High polymer material property prediction method and system based on sequence model
By using a sequence model-based method in the prediction of polymer material properties, considering the characteristics of sequence data and repeat units in polymer files, the problem of neglecting important factors in the prior art has been solved, and a higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202411800869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-09
AI Technical Summary
When using neural networks to predict the polymer glass transition temperature, the prior art uses only the polymer monomer SMILES as its characteristic, and ignores factors such as the connection method and polymerization degree between repeating units, resulting in inaccurate prediction results.
A method for predicting properties of polymer materials based on sequence models is proposed. By reading the sequence data in polymer files, splicing them with repeating units, performing word segmentation, computing embedded features, and inputting the sequence model to obtain the properties prediction results.
By considering multi-dimensional sequence data and special sequence word segmentation thesaurus, the embedded characteristics of polymer sequences can be more efficiently calculated and characterized, significantly improving the accuracy of prediction of polymer material properties.
Smart Images

Figure CN119943222A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of polymer technology, and in particular to a method and system for predicting polymer material properties based on a sequence model. Background Art
[0002] Polymers are usually composed of a large number of repeating units, and their structure and properties are more complex than those of small molecules. This complexity makes it more difficult to predict the properties of polymers because more factors need to be considered, such as the structure of the repeating units, the distribution of the repeating units, the length of the molecular chain, the interaction between molecules, etc. In order to obtain ideal polymer materials, a large number of experiments are usually required to verify the properties of polymer materials, so a lot of manpower, material resources and time are required.
[0003] In recent years, the development of artificial intelligence technology is driven by big data. Based on high-quality data sets, neural network models are used to fit the relationship between property characteristics and molecular structure to achieve the purpose of predicting properties. Neural networks usually have multiple layers, which can better fit different nonlinear models. Compared with theoretical formulas, they have stronger generalization ability and higher accuracy, and the prediction speed is also greatly improved.
[0004] However, predicting the properties of polymers is a complex task. There are many factors that affect the properties of polymers, and various factors will significantly affect the properties of polymers. In previous technologies, neural networks were used to predict the glass transition temperature of polymers. The training process of the temperature prediction model specifically included: using the polymer name, polymer monomer SMILES string and glass transition temperature collected from the database as data set samples. This method only uses the polymer monomer SMILES as a feature, ignoring other factors that more significantly affect the properties, such as the connection method between repeating units and the degree of polymerization, making it difficult to accurately predict the results. Summary of the invention
[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for predicting polymer material properties based on a sequence model with high accuracy.
[0006] To achieve the above-mentioned purpose, one aspect of an embodiment of the present application proposes a method for predicting polymer material properties based on a sequence model, comprising the following steps:
[0007] Reading sequence data in a macromolecular file to be predicted, wherein the macromolecular file to be predicted includes at least one repeating unit;
[0008] splicing the sequence data with the repeating unit to obtain a polymer sequence;
[0009] Segmenting the polymer sequence using a preset sequence segmentation word library to obtain a plurality of sequence segmentations;
[0010] Calculating the embedding features of each of the sequence segmentations, and then inputting the embedding features into a preset sequence model to obtain sequence features;
[0011] The sequence features are input into a preset regression network layer to obtain a prediction result of the polymer material property.
[0012] In some embodiments, the sequence data includes a PSMILES string, degree of polymerization, monomer ratio, and properties of each of the repeating units.
[0013] In some embodiments, the step of splicing the sequence data with the repeating unit to obtain a polymer sequence specifically includes:
[0014] Express each of the repeating units by using the PSMILES string;
[0015] The corresponding degree of polymerization, monomer proportion and property are added after the PSMILES character string of each repeating unit by preset symbols, and then the position of each repeating unit is transposed to obtain the polymer sequence.
[0016] In some embodiments, the calculating of the embedding features of each of the sequence segmentations specifically includes:
[0017] Adding a preset tag before the polymer sequence;
[0018] Performing word embedding processing on each of the sequence participles to obtain a feature embedding vector corresponding to each of the sequence participles;
[0019] Obtaining a position embedding vector according to the position of each of the sequence segmentations in the polymer sequence;
[0020] Classifying the sequence segmentations in different repeating units to obtain type embedding vectors;
[0021] The feature embedding vector, the position embedding vector, and the type embedding vector are added to obtain the embedded feature.
[0022] In some embodiments, the sequence model includes multiple attention mechanism network layers, and the embedding feature is input into a preset sequence model to obtain the sequence feature, specifically including:
[0023] Input the embedded features into each of the attention mechanism network layers, perform weight calculations according to the preset first matrix, second matrix, and third matrix, and output multiple feature vectors;
[0024] Multiple feature vectors are concatenated to obtain the sequence feature.
[0025] In some embodiments, the embedding features are input into each of the attention mechanism network layers, weight calculation is performed according to the preset first matrix, second matrix and third matrix, and multiple feature vectors are output, specifically including:
[0026] Multiplying the embedding feature corresponding to the current sequence segmentation by the first matrix to obtain a query vector;
[0027] Multiplying the embedding feature corresponding to each of the sequence segmentations in the polymer sequence by the second matrix respectively to obtain a key vector set;
[0028] Multiplying the query vector and the key vector set to obtain an attention weight;
[0029] Multiplying the embedding feature corresponding to the current sequence segmentation by the third matrix to obtain a value vector;
[0030] The value vector is multiplied by the attention weight to obtain the feature vector.
[0031] In some embodiments, the step of inputting the sequence features into a preset regression network layer to obtain a prediction result of polymer material properties specifically includes:
[0032] Inputting the sequence features corresponding to the preset markers into the regression network layer to obtain multidimensional values;
[0033] The target task type is determined, and the multidimensional numerical value is post-processed according to the target task type to obtain the prediction result of the polymer material property.
[0034] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a polymer material property prediction system based on a sequence model, comprising:
[0035] A sequence data reading module, used for reading sequence data in a macromolecular file to be predicted, wherein the macromolecular file to be predicted includes at least one repeating unit;
[0036] A repeating unit splicing module, used for splicing the sequence data with the repeating unit to obtain a macromolecular sequence;
[0037] A polymer sequence segmentation module is used to segment the polymer sequence using a preset sequence segmentation vocabulary to obtain a plurality of sequence segmentations;
[0038] A sequence feature acquisition module, used to calculate the embedding features of each of the sequence segmentations, and then input the embedding features into a preset sequence model to obtain sequence features;
[0039] The property prediction module is used to input the sequence features into a preset regression network layer to obtain the prediction results of the polymer material properties.
[0040] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the method for predicting polymer material properties based on the sequence model as described above is realized.
[0041] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the polymer material property prediction method based on the sequence model as described above.
[0042] The beneficial effects of the present invention are as follows: the polymer material property prediction method and system based on the sequence model of the present invention first reads the sequence data in the polymer file to be predicted, splices the sequence data with the repeating unit to obtain the polymer sequence, then segmentes the polymer sequence through a preset sequence segmentation vocabulary to obtain multiple sequence segmentations, and then calculates the embedded features of each sequence segmentation, and inputs the embedded features into a preset sequence model to obtain sequence features, and finally inputs the sequence features into a preset regression network layer to obtain the polymer material property prediction result. The present invention is based on multi-dimensional sequence data, segments the polymer sequence through a special sequence segmentation vocabulary, and obtains the sequence features of each sequence segmentation through a sequence model, which can more effectively calculate and characterize the embedded features of each sequence segmentation, greatly improving the accuracy of polymer material property prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solution in the embodiments of the present invention, the following introduction is made to the drawings required for use in the embodiments of the present invention. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solution of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0044] Figure 1 A flowchart of a method for predicting polymer material properties based on a sequence model provided by an embodiment of the present invention;
[0045] Figure 2 A flow chart of steps for splicing repeating units provided in an embodiment of the present invention;
[0046] Figure 3 An example diagram of a polymer sequence provided by an embodiment of the present invention;
[0047] Figure 4 A flowchart of the steps of calculating sequence features provided by an embodiment of the present invention;
[0048] Figure 5 A flow chart of steps for predicting the properties of polymer materials provided by an embodiment of the present invention;
[0049] Figure 6 A processing flow chart of a method for predicting polymer material properties based on a sequence model provided in an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of a repeating unit of a polymer sequence of Example 1 provided in an embodiment of the present invention;
[0051] Figure 8 A schematic diagram of a refractive index prediction result provided by an embodiment of the present invention;
[0052] Fig. 9 A schematic diagram of a repeating unit of a polymer sequence of Example 2 provided in an embodiment of the present invention;
[0053] Fig.10 A schematic diagram of glass transition temperature prediction results provided by an embodiment of the present invention;
[0054] Fig.11 A schematic diagram of a repeating unit of a polymer sequence of Example 3 provided in an embodiment of the present invention;
[0055] Fig.12 A schematic diagram of conductivity prediction results provided by an embodiment of the present invention;
[0056] Fig.13 A schematic diagram of the structure of a polymer material property prediction system based on a sequence model provided in an embodiment of the present invention;
[0057] Fig.14 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0059] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0060] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0061] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0062] Macromolecule: Macromolecule is also called high molecular weight polymer, generally refers to the relative molecular weight of the compound as high as thousands to millions, most macromolecular compounds are mixtures of many homologues with different relative molecular weights, so the relative molecular weight of macromolecular compounds is the average relative molecular weight. Macromolecular compounds are composed of thousands of atoms connected by covalent bonds. Although their relative molecular weight is large, they are connected in a simple structural unit and repeated way.
[0063] Sequence model: A sequence model is a model that uses neural networks to process sequence data. In a sequence model, the input and output are in sequence form, such as time series, text sequence, etc. Such as Transformer, BERT, GPT, etc. These models have achieved remarkable results in natural language processing, speech recognition, time series prediction and other fields.
[0064] Pre-trained model: A pre-trained model is a machine learning model that is pre-trained using large-scale datasets. During the pre-training process, the model learns rich feature representations that can be used for a variety of different tasks. A pre-trained model is a model that has been trained and can be used for a specific task. These models can learn complex features and patterns after a large amount of training data. Pre-trained models include BERT, GPT-3, and ResNet, which are widely used in different fields and have achieved good results.
[0065] Sequence Segmentation Thesaurus: Sequence segmentation thesaurus is a thesaurus resource used for word segmentation operations based on sequence models. Unlike traditional dictionary-based word segmentation methods, it is no longer a simple list of words, but a data resource closely related to the model training and learning process. The thesaurus usually includes a large amount of text data, which is used to train the model to learn the contextual information and word boundaries of word segmentation. Although it is different from traditional dictionaries, the quality and scale of the thesaurus still have an important impact on the word segmentation performance. In the field of chemistry, element symbols such as Na (sodium), Li (lithium), Fe (iron), etc. are usually recognized as separate words or tokens.
[0066] Embedding vector: refers to using a low-dimensional dense vector to "represent" an object. This vector can express certain features of the corresponding object, and the distance between vectors can also reflect the similarity between objects. In natural language processing, embedding usually refers to embedding words or phrases into vector space so that computers can count and compare them. In deep learning, the role of embedding can convert high-dimensional sparse features into a low-dimensional dense vector, thereby improving the generalization performance of the model.
[0067] Polymer degree of polymerization: Polymer degree of polymerization refers to the number of repeating units in a polymer compound. It reflects the correlation between the molecular weight and chain structure of a polymer compound and is one of the important parameters for measuring the properties of a polymer compound. The degree of polymerization directly affects the physical and chemical properties of a polymer compound, such as solubility, melting point, elasticity, strength, etc. In the synthesis, characterization and application of polymer compounds, the degree of polymerization is a key indicator and has important theoretical and application value.
[0068] Polymer properties: Polymer properties include many aspects, such as electrical properties, glass transition temperature, etc. The glass transition temperature of a polymer usually refers to the temperature at which the polymer changes from a glassy state to a highly elastic state. Below the glass transition temperature, the polymer is in a glassy state, and neither the molecular chains nor the chain segments can move, but the atoms (or groups) that make up the molecules vibrate at their equilibrium positions; at the glass transition temperature, the specific heat capacity, thermal expansion coefficient, viscosity, refractive index, free volume, and elastic modulus of the polymer will undergo a sudden change.
[0069] Polymers are usually composed of a large number of repeating units, and their structure and properties are more complex than those of small molecules. This complexity makes it more difficult to predict the properties of polymers because more factors need to be considered, such as the structure of the repeating units, the distribution of the repeating units, the length of the molecular chain, the interaction between molecules, etc. In order to obtain ideal polymer materials, a large number of experiments are usually required to verify the properties of polymer materials, so a lot of manpower, material resources and time are required.
[0070] In recent years, the development of artificial intelligence technology is driven by big data. Based on high-quality data sets, neural network models are used to fit the relationship between property characteristics and molecular structure to achieve the purpose of predicting properties. Neural networks usually have multiple layers, which can better fit different nonlinear models. Compared with theoretical formulas, they have stronger generalization ability and higher accuracy, and the prediction speed is also greatly improved.
[0071] However, predicting the properties of polymers is a complex task. There are many factors that affect the properties of polymers, and various factors will significantly affect the properties of polymers. In previous technologies, neural networks were used to predict the glass transition temperature of polymers. The training process of the temperature prediction model specifically included: using the polymer name, polymer monomer SMILES string and glass transition temperature collected from the database as data set samples. This method only uses the polymer monomer SMILES as a feature, ignoring other factors that more significantly affect the properties, such as the connection method between repeating units and the degree of polymerization, making it difficult to accurately predict the results.
[0072] To this end, an embodiment of the present invention proposes a method for predicting the properties of polymer materials based on a sequence model. First, the sequence data in the polymer file to be predicted is read, the sequence data is spliced with a repeating unit to obtain a polymer sequence, and then the polymer sequence is segmented through a preset sequence segmentation vocabulary to obtain multiple sequence segmentations, and then the embedded features of each sequence segmentation are calculated, and the embedded features are input into a preset sequence model to obtain sequence features, and finally the sequence features are input into a preset regression network layer to obtain a prediction result of the polymer material properties. The present invention is based on multi-dimensional sequence data, and the polymer sequence is segmented through a special sequence segmentation vocabulary, and the sequence features of each sequence segmentation are obtained through a sequence model. It can more effectively calculate and characterize the embedded features of each sequence segmentation, greatly improving the accuracy of polymer material property prediction. The polymer material property prediction method can be applied to scenes such as material research and development, material modification, material recycling, and environmental risk assessment, but is not limited to this.
[0073] Reference Figure 1 , Figure 1 The present invention provides a flow chart of the steps of a method for predicting the properties of polymer materials based on a sequence model. The present invention provides a method for predicting the properties of polymer materials based on a sequence model, and the method includes steps S101 to S105:
[0074] S101, reading sequence data in a polymer file to be predicted, where the polymer file to be predicted includes at least one repeating unit;
[0075] As a further optional embodiment, the sequence data includes the PSMILES string, degree of polymerization, monomer ratio and properties of each repeating unit.
[0076] In some optional embodiments, the sequence data in the polymer file to be predicted is first read, and the sequence data includes but is not limited to the PSMILES string of each repeating unit, the degree of polymerization, the monomer ratio and the properties of each repeating unit, wherein the properties include the charge properties, glass transition temperature, conductivity, etc. of the polymer.
[0077] S102, splicing the sequence data with the repeating unit to obtain a polymer sequence;
[0078] Reference Figure 2 , Figure 2 A flowchart of a step of splicing repeating units provided in an embodiment of the present invention, further as an optional implementation, the step of splicing sequence data with repeating units to obtain a polymer sequence can be specifically divided into the following steps S1021 to S1023:
[0079] S1021. Express each repeating unit through a PSMILES string;
[0080] Specifically, a polymer is usually composed of one or more repeating units, and each repeating unit is expressed using a PSMILES string, for example: *OC(*)=O. Furthermore, in order to improve the generalization ability of the sequence model, the PSMILES strings corresponding to each repeating unit are data enhanced. Exemplarily, after enhancing the PSMILES string *OC(*)=O, we can get: O(C(*)=O)*, C(*)(=O)O*, *C(=O)O*, O=C(O*)*. These PSMILES strings represent the same substance, but with different sequences.
[0081] S1022. Add the corresponding degree of polymerization, monomer ratio and properties after the PSMILES string of each repeating unit by using preset symbols, and then transpose each repeating unit to obtain a polymer sequence.
[0082] Specifically, the parameters that affect the properties of polymers include not only the monomers of the repeating units, but also the attributes and properties contained in each monomer, such as the proportion of the monomers; in addition, the degree of polymerization of the polymer also affects the properties, so when characterizing a polymer sequence, the PSMILES string of each monomer is added with properties such as proportion data, and separated by the preset symbol "$", and then the information of each repeating unit is connected in series, and the degree of polymerization of the polymer is added, and separated by the preset symbol "$$", forming the entire polymer sequence, such as Figure 3 Shown is an example diagram of a polymer sequence.
[0083] S103, segmenting the polymer sequence using a preset sequence segmentation vocabulary to obtain a plurality of sequence segmentations;
[0084] In some optional embodiments, for polymer sequences, on the basis of basic chemical element symbols (such as C, O, N, P, S, etc.), *, $, $$, (), =, #, [], @, @@, etc. are added to construct a sequence segmentation vocabulary of the polymer sequence. "*" is used to represent the repeating unit of the polymer, "=" is used to represent a double bond, "#" is used to represent a triple bond, "()" is used to represent a branched structure, "[]" is used to represent an ion or a ligand, "@" is used to represent clockwise chirality, and "@@" is used to represent counterclockwise chirality. "$" is used to separate the properties between monomers. "$$" is used to separate each monomer and degree of polymerization to obtain a sequence segmentation vocabulary corresponding to the polymer sequence.
[0085] S104, calculating the embedding features of each sequence word segment, and then inputting the embedding features into a preset sequence model to obtain sequence features;
[0086] Reference Figure 4 , Figure 4A flowchart of the steps of calculating the sequence features provided in the embodiment of the present invention, further as an optional implementation, the step of calculating the embedding features of each sequence segmentation word can be specifically divided into the following steps S1041 to S1045:
[0087] S1041, adding a preset tag before the polymer sequence;
[0088] Specifically, add a custom preset marker before the polymer sequence <cls>, to characterize the entire sequence feature information and to predict sequence-related properties.
[0089] S1042, performing word embedding processing on each sequence word to obtain a feature embedding vector corresponding to each sequence word;
[0090] In some optional embodiments, after the macromolecular sequence is segmented, the feature embedding vector (i.e., feature embedding vector) corresponding to each sequence segmentation is obtained through word embedding. Specifically, the embodiment of the present invention uses the Mask Language Model method to perform pre-training processing on a data set of tens of millions of molecular SMILES based on a pre-training model (the BERT model can be selected). The potential relationship between the training segmentation and the segmentation is finally obtained to obtain the feature embedding vector of the segmentation.
[0091] S1043, obtaining a position embedding vector according to the position of each sequence segmentation word in the polymer sequence;
[0092] It should be noted that each sequence word in the polymer sequence has a corresponding position, and the position embedding vector (i.e., position embedding vector) corresponding to the sequence word is obtained. In the sequence model, the same word may have different meanings in different positions. Therefore, on the basis of the feature embedding vector, the position embedding vector is added to better express the characteristics of the word.
[0093] Specifically, the embodiment of the present invention calculates by combining sine and cosine functions. For the d-dimensional Embedding vector, sine and cosine are used alternately to generate. For the even dimension 2*i, the sine function is used: sin(pos / 10000 2id ); for odd position dimensions, the cosine function is used: cos(pos / 10000 2id ), where pos represents the position of the sequence segmentation in the polymer sequence, i represents the dimension number, and d represents the dimension of Embedding.
[0094] S1044, classify the sequence segmentations in different repeating units to obtain type embedding vectors;
[0095] It should be noted that each repeating unit in the polymer sequence is encoded, and different repeating units are set with different type Embedding vectors (i.e., type embedding vectors). Since polymers are formed into multiple repeating units by polymerization reactions of different small molecules, some small molecules may undergo polymerization reactions with themselves or other small molecules, which may produce a variety of different arrangements, resulting in different final properties. Therefore, the embodiment of the present invention assigns a unique Embedding vector as a type Embedding vector to each repeating unit, and different types are used to distinguish information such as the main reactants and excess.
[0096] S1045. Add the feature embedding vector, the position embedding vector, and the type embedding vector to obtain an embedded feature.
[0097] Specifically, the feature Embedding vector, the position Embedding vector, and the type Embedding vector are added to obtain the Embedding vector of the sequence (i.e., the embedded feature).
[0098] As an optional implementation, the sequence model includes multiple attention mechanism network layers, and the step of inputting the embedded features into the preset sequence model to obtain the sequence features can be specifically divided into the following steps S1046 and S1047:
[0099] S1046, input the embedded features into each attention mechanism network layer, perform weight calculation according to the preset first matrix, second matrix and third matrix, and output multiple feature vectors;
[0100] S1047. Concatenate multiple feature vectors to obtain sequence features.
[0101] Specifically, the embedded features are input into the sequence model. For each embedded feature in the sequence, three matrices are used to calculate the weights, namely the first matrix Q, the second matrix K, and the third matrix V. These three matrices are all learnable parameters. Each set of output feature vectors is concatenated and connected to the fully connected layer to output the sequence features of the current layer.
[0102] As an optional implementation, the embedded features are input into each attention mechanism network layer, weight calculation is performed according to the preset first matrix, second matrix and third matrix, and a plurality of feature vectors are output. Specifically, the step can be divided into the following steps S10461 to S10465:
[0103] S10461, multiplying the embedding feature corresponding to the current sequence segmentation by the first matrix to obtain a query vector;
[0104] S10462, respectively multiplying the embedding features corresponding to each sequence segmentation in the polymer sequence by the second matrix to obtain a key vector set;
[0105] S10463, multiplying the query vector and the key vector set to obtain an attention weight;
[0106] S10464, multiplying the embedding feature corresponding to the current sequence segmentation by the third matrix to obtain a value vector;
[0107] S10465. Multiply the value vector by the attention weight to obtain a feature vector.
[0108] Specifically, first use the Embedding feature (i.e., embedding feature) of the current sequence segmentation to multiply the first matrix Q to obtain the query vector q, then multiply each sequence segmentation in the polymer sequence by the second matrix K to obtain the key vector set k, and then multiply the query vector q by the key vector set k to obtain the attention weight qk of the current sequence segmentation and each sequence segmentation in the polymer sequence. Next, multiply the current sequence segmentation by the third matrix V to obtain the value vector v, and then multiply the value vector v by the attention weight qk to obtain the feature (i.e., feature vector) of the sequence segmentation. The feature vector contains the attention weight of each sequence segmentation and each sequence segmentation in the polymer sequence. In order to make the attention mechanism perform better in complex data, multiple groups of the first matrix Q, the second matrix K, and the third matrix V can be added at the same time. After splicing, each group of output feature vectors is connected to the fully connected layer to output the sequence features of the current layer. The above process constitutes an attention mechanism network layer. In order to make the data fit better, multiple attention mechanism network layers are constructed in the embodiment of the present invention.
[0109] Exemplarily, 6 attention mechanism network layers are used for encoding, and the sequence features of each sequence segmentation are output. There are many types of polymer property prediction types. In order to be applicable to different prediction tasks, the embodiment of the present invention adds a preset tag before the sequence. <cls> , <cls>The Embedding vector will further learn the global information related to the task. As the representative vector of the entire text sequence, it helps to improve the accuracy of text classification and enhance the versatility and flexibility of the model.
[0110] S105, inputting the sequence features into a preset regression network layer to obtain the prediction results of the polymer material properties.
[0111] Reference Figure 5 , Figure 5 A flowchart of a step for predicting the properties of polymer materials provided in an embodiment of the present invention, further as an optional implementation, the step of inputting sequence features into a preset regression network layer to obtain the prediction result of the properties of polymer materials can be specifically divided into the following steps S1051 and S1052:
[0112] S1051, inputting the sequence features corresponding to the preset tags into the regression network layer to obtain multi-dimensional values;
[0113] S1052. Determine the target task type, and post-process the multidimensional numerical values according to the target task type to obtain the prediction results of the polymer material properties.
[0114] Specifically, the first <cls>The sequence features are input into the regression network layer. The regression network layer consists of a multi-layer fully connected network (Liner layer, Dropout layer, Normal layer and activation function ReLU), which is used to fit the relationship between sequence features and polymer properties. <cls>The vector focuses on the global information of the entire sequence. In multiple Encoder layers, the multi-head attention mechanism is used to obtain <cls>The vector has a potential relationship with each word in the entire sequence, and then uses <cls>Vector fitting polymer properties, with the change of gradient in the training stage, the difference between the predicted value of the regression network and the true value is minimized, and finally converges to a relatively appropriate loss value. During the entire training process, the learnable parameters include the first matrix Q, the second matrix K, and the third matrix V of each attention mechanism network layer in addition to the regression network layer. The regression network layer can be used for classification tasks or regression tasks, and make corresponding predictions based on the determined target task type.
[0115] For example, a classification task such as glass transition temperature prediction is performed by classifying according to temperature range. At this time, the regression network layer is an N-class classification task. The output N-dimensional data is Softmaxed to obtain the probability of each classification, and the highest probability is taken to obtain the glass transition temperature prediction result.
[0116] Regression tasks include conductivity prediction, refractive index prediction, etc. Conductivity prediction: Assuming that the data distribution of the conductivity of the existing data set is [a, b], calculate the mean and variance based on the entire data set, and then normalize the mean and variance to [0, 1]. Standardize the 1-dimensional value output by the regression network layer to [0, 1], and then calculate the final value through the mean and variance to obtain the conductivity prediction result.
[0117] In summary, the processing process of the polymer material property prediction method based on the sequence model is as follows: Figure 6 As shown:
[0118] The first step is to read the sequence data in the polymer file, including but not limited to the PSMILES strings of multiple repeating units, the degree of polymerization, the proportion of each repeating unit, the properties of the repeating units, etc.;
[0119] The second step is to splice the information of multiple repeating units into a new polymer sequence, and then use a specific sequence segmentation vocabulary to segment the sequence;
[0120] Step 3: Use the pre-trained model to calculate the embedding features of each word segment and add a preset tag before the sequence;
[0121] Step 4: Input the embedding features into the sequence model, and output the sequence features through multiple attention mechanism network layers in the sequence model;
[0122] Step 5: Input the sequence features into the regression network layer to obtain the output results of the regression network layer, and then perform post-processing based on the output results to obtain the prediction results of the polymer properties.
[0123] The above is an explanation of the polymer material property prediction method based on the sequence model of the embodiment of the present invention. It can be recognized that, compared with the polymer material property prediction in the prior art, the embodiment of the present invention first reads the sequence data in the polymer file to be predicted, splices the sequence data with the repeating unit to obtain the polymer sequence, then segments the polymer sequence through a preset sequence segmentation vocabulary to obtain multiple sequence segmentations, and then calculates the embedded features of each sequence segmentation, and inputs the embedded features into the preset sequence model to obtain sequence features, and finally inputs the sequence features into the preset regression network layer to obtain the polymer material property prediction results. The present invention is based on multi-dimensional sequence data, segments the polymer sequence through a special sequence segmentation vocabulary, and obtains the sequence features of each sequence segmentation through a sequence model, which can more effectively calculate and characterize the embedded features of each sequence segmentation, greatly improving the accuracy of polymer material property prediction.
[0124] In order to further verify the accuracy of the embodiment of the present invention, the effect of the embodiment of the present invention is further described below in conjunction with a specific polymer property prediction example.
[0125] Example 1: Refractive index prediction. Example 1 The repeating unit of the polymer sequence is Figure 7 As shown in , its PSMILES string is [*]c3ccc(Sc2ccc(Sc1ccc([*])cc1)cc2)cc3, the degree of polymerization is 2000, and the true refractive index is 1.75. The PSMILES string and degree of polymerization are input into the regression network layer, as shown in Figure 8 The figure shows the refractive index prediction results. Figure 8 It can be seen that the refractive index predicted by the embodiment of the present invention is 1.7139, which is close to the actual refractive index value.
[0126] Example 2: Prediction of glass transition temperature. Example 2 The repeating unit of the polymer sequence is Fig. 9 As shown in , its PSMILES string is [*]c5ccc(Sc4c1SCCSc1c(Sc2ccc([*])cc2)c3SCCSc34)cc5, the degree of polymerization is 1600, and the true glass transition temperature is 447 degrees Celsius. The PSMILES string and degree of polymerization are input into the regression network layer, as shown in Fig.10 The figure shows the schematic diagram of the glass transition temperature prediction results. Fig.10 It can be seen that the glass transition temperature predicted by the embodiment of the present invention is 400-450 degrees Celsius, including the actual glass transition temperature value.
[0127] Example 3: Electrical conductivity prediction. Example 3 The repeating unit of the polymer sequence is Fig.11 As shown in the figure, its PSMILES string is *C(F)(F)C(*)(F)C(F)(F)F.*CC(*)(F)F, the degree of polymerization is 1000, and the true conductivity is -2.6575S / cm. The PSMILES string and degree of polymerization are input into the regression network layer, as shown in Fig.12 The diagram shows the conductivity prediction results. Fig.12 It can be seen that the conductivity predicted by the embodiment of the present invention is -2.5808 degrees Celsius S / cm, which is close to the actual conductivity value.
[0128] Reference Fig.13 The embodiment of the present invention further provides a polymer material property prediction system based on a sequence model, comprising:
[0129] A sequence data reading module is used to read sequence data in a polymer file to be predicted, wherein the polymer file to be predicted includes at least one repeating unit;
[0130] Repeating unit splicing module, used to splice sequence data with repeating units to obtain polymer sequences;
[0131] A polymer sequence segmentation module is used to segment the polymer sequence using a preset sequence segmentation vocabulary to obtain multiple sequence segmentations;
[0132] The sequence feature acquisition module is used to calculate the embedding features of each sequence word segmentation, and then input the embedded features into the preset sequence model to obtain the sequence features;
[0133] The property prediction module is used to input sequence features into the preset regression network layer to obtain the prediction results of polymer material properties.
[0134] The contents of the above-mentioned embodiments of the polymer material property prediction method based on a sequence model are all applicable to the embodiments of the polymer material property prediction system based on a sequence model. The functions specifically implemented by the embodiments of the polymer material property prediction system based on a sequence model are the same as those of the above-mentioned embodiments of the polymer material property prediction method based on a sequence model, and the beneficial effects achieved are also the same as those achieved by the above-mentioned embodiments of the polymer material property prediction method based on a sequence model.
[0135] The embodiment of the present invention also provides an electronic device, which includes: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and when the program is executed by the processor, the above-mentioned polymer material property prediction method based on the sequence model is realized. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0136] like Fig.14 FIG. 1 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention, referring to FIG. Fig.14 , an embodiment of the present invention provides an electronic device, including:
[0137] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0138] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the polymer material property prediction method based on the sequence model of the embodiment of the present invention;
[0139] Input / output interface 1003, used to implement information input and output;
[0140] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0141] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );
[0142] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .
[0143] An embodiment of the present invention also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned sequence model-based polymer material property prediction method.
[0144] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0145] The embodiment of the present invention also discloses a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes Figure 1 The method shown.
[0146] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the above-mentioned boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.
[0147] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified to the contrary, one or more of the above-mentioned functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0148] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the above methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0149] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, apparatus or device and execute the instructions), or in conjunction with such instruction execution system, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, apparatus or device, or in conjunction with such instruction execution system, apparatus or device.
[0150] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0151] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
[0152] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.< / cls> < / cls> < / cls> < / cls> < / cls> < / cls> < / cls>
Claims
1. A method for predicting polymer material properties based on a sequence model, characterized in that: The following steps are involved: Reading sequence data in a macromolecular file to be predicted, wherein the macromolecular file to be predicted includes at least one repeating unit; splicing the sequence data with the repeating unit to obtain a polymer sequence; Segmenting the polymer sequence using a preset sequence segmentation word library to obtain a plurality of sequence segmentations; Calculating the embedding features of each of the sequence segmentations, and then inputting the embedding features into a preset sequence model to obtain sequence features; The sequence features are input into a preset regression network layer to obtain the prediction results of polymer material properties.
2. The method for predicting polymer material properties based on a sequence model according to claim 1, characterized in that: The sequence data includes the PSMILES string, degree of polymerization, monomer ratio and properties of each repeating unit.
3. The method for predicting polymer material properties based on a sequence model according to claim 2, characterized in that: The step of splicing the sequence data with the repeating unit to obtain a polymer sequence specifically includes: Express each of the repeating units by using the PSMILES string; The corresponding degree of polymerization, monomer proportion and property are added after the PSMILES character string of each repeating unit by preset symbols, and then the position of each repeating unit is transposed to obtain the polymer sequence.
4. The method for predicting polymer material properties based on a sequence model according to claim 1, characterized in that: The calculating of the embedding features of each of the sequence segmentations specifically includes: Adding a preset tag before the polymer sequence; Performing word embedding processing on each of the sequence participles to obtain a feature embedding vector corresponding to each of the sequence participles; Obtaining a position embedding vector according to the position of each of the sequence segmentations in the polymer sequence; Classifying the sequence segmentations in different repeating units to obtain type embedding vectors; The feature embedding vector, the position embedding vector, and the type embedding vector are added to obtain the embedded feature.
5. The method for predicting polymer material properties based on a sequence model according to claim 1, characterized in that: The sequence model includes multiple attention mechanism network layers, and the embedding feature is input into a preset sequence model to obtain the sequence feature, specifically including: Input the embedded features into each of the attention mechanism network layers, perform weight calculations according to the preset first matrix, second matrix, and third matrix, and output multiple feature vectors; Multiple feature vectors are concatenated to obtain the sequence feature.
6. The method for predicting polymer material properties based on a sequence model according to claim 5, characterized in that: The step of inputting the embedded features into each of the attention mechanism network layers, performing weight calculation according to the preset first matrix, second matrix and third matrix, and outputting a plurality of feature vectors specifically includes: Multiplying the embedding feature corresponding to the current sequence segmentation by the first matrix to obtain a query vector; Multiplying the embedding feature corresponding to each of the sequence segmentations in the polymer sequence by the second matrix respectively to obtain a key vector set; Multiplying the query vector and the key vector set to obtain an attention weight; Multiplying the embedding feature corresponding to the current sequence segmentation by the third matrix to obtain a value vector; The value vector is multiplied by the attention weight to obtain the feature vector.
7. The method for predicting polymer material properties based on a sequence model according to claim 4, characterized in that: The step of inputting the sequence features into a preset regression network layer to obtain a prediction result of polymer material properties specifically includes: Inputting the sequence features corresponding to the preset markers into the regression network layer to obtain multidimensional values; The target task type is determined, and the multidimensional numerical value is post-processed according to the target task type to obtain the prediction result of the polymer material property.
8. A polymer material property prediction system based on a sequence model, characterized in that: include: A sequence data reading module, used for reading sequence data in a macromolecular file to be predicted, wherein the macromolecular file to be predicted includes at least one repeating unit; A repeating unit splicing module, used for splicing the sequence data with the repeating unit to obtain a macromolecular sequence; A polymer sequence segmentation module is used to segment the polymer sequence using a preset sequence segmentation vocabulary to obtain a plurality of sequence segmentations; A sequence feature acquisition module, used to calculate the embedding features of each of the sequence segmentations, and then input the embedding features into a preset sequence model to obtain sequence features; The property prediction module is used to input the sequence features into a preset regression network layer to obtain the prediction results of the polymer material properties.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method for predicting polymer material properties based on a sequence model as described in any one of claims 1 to 7 are realized.
10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the polymer material property prediction method based on the sequence model as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Active polypeptide sequence generation method and device, equipment and storage medium
CN118800364A
Natural language processing to predict properties of proteins
US20240153590A1