A method and device for predicting the regularity of an alkylation reaction, an electronic device and a medium
Patent Information
- Application Number
- CN202611243769.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-10-27
AI Technical Summary
然而,现有的烷基化反应预测方法存在明显不足
[0016]本申请提供了一种烷基化反应规律预测方法、装置、电子设备及介质,其中,该方法包括:获取待预测烷基化反应的输入特征,输入特征由反应参与物的分子描述符特征、反应分子指纹特征和反应条件特征拼接而成;将输入特征输入至集成预测模型,以得到待预测烷基化反应的预测结果,集成预测模型包括映射子模型和深度异构融合子模型,深度异构融合子模型用于通过多个参数独立的并行分支网络对输入特征进行异构编码以得到异构表征,并通过跨分支多头自注意力层在分支维度上对异构表征进行交互融合,得到第二内部结果,预测结果根据第一内部结果和第二内部结果得到。通过本申请,实现了将多源分子特征与反应条件融合,并利用并行网络和自注意力交互,显著提升了烷基化反应规律的预测精度和泛化能力。
Smart Images

Figure CN122991376A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chemical reaction prediction technology, and more specifically, to a method, apparatus, electronic device, and medium for predicting the behavior of alkylation reactions. Background Technology
[0002] Alkylation is a key process in the petrochemical industry for preparing high-octane clean gasoline blending components. Accurate prediction of its reaction patterns is crucial for optimizing industrial plants, screening catalysts, and controlling process parameters. However, existing methods for predicting alkylation reactions have significant limitations.
[0003] On the one hand, traditional prediction methods based on reaction kinetics rely on general process simulation systems, but due to the lack of dedicated alkylation reaction unit modules and the inaccuracy of thermodynamic calculations, accurate simulation of alkylation processes is difficult to achieve. On the other hand, kinetic models usually require prior knowledge of the reaction mechanism and elementary reaction pathway, while alkylation reactions often involve complex transient catalyst initiation and deactivation processes, making mechanism modeling difficult and parameter estimation highly uncertain.
[0004] In recent years, although machine and deep learning methods have been attempted to predict alkylation reactions, existing models mostly use single feature representations or single network structures, failing to fully integrate multi-dimensional information such as molecular structure and reaction conditions. The prediction accuracy and generalization ability still need to be improved. Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method, apparatus, electronic device and medium for predicting the alkylation reaction pattern, in order to overcome at least one deficiency.
[0006] Firstly, this application provides a method for predicting the regularity of alkylation reactions, including: The input features of the alkylation reaction to be predicted are obtained by splicing together the molecular descriptor features of the reaction participants, the molecular fingerprint features of the reaction, and the reaction condition features. The input features are input into an integrated prediction model to obtain the prediction result of the alkylation reaction to be predicted. The integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model. The mapping sub-model is used to map the input features to obtain a first internal result. The deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result. The prediction result is obtained based on the first internal result and the second internal result.
[0007] In one possible implementation, the input features are obtained in the following manner: Obtain the set of reaction participants corresponding to the alkylation reaction to be predicted, wherein the set of reaction participants includes the molecular structure information of the reactants, products and solvents respectively; The target prediction type for the alkylation reaction to be predicted is determined, and the target prediction type includes yield prediction, temperature prediction, time prediction, and pressure prediction. According to the target prediction type, a corresponding set of molecular descriptors is selected from a preset set of molecular descriptors. Based on the molecular structure information of the reactants, the molecular descriptor features of the reactants are calculated. Based on the molecular structure information of the products, the molecular descriptor features of the products are calculated. Based on the molecular structure information of the solvents, the molecular descriptor features of the solvents are calculated. The molecular descriptor features of the reactants, the molecular descriptors of the products, and the molecular descriptors of the solvents are used to characterize the electronic properties, topological properties, and physicochemical properties of their respective corresponding molecules. Based on the reaction equation of the alkylation reaction to be predicted, a reaction molecular fingerprint feature is generated by a differential reaction fingerprint encoding algorithm. The reaction molecular fingerprint feature is used to characterize the structural change information during the conversion of reactants into products. The reaction conditions of the alkylation reaction to be predicted are encoded as reaction condition features, which include reaction temperature, reaction time, reaction pressure, and reaction type. The input feature is obtained by concatenating the reactant molecule descriptor features, the product molecule descriptor features, the solvent molecule descriptor features, the reaction molecule fingerprint features, and the reaction condition features.
[0008] In one possible implementation, the deep heterogeneous fusion sub-model interactively fuses the heterogeneous representations in the following manner: The heterogeneous representations output by the multiple parameter-independent parallel branch networks are stacked and merged along the branch dimension to obtain a branch sequence; The cross-branch multi-head self-attention layer performs multi-head self-attention calculation on the branch sequence in the branch dimension, so that any branch representation can aggregate the information of the other branch representations during the update process. The output of the cross-branch multi-head self-attention layer is added to the branch sequence by residual summation, and the result of residual summation is subjected to layer normalization to obtain the branch sequence after cross-branch interaction. The cross-branch multi-head self-attention layer, the residual summation and the layer normalization are stacked in series for one or more layers.
[0009] In one possible implementation, the deep heterogeneous fusion sub-model obtains the second internal result in the following manner: The average value of each branch representation in the branch sequence after cross-branch interaction is calculated to obtain the aggregate query vector; Linear mapping is performed on the branch sequences after cross-branch interaction to obtain key vectors and value vectors; Based on the similarity between the aggregated query vector and the key vector, attention weights are obtained by normalization on the branch dimension, and the value vectors are weighted and summed using the attention weights to obtain the soft fusion context vector. Maximize the branch sequence after cross-branch interaction along the branch dimension to obtain a hard-converged context vector; The soft fusion context vector and the hard convergence context vector are concatenated to obtain the second internal result.
[0010] In one possible implementation, the prediction result of the alkylation reaction to be predicted includes multiple prediction targets, including reaction yield, reaction temperature, reaction time and reaction pressure, the mapping sub-model includes tree model units, and the first internal result includes a first intermediate result; The tree model unit obtains the first intermediate result in the following way: The input features are subjected to nonlinear feature interaction across each feature dimension, and the first intermediate result is output through additive integration of multiple decision trees based on a gradient boosting structure. The tree model unit includes multiple tree model sub-units corresponding to each of the prediction targets. The tree model sub-units corresponding to different prediction targets use different molecular descriptor features and have different learned tree structures and weights.
[0011] In one possible implementation, the mapping sub-model further includes a linear model unit, and the first internal result further includes a second intermediate result; The linear model unit obtains the second intermediate result in the following manner: Under the norm regularization constraint, a linear weighted mapping is performed on each feature dimension in the input features to output the second intermediate result. The linear model unit includes multiple linear model sub-units corresponding to each prediction target. The linear model sub-units corresponding to different prediction targets use different molecular descriptor features and learn different weight coefficients under the norm regularization constraint. The first internal result is obtained in the following way: The first intermediate result and the second intermediate result are weighted and fused to obtain the first internal result.
[0012] In one possible implementation, the deep heterogeneous fusion sub-model includes multiple deep heterogeneous fusion sub-units, which correspond to four prediction targets: reaction yield, reaction temperature, reaction time, and reaction pressure. The deep heterogeneous fusion sub-units corresponding to different prediction targets use different molecular descriptor features and have different attention weight distributions learned by the cross-branch multi-head self-attention layer.
[0013] Secondly, this application provides an apparatus for predicting the behavior of alkylation reactions, comprising: The acquisition module is used to acquire the input features of the alkylation reaction to be predicted. The input features are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features. A prediction module is used to input the input features into an integrated prediction model to obtain the prediction result of the alkylation reaction to be predicted. The integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model. The mapping sub-model is used to map the input features to obtain a first internal result. The deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result. The prediction result is obtained based on the first internal result and the second internal result.
[0014] Thirdly, this application also provides an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions, when executed by the processor, perform the steps of the method.
[0015] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the method.
[0016] This application provides a method, apparatus, electronic device, and medium for predicting the behavior of alkylation reactions. The method includes: acquiring input features of the alkylation reaction to be predicted, wherein the input features are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features; inputting the input features into an integrated prediction model to obtain a prediction result for the alkylation reaction; the integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model; the deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result; the prediction result is obtained based on the first and second internal results. This application achieves the fusion of multi-source molecular features with reaction conditions and utilizes parallel networks and self-attention interaction, significantly improving the prediction accuracy and generalization ability of alkylation reaction behavior.
[0017] To make the objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart of the alkylation reaction pattern prediction method provided in the embodiments of this application; Figure 2 A flowchart illustrating the steps for obtaining input features provided in this application embodiment; Figure 3 A flowchart illustrating the steps for obtaining a first internal result using the mapping sub-model provided in this application embodiment; Figure 4 A flowchart illustrating the steps for obtaining a second internal result from the deep heterogeneous fusion submodel provided in this application embodiment; Figure 5 This is a schematic diagram of the alkylation reaction prediction device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0021] First, the applicable scenarios for this application will be introduced. This application can be applied to the technical field of chemical reaction prediction.
[0022] Research has shown that alkylation is an important process in petroleum refining for producing high-octane gasoline blending components, and modeling its reaction behavior is crucial for optimizing reaction conditions and improving product yield.
[0023] Existing technologies propose a kinetic modeling method based on reaction mechanisms. This method classifies alkylation feedstocks into multiple lumped components such as butene, isobutane, propane, and n-butane according to analytical data, and classifies products into propane, n-butane, isobutane, and C5 to C12 components. Based on the carbocation reaction mechanism, an alkylation reaction network including chain initiation, chain propagation, and chain termination steps is constructed by combining the lumped components. On this basis, considering the reactor's structure and flow characteristics, the influence of mass transfer on the reaction is ignored, and the reactor is treated as a plug flow reactor according to a pseudo-homogeneous model, establishing a reactor model. Further, a set of reaction kinetic model equations and a reaction temperature equation are established based on the reaction network and reactor model. Finally, an objective function for estimating model parameters is proposed, and the kinetic equations are solved using numerical methods. An optimization method is used to determine model parameters such as the reaction rate constant and equilibrium constant. The optimized objective function is the sum of squares of the differences between the simulated product results and the actual results.
[0024] However, the aforementioned existing technologies have the following shortcomings in practical applications. First, this method heavily relies on mechanistic assumptions and empirical modeling. The construction of the reaction network and the establishment of kinetic equations depend on expert experience and prior knowledge. When the reaction system is complex or has side reaction pathways, it is difficult to completely and accurately describe the real reaction process. The model's generalization ability is weak, and the division of lumped components is relatively coarse, ignoring the influence of molecular-level structural differences on reaction behavior, resulting in insufficient ability to characterize microscopic chemical properties. Second, mechanistic models mainly focus on macroscopic reaction kinetic processes and usually do not introduce key factors such as molecular structural features and physicochemical properties. These factors have a significant impact on reaction pathway selection and product distribution. The lack of support from multidimensional molecular features makes it difficult for the model to fully reflect the essential laws of the reaction system, limiting further improvement in prediction accuracy. Third, in terms of model construction and solution, it does not directly address the rapid prediction of yield and reaction conditions such as temperature, time, and pressure, resulting in low efficiency and difficulty in meeting the needs of high-throughput screening and rapid decision-making.
[0025] Based on this, embodiments of this application provide a method, apparatus, electronic device, and medium for predicting the behavior of alkylation reactions. By integrating multi-source molecular descriptor features, reaction fingerprint features, and reaction condition features, an integrated prediction framework including tree models, linear models, and cross-branch multi-head self-attention depth models is constructed. The yield, temperature, time, and pressure are directly predicted from the structures of reactants and products. This overcomes the shortcomings of traditional mechanistic models, such as relying on expert experience, ignoring molecular-level information, and having low computational efficiency. It provides efficient data-driven decision support for optimizing alkylation reaction conditions.
[0026] Please see Figure 1 , Figure 1 A flowchart illustrating the alkylation reaction pattern prediction method provided in this application embodiment.
[0027] like Figure 1 As shown, in step S101, the input features of the alkylation reaction to be predicted are obtained.
[0028] In this embodiment, the input features are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features. Reaction participants refer to various substances involved in the alkylation reaction process, specifically including reactants, products, catalysts, and solvents. Molecular descriptor features are used to characterize the structural information and physicochemical properties of the reaction participants at the molecular level; molecular fingerprint features are used to characterize the breaking and formation patterns of chemical bonds during the conversion of reactants to products; and reaction condition features are used to describe the external environmental parameters of the reaction. By combining these three types of features, a complete input representation of the alkylation reaction to be predicted can be constructed from three dimensions: microscopic molecular characteristics, macroscopic reaction transformation, and external reaction environment.
[0029] The following is combined with Figure 2 This section will introduce the specific process of obtaining the above input features.
[0030] Figure 2 A flowchart illustrating the steps for obtaining input features provided in this application embodiment.
[0031] like Figure 2 As shown, in step S201, the set of reaction participants corresponding to the alkylation reaction to be predicted is obtained.
[0032] In the embodiments of this application, the set of reaction participants includes the molecular structure information of the reactants, products, and solvents respectively.
[0033] In one embodiment, the molecular structure information of each substance included in the aforementioned set of reaction participants is obtained by loading an experimental data file. This experimental data file records detailed data for each alkylation experiment, including reactants, products, catalysts, solvents, reaction type, reaction temperature, reaction time, reaction pressure, and yield. When loading the experimental data, it is also necessary to remove outliers, adjust experimental parameters according to actual conditions, and standardize the data format and units to ensure correct identification and processing in subsequent steps.
[0034] In step S202, the target prediction type for the alkylation reaction to be predicted is determined.
[0035] In this embodiment, the target prediction type refers to the specific reaction index or reaction condition that needs to be predicted. The target prediction types include four types: yield prediction, temperature prediction, time prediction, and pressure prediction. Yield prediction refers to predicting the yield of the target component in the alkylation reaction product. Temperature prediction refers to predicting the optimal reaction temperature required for the alkylation reaction. Time prediction refers to predicting the optimal reaction time required for the alkylation reaction. Pressure prediction refers to predicting the optimal reaction pressure required for the alkylation reaction. Different target prediction types correspond to different prediction needs. In practical applications, results of all four target prediction types can be obtained simultaneously as needed, or predictions can be made for one or more of these target prediction types. For simplicity, the target prediction type is simply referred to as the prediction target; the terms "prediction target" and "target prediction type" have the same meaning.
[0036] In step S203, based on the target prediction type, a corresponding set of molecular descriptors is selected from a preset set of molecular descriptors, and the molecular descriptor features are calculated.
[0037] In the embodiments of this application, the preset multiple sets of molecular descriptors are combinations of descriptors determined in advance for the above four target prediction types through feature screening and experimental verification. Different target prediction types focus on different molecular characteristics, therefore the combinations of molecular descriptors selected are also different. Specific embodiments are given below for each target prediction type.
[0038] In one specific embodiment, when the target prediction type is yield prediction, a set of molecular descriptors corresponding to the yield prediction is selected from a preset set of molecular descriptors. This set of molecular descriptors includes the Barban index, the minimum absolute electric state index, the electrotopological state-surface area descriptor VSA_EState8, the electrotopological state-surface area descriptor VSA_EState4, the electrotopological state-surface area descriptor EState_VSA4, and the partial charge-surface area descriptor PEOE_VSA6. These descriptors focus on molecular topological complexity and electrotopological state, influencing the selection of reaction pathways and product distribution.
[0039] In another specific embodiment, when the target prediction type is temperature prediction, a set of molecular descriptors corresponding to the temperature prediction is selected from a preset set of molecular descriptors. This set of molecular descriptors includes the partial charge surface area descriptor PEOE_VSA8, the lipid-water partition coefficient surface area descriptor SlogP_VSA5, the eigenvalue correlation descriptor BCUT2D_MWHI, the eigenvalue correlation descriptor BCUT2D_MWLOW, the electrotopological state-surface area descriptor VSA_EState4, the minimum electrotopological state index, the Kappa shape index, and the molecular lipid-water partition coefficient. These descriptors focus more on molecular weight-related and shape-related topological indices and can be used as inputs to the temperature prediction model to characterize molecular structural features related to the choice of reaction temperature.
[0040] In another specific embodiment, when the target prediction type is time prediction, a set of molecular descriptors corresponding to time prediction is selected from a preset set of molecular descriptors. This set of molecular descriptors includes the Morgan fingerprint density descriptor, the eigenvalue correlation descriptor BCUT2D_LOGPHI, the eigenvalue correlation descriptor BCUT2D_MWLOW, the partial charge surface area descriptor PEOE_VSA7, the partial charge surface area descriptor PEOE_VSA9, and the electrotopological state-surface area descriptor VSA_EState5. These descriptors introduce indices such as the Morgan fingerprint density that reflect the local structural complexity of molecules, and can be used as input to the time prediction model to characterize the molecular structural features related to reaction time.
[0041] In another specific embodiment, when the target prediction type is stress prediction, a set of molecular descriptors corresponding to the stress prediction is selected from a preset set of molecular descriptors. This set of molecular descriptors includes partial charge surface area descriptors PEOE_VSA6 and PEOE_VSA7, intrinsic value correlation descriptors BCUT2D_MRLOW, electric state surface area descriptors VSA_EState9, drug-like parameters, topological polarity surface area, molecular weight, lipid-water partition coefficient, number of hydrogen bond donors, and number of hydrogen bond acceptors. These descriptors focus on the charge distribution, topological polarity, hydrogen bonding ability, and lipid-water partition of the molecule, and can be used as input to the stress prediction model to characterize the molecular structural features related to reaction stress selection.
[0042] In this embodiment of the application, the molecular descriptor features are obtained by calling the cheminformatics tool RDKit to calculate the molecular structure information of each substance in the reaction participant set.
[0043] Specifically, reactant molecular descriptor features are calculated based on the molecular structure information of the reactants, product molecular descriptor features are calculated based on the molecular structure information of the products, and solvent molecular descriptor features are calculated based on the molecular structure information of the solvent. These reactant, product, and solvent molecular descriptor features characterize the electronic, topological, and physicochemical properties of their respective molecules. Electronic properties refer to descriptors related to charge distribution within the molecule, including partial charge surface area descriptors and electric state descriptors, used to describe how the partial charge of each atom within the molecule is distributed on the molecular surface. Topological properties refer to descriptors related to the connection patterns of the molecular skeleton, including the Barban index, Kappa shape index, and Morgan fingerprint density descriptors, used to describe the degree of branching, cyclic structure, and overall topological complexity of the molecule. Physicochemical properties refer to descriptors related to the macroscopic physicochemical properties of the molecule, including molecular weight, lipid-water partition coefficient, topological polar surface area, drug-likeness parameters, number of hydrogen bond donors, number of hydrogen bond acceptors, and eigenvalue-related descriptors, used to describe the solubility, permeability, and intermolecular interaction capabilities of the molecule.
[0044] In step S204, based on the reaction equation of the alkylation reaction to be predicted, the reaction molecular fingerprint features are generated by the differential reaction fingerprinting algorithm.
[0045] In the embodiments of this application, the molecular fingerprint features of the reaction are used to characterize the structural changes during the transformation of reactants into products. The differential reaction fingerprinting algorithm, also known as the DRFP encoding algorithm, is a method specifically designed to encode chemical reaction information, capable of converting the entire chemical reaction equation into a fixed-length numerical vector.
[0046] In one specific embodiment, the process of generating reaction molecular fingerprint features is as follows: The reaction equation for the alkylation reaction is standardized and written in a uniform format. Molecular fingerprints of the reactants and products are calculated separately based on the DRFP encoding algorithm. Differential operations are performed on the reactant and product fingerprints to obtain reaction-level differential fingerprints. This reaction-level differential fingerprint captures the overall pattern of chemical bond breaking and formation, providing a macroscopic level of reaction characterization.
[0047] It should be noted that the embodiments of this application are applicable to various types of alkylation reactions. In some embodiments, the chemical process described by the above reaction equation can be, for example, a chemical process in which olefin feedstock and alkane feedstock are converted into alkylated oil products under the action of an acid catalyst. The reaction follows a carbocation reaction mechanism and includes steps such as chain initiation, chain propagation, and chain termination. Based on the alkylation reaction mechanism and in combination with multiple lumped components, an alkylation reaction network is constructed, which includes multiple chemical reactions.
[0048] In step S205, the reaction conditions of the alkylation reaction to be predicted are encoded as reaction condition features.
[0049] In the embodiments of this application, the reaction condition features include reaction temperature, reaction time, reaction pressure, and reaction type. Reaction temperature refers to the operating temperature within the reactor during the alkylation reaction. Reaction time refers to the residence time of the reactants within the reactor. Reaction pressure refers to the operating pressure within the reactor during the alkylation reaction. Reaction type refers to the specific type of alkylation reaction, such as sulfuric acid alkylation or hydrofluoric acid alkylation. The reaction condition features are converted into a computer-recognizable numerical vector format through encoding processing.
[0050] In step S206, the reactant molecule descriptor features, product molecule descriptor features, solvent molecule descriptor features, reaction molecule fingerprint features, and reaction condition features are concatenated to obtain the input features.
[0051] In this embodiment, the reactant molecule descriptor features, product molecule descriptor features, and solvent molecule descriptor features calculated in step S203, the reaction molecule fingerprint features generated in step S204, and the reaction condition features encoded in step S205 are concatenated to obtain the input features for the alkylation reaction to be predicted. This input feature is a high-dimensional feature vector, with each experimental sample corresponding to a complete high-dimensional feature vector. This feature vector is the input to the integrated prediction model.
[0052] return Figure 1 In step S102, the input features are input into the integrated prediction model to obtain the prediction results of the alkylation reaction to be predicted.
[0053] In this embodiment, the ensemble prediction model is a pre-trained fusion model containing two branches: a mapping sub-model and a deep heterogeneous fusion sub-model. Upon receiving input features, the ensemble prediction model simultaneously feeds these features into both the mapping sub-model and the deep heterogeneous fusion sub-model for parallel processing. The mapping sub-model maps the input features to obtain a first internal result. The deep heterogeneous fusion sub-model uses multiple parameter-independent parallel branch networks to heterogeneously encode the input features, obtaining heterogeneous representations. It then uses cross-branch multi-head self-attention layers to interactively fuse these heterogeneous representations along the branch dimensions, obtaining a second internal result. After the mapping sub-model outputs the first internal result and the deep heterogeneous fusion sub-model outputs the second internal result, the ensemble prediction model determines the prediction result for the alkylation reaction based on both results. The prediction result includes at least one of the following: reaction yield, reaction temperature, reaction time, and reaction pressure.
[0054] Let's combine the following... Figure 3 This section will introduce the specific process by which the mapping sub-model obtains the first internal result.
[0055] Figure 3 A flowchart illustrating the steps for obtaining a first internal result from the mapping sub-model provided in this application embodiment.
[0056] In this embodiment, the mapping sub-model contains two different types of processing units: a tree model unit and a linear model unit. These two units process the input features independently and in parallel, and then fuse their intermediate outputs to form the first internal result. The processing procedures of the tree model unit, the linear model unit, and the fusion process of the two are described below.
[0057] like Figure 3 As shown, in step S301, the tree model unit in the mapping sub-model performs nonlinear feature interaction on the input features to obtain the first intermediate result.
[0058] In this embodiment, the tree model unit is used to perform nonlinear feature interaction on each feature dimension of the input features, and outputs a first intermediate result through additive ensemble of multiple decision trees based on the gradient boosting structure. The gradient boosting structure is an iterative ensemble learning algorithm whose core idea is to continuously improve the model's predictive ability by gradually adding decision trees. Additive ensemble means that the final prediction result is obtained by weighted summation of the outputs of multiple decision trees according to the learning rate.
[0059] In one specific implementation, the tree model unit is implemented using the LightGBM model. The model expression is given below using the tree model unit corresponding to the predicted target being stress as an example. The tree model unit expressions for other predicted targets have the same structure, differing only in features and weights.
[0060] Features for predicting pressure include, but are not limited to: PEOE_VSA6, PEOE_VSA7, BCUT2D_MRLOW, VSA_EState9, qed, polarity_TPSA, MW, logP, acidity_HBD, and basicity_HBA. The model expression is shown below:
[0061] In the formula, It is the m-th tree pair of samples The output is η, which represents the learning rate, and η = 0.05.
[0062] Features used when predicting the target label as temperature include, but are not limited to: PEOE_VSA8, SlogP_VSA5, BCUT2D_MWHI, BCUT2D_MWLOW, VSA_EState4, MinEStateIndex, Kappa3, and MolLogP. The model expression is shown below:
[0063] In the formula, It is the m-th tree pair of samples The output is η, which represents the learning rate, and η = 0.05.
[0064] Features used when predicting the target label as yield include, but are not limited to: BalabanJ, MinAbsEStateIndex, VSA_EState8, VSA_EState4, EState_VSA4, and PEOE_VSA6. The model expression is shown below:
[0065] In the formula, It is the m-th tree pair of samples The output is η, which represents the learning rate, and η = 0.05.
[0066] Features used when the prediction target is reaction time include, but are not limited to: FpDensityMorgan3, BCUT2D_LOGPHI, BCUT2D_MWLOW, PEOE_VSA7, PEOE_VSA9, and VSA_EState5. The model expression is shown below:
[0067] In the formula, It is the m-th tree pair of samples The output is η, which represents the learning rate, and η = 0.05.
[0068] The tree model unit can automatically learn the nonlinear interactions between features, such as the complex influence of different molecular descriptor features and reaction condition features on yield, without requiring manual specification of feature interaction terms. The first intermediate result mentioned above is the output of the tree model unit; when the prediction target is pressure, the corresponding result is... When the target of prediction is temperature, the corresponding When the prediction target is the yield, the corresponding When the prediction target is time, the corresponding .
[0069] In step S302, the linear model unit in the mapping sub-model performs a linear weighted mapping on the input features to obtain the second intermediate result.
[0070] In this embodiment, the linear model unit is used to perform a linear weighted mapping of each feature dimension in the input features under norm regularization constraints, and output a second intermediate result. Norm regularization constraints refer to L2 regularization, which applies a penalty term to the weight parameters during model training, causing the weight coefficients to shrink towards zero. This can prevent the model from over-relying on certain features and improve generalization ability.
[0071] In one specific embodiment, the linear model unit is implemented using an L2-regularized logistic regression model. The model expression is given below using the linear model unit corresponding to the predicted target of stress as an example. The expression structure of the linear model unit corresponding to other predicted targets is the same, only the features and weights differ. The features for the predicted target of stress include, but are not limited to: PEOE_VSA6, PEOE_VSA7, BCUT2D_MRLOW, VSA_EState9, qed, polarity_TPSA, MW, logP, acidity_HBD, and basicity_HBA. The model expression is as follows:
[0072] In the formula, This represents the probability that a linear model unit predicts that the input feature vector x belongs to the k-th class when the target of the prediction is pressure; x is the input feature vector. This is the weight vector corresponding to the k-th class; This represents the bias term corresponding to the k-th class; K is the total number of classes. The sum of exponents for all categories is used to normalize the output into a probability distribution.
[0073] Features for predicting temperature include, but are not limited to: PEOE_VSA8, SlogP_VSA5, BCUT2D_MWHI, BCUT2D_MWLOW, VSA_EState4, MinEStateIndex, Kappa3, and MolLogP. The corresponding linear model unit expression for predicting temperature is as follows:
[0074] In the formula, This represents the probability that a linear model unit predicts that the input feature vector x belongs to the k-th class when the target of prediction is temperature. This is the weight vector corresponding to the k-th class; This is the bias term corresponding to the k-th class.
[0075] Features used when the prediction target is yield include, but are not limited to: BalabanJ, MinAbsEStateIndex, VSA_EState8, VSA_EState4, EState_VSA4, and PEOE_VSA6. The corresponding linear model unit expression when the prediction target is yield is as follows:
[0076] In the formula, This represents the probability that a linear model unit predicts that the input feature vector x belongs to the k-th class when the prediction target is yield. This is the weight vector corresponding to the k-th class; This is the bias term corresponding to the k-th class.
[0077] Features used when the prediction target is reaction time include, but are not limited to: FpDensityMorgan3, BCUT2D_LOGPHI, BCUT2D_MWLOW, PEOE_VSA7, PEOE_VSA9, and VSA_EState5. The corresponding linear model unit expression when the prediction target is time is as follows:
[0078] In the formula, This represents the probability that a linear model unit predicts that the input feature vector x belongs to the k-th class when the prediction target is time. This is the weight vector corresponding to the k-th class; This is the bias term corresponding to the k-th class.
[0079] The second intermediate result mentioned above is the output of the linear model unit, corresponding to the prediction target being pressure. When the target of prediction is temperature, the corresponding When the prediction target is the yield, the corresponding When the prediction target is time, the corresponding .
[0080] In step S303, the mapping sub-model performs a weighted fusion of the first intermediate result and the second intermediate result to obtain the first internal result.
[0081] In this embodiment, after obtaining the first intermediate result output by the tree model unit and the second intermediate result output by the linear model unit, the mapping sub-model weights and fuses the first and second intermediate results to obtain the first internal result. This fusion method enables the mapping sub-model to combine the tree model unit's ability to model nonlinear feature interactions with the linear model unit's ability to stably estimate linear main effects.
[0082] The following is combined with Figure 4 This section introduces the specific process by which a deep heterogeneous fusion sub-model interacts and fuses heterogeneous representations to obtain a second internal result.
[0083] Figure 4 A flowchart illustrating the steps for obtaining a second internal result from the deep heterogeneous fusion sub-model provided in this application embodiment.
[0084] In step S401, the heterogeneous representations output by multiple parallel branch networks with independent parameters are stacked and merged along the branch dimension to obtain a branch sequence.
[0085] In this embodiment, the heterogeneous representation is obtained by a deep heterogeneous fusion sub-model through heterogeneous encoding of input features using multiple parallel branch networks with independent parameters. Each parallel branch network has independent model parameters, and when encoding the input features, each branch network focuses on different feature information, thereby extracting multiple differentiated feature representations from the input features. After obtaining the heterogeneous representations output by each parallel branch network, the deep heterogeneous fusion sub-model merges the heterogeneous representations of each branch into a single branch sequence through a stacking and merging operation along the branch dimension.
[0086] In one specific embodiment, the aforementioned parallel branch network with multiple independent parameters consists of three nonlinear transformation branches with distinct parameters, each corresponding to one of the three information channels. The deep heterogeneous fusion sub-model includes multiple deep heterogeneous fusion sub-units, each corresponding to one of the four prediction targets: reaction yield, reaction temperature, reaction time, and reaction pressure. The molecular descriptor features used by the deep heterogeneous fusion sub-units corresponding to different prediction targets are different.
[0087] Taking the deep model corresponding to the predicted target being pressure as an example, the features used in this deep model include: PEOE_VSA6, PEOE_VSA7, BCUT2D_MRLOW, VSA_EState9, qed, polarity_TPSA, MW, logP, acidity_HBD, and basicity_HBA. Let the feature vector of a single sample be... x 1∈R d1 In batch processing, the following operations can be performed independently on each sample. The formula for shared representation is:
[0088] in This represents a shared feature extraction function consisting of linear mapping, normalization, and nonlinear activation in sequence. For shared features, the formula for the three-parallel heterogeneous branch coding is:
[0089] in , , These are nonlinear transformations with distinct parameters, corresponding to three information channels. The branch representation vector h is obtained from the output of each of the three parallel branches. 11 ∈R d2 h 12 ∈R d2 h 13 ∈R d2 Then, they are merged into a branch sequence T1 by stacking along the branch dimension. 0 ∈R d2×3 In batch processing, T1 0 ∈R B×3×d2 The second dimension is always three, representing three branch tokens, B is the batch size, and d2 is the dimension of each branch representation vector.
[0090] Taking the deep model corresponding to the predicted target as temperature as an example, the features used in this deep model include: PEOE_VSA8, SlogP_VSA5, BCUT2D_MWHI, BCUT2D_MWLOW, VSA_EState4, MinEStateIndex, Kappa3, and MolLogP. Let the feature vector of a single sample be... x 2∈R d1 The formula for shared representation is:
[0091] in This represents a shared feature extraction function consisting of linear mapping, normalization, and nonlinear activation in sequence. The formula for the three-parallel heterogeneous branch coding is:
[0092] in , , These are nonlinear transformations with distinct parameters, corresponding to three information channels. The branch representation vector h is obtained from the output of each of the three parallel branches. 21 ∈R d2 h 22 ∈R d2 h 23 ∈R d2 Then, they are merged into a branch sequence T2 by stacking along the branch dimension. 0 ∈R d2×3 In batch processing, T2 0 ∈R B×3×d2 .
[0093] Taking the deep learning model corresponding to the prediction target of yield as an example, the features used in this deep learning model include: BalabanJ, MinAbsEStateIndex, VSA_EState8, VSA_EState4, EState_VSA4, and PEOE_VSA6. Let the feature vector of a single sample be... x 3∈R d1 The formula for shared representation is:
[0094] in This represents a shared feature extraction function consisting of linear mapping, normalization, and nonlinear activation in sequence. The formula for the three-parallel heterogeneous branch coding is:
[0095] in , , These are nonlinear transformations with distinct parameters, corresponding to three information channels. The branch representation vector h is obtained from the output of each of the three parallel branches. 31 ∈R d2 h 32 ∈R d2 h 33 ∈R d2 Then, they are merged into a branch sequence T3 by stacking along the branch dimension. 0 ∈R d2×3 In batch processing, T3 0 ∈R B×3×d2 .
[0096] Taking the deep model corresponding to the prediction target as time as an example, the features used in this deep model include: FpDensityMorgan3, BCUT2D_LOGPHI, BCUT2D_MWLOW, PEOE_VSA7, PEOE_VSA9, and VSA_EState5. Let the feature vector of a single sample be... x 4∈R d1 The formula for shared representation is:
[0097] in This represents a shared feature extraction function consisting of linear mapping, normalization, and nonlinear activation in sequence. The formula for the three-parallel heterogeneous branch coding is:
[0098] in , , These are nonlinear transformations with distinct parameters, corresponding to three information channels. The branch representation vector h is obtained from the output of each of the three parallel branches. 41 ∈R d2 h 42 ∈R d2 h 43 ∈R d2 Then, they are merged into a branch sequence T4 by stacking along the branch dimension. 0 ∈R d2×3 In batch processing, T4 0 ∈R B×3×d2 .
[0099] In step S402, multi-head self-attention calculation is performed on the branch sequence in the branch dimension through a cross-branch multi-head self-attention layer, so that the information of the other branch representations can be aggregated during the update process of any branch representation.
[0100] In this embodiment, the branch sequence obtained by stacking and merging in step S401 is input into a cross-branch multi-head self-attention layer, and multi-head self-attention calculation is performed on the branch sequence along the branch dimension. Since the summation dimension of the attention weights corresponds to the branch dimension, during the multi-head self-attention calculation process, any branch representation can aggregate information from the other branch representations during the update process, thereby realizing explicit interaction and representation refinement between different information channels. Cross-branch means that the scope of the attention mechanism spans three branch tokens, rather than being calculated only within a single branch. This mechanism enables information channels from three different perspectives to communicate and complement each other.
[0101] Taking the depth model corresponding to the predicted target as pressure as an example, we will Input stacked multi-head self-attention layers, the first Layers Given the input sequence, perform self-attention computation on the three branch tokens along the branch dimension and obtain... The formula is as follows, for... =1,...,L:
[0102] in The branch sequence is the output of the three-parallel heterogeneous branch encoding. For the first The branch sequence of the layer input, This represents the multi-head self-attention function in the deep model when the prediction target is stress. This is an intermediate result after adding the residuals. This represents the layer normalization function in the deep model when the predicted target is pressure. For the first The branch sequence output by the layer. Since the summation dimension of the attention weights corresponds to the branch dimension, the update of any branch token incorporates information from the other branch tokens.
[0103] Taking the depth model corresponding to the predicted target being temperature as an example, we will... Input stacked multi-head self-attention layers, for =1,...,L:
[0104] in The branch sequence is the output of the three-parallel heterogeneous branch encoding. This represents the multi-head self-attention function in the depth model when the prediction target is temperature. This represents the layer normalization function in the depth model when the prediction target is temperature.
[0105] Taking the deep model corresponding to the predicted target of yield as an example, we will Input stacked multi-head self-attention layers, for =1,...,L:
[0106] in The branch sequence is the output of the three-parallel heterogeneous branch encoding. This represents the multi-head self-attention function in the deep model when the prediction objective is yield. This represents the layer normalization function in the deep model when the prediction target is yield.
[0107] Taking the deep model corresponding to the prediction target as time as an example, we will Input stacked multi-head self-attention layers, for =1,...,L:
[0108] in The branch sequence is the output of the three-parallel heterogeneous branch encoding. This represents the multi-head self-attention function in the deep model when the prediction target is time. This represents the layer normalization function in the deep model when the prediction target is time.
[0109] The aforementioned cross-branch multi-head self-attention computation is stacked in series with one or more layers. The more layers stacked, the deeper the cross-branch information fusion, and the more the interaction between different information channels is gradually enhanced.
[0110] In step S403, the output of the cross-branch multi-head self-attention layer is added to the branch sequence by residual summation, and the result of residual summation is layer normalized to obtain the branch sequence after cross-branch interaction. Among them, one or more layers of cross-branch multi-head self-attention layers, residual summation, and layer normalization are stacked in series.
[0111] In this embodiment, after the cross-branch multi-head self-attention layer completes the self-attention calculation on the branch sequence, the output of the cross-branch multi-head self-attention layer is added to the branch sequence of the attention input by residual summation. This involves adding the results before and after attention calculation element-wise. This residual summation operation preserves information from the original branch sequence, preventing information loss during deep network training. Layer normalization is then performed on the result after residual summation. This operation adjusts the numerical distribution of each branch representation to a standard distribution with a mean of zero and a variance of one, helping to stabilize the training process and accelerate convergence. One or more layers of cross-branch multi-head self-attention layer, residual summation, and layer normalization are stacked in series to progressively enhance the depth of cross-channel information fusion. Taking the deep model corresponding to the predicted target as pressure as an example, the branch sequence after cross-branch interaction is... Taking the depth model corresponding to the predicted target as temperature as an example Taking the deep learning model corresponding to the predicted target as the yield as an example Taking the deep model corresponding to the prediction target as time as an example , where L is the total number of stacked layers.
[0112] In step S404, the average value of each branch representation in the branch sequence after cross-branch interaction is calculated to obtain the aggregated query vector.
[0113] In this embodiment, after residual summation and layer normalization, the branch sequence following cross-branch interaction incorporates complementary information from other branches. Averaging the branch representations in the cross-branch interaction sequence involves averaging the three branch tokens along the branch dimension, summing them into an aggregated query vector that integrates global features from all branches. This aggregated query vector represents the overall feature representation after cross-branch information fusion and is used for subsequent similarity matching with each branch.
[0114] Taking the deep model with pressure as the prediction target as an example, the aggregated query vector is obtained by averaging the output T1 of the cross-branch multi-head self-attention. Taking the deep model with temperature as the prediction target as an example, the aggregated query vector is obtained by averaging the output T2 of the cross-branch multi-head self-attention. Taking the deep model with yield as the prediction target as an example, the aggregated query vector is obtained by averaging the output T3 of the cross-branch multi-head self-attention. Taking the deep model with time as the prediction target as an example, the aggregated query vector is obtained by averaging the output T4 of the cross-branch multi-head self-attention.
[0115] In step S405, the branch sequences after cross-branch interaction are linearly mapped to obtain key vectors and value vectors.
[0116] In this embodiment, the branch sequence after cross-branch interaction is subjected to two sets of parameter-independent linear mapping transformations. One set of linear mappings maps the branch representations in the branch sequence to key vectors, and the other set maps the branch representations in the branch sequence to value vectors. The key vectors are used for similarity matching with the aggregated query vector to determine the importance of each branch's information. The value vectors carry the actual feature information of each branch and are aggregated and extracted in the subsequent attention weighting process.
[0117] Taking the depth model corresponding to the predicted target of pressure as an example, linear mapping is performed on T1 to obtain the bond vector and value vector. Taking the depth model corresponding to the predicted target of temperature as an example, linear mapping is performed on T2 to obtain the bond vector and value vector. Taking the depth model corresponding to the predicted target of yield as an example, linear mapping is performed on T3 to obtain the bond vector and value vector. Taking the depth model corresponding to the predicted target of time as an example, linear mapping is performed on T4 to obtain the bond vector and value vector.
[0118] In step S406, attention weights are obtained by normalizing the branch dimension based on the similarity between the aggregated query vector and the key vector, and the value vectors are weighted and summed using the attention weights to obtain the soft fusion context vector.
[0119] In this embodiment, the similarity between the aggregated query vector obtained in step S404 and the key vector obtained in step S405 is calculated. This similarity reflects the degree of attention the aggregated query vector pays to the key vectors of each branch. The similarity calculation results are normalized along the branch dimensions, converting the similarity into attention weights, with the sum of all attention weights being one. Based on the normalized attention weights, the value vectors corresponding to each branch are weighted and summed, i.e., the value vectors of each branch are multiplied by their corresponding attention weights and then accumulated to obtain the soft-fusion context vector. This soft-fusion context vector is a soft information aggregation result based on an attention mechanism, where the information from each branch is fused to varying degrees according to its relevance to the comprehensive query.
[0120] Taking the deep learning model for predicting pressure as an example, attention weights are obtained by normalizing the query vector and each branch key vector along the branch dimension based on their similarity. The value vectors are then weighted and summed to obtain the soft-fusion context vector. Similarly, for the deep learning model for predicting temperature, attention weights are obtained by normalizing the query vector and each branch key vector along the branch dimension based on their similarity. The value vectors are then weighted and summed to obtain the soft-fusion context vector. For the deep learning model for predicting yield, attention weights are obtained by normalizing the query vector and each branch key vector along the branch dimension based on their similarity. The value vectors are then weighted and summed to obtain the soft-fusion context vector. Finally, for the deep learning model for predicting time, attention weights are obtained by normalizing the query vector and each branch key vector along the branch dimension based on their similarity. The value vectors are then weighted and summed to obtain the soft-fusion context vector.
[0121] In step S407, the branch sequence after cross-branch interaction is subjected to maximum convergence along the branch dimension to obtain a hard convergence context vector.
[0122] In this embodiment, a maximum convergence operation is performed on the branch sequence after cross-branch interaction along the aforementioned branch dimensions. This involves taking the maximum value at the same position represented by each branch in the branch sequence to obtain a hard-converged context vector. Unlike the soft fusion operation in step S406, which uses attention weights for weighting, the maximum convergence operation directly selects the maximum value of each branch along each feature dimension. This captures significant extreme value differences between branches and extracts feature signals that are particularly prominent in some branches but less obvious in others, thus complementing the aforementioned soft-converged context vector.
[0123] Taking the deep model corresponding to the predicted target of pressure as an example, maximum aggregation is performed on T1 in the branch dimension to obtain a hard-aggregated context vector, which is used to capture significant extreme value differences between branches. Taking the deep model corresponding to the predicted target of temperature as an example, maximum aggregation is performed on T2 in the branch dimension to obtain a hard-aggregated context vector, which is used to capture significant extreme value differences between branches. Taking the deep model corresponding to the predicted target of yield as an example, maximum aggregation is performed on T3 in the branch dimension to obtain a hard-aggregated context vector, which is used to capture significant extreme value differences between branches. Taking the deep model corresponding to the predicted target of time as an example, maximum aggregation is performed on T4 in the branch dimension to obtain a hard-aggregated context vector, which is used to capture significant extreme value differences between branches.
[0124] In step S408, the soft fusion context vector and the hard convergence context vector are concatenated to obtain the second internal result.
[0125] In this embodiment of the application, the soft fusion context vector obtained in step S406 and the hard convergence context vector obtained in step S407 are concatenated along the feature dimension at the vector level, and the two context vectors are connected end to end and merged into a unified fusion feature vector, which is the second internal result.
[0126] Taking the deep model corresponding to the predicted target as pressure as an example, the vectors obtained in the above steps are concatenated along the feature dimension to obtain a unified fused feature vector, and the prediction result T1 is output. p Taking the depth model corresponding to the predicted target of temperature as an example, the vectors obtained in the above steps are concatenated along the feature dimension to obtain a unified fused feature vector, and the prediction result T2 is output. p Taking the deep model corresponding to the predicted yield as an example, the vectors obtained in the above steps are concatenated along the feature dimension to obtain a unified fused feature vector, and the prediction result T3 is output. p Taking the deep model corresponding to time as the prediction target as an example, the vectors obtained in the above steps are concatenated along the feature dimension to obtain a unified fused feature vector, and the prediction result T4 is output. p .
[0127] The above-described splicing operation simultaneously preserves both soft fusion information based on attention weights and hard extremum information based on maximum convergence. These two elements complement each other, together forming a complete representation of the cross-branch interaction results. In this embodiment, after obtaining the first internal result output by the mapping sub-model and the second internal result output by the deep heterogeneous fusion sub-model, the integrated prediction model determines the prediction result based on the first and second internal results.
[0128] In a preferred embodiment of this application, the prediction result is obtained by weighted summation of the first internal result and the second internal result, wherein the sum of the weights corresponding to the first internal result and the weights corresponding to the second internal result is one.
[0129] Specifically, for cases where the prediction target is yield, the model fusion formula is as follows:
[0130] In the formula, f 11 f 12 f 13 These represent the weights corresponding to the tree model unit, the linear model unit, and the deep heterogeneous fusion sub-model, respectively, and the sum of the weights of the three is one.
[0131] For the case where the prediction target is temperature, the model fusion formula is as follows:
[0132] In the formula, f 21 f 22 f 23 These represent the weights corresponding to the tree model unit, the linear model unit, and the deep heterogeneous fusion sub-model, respectively, and the sum of the weights of the three is one.
[0133] For cases where the prediction target is time, the model fusion formula is as follows:
[0134] In the formula, f 31 f 32 f 33 These represent the weights corresponding to the tree model unit, the linear model unit, and the deep heterogeneous fusion sub-model, respectively, and the sum of the weights of the three is one.
[0135] For the case where the prediction target is pressure, the model fusion formula is as follows:
[0136] In the formula, f 41 f 42 f 43 These represent the weights corresponding to the tree model unit, the linear model unit, and the deep heterogeneous fusion sub-model, respectively, and the sum of the weights of the three is one.
[0137] In a preferred embodiment of this application, the tree model unit in the mapping sub-model includes multiple tree model sub-units corresponding to each prediction target. The tree model sub-units corresponding to different prediction targets use different molecular descriptor features and have different learned tree structures and weights. The linear model unit in the mapping sub-model includes multiple linear model sub-units corresponding to each prediction target. The linear model sub-units corresponding to different prediction targets use different molecular descriptor features and have different weight coefficients learned under norm regularization constraints. The deep heterogeneous fusion sub-model includes multiple deep heterogeneous fusion sub-units, each corresponding to one of the four prediction targets: reaction yield, reaction temperature, reaction time, and reaction pressure. The deep heterogeneous fusion sub-units corresponding to different prediction targets use different molecular descriptor features and have different attention weight distributions learned across the multi-head self-attention layer.
[0138] In the embodiments of this application, the integrated prediction model, when input into practical applications, incorporates the structural information of the target reaction and related conditions to predict key reaction parameters. Specifically, by inputting information such as the products, reactants, and solvents of the reaction to be predicted into the integrated prediction model, the model outputs predicted yields, temperatures, times, and pressures, with an overall accuracy exceeding 70%. This method achieves a unified modeling of the relationship between reaction results and reaction conditions, providing effective data-driven decision support for optimizing alkylation reaction conditions and designing experiments.
[0139] In this embodiment, the integrated prediction model needs to be trained before application. The training process includes: loading and preprocessing experimental data of alkylation reaction; calculating different molecular descriptor features according to different prediction targets; using the DRFP encoding algorithm to convert the chemical reaction equation into reaction molecular fingerprint features; encoding the features calculated from products, reactants, solvents, reaction type, reaction temperature, reaction pressure, reaction time, etc. into vectors; training a LightGBM model, an L2 logistic regression model, and a deep learning model based on cross-branch multi-head self-attention fusion for prediction targets of yield, temperature, time, and pressure, respectively, based on the vectorized features; and fusing the LightGBM model, L2 logistic regression model, and deep learning model with the same prediction target together with certain weights to obtain an alkylation reaction law prediction model, which includes four independent models that predict yield, temperature, time, and pressure, respectively.
[0140] Compared with existing technologies, this application, in terms of feature construction, integrates multi-source features based on molecular structure information and overall reaction information. On one hand, it utilizes RDKit to calculate molecular descriptors for reactants, products, and solvents, extracting multi-dimensional molecular physicochemical properties, including electronic characteristics, topological features, and physicochemical properties. On the other hand, it constructs reaction-level fingerprints based on reaction equations and introduces the DRFP encoding method to characterize structural changes during the reaction process. By combining molecular-level descriptors with reaction-level fingerprint features, it preserves microscopic molecular structure information while characterizing macroscopic reaction transformation features, thereby constructing a more comprehensive reaction representation and improving the model's ability to express complex reaction laws.
[0141] In terms of model construction, this application adopts a multi-model collaborative modeling and fusion strategy. A nonlinear model based on LightGBM is constructed to fully explore the complex nonlinear relationships between features. Simultaneously, an L2-regularized logistic regression model is introduced to linearly model the features, enhancing the model's stability and generalization ability. Building upon this, a deep learning model based on cross-branch multi-head self-attention fusion is further constructed. Through shared feature extraction, multi-branch heterogeneous encoding, and multi-head self-attention mechanisms, deep interaction and information fusion between different feature subspaces are achieved, thereby improving the modeling ability for complex reaction systems. The above multiple models are weighted and integrated, combining the advantages of different models in different feature spaces, effectively improving the stability and accuracy of the prediction results. Furthermore, compared to traditional reaction kinetics-based modeling methods, this application does not require explicit construction of complex reaction mechanism equations, avoiding the tedious estimation process of parameters such as reaction rate constants and equilibrium constants, significantly reducing modeling difficulty and computational cost, and improving the model's applicability in different reaction systems. Further, this application uses reaction yield, reaction temperature, reaction time, and reaction pressure as prediction targets to achieve unified modeling of the relationship between reaction results and reaction conditions.
[0142] In summary, this application effectively overcomes the shortcomings of existing technologies in terms of insufficient feature expression, limited model generalization ability, and low computational efficiency by introducing multi-source molecular features, constructing a multi-model fusion framework, and adopting a data-driven approach to replace traditional mechanism modeling methods. This significantly improves the accuracy and engineering practicality of predicting alkylation reaction rules.
[0143] Please see Figure 5 , Figure 5 This is a schematic diagram of the alkylation reaction prediction device provided in the embodiments of this application. Figure 5 As shown, the alkylation reaction pattern prediction device 500 includes: The acquisition module 501 is used to acquire the input features of the alkylation reaction to be predicted. The input features are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features.
[0144] The prediction module 502 is used to input the input features into the integrated prediction model to obtain the prediction result of the alkylation reaction to be predicted. The integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model. The mapping sub-model is used to map the input features to obtain a first internal result. The deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result. The prediction result is obtained based on the first internal result and the second internal result.
[0145] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 600 includes a processor 610, a memory 620, and a bus 630.
[0146] The memory 620 stores machine-readable instructions that can be executed by the processor 610. When the electronic device 600 is running, the processor 610 and the memory 620 communicate via the bus 630. When the machine-readable instructions are executed by the processor 610, the steps of the method can be performed. For specific implementation details, please refer to the method embodiment, which will not be repeated here.
[0147] This application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it can execute the steps of the method. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0148] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the described systems, devices, and units can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0152] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for predicting the reaction patterns of alkylation, characterized in that, include: The input features of the alkylation reaction to be predicted are obtained, which are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features. The input features are input into an integrated prediction model to obtain the prediction result of the alkylation reaction to be predicted. The integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model. The mapping sub-model is used to map the input features to obtain a first internal result. The deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result. The prediction result is obtained based on the first internal result and the second internal result.
2. The method according to claim 1, characterized in that, The input features are obtained in the following way: Obtain the set of reaction participants corresponding to the alkylation reaction to be predicted, wherein the set of reaction participants includes the molecular structure information of the reactants, products and solvents respectively; The target prediction type for the alkylation reaction to be predicted is determined, and the target prediction type includes yield prediction, temperature prediction, time prediction, and pressure prediction. According to the target prediction type, a corresponding set of molecular descriptors is selected from a preset set of molecular descriptors. Based on the molecular structure information of the reactants, the molecular descriptor features of the reactants are calculated. Based on the molecular structure information of the products, the molecular descriptor features of the products are calculated. Based on the molecular structure information of the solvents, the molecular descriptor features of the solvents are calculated. The molecular descriptor features of the reactants, the molecular descriptors of the products, and the molecular descriptors of the solvents are used to characterize the electronic properties, topological properties, and physicochemical properties of their respective corresponding molecules. Based on the reaction equation of the alkylation reaction to be predicted, a reaction molecular fingerprint feature is generated by a differential reaction fingerprint encoding algorithm. The reaction molecular fingerprint feature is used to characterize the structural change information during the conversion of reactants into products. The reaction conditions of the alkylation reaction to be predicted are encoded as reaction condition features, which include reaction temperature, reaction time, reaction pressure, and reaction type. The input feature is obtained by concatenating the reactant molecule descriptor features, the product molecule descriptor features, the solvent molecule descriptor features, the reaction molecule fingerprint features, and the reaction condition features.
3. The method according to claim 1, characterized in that, The deep heterogeneous fusion sub-model performs interactive fusion of the heterogeneous representations in the following manner: The heterogeneous representations output by the multiple parameter-independent parallel branch networks are stacked and merged along the branch dimension to obtain a branch sequence; The cross-branch multi-head self-attention layer performs multi-head self-attention calculation on the branch sequence in the branch dimension, so that any branch representation can aggregate the information of the other branch representations during the update process. The output of the cross-branch multi-head self-attention layer is added to the branch sequence by residual summation, and the result of residual summation is subjected to layer normalization to obtain the branch sequence after cross-branch interaction. The cross-branch multi-head self-attention layer, the residual summation and the layer normalization are stacked in series for one or more layers.
4. The method according to claim 3, characterized in that, The deep heterogeneous fusion sub-model obtains the second internal result in the following manner: The average value of each branch representation in the branch sequence after cross-branch interaction is calculated to obtain the aggregate query vector; Linear mapping is performed on the branch sequences after cross-branch interaction to obtain key vectors and value vectors; Based on the similarity between the aggregated query vector and the key vector, attention weights are obtained by normalization on the branch dimension, and the value vectors are weighted and summed using the attention weights to obtain the soft fusion context vector. Maximize the branch sequence after cross-branch interaction along the branch dimension to obtain a hard-converged context vector; The soft fusion context vector and the hard convergence context vector are concatenated to obtain the second internal result.
5. The method according to claim 1, characterized in that, The prediction results for the alkylation reaction to be predicted include multiple prediction targets, including reaction yield, reaction temperature, reaction time, and reaction pressure. The mapping sub-model includes tree model units, and the first internal result includes a first intermediate result. The tree model unit obtains the first intermediate result in the following way: The input features are subjected to nonlinear feature interaction across each feature dimension, and the first intermediate result is output through additive integration of multiple decision trees based on a gradient boosting structure. The tree model unit includes multiple tree model sub-units corresponding to each of the prediction targets. The tree model sub-units corresponding to different prediction targets use different molecular descriptor features and have different learned tree structures and weights.
6. The method according to claim 5, characterized in that, The mapping sub-model also includes a linear model unit, and the first internal result further includes a second intermediate result. The linear model unit obtains the second intermediate result in the following manner: Under the norm regularization constraint, a linear weighted mapping is performed on each feature dimension in the input features to output the second intermediate result. The linear model unit includes multiple linear model sub-units corresponding to each prediction target. The linear model sub-units corresponding to different prediction targets use different molecular descriptor features and learn different weight coefficients under the norm regularization constraint. The first internal result is obtained in the following way: The first intermediate result and the second intermediate result are weighted and fused to obtain the first internal result.
7. The method according to claim 1, characterized in that, The deep heterogeneous fusion sub-model includes multiple deep heterogeneous fusion sub-units, which correspond to four prediction targets: reaction yield, reaction temperature, reaction time, and reaction pressure. The deep heterogeneous fusion sub-units corresponding to different prediction targets use different molecular descriptor features and have different attention weight distributions learned by the cross-branch multi-head self-attention layer.
8. A device for predicting the alkylation reaction pattern, characterized in that, include: The acquisition module is used to acquire the input features of the alkylation reaction to be predicted. The input features are composed of molecular descriptor features of the reaction participants, molecular fingerprint features of the reaction, and reaction condition features. A prediction module is used to input the input features into an integrated prediction model to obtain the prediction result of the alkylation reaction to be predicted. The integrated prediction model includes a mapping sub-model and a deep heterogeneous fusion sub-model. The mapping sub-model is used to map the input features to obtain a first internal result. The deep heterogeneous fusion sub-model is used to heterogeneously encode the input features through multiple parameter-independent parallel branch networks to obtain heterogeneous representations, and to interactively fuse the heterogeneous representations in the branch dimension through a cross-branch multi-head self-attention layer to obtain a second internal result. The prediction result is obtained based on the first internal result and the second internal result.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method as described in any one of claims 1 to 7.