A method and system for predicting polymer material properties based on sequence model
By splicing sequence data and word segmentation of polymer files, using sequence models and regression network layers for property prediction, the problem of ignoring the connection method and polymerization degree in the prior art is solved, and the properties of polymer materials are accurately predicted.
Patent Information
- Application Number
- CN202411800869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-09
AI Technical Summary
In the prediction of polymer material properties, the prior art ignores factors such as the connection method and polymerization degree between repeating units, resulting in inaccurate prediction results.
By reading the sequence data in polymer files, splicing and word segmentation, using the sequence word segmentation thesaurus to calculate the embedded features, and properties are predicted through the sequence model and regression network layer.
It improves the accuracy of prediction of polymer material properties, and can more effectively calculate and characterize the embedded characteristics of sequence word participles, greatly improving the accuracy of prediction results.
Smart Images

Figure CN119943222B_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 typically composed of numerous repeating units, resulting in more complex structures and properties than small molecules. This complexity complicates the prediction of polymer properties because more factors must be considered, such as the structure and distribution of the repeating units, the length of the molecular chain, and intermolecular interactions. To obtain the ideal polymer material, extensive experiments are typically required to verify its properties, requiring significant investment of manpower, material resources, and time.
[0003] In recent years, the development of artificial intelligence technology has been driven by big data. Based on high-quality datasets, neural network models are used to fit the relationship between property characteristics and molecular structure to achieve the goal of predicting properties. Neural networks typically have multiple layers and can effectively fit different nonlinear models. Compared with theoretical formulas, they have stronger generalization capabilities and higher accuracy, while also significantly improving prediction speed.
[0004] However, predicting polymer properties is a complex task, influenced by numerous factors, each of which can significantly impact polymer properties. Previous techniques used neural networks to predict the glass transition temperature of polymers. The training process for the temperature prediction model involved using the polymer name, monomer SMILES string, and glass transition temperature collected from a database as a sample dataset. This method only uses the monomer SMILES as features, ignoring other factors that more significantly influence properties, such as the connection between repeating units and the degree of polymerization, making accurate predictions difficult. Summary of the Invention
[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a highly accurate method and system for predicting polymer material properties based on a sequence model.
[0006] To achieve the above objectives, one aspect of an embodiment of the present application provides a method for predicting polymer material properties based on a sequence model, comprising the following steps:
[0007] Reading sequence data in a polymer file to be predicted, wherein the polymer 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 vocabulary 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 the prediction results of the polymer material properties.
[0012] In some embodiments, the sequence data includes the 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] Expressing each of the repeating units by the PSMILES string;
[0015] The corresponding degree of polymerization, monomer ratio 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 swapped to obtain the polymer sequence.
[0016] In some embodiments, calculating the embedding features of each of the sequence segmentations specifically includes:
[0017] Adding a preset tag before the polymer sequence;
[0018] Perform word embedding processing on each of the sequence segmentations to obtain a feature embedding vector corresponding to each of the sequence segmentations;
[0019] Obtaining a position embedding vector according to the position of each sequence segmentation word 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 inputting the embedded features into a preset sequence model to obtain sequence features specifically includes:
[0023] Input the embedded features into each of the attention mechanism network layers, perform weight calculations based on 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 sequence segmentation 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, 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] A target task type is determined, and the multidimensional numerical value is post-processed according to the target task type to obtain a prediction result of the polymer material property.
[0034] To achieve the above objectives, another aspect of the present application provides a polymer material property prediction system based on a sequence model, comprising:
[0035] A sequence data reading module is used to read 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 polymer sequence;
[0037] A polymer sequence segmentation module is used to segment the polymer sequence using a preset sequence segmentation vocabulary to obtain multiple sequence segmentations;
[0038] A sequence feature acquisition module is 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 on 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. 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 method and system for predicting polymer material properties based on a sequence model of the present invention first reads the sequence data in the polymer file to be predicted, splices the sequence data with repeating units to obtain a polymer sequence, then segments the polymer sequence through a preset sequence segmentation vocabulary to obtain multiple sequence segmentations, and then calculates the embedding features of each sequence segmentation, and inputs the embedding features into a preset sequence model to obtain sequence features, and finally inputs the sequence features into a preset regression network layer to obtain a 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 embedding 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 solutions 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 solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any 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 flowchart of the steps of 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 for calculating sequence features provided in an embodiment of the present invention;
[0048] Figure 5 A flowchart of a step for predicting polymer material properties 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 the refractive index prediction results provided by an embodiment of the present invention;
[0052] Figure 9 A schematic diagram of a repeating unit of a polymer sequence of Example 2 provided in an embodiment of the present invention;
[0053] Figure 10 A schematic diagram of the glass transition temperature prediction results provided by an embodiment of the present invention;
[0054] Figure 11 A schematic diagram of a repeating unit of a polymer sequence of Example 3 provided in an embodiment of the present invention;
[0055] Figure 12 A schematic diagram of conductivity prediction results provided by an embodiment of the present invention;
[0056] Figure 13 A schematic diagram of the structure of a polymer material property prediction system based on a sequence model provided by an embodiment of the present invention;
[0057] Figure 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 with reference to 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 merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0059] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments 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 may be interpreted as "at the time of" or "when" or "in response to determining".
[0060] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" in the context of the present invention, and "at least one" or "at least one" includes one, two or more, "plurality" or "any one" includes two or more, "each" or "each one" in the context of the present invention, and "any" or "any one
[0061] Before explaining the embodiments of the present application in detail, some of the nouns and terms involved in the embodiments of the present application are first explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0062] Macromolecules: Macromolecules, also known as high molecular polymers, generally refer to compounds with a relative molecular mass of several thousand to several million. Most macromolecules are mixtures of many homologues with different relative molecular masses. Therefore, the relative molecular mass of a macromolecule is the average relative molecular mass. Macromolecules are composed of thousands of atoms connected to each other by covalent bonds. Although their relative molecular mass is large, they are all connected in a simple structural unit and repeated manner.
[0063] Sequence models: Sequence models use neural networks to process sequential data. In sequence models, the input and output are in sequence form, such as time series or text sequences. Examples include Transformer, BERT, and GPT. These models have achieved remarkable results in fields such as natural language processing, speech recognition, and time series prediction.
[0064] Pretrained Models: Pretrained models are machine learning models that are pretrained using large-scale datasets. During pretraining, the model learns rich feature representations that can be applied to a variety of tasks. Pretrained models are pretrained for specific tasks. These models, after extensive training data, are able to learn complex features and patterns. Pretrained models include BERT, GPT-3, and ResNet, which have been widely used in various fields and have achieved excellent results.
[0065] Sequence Segmentation Lexicon: A sequence segmentation lexicon is a lexicon 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 lexicon typically includes a large amount of text data, which is used to train the model to learn the contextual information and word boundaries for word segmentation. Although it is different from a traditional dictionary, the quality and size of the lexicon still have a significant impact on word segmentation performance. In the field of chemistry, element symbols such as Na (sodium), Li (lithium), and Fe (iron) are usually recognized as separate words or tokens.
[0066] Embedding vectors: This refers to the use of a low-dimensional, dense vector to "represent" an object. This vector can express certain characteristics of the corresponding object, and the distance between vectors can also reflect the similarity between objects. In natural language processing, embedding generally refers to embedding words or phrases into a vector space so that computers can perform calculations and comparisons on them. In deep learning, embedding can transform high-dimensional, sparse features into a low-dimensional, dense vector, thereby improving model generalization performance.
[0067] Polymer Degree of Polymerization (DP): The DP refers to the number of repeating units in a polymer compound. It reflects the correlation between molecular weight and chain structure and is a key parameter for measuring polymer properties. The DP directly influences the physical and chemical properties of polymers, such as solubility, melting point, elasticity, and strength. It is a key indicator in the synthesis, characterization, and application of polymer compounds, possessing significant theoretical and practical value.
[0068] Polymer properties: Polymer properties encompass many aspects, such as electrical properties and glass transition temperature. The glass transition temperature (Tg) of a polymer generally refers to the temperature at which it transitions from a glassy state to a highly elastic state. Below the Tg, the polymer is in a glassy state, where neither the molecular chains nor the chain segments can move; only the atoms (or groups) that make up the molecule vibrate at their equilibrium positions. At the Tg, the polymer's specific heat capacity, thermal expansion coefficient, viscosity, refractive index, free volume, and elastic modulus undergo a sudden change.
[0069] Polymers are typically composed of numerous repeating units, resulting in more complex structures and properties than small molecules. This complexity complicates the prediction of polymer properties because more factors must be considered, such as the structure and distribution of the repeating units, the length of the molecular chain, and intermolecular interactions. To obtain the ideal polymer material, extensive experiments are typically required to verify its properties, requiring significant investment of manpower, material resources, and time.
[0070] In recent years, the development of artificial intelligence technology has been driven by big data. Based on high-quality datasets, neural network models are used to fit the relationship between property characteristics and molecular structure to achieve the goal of predicting properties. Neural networks typically have multiple layers and can effectively fit different nonlinear models. Compared with theoretical formulas, they have stronger generalization capabilities and higher accuracy, while also significantly improving prediction speed.
[0071] However, predicting polymer properties is a complex task, influenced by numerous factors, each of which can significantly impact polymer properties. Previous techniques used neural networks to predict the glass transition temperature of polymers. The training process for the temperature prediction model involved using the polymer name, monomer SMILES string, and glass transition temperature collected from a database as a sample dataset. This method only uses the monomer SMILES as features, ignoring other factors that more significantly influence properties, such as the connection between repeating units and the degree of polymerization, making accurate predictions difficult.
[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 by a preset sequence segmentation vocabulary to obtain a plurality of sequence segmentations, and then the embedding 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 the polymer material property prediction result. The present invention is based on multi-dimensional sequence data, and the polymer sequence is segmented by a special sequence segmentation vocabulary, and the sequence features of each sequence segmentation are obtained by a sequence model. It can more effectively calculate and characterize the embedding 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 thereto.
[0073] Reference Figure 1 , Figure 1 This is a flowchart of a method for predicting polymer material properties based on a sequence model provided by an embodiment of the present invention. The embodiment of the present invention provides a method for predicting polymer material properties 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 units 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 using 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. For example, after enhancing the PSMILES string *OC(*)=O, we can obtain: 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 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. Therefore, 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 "$". 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. Figure 3 Shown is an example diagram of a macromolecular sequence.
[0083] S103, segmenting the polymer sequence using a preset sequence segmentation vocabulary to obtain multiple 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 for polymer sequences. "*" 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 attributes 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: Calculate the embedding features of each sequence word segmentation, and then input the embedded features into a preset sequence model to obtain sequence features;
[0086] Reference Figure 4 , Figure 4A flowchart of the steps for calculating sequence features provided in an 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, add 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. Perform 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 polymer sequence is segmented, word embedding is used to obtain the corresponding feature embedding vector (i.e., feature embedding vector) for each sequence segmentation. Specifically, embodiments of the present invention use a pre-trained model (the BERT model can be used) on a dataset of tens of millions of molecular SMILES, using the Mask Language Model method for pre-training. The potential relationship between the training segmentations is then used to ultimately obtain the feature embedding vectors for the segmentations.
[0091] S1043. Obtain a position embedding vector according to the position of each sequence segmentation word in the polymer sequence;
[0092] It's important to note that each sequence word in a polymer sequence has a corresponding position, and we need to obtain the corresponding positional embedding vector (i.e., position embedding vector). In sequence models, the same word can convey different meanings at different positions. Therefore, adding the positional embedding vector to the feature embedding vector can better represent 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 reactant, excess, etc.
[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, position embedding vector, and type embedding vector are added together to obtain the embedding vector of the sequence (i.e., the embedding feature).
[0098] As an optional implementation, the sequence model includes multiple attention mechanism network layers. 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, weights are calculated according to the preset first matrix, second matrix, and third matrix, and multiple feature vectors are output. This step can be specifically divided into the following steps S10461 to S10465:
[0103] S10461. Multiply the embedding feature corresponding to the current sequence segmentation by the first matrix to obtain a query vector.
[0104] S10462. Multiply the embedding features corresponding to each sequence segmentation in the polymer sequence by the second matrix to obtain a key vector set;
[0105] S10463. Multiply the query vector and the key vector set to obtain the attention weight;
[0106] S10464. Multiply 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, the Embedding feature (i.e., the embedding feature) of the current sequence segmentation is multiplied by the first matrix Q to obtain the query vector q, and then each sequence segmentation in the polymer sequence is multiplied by the second matrix K to obtain the key vector set k, and then the query vector q is multiplied 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, the current sequence segmentation is multiplied by the third matrix V to obtain the value vector v, and then the value vector v is multiplied 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] For example, 6 attention mechanism network layers are used for encoding to output the sequence features of each sequence segmentation. 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 global information related to the task. As a 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. Input 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 polymer material properties provided in an embodiment of the present invention, further as an optional implementation, inputting sequence features into a preset regression network layer to obtain a polymer material property prediction result 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 multidimensional 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, through the multi-head attention mechanism, <cls>The vector has a potential relationship with each word in the entire sequence, and then uses <cls>Vectors are fitted to polymer properties. During the training phase, as the gradient changes, the difference between the regression network's predictions and the true values is minimized, ultimately converging to a relatively appropriate loss value. Throughout the training process, learnable parameters include not only the regression network layer but also the first matrix Q, the second matrix K, and the third matrix V of each attention mechanism network layer. The regression network layer can be used for either classification or regression tasks, making predictions based on the target task type.
[0115] For example, a classification task such as glass transition temperature prediction is performed by classifying according to temperature range. In this case, the regression network layer is an N-class classification task. The output N-dimensional data is Softmaxed to obtain the probability of each classification. The highest probability is taken to obtain the glass transition temperature prediction result.
[0116] Regression tasks include conductivity prediction and refractive index prediction. Conductivity prediction: Assuming the conductivity data distribution of the existing dataset is [a, b], calculate the mean and variance based on the entire dataset, then normalize the mean and variance to [0, 1]. Standardize the 1D value output by the regression network layer to [0, 1]. Then calculate the final value using the mean and variance to obtain the conductivity prediction result.
[0117] In summary, the process of polymer material property prediction method based on 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, and the properties of the repeating units;
[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] The third step is to use the pre-trained model to calculate the embedding features of each word 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 a plurality of sequence segmentations, and then calculates the embedding features of each sequence segmentation, and inputs the embedding 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 embedding features of each sequence segmentation, greatly improving the accuracy of polymer material property prediction.
[0124] To further verify the accuracy of the embodiment of the present invention, the effects of the embodiment of the present invention are further described below in conjunction with specific examples of polymer property prediction.
[0125] Example 1: Refractive index prediction. Example 1 The repeating unit of the polymer sequence is Figure 7 As shown, 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 the 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 Figure 9 As shown, 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 the degree of polymerization are input into the regression network layer, as shown in Figure 10 The figure shows the predicted results of glass transition temperature. Figure 10 It can be seen that the glass transition temperature predicted by the embodiment of the present invention is 400-450 degrees Celsius, which includes the actual glass transition temperature value.
[0127] Example 3: Conductivity prediction. Example 3 The repeating unit of the polymer sequence is Figure 11 As shown, 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 the degree of polymerization are input into the regression network layer, as shown Figure 12 The diagram shows the conductivity prediction results. Figure 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 Figure 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 macromolecular file to be predicted, wherein the macromolecular 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] The polymer sequence word segmentation module is used to segment the polymer sequence using a preset sequence word segmentation vocabulary to obtain multiple sequence word segments;
[0132] The sequence feature acquisition module is used to calculate the embedding features of each sequence segmentation word, 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 method for predicting the properties of polymer materials based on a sequence model are all applicable to the embodiments of the system for predicting the properties of polymer materials based on a sequence model. The functions specifically implemented by the embodiments of the system for predicting the properties of polymer materials based on a sequence model are the same as those of the above-mentioned embodiments of the method for predicting the properties of polymer materials based on a sequence model, and the beneficial effects achieved are also the same as those achieved by the above-mentioned embodiments of the method for predicting the properties of polymer materials based on a sequence model.
[0135] An embodiment of the present invention further provides an electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communicating between the processor and the memory. When the program is executed by the processor, the aforementioned sequence model-based polymer material property prediction method is implemented. The electronic device can be any intelligent terminal, including a tablet computer and an in-vehicle computer.
[0136] like Figure 14 FIG2 is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention, referring to FIG2 Figure 14 , an embodiment of the present invention provides an electronic device, including:
[0137] The processor 1001 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by 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 solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called by the processor 1001 to execute the polymer material property prediction method based on the sequence model according to the embodiment of the present invention.
[0139] Input / output interface 1003, used to implement information input and output;
[0140] Communication interface 1004, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0141] Bus 1005 , which transmits information between various components of the device (e.g., processor 1001 , memory 1002 , input / output interface 1003 , and 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 arranged 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 computer program, which includes computer instructions 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 performs Figure 1 The method shown.
[0146] In some optional 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 in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0147] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise stated, 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 separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the routine skills of an engineer. Therefore, a person skilled in the art can implement the present invention set forth in the claims using ordinary skills without undue experimentation. 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 and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute 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 code.
[0149] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0150] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0151] While 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 invention, and that the scope of the 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 can 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 polymer file to be predicted, wherein the polymer 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 vocabulary 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; Inputting the sequence features into a preset regression network layer to obtain a prediction result of the polymer material properties; The sequence data includes the PSMILES string, degree of polymerization, monomer ratio and properties of each repeating unit; The step of splicing the sequence data with the repeating unit to obtain a polymer sequence specifically includes: Expressing each of the repeating units by the PSMILES string; Add the corresponding degree of polymerization, monomer ratio, and property after the PSMILES string of each repeating unit by using preset symbols, and then transpose each repeating unit to obtain the polymer sequence; The calculation of the embedding features of each of the sequence segmentations specifically includes: Adding a preset tag before the polymer sequence; Perform word embedding processing on each of the sequence segmentations to obtain a feature embedding vector corresponding to each of the sequence segmentations; Obtaining a position embedding vector according to the position of each sequence segmentation word 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.
2. 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 features are input into the preset sequence model to obtain sequence features, specifically including: Input the embedded features into each of the attention mechanism network layers, perform weight calculations based on the preset first matrix, second matrix, and third matrix, and output multiple feature vectors; Multiple feature vectors are concatenated to obtain the sequence feature.
3. The method for predicting polymer material properties based on a sequence model according to claim 2, characterized in that: The step of inputting the embedded features into each of the attention mechanism network layers, performing weight calculations based on the preset first matrix, second matrix, and third matrix, and outputting multiple 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 sequence segmentation 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.
4. The method for predicting polymer material properties based on a sequence model according to claim 1, characterized in that: Inputting the sequence features into a preset regression network layer to obtain a prediction result of the polymer material properties specifically includes: Inputting the sequence features corresponding to the preset markers into the regression network layer to obtain multidimensional values; A target task type is determined, and the multidimensional numerical value is post-processed according to the target task type to obtain a prediction result of the polymer material property.
5. A polymer material property prediction system based on a sequence model, characterized in that: include: A sequence data reading module is used to read 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 polymer sequence; A polymer sequence segmentation module is used to segment the polymer sequence using a preset sequence segmentation vocabulary to obtain multiple sequence segmentations; A sequence feature acquisition module is 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; A property prediction module is used to input the sequence features into a preset regression network layer to obtain a prediction result of the polymer material properties; The sequence data includes the PSMILES string, degree of polymerization, monomer ratio and properties of each repeating unit; The step of splicing the sequence data with the repeating unit to obtain a polymer sequence specifically includes: Expressing each of the repeating units by the PSMILES string; Add the corresponding degree of polymerization, monomer ratio, and property after the PSMILES string of each repeating unit by using preset symbols, and then transpose each repeating unit to obtain the polymer sequence; The calculation of the embedding features of each of the sequence segmentations specifically includes: Adding a preset tag before the polymer sequence; Perform word embedding processing on each of the sequence segmentations to obtain a feature embedding vector corresponding to each of the sequence segmentations; Obtaining a position embedding vector according to the position of each sequence segmentation word 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.
6. 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 4 are realized.
7. A storage medium, wherein the storage medium is a computer-readable storage medium and is 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 4.
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