CN111814460B - External knowledge-based drug interaction relation extraction method and system - Google Patents
External knowledge-based drug interaction relation extraction method and system Download PDFInfo
- Publication number
- CN111814460B CN111814460B CN202010643746.XA CN202010643746A CN111814460B CN 111814460 B CN111814460 B CN 111814460B CN 202010643746 A CN202010643746 A CN 202010643746A CN 111814460 B CN111814460 B CN 111814460B
- Authority
- CN
- China
- Prior art keywords
- drug
- model
- layer
- bilstm
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/335—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Databases & Information Systems (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Medical Treatment And Welfare Office Work (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
技术领域technical field
本发明属于自然语言处理技术领域,具体涉及一种基于外部知识的药物相互作用关系抽取方法。The invention belongs to the technical field of natural language processing, and in particular relates to a method for extracting drug interaction relationships based on external knowledge.
背景技术Background technique
药物-药物相互作用(Drug-Drug Interactions,DDI)是指当患者同时服用多种药物时,不同药物之间所产生的协同或拮抗等作用,由此可能会产生副作用,导致治疗费用增加且对患者的生命安全造成威胁,因此了解药物之间的相互作用知识对于患者的诊治和医学的发展有着非常重要的意义与价值。Drug-Drug Interactions (DDI) refers to the synergistic or antagonistic effects between different drugs when a patient takes multiple drugs at the same time, which may cause side effects, increase the cost of treatment, and increase the cost of treatment. The life safety of patients is threatened, so understanding the interaction between drugs is of great significance and value for the diagnosis and treatment of patients and the development of medicine.
目前在药物相互作用关系抽取领域应用方法主要有:基于规则的方法,基于传统机器学习的方法以及基于深度学习的方法。基于规则的方法,其规则的制定一般需要医学领域中专业人员的辅助,由于语言表达形式的多样性,制定的规则往往难以覆盖所有的药物相互作用关系,因此该方法的召回率较低;基于传统机器学习的方法,通常需要利用大量人工定义特征,如词性,句法,语法等特征,且需要利用外部自然语言处理工具生成这些特征,如词性标注器,句法分析器等工具,因此其抽取性能受外部自然语言处理工具的影响较大;基于深度学习的方法具有自动学习特征的能力,可以减少人工设计特征所耗费的代价且抽取效果一般比传统的方法好,但同前两种方法类似,模型在不同关系类别上的抽取结果上会出现差异较大的问题。At present, the main application methods in the field of drug interaction relationship extraction are: rule-based methods, traditional machine learning-based methods and deep learning-based methods. Rule-based methods generally require the assistance of professionals in the medical field to formulate rules. Due to the diversity of language expressions, it is often difficult to formulate rules to cover all drug interaction relationships, so the recall rate of this method is low; Traditional machine learning methods usually need to use a large number of artificially defined features, such as parts of speech, syntax, grammar and other features, and need to use external natural language processing tools to generate these features, such as part-of-speech tagger, syntax analyzer and other tools, so its extraction performance It is greatly influenced by external natural language processing tools; the method based on deep learning has the ability to automatically learn features, which can reduce the cost of artificial design features and the extraction effect is generally better than the traditional method, but similar to the first two methods, There will be large differences in the extraction results of the model on different relationship categories.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明的目的之一在于提供一种基于外部知识的药物相互作用关系抽取方法,该方法能缓解不同关系类别抽取结果差异较大的问题,提高了抽取效果。In view of this, one of the objectives of the present invention is to provide a method for extracting drug interaction relationships based on external knowledge, which can alleviate the problem of large differences in the extraction results of different relationship categories and improve the extraction effect.
为实现上述目的,本发明的技术方案为:一种基于外部知识的药物相互作用关系抽取方法,包括以下步骤:In order to achieve the above object, the technical scheme of the present invention is: a method for extracting drug interaction relationship based on external knowledge, comprising the following steps:
对药物数据库内容进行分析处理,抽取并生成相互作用的药物对,同时保存所有药物描述信息,形成带有药物描述信息的药物相互作用数据集;Analyze and process the content of the drug database, extract and generate interacting drug pairs, save all drug description information at the same time, and form a drug interaction data set with drug description information;
构建药物描述系信息训练模型,并通过所述药物相互作用数据集进行训练,得到并保存最优模型;constructing a drug description information training model, and training through the drug interaction data set to obtain and save the optimal model;
将所述最优模型与BiLSTM-Att-CapsNet模型相结合得到EK-BiLSTM-Att-CapsNet模型,同时识别药物相互作用数据集的药物实体,在药物数据库中找寻对应药物描述信息并保存,最后对结合的模型进行训练得到最终关系抽取模型。The optimal model is combined with the BiLSTM-Att-CapsNet model to obtain the EK-BiLSTM-Att-CapsNet model, and the drug entities of the drug interaction data set are identified at the same time, and the corresponding drug description information is found in the drug database and saved. The combined model is trained to obtain the final relation extraction model.
进一步地,所述构建药物描述系信息训练模型,并通过所述药物相互作用数据集进行训练,得到并保存最优模型的步骤,具体包括:Further, the steps of constructing a drug description system information training model, and performing training on the drug interaction data set to obtain and save the optimal model, specifically include:
同一时间接收第一药物的描述信息、第二药物的描述信息;Receive the description information of the first drug and the description information of the second drug at the same time;
将第一药物的描述信息、第二药物的描述信息转换为向量表示;Convert the description information of the first drug and the description information of the second drug into a vector representation;
分别获取第一药物与第二药物描述语句的前向信息和后向信息,然后将二者相结合,作为句子表示;Obtain the forward information and backward information of the first drug and the second drug description sentences respectively, and then combine the two to represent them as sentences;
对句子表示进行线性变换,然后进行性归一化处理,选取类别概率最大的作为预测类别标签;Linearly transform the sentence representation, and then perform normalization, and select the category with the highest probability as the predicted category label;
利用损失函数代入药物相互作用数据集训练,得到最优模型。The optimal model is obtained by substituting the loss function into the drug interaction dataset for training.
进一步地,得到句子表示的方法为:Further, the method to obtain the sentence representation is:
BiLSTM获取语句的前向信息和后向信息,计算得到隐藏层的输出:BiLSTM obtains the forward and backward information of the sentence, and calculates the output of the hidden layer:
表示正向输入的语句,表示逆序输入的语句,表示正向输入的语句的输出,表示逆序输入的语句的输出,H为BiLSTM隐藏层的输出; A statement representing forward input, Represents a statement entered in reverse order, represents the output of the forward input statement, Represents the output of the sentence input in reverse order, and H is the output of the BiLSTM hidden layer;
计算得到经过BiLSTM后,句子表示为:After calculating the BiLSTM, the sentence is expressed as:
表示前向输入的最后一个时间步的信息,表示后向输入的最后一个时间步的信息。 information representing the last time step of the forward input, Information representing the last time step of the backward input.
进一步地,所述预测类别标签通过以下方式得到:Further, the predicted category labels are obtained in the following ways:
先计算得到句子表示的线性变换:First calculate the linear transformation of the sentence representation:
h*=[h1;h2];h * =[h 1 ; h 2 ];
output=W(fc)·h*+b(fc);output=W (fc) ·h * +b (fc) ;
其中,W(fc)和b(fc)分别为全连接层的权重参数和偏置参数,h1∈RN表示第一药物描述信息经过BiLSTM层的句子表示,h2∈RN表示第二药物描述信息经过BiLSTM层的句子表示,N表示BiLSTM隐藏层单元数目,output为线性变换输出,h*∈R2N为第一药物、第二药物句子表示的拼接;Among them, W (fc) and b (fc) are the weight parameters and bias parameters of the fully connected layer, respectively, h 1 ∈ R N represents the sentence representation of the first drug description information through the BiLSTM layer, h 2 ∈ R N represents the second The drug description information is represented by sentences in the BiLSTM layer, N represents the number of BiLSTM hidden layer units, output is the output of linear transformation, h * ∈ R 2N is the splicing of the sentence representations of the first drug and the second drug;
根据线性变换进行归一化处理,选取最大的类别概率为预测类别标签:Normalization is performed according to linear transformation, and the largest category probability is selected as the predicted category label:
其中,代表预测类别标签,output代表所述句子线性变换的输出,softmax(output)为归一化处理。in, Represents the predicted category label, output represents the output of the linear transformation of the sentence, and softmax(output) is normalized.
进一步地,所述损失函数为:Further, the loss function is:
其中,y∈Rm代表真实类别标签,m代表类别标签数目,y和以one-hot向量表示,λ是L2正则化的超参数,θ为在模型中进行训练得到。where y∈Rm represents the true class label, m represents the number of class labels, y and Represented as a one-hot vector, λ is the hyperparameter of L2 regularization, and θ is obtained by training in the model.
进一步地,所述EK-BiLSTM-Att-CapsNet模型使用的损失函数为:Further, the loss function used by the EK-BiLSTM-Att-CapsNet model is:
L=Tk max(0,m+-||vk||)2+λ(1-Tk)max(0,||vk||-m-)2 L=T k max(0,m + -||v k ||) 2 +λ(1-T k )max(0,||v k ||-m - ) 2
其中,Tk为分类的指示函数,k为指示系数,m+为上边界,||vk||为第k个胶囊的长度,m-为下边界。Among them, Tk is the indicator function of classification, k is the indicator coefficient, m + is the upper boundary, ||v k || is the length of the kth capsule, and m- is the lower boundary.
有鉴于此,本发明的目的之二在于提供一种基于外部知识的药物相互作用关系抽取系统,该系统能缓解在不同关系类别抽取中结果差异较大的问题。In view of this, the second purpose of the present invention is to provide a drug interaction relationship extraction system based on external knowledge, which can alleviate the problem of large differences in results in different relationship category extraction.
为实现上述目的,本发明的技术方案为:一种基于外部知识的药物相互作用关系抽取系统,包括:To achieve the above purpose, the technical solution of the present invention is: a system for extracting drug interaction relationships based on external knowledge, comprising:
药物信息数据集构建模块,用于对药物数据库内容进行分析和处理,抽取并生成相互作用的药物对,同时保留所有药物的描述信息,形成带有药物描述信息的药物相互作用数据集;The drug information dataset building module is used to analyze and process the content of the drug database, extract and generate interacting drug pairs, and retain the description information of all drugs to form a drug interaction dataset with drug description information;
药物描述信息模型,与所述药物信息数据集构建模块相连,用于构建药物描述信息训练模型,并在所述药物相互作用数据集上训练,然后保存最优模型;a drug description information model, connected with the drug information data set building module, used to construct a drug description information training model, train on the drug interaction data set, and then save the optimal model;
EK-BiLSTM-Att-CapsNet模型,与所述药物描述信息模型相连,用于识别所述药物相互作用数据集的药物实体,然后在药物数据库中找寻对应药物描述信息并保存,同时将所述药物描述信息模型保存的最优模型与BiLSTM-Att-CapsNet模型相结合,并对结合模型进行训练得到最终关系抽取模型。The EK-BiLSTM-Att-CapsNet model, connected with the drug description information model, is used to identify the drug entity of the drug interaction data set, and then find the corresponding drug description information in the drug database and save it, while the drug The optimal model saved by the description information model is combined with the BiLSTM-Att-CapsNet model, and the combined model is trained to obtain the final relation extraction model.
进一步地,所述药物描述信息模型包括:输入层、嵌入层、BiLSTM层、全连接层、输出层;其中,Further, the drug description information model includes: an input layer, an embedding layer, a BiLSTM layer, a fully connected layer, and an output layer; wherein,
输入层同一时间接收第一药物的描述信息、第二药物的描述信息,第一药物描述语句用p表示,p={p1,...pi...,pn};第二药物描述语句用q表示,q={q1,...qi...,qn},pi和qi分别表示两个药物描述语句的第i个单词;The input layer receives the description information of the first medicine and the description information of the second medicine at the same time, the first medicine description sentence is represented by p, p={p 1 ,...p i ...,p n }; the second medicine The description sentence is represented by q, q={q 1 ,...q i ...,q n }, p i and q i respectively represent the i-th word of the two drug description sentences;
所述嵌入层将所述输入层的药物描述语句转换为向量表示,第一药物描述语句向量用表示,第二药物描述语句向量用表示,表示单词嵌入的维度;The embedding layer converts the drug description sentence of the input layer into a vector representation, and the first drug description sentence vector is represented by express, The second drug description sentence vector is used express, represents the dimension of word embedding;
所述BiLSTM层与所述嵌入层相连,用于使用BiLSTM网络,分别获取第一药物与第二药物的描述语句的前向信息和后向信息,然后将二者相结合,作为句子表示;The BiLSTM layer is connected with the embedding layer, and is used for using the BiLSTM network to obtain the forward information and the backward information of the description sentences of the first drug and the second drug respectively, and then combine the two to represent the sentences;
全连接层与所述BiLSTM层相连,用于对BiLSTM层的句子表示进行线性变换;The fully connected layer is connected to the BiLSTM layer and is used to linearly transform the sentence representation of the BiLSTM layer;
输出层与所述全连接层相连,用于对所述全连接层的输出进行归一化处理,并选取类别概率最大的作为预测的关系类别。The output layer is connected to the fully-connected layer, and is used for normalizing the output of the fully-connected layer, and selecting the relationship category with the largest category probability as the predicted relationship category.
进一步地,得到句子表示的方法为:Further, the method to obtain the sentence representation is:
表示正向输入的语句,表示逆序输入的语句,表示正向输入的语句的输出,表示逆序输入的语句的输出,H为BiLSTM层中BiLSTM隐藏层的输出,表示前向输入的最后一个时间步的信息,表示后向输入的最后一个时间步的信息。 A statement representing forward input, Represents a statement entered in reverse order, represents the output of the forward input statement, Represents the output of the sentence input in reverse order, H is the output of the BiLSTM hidden layer in the BiLSTM layer, information representing the last time step of the forward input, Information representing the last time step of the backward input.
进一步地,所述预测的关系类别通过以下方式得到:Further, the predicted relationship category is obtained in the following manner:
h*=[h1;h2];h * =[h 1 ; h 2 ];
output=W(fc)·h*+b(fc);output=W (fc) ·h * +b (fc) ;
其中,W(fc)和b(fc)分别为全连接层的权重参数和偏置参数,h1∈RN表示第一药物描述信息经过BiLSTM层的句子表示,h2∈RN表示第二药物描述信息经过BiLSTM层的句子表示,N表示BiLSTM隐藏层单元数目,output为线性变换输出,h*∈R2N为第一药物、第二药物句子表示的拼接;代表预测的关系类别,output代表所述全连接层的输出,softmax(output)为归一化处理。Among them, W (fc) and b (fc) are the weight parameters and bias parameters of the fully connected layer, respectively, h 1 ∈ R N represents the sentence representation of the first drug description information through the BiLSTM layer, h 2 ∈ R N represents the second The drug description information is represented by sentences in the BiLSTM layer, N represents the number of BiLSTM hidden layer units, output is the output of linear transformation, h * ∈ R 2N is the splicing of the sentence representations of the first drug and the second drug; Represents the predicted relationship category, output represents the output of the fully connected layer, and softmax(output) is normalized.
本发明提供一种基于外部知识的药物相互作用关系抽取方法,对外部药物数据库中的信息进行处理,构建带有药物描述信息的数据集,然后在该数据集上进行模型训练,并保存最优模型,最后将该最优模型与药物关系抽取模型相结合,进行药物关系抽取,从而更好的利用了药物数据库中已有的知识,缓解了不同关系类别抽取结果差异较大的问题,提高了抽取效果。The invention provides a drug interaction relationship extraction method based on external knowledge, which processes information in an external drug database, constructs a data set with drug description information, then conducts model training on the data set, and saves the optimal Finally, the optimal model is combined with the drug relationship extraction model to extract the drug relationship, so as to better utilize the existing knowledge in the drug database, alleviate the problem of large differences in the extraction results of different relationship categories, and improve the performance of the drug relationship. Extraction effect.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍。显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that are required to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.
图1为本发明一种基于外部知识的药物相互作用关系抽取系统的一实施例结构示意图;1 is a schematic structural diagram of an embodiment of an external knowledge-based drug interaction relationship extraction system of the present invention;
图2为本发明EK-BiLSTM-Att-CapsNet模型的结构示意图;Fig. 2 is the structural representation of the EK-BiLSTM-Att-CapsNet model of the present invention;
图3为本发明一种基于外部知识的药物相互作用关系抽取方法的一实施例流程图。FIG. 3 is a flowchart of an embodiment of a method for extracting drug interaction relationships based on external knowledge of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
所举实施例是为了更好地对本发明进行说明,但并不是本发明的内容仅局限于所举实施例。所以熟悉本领域的技术人员根据上述发明内容对实施方案进行非本质的改进和调整,仍属于本发明的保护范围。The examples are given to better illustrate the present invention, but the content of the present invention is not limited to the examples. Therefore, those skilled in the art make non-essential improvements and adjustments to the embodiments according to the above-mentioned contents of the invention, which still belong to the protection scope of the present invention.
实施例1Example 1
参考图1,为本发明一种基于外部知识的药物相互作用关系抽取系统的结构示意图,具体地,一种基于外部知识的药物相互作用关系抽取系统,包括:Referring to FIG. 1, it is a schematic structural diagram of a drug interaction relationship extraction system based on external knowledge of the present invention, specifically, a drug interaction relationship extraction system based on external knowledge, including:
药物信息数据集构建模块1,用于对药物数据库内容进行分析和处理,抽取并生成相互作用的药物对,同时保留所有药物的描述信息,形成带有药物描述信息的药物相互作用数据集;The drug information data set building module 1 is used to analyze and process the content of the drug database, extract and generate interacting drug pairs, and at the same time retain the description information of all drugs to form a drug interaction data set with drug description information;
本实施例中,可采用常用的药物数据库,比如DrugBank数据库,内含可查询到药物类型、药物结构、药物描述信息与该药物之间有相互作用的其他药物等相关信息;In this embodiment, a commonly used drug database, such as the DrugBank database, can be used, which contains relevant information such as drug type, drug structure, drug description information and other drugs that interact with the drug;
本实施例中,药物信息数据集构建模块1通过对数据库中药物信息的分析,发现药物的描述信息是对该药物的详细介绍,在描述信息中一般包括该药物适用的疾病类型、组成成分、作用效果等信息,即药物的描述信息中可能隐含着某两个药物之间的潜在关系,有助于判断是否存在相互作用关系,因此本系统选用药物的描述信息。In this embodiment, the drug information data set building module 1 finds that the description information of the drug is a detailed introduction of the drug by analyzing the drug information in the database, and the description information generally includes the disease type, composition, Information such as action and effect, that is, the description information of the drug may imply the potential relationship between two drugs, which is helpful to judge whether there is an interaction relationship, so the system selects the description information of the drug.
药物描述信息模型2,与药物信息数据集构建模块相连,用于构建药物描述信息训练模型,并在药物相互作用数据集上训练,然后保存最优模型;The drug description information model 2, which is connected with the drug information data set building module, is used to construct a drug description information training model, and train it on the drug interaction data set, and then save the optimal model;
本实施例中的药物描述信息模型2还包括:输入层201、嵌入层202、BiLSTM层203、全连接层204、输出层205;其中,The drug description information model 2 in this embodiment further includes: an input layer 201, an embedding layer 202, a BiLSTM layer 203, a fully connected layer 204, and an output layer 205; wherein,
输入层201在同一时间接收两种药物的描述信息,本实施例中设为第一药物的描述信息、第二药物的描述信息,第一药物描述语句用p表示,p={p1,...pi...,pn};第二药物描述语句用q表示,q={q1,...qi...,qn},pi和qi分别表示两个药物描述语句的第i个单词;The input layer 201 receives the description information of two medicines at the same time. In this embodiment, it is set as the description information of the first medicine and the description information of the second medicine. The first medicine description sentence is represented by p, p={p 1 ,. ..p i ..., p n }; the second drug description sentence is represented by q, q={q 1 , ... q i ..., q n }, p i and qi represent two drugs respectively describe the ith word of the sentence;
嵌入层202将输入层201的药物描述语句转换为向量表示,第一药物描述语句向量用表示,第二药物描述语句向量用表示,表示单词嵌入的维度;The embedding layer 202 converts the drug description sentence of the input layer 201 into a vector representation, and the first drug description sentence vector is represented by express, The second drug description sentence vector is used express, represents the dimension of word embedding;
BiLSTM层203与嵌入层202相连,用于获得输入语句的长序列依赖信息,通过使用BiLSTM网络,分别获取第一药物与第二药物的描述语句的前向信息和后向信息,然后将二者相结合,作为句子表示;The BiLSTM layer 203 is connected to the embedding layer 202, and is used to obtain the long sequence dependency information of the input sentence. By using the BiLSTM network, the forward information and backward information of the description sentences of the first drug and the second drug are obtained respectively, and then the two are obtained. combined, expressed as a sentence;
本实施例中在BiLSTM层203得到句子表示的方法为:In this embodiment, the method for obtaining the sentence representation in the BiLSTM layer 203 is:
表示正向输入的语句,表示逆序输入的语句,表示正向输入的语句的输出,表示逆序输入的语句的输出,H为BiLSTM层中BiLSTM隐藏层的输出,表示前向输入的最后一个时间步的信息,表示后向输入的最后一个时间步的信息。 A statement representing forward input, Represents a statement entered in reverse order, represents the output of the forward input statement, Represents the output of the sentence input in reverse order, H is the output of the BiLSTM hidden layer in the BiLSTM layer, information representing the last time step of the forward input, Information representing the last time step of the backward input.
全连接层204与BiLSTM层203相连,由于BiLSTM层203的输出维度与输出层205的节点关系类别数目不同,因此,全连接层204用于对BiLSTM层的句子表示进行线性变换;The fully connected layer 204 is connected to the BiLSTM layer 203. Since the output dimension of the BiLSTM layer 203 is different from the number of node relationship categories of the output layer 205, the fully connected layer 204 is used to linearly transform the sentence representation of the BiLSTM layer;
输出层205与全连接层204相连,用于对全连接层204的输出进行归一化处理,并选取类别概率最大的作为预测的关系类别,即将各个类别对应的值转换为对应的概率,所有类别概率值的总和为1,并从中选取概率最大的作为预测的关系类别 The output layer 205 is connected to the fully connected layer 204, and is used to normalize the output of the fully connected layer 204, and select the category with the highest probability as the predicted relationship category, that is, convert the value corresponding to each category into the corresponding probability, all The sum of the class probability values is 1, and the one with the highest probability is selected as the predicted relation class
进一步地,预测类别标签通过以下方式得到:Further, the predicted class labels are obtained in the following ways:
h*=[h1;h2];h * =[h 1 ; h 2 ];
output=W(fc)·h*+b(fc);output=W (fc) ·h * +b (fc) ;
其中,W(fc)和b(fc)分别为全连接层的权重参数和偏置参数,h1∈RN表示第一药物描述信息经过BiLSTM层的句子表示,h2∈RN表示第二药物描述信息经过BiLSTM层的句子表示,N表示BiLSTM隐藏层单元数目,output为线性变换输出,h*∈R2N为第一药物、第二药物句子表示的拼接;代表预测的关系类别,output代表全连接层的输出,softmax(output)为归一化处理;Among them, W (fc) and b (fc) are the weight parameters and bias parameters of the fully connected layer, respectively, h 1 ∈ R N represents the sentence representation of the first drug description information through the BiLSTM layer, h 2 ∈ R N represents the second The drug description information is represented by sentences in the BiLSTM layer, N represents the number of BiLSTM hidden layer units, output is the output of linear transformation, h * ∈ R 2N is the splicing of the sentence representations of the first drug and the second drug; Represents the predicted relationship category, output represents the output of the fully connected layer, and softmax(output) is normalized;
再进一步地,通过将药物信息数据集构建模块1中构建的带有药物描述信息的药物相互用数据集反复在药物描述信息模型2中进行训练,最后将取得最优结果的模型进行保存。Still further, the drug interaction data set with drug description information constructed in the drug information data set building module 1 is repeatedly trained in the drug description information model 2, and finally the model that obtains the optimal result is saved.
EK-BiLSTM-Att-CapsNet模型3,与药物描述信息模型2相连,用于识别药物相互作用数据集的药物实体,然后在药物数据库中找寻对应药物描述信息并保存,同时将药物描述信息模型保存的最优模型与BiLSTM-Att-CapsNet模型相结合,并对结合模型进行训练得到最终关系抽取模型。EK-BiLSTM-Att-CapsNet model 3, connected with the drug description information model 2, is used to identify drug entities in the drug interaction dataset, and then find the corresponding drug description information in the drug database and save it, and save the drug description information model at the same time The optimal model is combined with the BiLSTM-Att-CapsNet model, and the combined model is trained to obtain the final relation extraction model.
本实施例中,为充分利用外部药物描述信息和药物相互作用知识,使本系统的性能得到提升,将药物描述信息模型2得到的最优模型与基于注意力的药物关系抽取模型(BiLSTM-Att-CapsNet模型)相结合,参考图2,为本发明中EK-BiLSTM-Att-CapsNet模型的一实施例结构示意图,基于注意力的药物关系抽取模型结构参考目前的相关技术文献,如在本实施例中BiLSTM-Att-CapsNet模型包括BILSTM层、注意力层、胶囊网络层,输出层,该模型中的BILSTM层、输出层与药物描述信息模型2中的BILSTM层、输出层不为同一结构,为了区分,在本实施例中,图2中将BiLSTM-Att-CapsNet模型包括BILSTM层、输出层分别命名为BAC-BILSTM层、BAC-输出层;In this embodiment, in order to make full use of the external drug description information and drug interaction knowledge to improve the performance of the system, the optimal model obtained by the drug description information model 2 and the attention-based drug relationship extraction model (BiLSTM-Att -CapsNet model) in combination, with reference to FIG. 2, it is a schematic structural diagram of an embodiment of the EK-BiLSTM-Att-CapsNet model in the present invention, the attention-based drug relationship extraction model structure refers to the current related technical documents, as in this implementation In the example, the BiLSTM-Att-CapsNet model includes a BILSTM layer, an attention layer, a capsule network layer, and an output layer. The BILSTM layer and output layer in this model are not the same structure as the BILSTM layer and output layer in the drug description information model 2. In order to distinguish, in this embodiment, the BiLSTM-Att-CapsNet model including the BILSTM layer and the output layer are named as the BAC-BILSTM layer and the BAC-output layer in FIG. 2 ;
本实施例中,因为需要知道预测的准确与否,药物描述信息模型的权全连接层与输出层进行对该模型进行反复训练,直到得到最优模型,输出层输出的关系预测是对待预测数据的预测结果。In this embodiment, because it is necessary to know whether the prediction is accurate or not, the weighted fully connected layer and the output layer of the drug description information model repeatedly train the model until the optimal model is obtained. The relationship prediction output by the output layer is the data to be predicted. prediction results.
进一步地,本实施例中,将药物的描述信息作为胶囊网络层中的低层胶囊网络的一部分,然后将其动态的传输到胶囊网络层中的高层胶囊网络中,从而更好的使用药物描述信息,此外,药物描述信息模型是在构建的药物相互作用数据集上进行训练得到,该数据集是对药物数据库中已有的信息进行处理得到,故可以充分利用外部已有的药物相互作用知识。Further, in this embodiment, the description information of the drug is used as a part of the low-level capsule network in the capsule network layer, and then dynamically transmitted to the high-level capsule network in the capsule network layer, so as to better use the drug description information. , In addition, the drug description information model is obtained by training on the constructed drug interaction data set, which is obtained by processing the existing information in the drug database, so the existing external drug interaction knowledge can be fully utilized.
优选地,本实施例中的EK-BiLSTM-Att-CapsNet模型采用的损失函数公式为:Preferably, the loss function formula adopted by the EK-BiLSTM-Att-CapsNet model in this embodiment is:
L=Tk max(0,m+-||vk||)2+λ(1-Tk)max(0,||vk||-m-)2 L=T k max(0,m + -||v k ||) 2 +λ(1-T k )max(0,||v k ||-m - ) 2
其中,Tk为分类的指示函数,k为指示系数,m+为上边界,||vk||为第k个胶囊的长度,m-为下边界;当k存在时,Tk为1,否则Tk为0。Among them, T k is the indicator function of classification, k is the indicator coefficient, m + is the upper boundary, ||v k || is the length of the k-th capsule, m - is the lower boundary; when k exists, T k is 1 , otherwise Tk is 0.
本实施例中,将药物描述信息模型2进行单独训练,使用的数据集是药物数据库中已有的大量药物相互作用数据,根据模型输出层的关系预测以此训练模型,保存最优的模型,主要是为了利用药物数据库中已有的大量相关知识探索药物描述信息和药物相互作用关系之间的联系;然后使用公开的数据集(如DDIE2011和DDIE2013)的训练集进行整体模型的训练,此时将DDIE2011和DDIE2013的训练集数据输入到刚刚保存的最优的药物描述信息模型中,得到中间结果,不用再对该最优模型进行参数的训练,然后将中间结果与胶囊网络模型相结合即可进行关系抽取。In this embodiment, the drug description information model 2 is trained separately, the data set used is a large amount of drug interaction data existing in the drug database, and the model is trained according to the relationship prediction of the output layer of the model, and the optimal model is saved. The main purpose is to explore the connection between drug description information and drug interaction relationship by using a large amount of related knowledge in the drug database; then use the training set of public datasets (such as DDIE2011 and DDIE2013) to train the overall model, at this time Input the training set data of DDIE2011 and DDIE2013 into the optimal drug description information model saved just now, and get the intermediate results. There is no need to train the parameters of the optimal model, and then combine the intermediate results with the capsule network model. perform relation extraction.
实施例2Example 2
基于实施例1的系统,本实施例提供了一种基于外部知识的药物相互作用关系抽取方法,参考图3,为该方法的流程示意图,具体地:一种基于外部知识的药物相互作用关系抽取方法,包括以下步骤:Based on the system of Embodiment 1, this embodiment provides a method for extracting drug interaction relationships based on external knowledge. Referring to FIG. 3, it is a schematic flowchart of the method, specifically: a drug interaction relationship extraction method based on external knowledge method, including the following steps:
S400:对药物数据库内容进行分析处理,抽取并生成相互作用的药物对,同时保存所有药物描述信息,形成带有药物描述信息的药物相互作用数据集;然后执行步骤S402;S400: Analyse and process the content of the drug database, extract and generate interacting drug pairs, save all drug description information at the same time, and form a drug interaction data set with the drug description information; then perform step S402;
本实施例中,常用的药物数据库,比如DrugBank数据库,内含可查询到药物类型、药物结构、药物描述信息与该药物之间有相互作用的其他药物等相关信息;通过对药物数据库DrugBank中的知识进行分析和处理,从中抽取出有相互作用的药物对,并生成无相互作用的药物对,同时保留每个药物的描述信息,以此构建带有药物描述信息的药物相互作用数据集。In this embodiment, a commonly used drug database, such as the DrugBank database, contains relevant information such as drug type, drug structure, drug description information and other drugs that interact with the drug; The knowledge is analyzed and processed to extract the interacting drug pairs and generate non-interacting drug pairs, while retaining the description information of each drug, so as to construct a drug interaction data set with drug description information.
S402:构建药物描述系信息训练模型,并通过药物相互作用数据集进行训练,得到并保存最优模型;然后执行步骤S404;S402: Build a drug description system information training model, and train it through the drug interaction data set to obtain and save the optimal model; then perform step S404;
本实施例中,先同一时间接收两种药物的描述信息,如第一药物的描述信息、第二药物的描述信息,然后将第一药物的描述信息、第二药物的描述信息转换为向量表示;分别获取第一药物与第二药物描述语句的前向信息和后向信息,然后将二者相结合,作为句子表示;接着对句子表示进行线性变换,然后进行性归一化处理,选取类别概率最大的作为预测类别标签;其具体计算方法可参考实施例中的药物描述信息模型2的建立方法;In this embodiment, the description information of two medicines, such as the description information of the first medicine and the description information of the second medicine, is first received at the same time, and then the description information of the first medicine and the description information of the second medicine are converted into vector representations ; Obtain the forward information and backward information of the first drug and the second drug description sentence respectively, and then combine the two as a sentence representation; then perform a linear transformation on the sentence representation, and then perform a normalization process to select the category The highest probability is used as the predicted category label; the specific calculation method can refer to the establishment method of the drug description information model 2 in the embodiment;
进一步地,第一药物的描述信息p经过BiLSTM层203之后,可以表示为h1∈RN,第二药物的描述信息q经过BiLSTM层203之后,可以表示为h2∈RN,并将二者拼接,即h*=[h1;h2]∈R2N送入全连接层204中,其中N表示BiLSTM层203中隐藏层单元数目;由于BiLSTM的输出维度为2N,而将输出层的节点为关系类别数目m,故需要使用全连接层进行线性变换,如下式,其中,W(fc)和b(fc)分别为全连接层的权重参数和偏置参数,output为线性变换输出:Further, the description information p of the first medicine can be expressed as h 1 ∈ R N after passing through the BiLSTM layer 203 , and the description information q of the second medicine can be expressed as h 2 ∈ R N after passing through the BiLSTM layer 203 , and the two or splicing, that is, h * =[h 1 ; h 2 ]∈R 2N is sent to the fully connected layer 204, where N represents the number of hidden layer units in the BiLSTM layer 203; since the output dimension of BiLSTM is 2N, the output layer The node is the number of relationship categories m, so the fully connected layer needs to be used for linear transformation, as shown in the following formula, where W (fc) and b (fc) are the weight parameters and bias parameters of the fully connected layer, respectively, and output is the output of the linear transformation:
output=W(fc)·h*+b(fc)。output=W (fc) ·h * +b (fc) .
优选地,为了提高模型的泛化能力,降低模型过拟合的风险,在全连接层应用Dropout机制,其思想是采用一定的比例使结点不工作。Preferably, in order to improve the generalization ability of the model and reduce the risk of overfitting of the model, the dropout mechanism is applied in the fully connected layer, and the idea is to use a certain ratio to make the nodes not work.
最后在本步骤中利用损失函数代入药物相互作用数据集训练,得到最优模型;具体地,在该层中选用softmax函数对全连接层的输出进行归一化处理,即将各个类别对应的值转换为对应的概率,所有类别概率值的总和为1,并从中选取概率最大的作为预测的关系类别(预测类别标签):Finally, in this step, the loss function is substituted into the drug interaction data set for training to obtain the optimal model; specifically, the softmax function is used in this layer to normalize the output of the fully connected layer, that is, the values corresponding to each category are converted For the corresponding probability, the sum of the probability values of all categories is 1, and the one with the highest probability is selected as the predicted relationship category (predicted category label):
其中,代表预测类别标签,output代表句子线性变换的输出,softmax(output)为归一化处理。in, Represents the predicted category label, output represents the output of the linear transformation of the sentence, and softmax(output) is normalized.
进一步地,损失函数为:Further, the loss function is:
其中,y∈Rm代表真实类别标签,m代表类别标签数目,y和以one-hot向量表示,λ是L2正则化的超参数,θ为在模型中进行训练得到,该θ主要是目的是为了防止模型出现过拟合现象,当θ值为最佳值时,此时的药物描述系信息训练模型即为最优模型。本步骤中还使用步骤S400中构建的带有药物描述信息的药物相互用数据集进行训练,并将取得最优结果的模型进行保存。where y∈Rm represents the true class label, m represents the number of class labels, y and Represented by a one-hot vector, λ is the hyperparameter of L2 regularization, and θ is obtained by training in the model. The main purpose of this θ is to prevent the model from overfitting. When the θ value is the best value, this The information training model of the drug description system at the time is the optimal model. In this step, the drug interaction data set with drug description information constructed in step S400 is also used for training, and the model that obtains the optimal result is saved.
S404:将最优模型与BiLSTM-Att-CapsNet模型相结合得到EK-BiLSTM-Att-CapsNet模型;然后执行步骤S406;S404: combine the optimal model with the BiLSTM-Att-CapsNet model to obtain the EK-BiLSTM-Att-CapsNet model; then perform step S406;
本实施例中得到EK-BiLSTM-Att-CapsNet模型可参考实施例1中的EK-BiLSTM-Att-CapsNet模型3,结构图参考图2,药物信息在经过药物描述信息模型中的BILSTM过后进入BiLSTM-Att-CapsNet模型到达胶囊网络层。The EK-BiLSTM-Att-CapsNet model obtained in this example can refer to the EK-BiLSTM-Att-CapsNet model 3 in Example 1, and the structure diagram refers to Figure 2. The drug information enters the BiLSTM after passing through the BILSTM in the drug description information model. -Att-CapsNet model arrives at the capsule network layer.
进一步地,EK-BiLSTM-Att-CapsNet模型使用的损失函数为:Further, the loss function used by the EK-BiLSTM-Att-CapsNet model is:
L=Tk max(0,m+-||vk||)2+λ(1-Tk)max(0,||vk||-m-)2 L=T k max(0,m + -||v k ||) 2 +λ(1-T k )max(0,||v k ||-m - ) 2
其中,Tk为分类的指示函数,k为指示系数,m+为上边界,||vk||为第k个胶囊的长度,m-为下边界。Among them, Tk is the indicator function of classification, k is the indicator coefficient, m + is the upper boundary, ||v k || is the length of the kth capsule, and m- is the lower boundary.
S406:识别药物相互作用数据集的药物实体,在药物数据库中找寻对应药物描述信息并保存,最后对结合的模型进行训练得到最终关系抽取模型。S406: Identify the drug entities of the drug interaction data set, find and save the corresponding drug description information in the drug database, and finally train the combined model to obtain a final relationship extraction model.
本实施例中,药物实体即为药物的描述信息,假设BiLSTM-Att-CapsNet模型输入原语句Soriginal,该语句中两个药物实体之间的最短依存路径为Ssdp,原语句中的两个药物实体在如DrugBank数据库中的描述信息分别用des1和des2表示;In this embodiment, the drug entity is the description information of the drug. Assuming that the BiLSTM-Att-CapsNet model inputs the original sentence S original , the shortest dependency path between the two drug entities in the sentence is S sdp , and the two The description information of drug entities in the DrugBank database is represented by des 1 and des 2 , respectively;
如图2的上部分所示,将以文本表示的Soriginal和Ssdp经过嵌入层,可得到以向量形式进行表示的和再将二者分别送入BAC-BiLSTM层,即可得到原语句的长序列依赖信息Horiginal和最短依存路径的长序列依赖信息表示Hsdp,考虑到语句中不同单词的重要性不同,在原语句Horiginal上应用单词级别的注意力机制,即可得到加权后的为了缓解使用最短依存路径可能造成的噪声干扰问题,在Horiginal和Hsdp应用句子级别的注意力机制,可以有效的将原语句信息和最短依存路径信息相融合,用Hall表示;As shown in the upper part of Fig. 2, the S original and S sdp represented by text are passed through the embedding layer to obtain a vector represented by and Then send the two to the BAC-BiLSTM layer, respectively, to obtain the long sequence dependency information H original of the original sentence and the long sequence dependency information representation H sdp of the shortest dependency path. Considering the different importance of different words in the sentence, in the original sentence Apply the word-level attention mechanism on H original to get the weighted In order to alleviate the noise interference problem that may be caused by using the shortest dependency path, the sentence-level attention mechanism is applied to H original and H sdp , which can effectively fuse the original sentence information and the shortest dependency path information, which is represented by Hall ;
如图2的下部分所示,在将第一药物描述信息des1和第二药物描述信息des2经过嵌入层之后,分别送入BiLSTM层203,即可得到相对应的BiLSTM隐藏层输出Hdes1和Hdes2,将二者结合,即可得到Hdes=[Hdes1;Hdes2]。As shown in the lower part of Figure 2, after the first drug description information des 1 and the second drug description information des 2 are passed through the embedding layer, they are respectively sent to the BiLSTM layer 203, and the corresponding BiLSTM hidden layer output H des1 can be obtained. and H des2 , by combining the two, H des =[H des1 ; H des2 ] can be obtained.
将Hall以及Hdes分别经过卷积操作,得到胶囊网络层的低层胶囊表示,uall=(u1,u2,...,um)和udes=(u1,u2,...,un),其中m和n分别表示Hall产生的低层胶囊个数,以及药物描述信息Hdes产生的胶囊个数。二者共同构成胶囊网络层的低层胶囊u=[uall;udes],通过胶囊网络层的动态路由机制,可以动态的决定低层胶囊向高层胶囊传输的信息量,即可动态的利用药物描述信息这一外部知识。 Convolve Hall and H des respectively to obtain the low-level capsule representation of the capsule network layer, u all =(u 1 ,u 2 ,..., um ) and u des =(u 1 ,u 2 ,. ..,u n ), where m and n represent the number of low-level capsules generated by Hall and the number of capsules generated by the drug description information H des , respectively. The two together form the low-level capsule u=[u all ; u des ] of the capsule network layer. Through the dynamic routing mechanism of the capsule network layer, the amount of information transmitted from the low-level capsule to the high-level capsule can be dynamically determined, and the drug description can be dynamically used. information as external knowledge.
实施例3Example 3
本实施例中,对实施例1的系统和实施例2的方法的有效性进行验证,具体采用DDIExtraction2013数据集进行实验,该数据集是由792篇DrugBank中的医学文本和MedLine中的233篇摘要组成,并事先对药物实体进行了标注,数据集的详细信息如表1所示:In this example, the effectiveness of the system in Example 1 and the method in Example 2 is verified, and the DDIExtraction2013 data set is used for experiments. The data set is composed of 792 medical texts in DrugBank and 233 abstracts in MedLine. composition, and annotated drug entities in advance. The details of the dataset are shown in Table 1:
表1 DDIExtraction2013数据描述Table 1 DDIExtraction2013 data description
本章中药物描述信息的长度设置为50,并将单词转换为300维的Glove词向量,对于未在Glove词表中出现的单词采用随机初始化的方式表示该单词的词向量,胶囊网络的迭代次数设置为3,Batchsize设置为64,dropout取值为0.5,学习率设置为0.001,药物描述信息模型的迭代次数设置为50,EK-BiLSTM-Att-CapsNet模型的迭代次数设置为35,模型损失函数中的m+为0.9,m-为0.1;L2正则化的超参数λ为0.25。In this chapter, the length of the drug description information is set to 50, and the word is converted into a 300-dimensional Glove word vector. For words that do not appear in the Glove vocabulary, the word vector of the word is represented by random initialization. The number of iterations of the capsule network Set to 3, Batchsize to 64, dropout to 0.5, learning rate to 0.001, the number of iterations of the drug description information model is set to 50, the number of iterations of the EK-BiLSTM-Att-CapsNet model is set to 35, and the model loss function where m + is 0.9 and m- is 0.1; the hyperparameter λ for L2 regularization is 0.25.
进一步地,使用实施例1模型设计消融实验,得到的结果如表2:Further, the ablation experiment was designed using the model of Example 1, and the obtained results were shown in Table 2:
表2消融实验结果Table 2 Results of ablation experiments
由消融实验结果可以看出,在直接添加外部的药物描述信息后,模型的F1值提高了0.27%,说明药物描述信息中存在对药物相互作用关系判断的信息,通过使用该信息,可以提高模型的抽取效果。在使用DrugBank中的带有药物描述信息的药物相互作用数据集进行训练后,模型的效果提升了0.73%,有效证明了外部药物数据库中已有的知识可以有效提升模型的抽取效果。通过消融实验结果表明,本章提出的模型可以有效利用外部已有的药物描述信息,同时可以利用DrugBank中已有的大量的药物相互作用知识,有助于提高模型的抽取结果。It can be seen from the results of the ablation experiment that after directly adding the external drug description information, the F1 value of the model is increased by 0.27%, indicating that there is information on the drug interaction relationship judgment in the drug description information. By using this information, the model can be improved. extraction effect. After training with the drug interaction dataset with drug description information in DrugBank, the effect of the model is improved by 0.73%, which effectively proves that the existing knowledge in the external drug database can effectively improve the extraction effect of the model. The results of ablation experiments show that the model proposed in this chapter can effectively use the existing external drug description information, and at the same time can use a large number of drug interaction knowledge in DrugBank, which is helpful to improve the extraction results of the model.
再进一步地,不同关系类别上的结果对比验证本发明的有效性,通过对数据集的分析可知,数据集中不同类别的数目相差较大,因此可能造成不同类别的预测结果相差较大,将本发明模型与相关模型在不同类别上的实验结果进行对比,具体信息如表3所示,(下表中的模型为均为现有技术模型):Further, the results of different relationship categories are compared to verify the effectiveness of the present invention. Through the analysis of the data set, it can be seen that the number of different categories in the data set is quite different, so it may cause the prediction results of different categories to be quite different. The experimental results of the invention model and related models in different categories are compared, and the specific information is shown in Table 3, (the models in the following table are all prior art models):
表3不同关系类别上的实验结果Table 3 Experimental results on different relation categories
通过上表,可知对比模型的不同类别之间的最大F1值差值在31.35%到36.15%之间浮动,本发明的系统模型不同类别之间的F1值最大相差仅为25.34%,较大降低了不同类别的F1值之间的差距;由此可见,与其他模型相比,本模型能够有效缓解因不同类型样本数目差异较大造成的抽取结果差异较大的问题。From the above table, it can be seen that the maximum difference in F1 value between different categories of the comparison model is between 31.35% and 36.15%, and the maximum difference in F1 value between different categories of the system model of the present invention is only 25.34%, which is greatly reduced It can be seen that compared with other models, this model can effectively alleviate the problem of large differences in extraction results caused by large differences in the number of samples of different types.
最后,本实施例中还对本发明中的方法与现有的关系提取方法做了对比实验,将本发明的系统模型在DDIExtraction2013数据集上的实验结果与现有模型在该数据集上的结果进行对比。Finally, in this embodiment, a comparative experiment is made between the method of the present invention and the existing relationship extraction method, and the experimental results of the system model of the present invention on the DDIExtraction2013 data set are compared with the results of the existing model on the data set. Compared.
不同模型在DDIExtraction2013数据集上的实验结果如表4所示:The experimental results of different models on the DDIExtraction2013 dataset are shown in Table 4:
表-4不同模型在DDIExtraction2013数据集上的实验结果Table-4 Experimental results of different models on the DDIExtraction2013 dataset
根据表4可知,本发明中的模型的F1值分别比表格其他模型的F1值就均要高,即与现有模型相比,本发明的系统模型能够更好的自动抽取药物之间的相互作用关系。According to Table 4, the F1 value of the model in the present invention is higher than the F1 value of other models in the table, that is, compared with the existing model, the system model of the present invention can better automatically extract the interaction between drugs effect relationship.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the scope of protection of the present invention and the claims, many forms can be made, which all belong to the protection of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010643746.XA CN111814460B (en) | 2020-07-06 | 2020-07-06 | External knowledge-based drug interaction relation extraction method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010643746.XA CN111814460B (en) | 2020-07-06 | 2020-07-06 | External knowledge-based drug interaction relation extraction method and system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111814460A CN111814460A (en) | 2020-10-23 |
| CN111814460B true CN111814460B (en) | 2021-02-09 |
Family
ID=72841756
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010643746.XA Active CN111814460B (en) | 2020-07-06 | 2020-07-06 | External knowledge-based drug interaction relation extraction method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111814460B (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112308326B (en) * | 2020-11-05 | 2022-12-13 | 湖南大学 | Biological network link prediction method based on meta-path and bidirectional encoder |
| CN112270951B (en) * | 2020-11-10 | 2022-11-01 | 四川大学 | Brand-new molecule generation method based on multitask capsule self-encoder neural network |
| CN112634996A (en) * | 2021-03-10 | 2021-04-09 | 北京中医药大学东直门医院 | Liver injury prediction method, apparatus, device, medium, and program product |
| CN113158679B (en) * | 2021-05-20 | 2023-07-04 | 广东工业大学 | Marine industry entity identification method and device based on multi-feature superposition capsule network |
| CN115934948B (en) * | 2022-12-28 | 2026-01-13 | 湖南大学 | Knowledge enhancement-based pharmaceutical entity relationship joint extraction method and system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108491680A (en) * | 2018-03-07 | 2018-09-04 | 安庆师范大学 | Drug relationship abstracting method based on residual error network and attention mechanism |
| CN109325131A (en) * | 2018-09-27 | 2019-02-12 | 大连理工大学 | A Drug Recognition Method Based on Biomedical Knowledge Graph Reasoning |
| US10657330B2 (en) * | 2016-10-28 | 2020-05-19 | Boe Technology Group Co., Ltd. | Information extraction method and apparatus |
| US10789546B2 (en) * | 2016-06-23 | 2020-09-29 | International Business Machines Corporation | Cognitive machine learning classifier generation |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10628632B2 (en) * | 2018-04-11 | 2020-04-21 | Accenture Global Solutions Limited | Generating a structured document based on a machine readable document and artificial intelligence-generated annotations |
| CN111078889B (en) * | 2019-12-20 | 2021-01-05 | 大连理工大学 | Method for extracting relationship between medicines based on various attentions and improved pre-training |
| CN111222338A (en) * | 2020-01-08 | 2020-06-02 | 大连理工大学 | Biomedical relation extraction method based on pre-training model and self-attention mechanism |
| CN111276258B (en) * | 2020-01-15 | 2022-10-14 | 大连理工大学 | A method for extracting drug pathogenic relationship based on domain knowledge |
-
2020
- 2020-07-06 CN CN202010643746.XA patent/CN111814460B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10789546B2 (en) * | 2016-06-23 | 2020-09-29 | International Business Machines Corporation | Cognitive machine learning classifier generation |
| US10657330B2 (en) * | 2016-10-28 | 2020-05-19 | Boe Technology Group Co., Ltd. | Information extraction method and apparatus |
| CN108491680A (en) * | 2018-03-07 | 2018-09-04 | 安庆师范大学 | Drug relationship abstracting method based on residual error network and attention mechanism |
| CN109325131A (en) * | 2018-09-27 | 2019-02-12 | 大连理工大学 | A Drug Recognition Method Based on Biomedical Knowledge Graph Reasoning |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111814460A (en) | 2020-10-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111814460B (en) | External knowledge-based drug interaction relation extraction method and system | |
| CN110210037B (en) | Syndrome-oriented medical field category detection method | |
| US11610678B2 (en) | Medical diagnostic aid and method | |
| CN113326374B (en) | Short Text Sentiment Classification Method and System Based on Feature Enhancement | |
| WO2021139232A1 (en) | Medical knowledge graph-based triage method and apparatus, device, and storage medium | |
| CN111834014A (en) | A method and system for named entity recognition in the medical field | |
| CN113255320A (en) | Entity relation extraction method and device based on syntax tree and graph attention machine mechanism | |
| CN114841122A (en) | Text extraction method combining entity identification and relationship extraction, storage medium and terminal | |
| CN116719913A (en) | A medical question answering system based on improved named entity recognition and its construction method | |
| CN111966827A (en) | Conversation emotion analysis method based on heterogeneous bipartite graph | |
| US20250329342A1 (en) | Multi-mode emotion recognition method, system, electronic device and storage medium | |
| CN106407211A (en) | Method and device for classifying semantic relationships among entity words | |
| CN117423470B (en) | A chronic disease clinical decision support system and construction method | |
| CN110110059A (en) | A kind of medical conversational system intention assessment classification method based on deep learning | |
| CN117033568A (en) | A method, device, storage medium and equipment for interpreting medical data indicators | |
| CN114398464B (en) | Knowledge graph-based discussion data display method and system | |
| CN110427486A (en) | Classification method, device and the equipment of body patient's condition text | |
| CN114840665A (en) | Rumor detection method and device based on emotion analysis and related medium | |
| CN111651973A (en) | Text matching method based on syntax perception | |
| WO2023185082A1 (en) | Training method and training device for language representation model | |
| CN109119160B (en) | Expert triage system with multiple reasoning modes and method thereof | |
| CN114169408A (en) | Emotion classification method based on multi-mode attention mechanism | |
| Pais et al. | In-depth evaluation of Romanian natural language processing pipelines | |
| CN117787276A (en) | A Chinese medical named entity recognition method based on attention mechanism interaction | |
| CN110060749B (en) | Intelligent diagnosis method of electronic medical record based on SEV-SDG-CNN |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |