Biochemical reaction representation method and system based on functional group level

By employing a functional group-based biochemical reaction representation method and using an atomic environment functional group word segmentation strategy and the BERT model for multiple training iterations, the problem of capturing comprehensive information about biochemical reactions in existing technologies is solved. This enables more accurate reaction classification and similarity retrieval, and improves the accuracy of enzyme kinetic parameter prediction.

CN121281663APending Publication Date: 2026-01-06TIANJIN INST OF IND BIOTECH CHINESE ACADEMY OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511412989.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing methods for representing biochemical reactions are insufficient to fully capture comprehensive information about the reaction. In particular, traditional methods rely on simple mathematical operations between products and substrates, which cannot accurately characterize the transformation of key functional groups before and after the reaction. Furthermore, the atomic-level method RXNFP does not consider functional groups.

Method used

A functional group segmentation strategy based on atomic environment is used to decompose the molecular structure of the reaction, construct a functional group sequence dataset, and generate a biochemical reaction representation model at the functional group level through random masking, transfer learning, random swapping and supervised contrastive learning, combined with the BERT model for multiple trainings.

Benefits of technology

It achieves precise characterization of biochemical reactions, improves the accuracy of reaction classification and similarity retrieval capabilities, enhances the accuracy of enzyme kinetic parameter prediction, and significantly improves the robustness and interpretability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121281663A_ABST
    Figure CN121281663A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of biochemical reaction representation, and discloses a biochemical reaction representation method and system based on a functional group level, and the method comprises the following steps: splitting functional groups of a reaction molecular structure, and constructing a functional group sequence data set; randomly masking the functional group sequence data set, constructing an initial functional group level biochemical reaction representation model in combination with a transfer learning strategy, and performing preliminary training; performing random exchange processing on the functional group sequence data set, constructing a functional group position exchange data set, and performing secondary training on the preliminarily trained model in combination with the functional group sequence data set and a loss function; on the basis of a supervised contrast learning strategy and a multi-dimensional evaluation index, performing third training on the model after secondary training to obtain a final functional group level biochemical reaction characterization model; and expressing the to-be-expressed reaction molecular structure to obtain a biochemical reaction expression result of the functional group level of the reaction molecular structure. According to the method, the accuracy of reaction classification and similarity retrieval is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of biochemical reaction representation technology, and in particular to a method and system for representing biochemical reactions based on the functional group level. Background Technology

[0002] Biochemical reactions are the fundamental units in metabolic pathway design research, and their dynamic characteristics (such as enzyme catalytic mechanisms and substrate-directed transformation pathways) directly determine the efficiency and stability of metabolic pathways. In recent years, data-driven artificial intelligence (AI) technology has enabled the automated extraction of hidden patterns and topological relationships in reaction mechanisms by encoding reactions as high-dimensional vector features. This AI-based mathematical representation method provides common technical support for key issues such as accurate reaction mechanism analysis, similar reaction search, and enzyme kinetic parameter prediction.

[0003] Existing methods for representing biochemical reactions have limitations. Traditional reaction representation methods mainly rely on simple mathematical operations between products and substrates (such as reaction representation methods based on differential reaction fingerprints), which are difficult to fully capture comprehensive information about biochemical reactions. The general reaction representation method RXNFP (Reaction Fingerprint), which is based on the atomic level, does not consider functional groups and cannot accurately characterize the transformation of key groups before and after the reaction. Summary of the Invention

[0004] This invention provides a method and system for representing biochemical reactions at the functional group level, in order to solve the problem that it is difficult to fully capture comprehensive information about biochemical reactions in the prior art.

[0005] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or to describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.

[0006] According to a first aspect of the present invention, a method for representing biochemical reactions based on the functional group level is provided.

[0007] In one embodiment, a method for representing biochemical reactions at the functional group level includes:

[0008] An atomic environment functional group word segmentation strategy is adopted to decompose the functional groups of the reaction molecular structure, and a functional group sequence dataset is constructed based on the decomposition results.

[0009] The functional group sequence dataset is randomly masked to generate a masked functional group sequence dataset. Combined with a transfer learning strategy, an initial functional group-level biochemical reaction representation model is constructed and preliminarily trained.

[0010] The functional group sequence dataset is randomly swapped to construct a functional group position swap dataset. The functional group sequence dataset and loss function are then combined to perform secondary training on the functional group level biochemical response representation model after the initial training.

[0011] Based on the supervised contrastive learning strategy and multidimensional evaluation index, the functional group level biochemical reaction representation model after secondary training is trained three times to obtain the final functional group level biochemical reaction characterization model.

[0012] Using the final functional group level biochemical reaction characterization model, the molecular structure of the reaction to be represented is represented, and the biochemical reaction representation results at the functional group level of the molecular structure are obtained.

[0013] According to a second aspect of the present invention, a biochemical reaction representation system based on the functional group level is provided.

[0014] In one embodiment, a biochemical reaction representation system based on the functional group level includes:

[0015] The functional group sequence construction module is used to split the functional groups of the reaction molecule structure using the atomic environment functional group word segmentation strategy, and to construct a functional group sequence dataset based on the splitting results.

[0016] The mask pre-training module is used to perform random masking on the functional group sequence dataset to generate a masked functional group sequence dataset. Combined with the transfer learning strategy, it constructs an initial functional group-level biochemical reaction representation model and performs preliminary training.

[0017] The position-swapping training module is used to randomly swap the functional group sequence dataset to construct the functional group position-swapping dataset, and then, in combination with the functional group sequence dataset and the loss function, to perform secondary training on the functional group-level biochemical response representation model after the initial training.

[0018] The supervised comparison optimization module is used to train the functional group-level biochemical reaction representation model three times based on the supervised comparison learning strategy and multi-dimensional evaluation index to obtain the final functional group-level biochemical reaction characterization model.

[0019] The reaction characterization results module is used to represent the molecular structure of the reaction to be represented using the final functional group level biochemical reaction characterization model, and obtain the biochemical reaction representation results at the functional group level of the reaction molecular structure.

[0020] According to a third aspect of the present invention, a computer device is provided.

[0021] In some embodiments, the computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.

[0022] According to a fourth aspect of the present invention, a computer-readable storage medium is provided.

[0023] In one embodiment, a computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the above method.

[0024] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0025] 1. This invention proposes a functional group decomposition method based on atomic environment. This method identifies the ring structure of molecules and considers the chemical environment and connection modes of carbon atoms and heteroatoms. Compared with existing methods, AEFG can decompose all 39,909 compounds involved in the biochemical reaction dataset. The decomposed functional groups possess chiral information, are highly readable, do not generate meaningless strings, and do not miss atoms or groups, demonstrating good versatility and application prospects.

[0026] 2. This invention develops a biochemical reaction representation method based on the functional group level. This method uses functional groups as the basic unit and combines them with the BERT model to perform functional group mask learning for millions of chemical reactions. Through transfer learning, the model is fine-tuned for biochemical reaction classification using tens of thousands of biochemical reaction data. The model can assign higher attention weights to key groups that undergo transformation before and after the reaction, more accurately capturing the core features of the reaction. In the reaction classification task, its mF1 score reaches 0.935, higher than the general reaction representation method RXNFP (mF1 score: 0.859). After adding a compound token exchange strategy to the model, the model generates training samples with multiple permutations and combinations for the input reaction during training, enabling the model to better learn the feature representation of the reaction under different compound arrangements, thus making the model more robust to changes in the order of compounds. Furthermore, the introduction of contrastive learning techniques enables the model to maximize the similarity between identical reaction mechanisms in the feature space while minimizing the similarity between different reaction mechanisms. This effectively enhances the model's ability to recognize subtle changes in reactions, increasing the reaction classification mF1 score to 0.947 and the reaction similarity retrieval accuracy to 0.923. Simultaneously, the determination coefficient of the enzyme kinetic parameter prediction model TurNup is improved from 0.436 to 0.453. Through these innovative improvements, this invention achieves precise characterization of biochemical reactions, providing strong support for research on biochemical reaction mechanisms and the development of related applications.

[0027] 3. This invention proposes a novel functional group decomposition method based on atomic environment, which can more accurately identify and separate functional groups in compounds. A pre-trained biochemical reaction model based on the functional group level is proposed. This model combines BERT architecture, functional group mask learning, compound token exchange, and contrastive learning strategies, significantly improving the accuracy of reaction classification and similarity retrieval. It can capture the key features of biochemical reactions and has good model interpretability.

[0028] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0030] Figure 1 This is a flowchart illustrating a biochemical reaction representation method based on the functional group level, according to an exemplary embodiment.

[0031] Figure 2 This is a schematic diagram illustrating a biochemical reaction representation system based on the functional group level, according to an exemplary embodiment.

[0032] Figure 3 This is a schematic diagram illustrating the functional group splitting of tyrosine in a biochemical reaction representation method based on the functional group level, according to an exemplary embodiment.

[0033] Figure 4 This is a schematic diagram of functional group word segmentation for the aspartic acid transamination reaction in a biochemical reaction representation method based on functional group level, according to an exemplary embodiment.

[0034] Figure 5 This is a biochemical reaction representation model framework in a biochemical reaction representation method based on the functional group level, as illustrated in an exemplary embodiment.

[0035] Figure 6 This is the frequency distribution of the first 20 functional groups in a biochemical reaction representation method based on the functional group level, as illustrated in an exemplary embodiment.

[0036] Figure 7 The molecular structure of aspartic acid is shown in an exemplary embodiment of a biochemical reaction representation method based on the functional group level.

[0037] Figure 8 This is a schematic diagram illustrating the functional group separation result of nicotinamide adenine dinucleotide in a biochemical reaction representation method based on the functional group level, according to an exemplary embodiment.

[0038] Figure 9 This is a diagram showing the experimental results of various models in a biochemical reaction representation method based on the functional group level, according to an exemplary embodiment.

[0039] Figure 10 This is a diagram showing the proportion of misclassified hydrolysis reactions in a biochemical reaction representation method based on functional group level, according to an exemplary embodiment.

[0040] Figure 11 This is a schematic diagram of reaction similarity retrieval results based on substrate similarity in a biochemical reaction representation method based on functional group level, according to an exemplary embodiment.

[0041] Figure 12 This is a schematic diagram illustrating the ranking of similar reactions in a biochemical reaction representation method based on the functional group level, according to an exemplary embodiment.

[0042] Figure 13 This is a schematic diagram illustrating the reaction similarity retrieval results for a medium-complex task based on a functional group-level biochemical reaction representation method, according to an exemplary embodiment.

[0043] Figure 14 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation

[0044] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0045] Figure 1 An embodiment of a biochemical reaction representation method based on the functional group level of the present invention is shown.

[0046] In this optional embodiment, the method for representing biochemical reactions based on functional groups includes:

[0047] S101. The functional group segmentation strategy of atomic environment is adopted to split the functional groups of the reaction molecular structure, and the functional group sequence dataset is constructed based on the segmentation results.

[0048] S102. Randomly mask the functional group sequence dataset to generate a masked functional group sequence dataset. Combine the transfer learning strategy to construct an initial functional group-level biochemical reaction representation model and perform preliminary training.

[0049] S103. Randomly swap the functional group sequence dataset to construct a functional group position swap dataset, and combine the functional group sequence dataset and loss function to perform secondary training on the functional group level biochemical response representation model after the initial training.

[0050] S104. Based on the supervised contrastive learning strategy and multidimensional evaluation index, the functional group level biochemical reaction representation model after secondary training is trained three times to obtain the final functional group level biochemical reaction characterization model.

[0051] S105. Using the final functional group level biochemical reaction characterization model, the molecular structure of the reaction to be represented is represented, and the biochemical reaction representation results at the functional group level of the molecular structure are obtained.

[0052] It should be explained that, in order to characterize biochemical reactions at the functional group level, this invention proposes an atomic-environment-based functional group decomposition method, AEFG (Atom-Environment-Based Functional Groups). AEFG considers the chemical environment information of atoms and decomposes compounds into chemically meaningful functional group units. The specific steps are as follows:

[0053] (1) Ring structure identification: The RDKit toolkit is used to identify and extract all ring structures in the compound, including aromatic rings and heterocycles. Additionally, if two ring structures are connected by sharing one or more atoms, they are considered fused ring structures. For example, a purine ring is formed by the fusion of a pyrimidine ring (six-membered ring) and an imidazole ring (five-membered ring) by sharing a carbon-carbon double bond. (2) Carbon atom-based functional group identification: The RDKit toolkit is used to identify carbon atoms in non-cyclic structures of the compound (i.e., carbon atoms in rings are not considered) and their first-order neighboring atoms, filtering out neighboring C atoms linked by single bonds and retaining carbon atoms linked by double or triple bonds, as well as heteroatoms (such as oxygen, nitrogen, sulfur, etc.). For example, for a carboxyl group (-COOH), the central carbon atom is connected to a hydroxyl oxygen (single bond) and a carbonyl oxygen (double bond). If the central carbon atom is also connected to a single-bonded carbon atom (such as an R group), that carbon atom is ignored. (3) Heteroatom-based functional group identification: The RDKit is used to identify heteroatoms (such as oxygen, nitrogen, sulfur, etc.) in non-cyclic structures of the compound. Then, the neighboring atoms of each heteroatom are extracted and the process is recursively expanded until the neighboring atom is a carbon atom. For example, for peroxides (ROOR), when the heteroatom O is identified, if R is a carbon atom, it will be split into a peroxy bond (-COOC-). (4) Functional group merging and priority processing: The functional groups obtained in the above three steps are merged by using the atomic index of the functional group to ensure that each atom belongs to only one functional group. In the merging process, all ring structures (including fused rings) are retained first, followed by functional groups based on carbon atom identification (such as carboxyl groups, hydroxyl groups, etc.). Finally, functional groups based on heteroatom identification are retained.

[0054] Using the AEFG method, this invention provides a more reasonable functional group decomposition strategy for reaction representation learning. For example... Figure 3The diagram shown is a schematic of the slicing of tyrosine, and its SMILES is represented as "N[C@@H](Cc1ccc(O)cc1)C(O)=O".

[0055] The molecular structure of tyrosine was resolved using RDKit to read the SMILES (Simplified Linear Input Canonical Specification, commonly used to represent molecular structures). The first step of AEFG yielded the benzene ring, with the SMILES "c1ccccc1" (atomic indices 3, 4, 5, 6, 8, 9). The second step identified the acyclic carbon atom and its neighbors, resulting in the amino group "[C@@H]N" (atomic indices 1, 0), the aliphatic chain carbon "C" (atomic index 2), and the carboxyl group "O=CO" (atomic indices 10, 11, 12). The third step identified the heteroatom and its neighbors, yielding the amino group "CN" (atomic indices 0, 1), the phenolic hydroxyl group "cO" (atomic indices 7, 6), the carboxyl oxygen group "CO" (atomic indices 11, 10), and the carbonyl group "C=O" (atomic indices 12, 10). When merging functional groups, the benzene ring "c1ccccc1:3,4,5,6,8,9" is retained first, followed by functional groups based on carbon atom recognition "[C@@H]N:1,0", "C:2", and "O=CO:10,11,12". Finally, when merging functional groups based on heteroatom recognition, the atomic indices of "CN:0,1", "CO:11,10", and "C=O:12,10" have already appeared in the first two steps, so they are filtered out, and only the phenolic hydroxyl group "cO:7,6" is retained. To distinguish the hydroxyl group "CO" on the aliphatic chain from the phenolic hydroxyl group on the aromatic ring, the latter uses a lowercase "c" to indicate aromaticity. Using the AEFG method, the smiles of tyrosine are ultimately resolved to "[C@@H]N,C,c1ccccc1,cO,O=CO]".

[0056] This invention employs a functional group segmentation strategy, utilizing AEFG to perform functional group segmentation on reactions SMILES, and constructs a vocabulary covering common functional groups, containing a total of 12901 functional groups. The steps are as follows:

[0057] (1) Functional groups SMILES were extracted from 1,992,468 compounds in a dataset of 2,180,926 chemical reactions and 32,841 enzyme-catalyzed reactions using the AEFG method. The AEFG method breaks down compounds into chemically significant functional groups, such as carboxyl (-COOH), hydroxyl (-OH), amino (-NH2), and aldehyde (-CHO), by considering the chemical environment of atoms. (2) The frequency of each functional group SMILES was counted, and functional groups with a frequency greater than 10 times were retained, while uncommon functional groups were filtered out. (3) The functional group SMILES were deduplicated to ensure the uniqueness of each functional group in the vocabulary.

[0058] This method performs reaction word segmentation processing according to the following steps:

[0059] (1) SMILES: SMILES reactions are split into independent compounds using ">>" (reversing the chemical reaction, connecting reactants and products) and "." (separator for mixtures, connecting different compounds). For example, the reaction SMILES for aspartic acid transamination is "N[C@@H](CC(O)=O)C(=O)OO=C(O)CCC(=O)C(=O)O>>N[C@@H](CCC(O)=O)C(=O)OO=C(O)CC(=O)C(=O)O". This is split into the substrates "N[C@@H](CC(O)=O)C(=O)O" and "O=C(O)CCC(=O)C(=O)O", and the products "N[C@@H](CCC(O)=O)C(=O)O" and "O=C(O)CC(=O)C(=O)O".

[0060] (2) Functional group resolution: The AEFG method was used to analyze the functional groups of each compound, breaking it down into chemically significant functional group fragments. For example... Figure 4 As shown (reaction SMILES represent chemical reactions, and Tokens of Function Group represent functional group markers), the aspartic acid "N[C@@H](CC(O)=O)C(=O)O" is decomposed into "[C@@H]N,C,O=CO,O=CO". Using the AEFG functional decomposition method to decompose the reaction SMILES of the aspartic acid transamination reaction, the results include each functional group, such as "O=CO", ".", and ">>", preserving the original reaction writing format.

[0061] (3) Reconstructing reactions SMILES: Based on the original reaction connection method, add "." and ">>" to the original positions. Reassemble the reactions to ensure that the reactions after word segmentation still maintain the original reaction relationship.

[0062] like Figure 5The diagram shows the framework of a biochemical reaction representation model. The left side of the diagram illustrates the pre-training stage of the chemical reaction. Here, CLS is the classification marker used to obtain the representation of the entire sequence; MASK is the mask marker used to predict masked words during pre-training; SEP is the sentence separation marker, representing the boundary between two sentences; [cO] and [O=CO] represent the input functional groups. When the input reaction SMILES is given, functional group segmentation is performed, followed by functional group-level mask learning. The right side shows the fine-tuning stage of the enzyme-catalyzed reaction. Sa+Sb=Pc+Pd represents the order of functional groups in the original compound; Sa+Sb=Pc+Pd represents the order of functional groups after the exchange, where Sa represents the functional group of substrate a, Sb represents the functional group of substrate b, Pc represents the functional group of product c, and Pd represents the functional group of product d. The BERT model was fine-tuned using biochemical reactions, with the total loss being a weighted average of the cross-entropy loss (CE-Loss) and the supervised contrastive loss (SupCon-Loss). Finally, the model's CLS labels were used as the feature vectors for the reactions.

[0063] This invention constructs a pre-trained model for biochemical reactions based on the BERT model framework. Leveraging BERT's powerful contextual understanding and self-attention mechanism, it captures key features of chemical reactions at the functional group level. This invention employs 12 hidden layers, each with 512 hidden units, and 4 attention mechanism heads.

[0064] During the pre-training phase, this invention employs Masked Language Modeling (MLM) to perform masking learning on chemical reactions at the functional group level. The masking rate is 0.15, meaning that 15% of the functional groups in each sequence are randomly masked. The masked portions are replaced by the special marker "[MASK]", and the model needs to predict the masked functional groups based on contextual information. For example, when the model masks the hydroxyl group (-CO) in a reaction, it needs to infer the masked hydroxyl group based on the surrounding functional groups (such as aldehydes, carboxyls, etc.). Furthermore, "[SEP]" is used to indicate the boundary between two sentences.

[0065] In the fine-tuning phase, this invention employs a transfer learning strategy, using a small amount of enzymatic reaction data to fine-tune the model, allowing the knowledge learned from chemical reactions to be transferred to specific biochemical reaction tasks. The fine-tuned (i.e., adjusted) model is FGRFP (Functional Groups Reaction Fingerprint). During the fine-tuning process, a classifier head is added to the BERT framework, and the embedding vector labeled "[CLS]" is used as the input feature of the classifier. "[CLS]" is a special label in the BERT model used to aggregate global sequence information, and its embedding vector can comprehensively represent the semantic features of the reaction sequence.

[0066] EC numbering is an internationally recognized enzyme classification system that employs a four-level hierarchical structure to describe the catalytic function and reaction mechanism of enzymes. The first-level numbering (EC1 to EC6) indicates the type of reaction catalyzed by the enzyme, such as redox reactions (EC1), transfer reactions (EC2), hydrolysis reactions (EC3), and cleavage reactions (EC4). The subsequent second and third-level numbering further subdivides the specific details of the reaction, including the type of chemical bond, the type of functional group, and whether a cofactor is involved. For example, EC:2.6.1 represents an aminotransfer reaction (EC:2.6.1) in transferases (EC2) that transfers a nitrogen-containing functional group (EC:2.6). Finally, the fourth-level numbering describes the enzyme's specificity for its substrate. The fine-tuning task of this invention is to predict 186 tertiary EC numbers. By predicting the tertiary EC numbers (enzyme reaction classification), the model learns the specific roles and transformation patterns of different functional groups in biochemical reactions.

[0067] Biochemical reactions are multi-substrate or multi-product systems, and for such systems, changes in the order of compounds do not alter the essential semantics of the reaction. However, the BERT model is sensitive to the input order of reaction compounds, resulting in different vector space mappings for different representations of the same reaction. To address this sensitivity, this invention introduces a Compound Token Swapping (CTS) mechanism, enabling the model to adapt to different arrangements of reaction compounds. The trained model is named FGRFP_CTS (i.e., the functional group-level biochemical reaction representation model after secondary training).

[0068] (1) Compound Token Position Swapping Strategy: After functional group segmentation of reaction SMILES, this invention swaps the word index (input_ids) of compound tokens. Taking substrates as an example, if a reaction involves multiple substrates, the model will replace all input_ids corresponding to the compounds. For example, in the reaction A+B→C+D, the model will swap the input_ids corresponding to A and B, thereby generating the permutation B+A. Similarly, for the product part, the input_ids of C and D will also undergo a similar random swapping operation.

[0069] (2) Loss Function: For each training sample, the model calculates the cross-entropy loss of the original sequence and the swapped sequence separately, and then performs a weighted average of the two losses. The cross-entropy loss function can be expressed as:

[0070] CrossEntropyLoss=-∑iy i log(p i );

[0071] In the formula, y i It is the tertiary EC number label for the i-th reaction, p i It is the predicted probability of the i-th reaction.

[0072]

[0073] In the formula, L total_cts L represents the total loss due to the exchange of functional groups in the compound. origina l and L swapped These represent the cross-entropy loss of the original sequence and the exchanged sequence, respectively.

[0074] Contrastive learning, as a powerful feature extraction method, has made groundbreaking progress in several fields such as computer vision and natural language processing in recent years. Its core idea is to construct positive and negative sample pairs to maximize the similarity between similar samples in the feature space, while minimizing the similarity between different samples, thereby learning useful feature representations from the data.

[0075] To enhance the model's representational ability, this invention introduces supervised contrastive learning (SCL) technology based on the aforementioned fine-tuned classification model. The model is named as follows:

[0076] FGRFP_CTS_SCL (i.e., the final functional group level biochemical reaction characterization model) aims to learn key feature information and fine-grained differences between biochemical reactions by maximizing the similarity between reactions with the same tertiary EC number and minimizing the similarity between reactions with different tertiary EC numbers.

[0077] (1) Contrastive Learning Strategy: In this invention, a three-level EC number is used as a supervision signal. For each reaction sample, positive samples are other reactions under the same EC number, while negative samples are reactions under different EC numbers. In addition, different representations generated through a compound token position swapping strategy are used as second-view data for contrastive learning.

[0078] (2) Loss Function: The contrastive loss function is used to optimize the distribution of samples in the feature space. For each response i, its contrastive loss (L... contrastive This can be represented as:

[0079]

[0080] In the formula, I is the reaction set, P(i) is the set of positive samples of the same third-level EC in I, A(i) is the set of negative samples of different third-level ECs in I, and z i Let z be the eigenvector of reaction i. p Let z be the feature vector of the positive sample p. a Let be the feature vector of the negative sample a, and τ be the temperature parameter used to adjust the distribution of similarity.

[0081] 3) Total loss function:

[0082] (i) Classification loss (Cross-Entropy Loss): Calculates the classification error of the original sequence, accounting for 80%.

[0083] (ii) Token Swapping Loss: Calculates the classification error of the swapped sequence, accounting for 80%.

[0084] (iii) Contrastive Loss: Maximize the similarity of reactions with the same tertiary EC number and minimize the similarity of reactions with different tertiary EC numbers, accounting for 20%.

[0085] The final total loss function (L total This can be represented as:

[0086]

[0087] In the formula, L original and L swappedL represents the cross-entropy loss of the original sequence and the swapped sequence, respectively. contrastive To compare the losses.

[0088] As shown in Table 1, the model architecture of this invention, based on a pre-trained model at the functional group level and three enzyme-catalyzed reaction fine-tuning models FGRFP, FGRFP_CTS, and FGRFP_CTS_SCL, comprises 12 hidden layers, each with 512 hidden units, and is equipped with a 4-head attention mechanism. During the pre-training phase, the learning rate (LR) is set to 1e-4, the batch size is 8, and the training epochs are 50. During the fine-tuning phase, the learning rate for the FGRFP and FGRFP_CTS models is set to 1e-5, the batch sizes are 8 and 32 respectively, and the training epochs are 50. This parameter setting balances training efficiency and memory usage while ensuring that the model can converge sufficiently on different tasks.

[0089] Table 1: Model Parameters

[0090]

[0091] For the FGRFP_CTS_SCL model, due to the introduction of the Supervised Contrastive Learning (SCL) strategy, the learning rate is set to 2e-5, the training batch size is 1024, and the training period is 600 epochs. The introduction of the contrastive learning task increases the complexity of model training; therefore, appropriately increasing the learning rate helps the model converge faster. Simultaneously, a larger training batch size provides more negative sample pairs, thereby enhancing the effect of contrastive learning and improving the model's ability to discriminate response features.

[0092] Table 2 shows the experimental environment configuration requirements.

[0093] Table 2: Experimental Environment Configuration

[0094] name Configuration information operating system Ubuntu 22.04 Programming Language Python 3.7.0 Deep learning framework PyTorch 2.2.0 + CUDA 11.8 + DGL 2.1 GPU GeForce RTX A6000 (48GB) CPU Intel Xeon Gold 6138 RDKit 2023.09.03

[0095] In the method evaluation of this invention, the representative atomic-level reaction representation model RXNFP was primarily selected as the baseline model. RXNFP is a learning model that directly uses chemical reaction smiles at the atomic level. RXNFP can capture the key features of chemical reactions, outperforming traditional reaction representation methods, such as molecular fingerprinting and reaction fingerprinting based on substructure symmetry difference (DRFP). Furthermore, these traditional methods have significant limitations; they mainly rely on simple mathematical operations between products and substrates (such as difference calculations), making it difficult to effectively characterize the overall reaction level.

[0096] To ensure a fair comparative analysis, this invention retrains RXNFP (reaction fingerprint) using an enzyme-catalyzed reaction dataset, maintaining the same training parameters as FGRFP, including batch size, learning rate, number of training epochs, and optimizer. The trained model is named RXNFP_Bio. Furthermore, in the enzyme-catalyzed reaction classification task, this invention follows the method of the original developers of RXNFP, using RXNFP to extract features from reactions and employing a 5-Nearest Neighbors (5-NN) classifier for reaction classification prediction.

[0097] This invention employs multiple evaluation metrics, including mean accuracy (mACC), mean F1 score (mF1 Score), and mean Matthews correlation coefficient (mMCC). These metrics reflect the model's performance in enzyme-catalyzed reaction classification tasks from different perspectives, ensuring the scientific validity and reliability of the estimation results. Through these evaluation metrics, this invention can measure the model's performance in reaction classification tasks.

[0098] Using the Atomic Environment-Based Functional Group Separation (AEFG) method, this invention performed functional group-level separation on 39,909 compounds from 32,841 enzymatic reactions. After separation, a total of 15,646 unique functional groups were obtained, such as... Figure 6 As shown, the vertical axis represents the number of times a functional group appears in the dataset, and the horizontal axis represents the top 20 most frequently occurring functional groups.

[0099] Of the 15,646 unique functional groups obtained from the decomposition, the hydroxyl group (-OH) is the most common, appearing a total of 69,729 times. Specific forms of the hydroxyl group include [C@H]O, [C@@H]O, CO, and cO, corresponding to hydroxyl structures under different chemical conditions. For example, [C@H]O and [C@@H]O represent hydroxyl groups on chiral carbon atoms, while CO and cO represent hydroxyl groups on aliphatic chains and aromatic rings, respectively. Secondly, the amide bond (-CONH-) is the second most common functional group, and its frequent occurrence in enzymatic reactions is closely related to the metabolism of proteins and peptides.

[0100] This invention provides a comprehensive comparative analysis of the performance of existing functional group resolution methods in chemical structure characterization. Typical molecules with different structural features, such as aspartic acid (Asp) and nicotinamide adenine dinucleotide (NADH), were selected as test objects. The analytical performance of the AEFG method developed in this invention was compared with that of current mainstream methods (including BRICS, SPE, and ReLMole).

[0101] In the task of resolving aspartic acid, such as Figure 7 The image shows the molecular structure of aspartic acid (aspartic acid contains two carboxyl groups, one amino group, and one single carbon atom). The results of the functional group resolution methods are shown in Table 3. The BRICS method returns the original aspartic acid SMILES representation ([NH2][C@@H](CC(=O)O)C(=O)O). This method does not resolve the compound, preserving the complete molecular structure and failing to provide functional group-level information, thus limiting its application in reaction characterization. The SPE method returns the resolution result as "[NH2],[C@@H](,CC(=O)O),C(=O)O". Since SPE directly slices the SMILES string, the resolution result contains meaningless characters (such as ")", "\", and numbers), which lack chemical meaning and reduce the interpretability and practicality of the resolution result. The ReLMole method returns the resolution result as "CC,CC(=O)O,CN". This method neglects one of the carboxyl groups in the resolution of aspartic acid and also loses chiral information (such as "@@"), resulting in incomplete resolution results and unclear chemical meaning. In contrast, the AEFG method proposed in this invention resolves aspartic acid into "[C@@H]N,C,O=CO,O=CO". The AEFG method not only completely preserves the two carboxyl groups but also accurately captures chiral information (such as "@@"), ensuring the chemical meaning and completeness of the resolution results.

[0102] Table 3: Comparison of functional group resolution results of aspartic acid by different methods

[0103] method Asp functional groups BRICS NH2][C@@H](CC(=O)O)C(=O)O SPE [NH2],[C@@H](,CC(=O)O),C(=O)O ReLMole CC,CC(=O)O,CN AEFG(Ours) [C@@H]N,C,O=CO,O=CO

[0104] Table 3 shows the results of four resolution methods for complex NADH molecules. AEFG can effectively identify and extract the functional group composition of NADH, such as... Figure 8 As shown, AEFG resolves NADH by separating seven functional groups: amide, purine ring, phosphate, hydroxyl, amino, furanose, and pyridine ring, while retaining the chiral information of the original molecule.

[0105] Table 3: Comparison of functional group separation results of NADH by various methods

[0106]

[0107] The BRICS method splits NADH into adenine, phosphate, furanose, and nicotinamide functional groups, but omits one furanose group. NADH contains two furanose structures. The SPE method, when splitting NADH, includes meaningless strings in its results, such as parentheses, forward slashes, and single numbers. The ReLMole method returns results without chiral markers (such as "@@") and omits furanose and hydroxyl groups.

[0108] To systematically evaluate the performance of different functional group splitting methods, this invention used AEFG and three other functional group splitting methods (BRICS, SPE, and ReLMole) to split 39,909 compounds in an enzyme-catalyzed reaction dataset, and analyzed the results in terms of readability, chiral information preservation, atom conservation, and splitting coverage. As shown in Table 4, the BRICS method returned 15,646 unique functional groups with a readability of 98% (readable using RDKit) and chiral information. However, the BRICS method could not split 5,012 compounds, returning only the original compounds SMILES, such as simple aspartic acid molecules. The SPE method ensured that the number of atoms in the functional groups matched the number of atoms in the compound itself and could split all compounds, but the readability of the functional groups obtained by SPE was extremely poor, with only 17% of the splitting results being correctly read by RDKit. The ReLMole method suffered from loss of chiral information and missing atomic information (37% atom conservation) when splitting compounds.

[0109] Table 4: Comparative Analysis of Different Functional Group Resolution Methods

[0110]

[0111] Compared to three representative methods, the AEFG method proposed in this invention demonstrates significant advantages in systematic evaluation. After resolving 39,909 compounds, AEFG yielded 1,812 unique functional groups with a readability of 84%, while fully preserving chiral information. The remaining 180 compounds (such as phosphoric acid and hydrogen peroxide) were directly retained as complete molecules due to their simple structures and indivisibility. Furthermore, the AEFG method exhibits excellent atomic conservation, exhibiting only polyatomic phenomena (such as the benzene ring carbon in the phenolic hydroxyl group "cO"). This polyatomic situation is permissible because the benzene ring carbon is an indivisible whole within the chemical environment of the phenolic hydroxyl group; preserving its integrity helps in accurately characterizing the chemical properties of the functional groups. By allowing this reasonable polyatomic phenomenon, the AEFG method ensures the chemical significance and practicality of the resolution results.

[0112] This invention uses the three-level EC numbering (reaction classification) of predicted reactions as a fine-tuning task. The three-level EC numbering guides the model to learn the reaction rules of biochemical reactions. To evaluate the performance difference between the model constructed in this invention and different reaction representation methods, this invention compares the functional group-level biochemical reaction models (FGRFP, FGRFP_CST, and FGRFP_CTS_STS) with the atomic-level benchmark model (RXNFP). In addition, this invention re-fine-tunes the RXNFP pre-trained model using the same enzyme-catalyzed reaction dataset, with all hyperparameter settings consistent with FGRFP. The fine-tuned model is named RXNFP_Bio. Table 5 provides a brief description of each model.

[0113] Table 5: Description of each model

[0114]

[0115] During the model fine-tuning phase, this invention performed three repeated random partitions of the training and validation sets, maintaining the original 8:1 ratio in each partition. To ensure the reproducibility of the experiments, a fixed random seed was set for each partition and training round, and different data was used for each training session. After the model training was completed, a test set containing 3327 responses was used for performance evaluation, and the best-performing model in each experiment was recorded.

[0116] As shown in Table 6, the experimental results indicate that the three models (FGRFP, FGRFP_CTS, and FGRFP_CTS_SCL) performed relatively stably in the three experiments, with minimal performance fluctuations. The FGRFP model had an average accuracy of 0.931, FGRFP_CTS had a slightly higher accuracy of 0.934, while the FGRFP_CTS_SCL model, which incorporated contrastive learning techniques, performed best with an average accuracy of 0.939.

[0117] Table 6: Validation results of repeated random partitioning

[0118] FGRFP FGRFP_CTS FGRFP_CTS_SCL 1 0.931 0.935 0.941 2 0.934 0.936 0.940 3 0.929 0.931 0.936 Mean 0.931 0.934 0.939

[0119] This invention uses RXNFP as the baseline model. RXNFP is a deep learning-based model capable of capturing key features of reactions at the atomic level, outperforming traditional reaction fingerprinting methods such as DRFP. In reaction classification tasks, this invention uses RXNFP combined with a 5-NN classifier to classify the test set.

[0120] like Figure 9As shown, the experimental results indicate that when RXNFP is directly used to characterize enzyme-catalyzed reactions and combined with a 5-NN classifier, the average accuracy (mACC) is 0.853, the average Matthews correlation coefficient (mMCC) is 0.822, and the average F1 score (mF1 score) is 0.859. In the reaction classification task, the performance of five models was evaluated: RXNFP+5-NN classifier, RXNFP_Bio, FGRFP, FGRFP_CTS, and FGRFP_CTS_SCL. Each model was evaluated on three metrics: mACC (average accuracy), mMCC (average Matthews correlation coefficient), and mF1 score (average F1 score). It should be noted that because RXNFP, as a pre-trained model, has fixed parameters, and the 5-NN classifier, as a typical non-parametric method, relies on directly calculating the distance between samples, it cannot be adapted to different data partitions through retraining. Therefore, this invention adopts an evaluation strategy of independent test sets to ensure the comparability of results through a single rigorous test, without performing cross-validation on the RXNFP+5-NN combination.

[0121] After fine-tuning the RXNFP pre-trained model using enzyme-catalyzed reaction data, the performance of the RXNFP_Bio model improved, with mACC, mMCC, and mF1 scores reaching 0.901, 0.885, and 0.903, respectively. However, these results are still lower than the three models based on the functional group level (FGRFP, FGRFP_CTS, and FGRFP_CTS_SCL), indicating that the atomic-level representation method has certain limitations in enzyme-catalyzed reaction classification tasks. The FGRFP model, with mACC, mMCC, and mF1 scores of 0.931, 0.921, and 0.935, outperformed the RXNFP_Bio model's 0.901, 0.885, and 0.903. This demonstrates that the functional group-level model can effectively capture key features in the reaction.

[0122] Based on the FGRFP model (i.e., the Initial Functional Group Level Biochemical Reaction Representation Model), this invention introduces a compound token position swapping strategy, increasing the number of training samples and improving the model's mACC, mMCC, and mF1 scores to 0.934, 0.925, and 0.939, respectively. Furthermore, by introducing contrastive learning techniques, FGRFP_CTS_SCL can more effectively capture the intrinsic patterns of reaction characteristics, resulting in superior performance across all evaluation metrics, with mACC, mMCC, and mF1 scores reaching 0.939, 0.929, and 0.947, respectively.

[0123] This invention analyzes the performance differences of models from the perspective of six types of enzyme-catalyzed reactions. As shown in Table 7, the FGRFP model based on functional group level performs best in redox reactions, transfer reactions, and cleavage reactions, with F1 scores of 0.959, 0.983, and 0.967, respectively. Among these, the transfer reaction shows the most outstanding performance in classifying the six types of enzyme-catalyzed reactions. Figure 10 As shown, the left side represents the FGRFP model, and the right side represents the RXNFP+5-NN classifier model. Classifying hydrolysis and isomerism reactions is quite challenging, especially peptide hydrolysis reactions involving complex molecular structures. These peptide hydrolysis reactions account for 73% of the misclassified hydrolysis reactions. For isomerism reactions, these typically involve only minor changes in the substrate structure, such as cis-trans isomerism, racemization, epimerism, and intramolecular transfer. Furthermore, the data on isomerism reactions is limited, with only 862 reactions.

[0124] Table 7: Classification of Six Major Categories of Enzyme-Catalyzed Reactions

[0125]

[0126] By introducing a compound token position swapping strategy, diverse training samples are generated by randomly exchanging the order of functional groups in the substrate and product, achieving data augmentation. The FGRFP_CTS model shows improvements in hydrolysis, isomerization, and linkage reactions. The scores for hydrolysis and linkage reactions improved from 0.877 and 0.970 in the FGRFP model to 0.889 and 0.978, respectively, while the score for isomerization improved from 0.852 to 0.870, exceeding the RXNFP+5-NN classifier model (0.859). After applying supervised contrastive learning techniques to FGRFP_CTS, the FGRFP_CTS_SCL model achieved the same performance levels as FGRFP and FGRFP_CTS in redox reactions, transfer reactions, cleavage reactions, and linkage reactions. Further improvements were made in hydrolysis and isomerization reactions, which are more difficult to classify, especially isomerization reactions, where the score improved from 0.870 in FGRFP_CTS to 0.920, an improvement of 5.7%.

[0127] Functional group-based models perform exceptionally well in enzyme classification tasks. Compared to atomic-level reaction representations, functional group-based methods are more effective at capturing key features of reactions. By introducing contrastive learning, the models can not only classify reaction types more accurately but also better understand reaction mechanisms.

[0128] To comprehensively evaluate the model's reaction similarity retrieval capabilities in complex contexts, particularly its ability to accurately retrieve similar reactions from a large pool of highly similar substrates, this invention constructs a benchmark test set. This test set contains 3327 reactions, each corresponding to a substrate similarity reaction library containing 100 reactions, including one positive sample (a reaction with the same Level 3 EC number as the test reaction) and 99 negative samples (reactions with different Level 3 EC numbers than the test reaction). Evaluation on this benchmark test set allows for the verification of each model's retrieval performance in complex contexts.

[0129] like Figure 11 The figure shows the comparison results of different models in terms of accuracy (ACC) for Top 1, Top 3, and Top 5 similar reaction retrieval. When directly using RXNFP for reaction similarity retrieval, its accuracy in Top 1 is only 0.668. Even when broadened to Top 5, i.e., retrieving the correct similar reaction from the top 5 similar reactions, its accuracy is only 0.775. This indicates that RXNFP, based on chemical reaction learning, has certain limitations in handling biochemical reaction similarity retrieval tasks in complex contexts. After fine-tuning RXNFP for enzymatic reactions, its accuracy in Top 1 significantly improves to 0.880, demonstrating the positive impact of the fine-tuning strategy on model performance.

[0130] Compared to RXNFP_Bio, the functional group-based method proposed in this invention improves similarity retrieval accuracy by at least 3.30%. The FGRFP_CTS_SCL model is particularly outstanding, with its Top 1 retrieval accuracy (0.923) being 4.89% (0.880) higher than RXNFP_Bio and 38.2% (0.668) higher than the original RXNFP. This demonstrates the significant advantage of the functional group-based method in handling reaction similarity retrieval tasks in complex contexts. In Top 3 and Top 5 retrieval tasks, the functional group-based method also exhibits superior performance, with its retrieval accuracy significantly outperforming the atomic-level method. The top 3 search accuracies were RXNFP (0.739), RXNFP_Bio (0.923), FGRFP (0.939), FGRFP_CTS (0.940), and FGRFP_CTS_SCL (0.945). In the top 5 search task, FGRFP_CTS_SCL had an ACC of 0.952, which was still significantly higher than RXNFP (ACC: 0.775) and RXNFP_Bio (ACC: 0.934).

[0131] Furthermore, this invention analyzes the distribution of positive sample counts for each model after the 6th ranked model, such as... Figure 12As shown, the distribution of positive sample responses for different models after the Top 6 ranking is statistically analyzed. The horizontal axis is divided into three intervals: 6-20, 21-50, and 51-100. The vertical axis represents the number of positive sample responses within each interval. As the ranking increases, the number of positive samples for each model shows a decreasing trend. RXNFP has 297 positive samples in the 6-20 ranking interval, 242 in the 21-50 interval, and 209 in the 50-100 interval. FGRFP_CTS_SCL has 60 positive samples in the 6-20 interval, 52 in the 21-50 interval, and 47 in the 50-100 interval.

[0132] In practical similar reaction retrieval tasks, it is often necessary to retrieve multiple similar reactions, not just the most similar one. To better reflect real-world applications, this invention uses the test set in the enzyme-catalyzed reaction fine-tuning dataset as a benchmark and combines the training and validation sets to form a similar reaction database with broad coverage. By evaluating the model's performance within different retrieval ranges, this invention more realistically simulates real-world applications. To this end, this invention sets three different retrieval criteria: (1) The Top1 criterion requires that the Level 3 EC number of the top-ranked similar reaction completely matches the EC number of the input reaction; (2) The Top5 criterion requires that the Level 3 EC numbers of the top five similar reactions all match the EC number of the input reaction; (3) The Top10 criterion stipulates that the Level 3 EC numbers of the top ten similar reactions must completely match the EC number of the input reaction.

[0133] like Figure 13 As shown, experimental results demonstrate that functional group-based models exhibit significant advantages in similarity response retrieval tasks. In the Top 1 task, the RXNFP model had the lowest accuracy (ACC) at 0.871, while the FGRFP_CTS_SCL model achieved the highest accuracy at 0.938, a 7.69% improvement over RXNFP. This significant improvement fully reflects the superiority of functional group-based representations in capturing response similarity. The fine-tuned RXNFP_Bio (ACC: 0.920) model was stronger in response similarity retrieval than the untuned model, but still weaker than the functional group-based models FGRFP (ACC: 0.930), FGRFP_CTS (ACC: 0.933), and FGRFP_CTS_SCL (ACC: 0.938).

[0134] As the search scope expanded, the performance of each model declined to varying degrees, but the functional group-based models demonstrated stronger robustness. In the Top 5 task, the accuracy of the RXNFP model dropped sharply from 0.871 to 0.645, while the RXNFP_Bio model decreased from 0.916 to 0.827. In contrast, the accuracies of functional group-based models (FGRFP, FGRFP_CTS, FGRFP_CTS_SCL) decreased to 0.910, 0.896, and 0.911, respectively, while maintaining high retrieval performance. In the Top 10 task, the accuracy of functional group-based models remained above 0.870, further validating their stability and reliability in complex similarity retrieval tasks.

[0135] Figure 2 An embodiment of a biochemical reaction representation system based on the functional group level of the present invention is shown.

[0136] In this optional embodiment, the biochemical reaction representation system based on the functional group level includes:

[0137] Functional group sequence construction module 201 is used to split the functional groups of the reaction molecule structure using the atomic environment functional group word segmentation strategy, and to construct a functional group sequence dataset based on the splitting results.

[0138] The mask pre-training module 202 is used to perform random masking on the functional group sequence dataset to generate a masked functional group sequence dataset. Combined with the transfer learning strategy, it constructs an initial functional group-level biochemical reaction representation model and performs preliminary training.

[0139] The position-swapping training module 203 is used to randomly swap the functional group sequence dataset to construct the functional group position-swapping dataset, and combine the functional group sequence dataset and loss function to perform secondary training on the functional group level biochemical response representation model after the initial training.

[0140] The supervised comparison optimization module 204 is used to train the functional group level biochemical reaction representation model three times based on the supervised comparison learning strategy and multi-dimensional evaluation index to obtain the final functional group level biochemical reaction characterization model.

[0141] The reaction characterization results module 205 is used to represent the molecular structure of the reaction to be represented using the final functional group level biochemical reaction characterization model, and obtain the biochemical reaction representation results at the functional group level of the reaction molecular structure.

[0142] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 14As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores static and dynamic information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.

[0143] Those skilled in the art will understand that Figure 14 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0144] In addition, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0145] In addition, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0146] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0147] This invention is not limited to the structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this invention is limited only by the appended claims.

Claims

1. A method for representing biochemical reactions based on the level of functional groups, characterized by, The method comprises: adopting an atomic environment functional group segmentation strategy to split the functional groups of the reaction molecular structure, and constructing a functional group sequence dataset according to the splitting result; performing random mask processing on the functional group sequence dataset to generate a masked functional group sequence dataset, combining a transfer learning strategy to construct an initial functional group level biochemical reaction representation model and perform preliminary training; performing random exchange processing on the functional group sequence dataset to construct a functional group position exchange dataset, and combining the functional group sequence dataset and a loss function to perform secondary training on the preliminary trained functional group level biochemical reaction representation model; based on a supervised contrast learning strategy and multi-dimensional evaluation indicators, performing tertiary training on the secondary trained functional group level biochemical reaction representation model to obtain a final functional group level biochemical reaction representation model; using the final functional group level biochemical reaction representation model to represent the to-be-represented reaction molecular structure to obtain a biochemical reaction representation result at the functional group level of the reaction molecular structure. 2.The biochemical reaction representation method based on the functional group level according to claim 1, characterized in that, The method comprises the following steps: According to the chemical reaction reverse and the mixture separator symbol, the reaction molecular structure is split into independent compounds; based on the atomic environment functional group segmentation strategy, the functional groups of each compound are analyzed to obtain functional group units; According to the connection mode of the original reaction, the functional group units are spliced based on the chemical reaction reverse and the mixture separator symbol to obtain the functional group sequence of a single reaction; screening and deduplication processing are performed on the functional group sequences of all reactions, and the functional group sequence dataset is obtained by integration. 3.The biochemical reaction representation method based on the functional group level according to claim 2, characterized in that, The method comprises the following steps: all ring structures in the compound are identified and extracted to obtain ring structure functional groups; carbon atoms and their first-order neighbor atoms on the non-ring structure in the compound are identified, and neighbor carbon atoms connected by single bonds are filtered to retain neighbor carbon atoms and heteroatoms connected by double or triple bonds to obtain carbon atom functional groups; Heteroatoms on the non-ring structure in the compound are identified, neighbor atoms of each heteroatom are extracted, and recursive expansion is performed from the adjacent atoms as the starting point until the neighbor atoms are carbon atoms to stop expansion to obtain heteroatom functional groups; Based on the atomic index involved in the functional group and combined with the merging priority rules, the ring structure functional groups, carbon atom functional groups and heteroatom functional groups are merged to obtain functional group fragments. 4.The biochemical reaction representation method based on the functional group level according to claim 3, characterized in that, The merging priority rules are: The merging priority of the ring structure functional groups is higher than that of the carbon atom functional groups, and the merging priority of the carbon atom functional groups is higher than that of the heteroatom functional groups.

5. The method according to claim 1, wherein the method is characterized by, The method comprises the following steps: Based on the BERT model framework, an initial functional group level biochemical reaction representation model is constructed; The functional group sequence dataset is randomly masked by using a mask language model to obtain a masked functional group sequence dataset; The initial functional group level biochemical reaction representation model is pre-trained based on the masked functional group sequence dataset and the original functional group at the masked position to obtain a self-supervised functional group level biochemical reaction representation model; The self-supervised functional group level biochemical reaction representation model is adjusted in combination with a classifier header to obtain a preliminarily trained functional group level biochemical reaction representation model. 6.The biochemical reaction representation method based on the functional group level according to claim 1, characterized in that, The preliminarily trained functional group level biochemical reaction representation model is further trained by randomly exchanging the functional group sequence dataset to obtain a functional group position exchange dataset, and combining the functional group sequence dataset and a loss function, which comprises the following steps: The functional group sequence dataset is randomly exchanged by using a compound label position exchange strategy to obtain a functional group position exchange dataset; The parameters of the preliminarily trained functional group level biochemical reaction representation model are optimized based on a loss function and in combination with the original functional group sequence dataset and the functional group position exchange dataset to obtain a secondarily trained functional group level biochemical reaction representation model.

7. The method according to claim 6, wherein the functional group level biochemical reaction representation is characterized by, The parameters of the preliminarily trained functional group level biochemical reaction representation model are optimized based on a loss function and in combination with the original functional group sequence dataset and the functional group position exchange dataset to obtain a secondarily trained functional group level biochemical reaction representation model, which comprises the following steps: The original functional group sequence dataset and the functional group position exchange dataset are respectively input into the preliminarily trained functional group level biochemical reaction representation model for forward propagation to obtain a prediction probability of the original sequence and a prediction probability of the exchanged sequence; Cross-entropy losses of the original functional group sequence dataset and the functional group position exchange dataset are respectively calculated based on the prediction probability of the original sequence, the prediction probability of the exchanged sequence and a true label; The cross-entropy losses of the original functional group sequence dataset and the functional group position exchange dataset are weighted and averaged to obtain a total loss; The parameters of the preliminarily trained functional group level biochemical reaction representation model are optimized based on the total loss to obtain a secondarily trained functional group level biochemical reaction representation model. 8.The biochemical reaction representation method based on the functional group level according to claim 1, wherein, The secondarily trained functional group level biochemical reaction representation model is further trained based on a supervised contrast learning strategy and multi-dimensional evaluation indexes to obtain a final functional group level biochemical reaction representation model, which comprises the following steps: The functional group sequence dataset is subjected to positive and negative sample extraction based on the supervised contrast learning strategy to obtain a positive sample set and a negative sample set; The parameters of the secondarily trained functional group level biochemical reaction representation model are optimized by using a multi-task loss function and in combination with the positive sample set, the negative sample set, the original functional group sequence dataset and the functional group position exchange dataset to obtain a thirdly trained functional group level biochemical reaction representation model; The thirdly trained functional group level biochemical reaction representation model is evaluated and optimized by using multi-dimensional evaluation indexes and the functional group sequence dataset to obtain a final functional group level biochemical reaction representation model.

9. The method according to claim 8, wherein the functional group level biochemical reaction representation is characterized by, The parameter of the secondary trained functional group level biochemical reaction representation model is optimized by using the multi-task loss function and combining the positive sample set, the negative sample set, the original functional group sequence data set and the functional group position exchange data set, and a third trained functional group level biochemical reaction representation model is obtained. The original functional group sequence data set and the functional group position exchange data set are input into the secondary trained functional group level biochemical reaction representation model to obtain a reaction feature vector. Based on the positive sample set, the negative sample set and the reaction feature vector, a comparison loss is calculated. Based on the prediction probability of the original sequence, the prediction probability of the exchange sequence and the true label, the classification loss of the original functional group sequence data set and the classification loss of the functional group position exchange data set are calculated respectively. The classification loss of the original functional group sequence data set, the classification loss of the functional group position exchange data set and the comparison loss are fused according to the preset weight to obtain a multi-task total loss. Based on the multi-task total loss, the parameter of the secondary trained functional group level biochemical reaction representation model is optimized to obtain a third trained functional group level biochemical reaction representation model.

10. A biochemical reaction representation system based on the level of functional groups, characterized by, The system comprises: A functional group sequence construction module is configured to split functional groups of a reaction molecular structure by using an atomic environment functional group word segmentation strategy, and construct a functional group sequence data set according to the splitting result. A mask pre-training module is configured to perform random mask processing on the functional group sequence data set to generate a mask functional group sequence data set, and construct an initial functional group level biochemical reaction representation model and perform preliminary training by using a transfer learning strategy. A position exchange training module is configured to perform random exchange processing on the functional group sequence data set to construct a functional group position exchange data set, and perform secondary training on the preliminary trained functional group level biochemical reaction representation model by using the functional group sequence data set and a loss function. A supervised comparison optimization module is configured to perform third training on the secondary trained functional group level biochemical reaction representation model by using a supervised comparison learning strategy and multi-dimensional evaluation indexes to obtain a final functional group level biochemical reaction representation model. A reaction representation result module is configured to represent a to-be-represented reaction molecular structure by using the final functional group level biochemical reaction representation model to obtain a biochemical reaction representation result of the reaction molecular structure at the functional group level.