A training method, extraction method, device, equipment and storage medium for chemical information extraction model

Through the chemical information extraction model, we solve the problem of non-/semi-structured data extraction in the chemical industry, realize the extraction of structured data from chemical engineering literature, and improve the efficiency of scientific research, production and experiments.

CN112699668BActive Publication Date: 2024-09-20GUANGZHOU YINNOVATOR BIOTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110007886.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-05
Publication Date
2024-09-20
Estimated Expiration
2041-01-05

AI Technical Summary

Technical Problem

There are a large number of multi-source, heterogeneous, and low-quality non/semi-structured data in the chemical industry. It is difficult to automatically extract structured data on chemical component reactions, which affects the efficiency of scientific research, production, and experiments.

Method used

The chemical information extraction model training method is used to extract chemical information existing in chemical sentences by obtaining labeled chemical sentence samples, characterizing characters, calculating cross-entropy loss and updating model parameters, combined with gated convolution network and attention network.

Benefits of technology

Effectively extract structured data from un/semi-structured data to facilitate data management in the chemical industry and improve the efficiency of scientific research, production and experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112699668B
    Figure CN112699668B
Patent Text Reader

Abstract

The present invention discloses a training method, extraction method, device, equipment and storage medium for a chemical information extraction model. The training method includes: obtaining a training set, the training set includes a plurality of chemical sentence samples, the chemical sentence samples are annotated with reference chemical information, the characters in the chemical sentence samples are characterized, and a characterization vector of each character is obtained, the characterization vector is input into the chemical information extraction model for processing, and the probability of the reference chemical information existing in the chemical sentence samples is obtained, the cross entropy loss of the chemical sentence samples is calculated based on the probability and the reference chemical information, and the parameters of the chemical information extraction model are updated based on the cross entropy loss. The chemical information extraction model is trained by the training method of the above-mentioned chemical information extraction model, so as to extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitate data management, and provide great help to scientific research, production, and experiments in the chemical industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of machine learning technology, and in particular to a training method, extraction method, device and storage medium for a chemical information extraction model. Background Art

[0002] With the development of machine deep learning, semantic extraction has become an important direction of current knowledge management. Through semantic extraction, various trivial non- / semi-structured information data can be extracted semantically, thereby connecting knowledge and forming a semantic-based knowledge network.

[0003] Among them, in the chemical industry, in various chemical research, experiments, production and other business practices, various literature and information data generally present a multi-source, heterogeneous and low-quality situation. Unstructured / semi-structured data accounts for a large proportion and has obvious industry characteristics. Automatically extracting chemical component reaction structured data from these unstructured / semi-structured data can provide great help to the scientific research, production and experiments of the chemical industry. Summary of the invention

[0004] The present invention provides a training method, extraction method, device, equipment and storage medium for a chemical information extraction model to extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitate data management, and provide great help to scientific research, production and experiments in the chemical industry.

[0005] In a first aspect, an embodiment of the present invention provides a method for training a chemical information extraction model, comprising:

[0006] Obtaining a training set, the training set comprising a plurality of chemical engineering sentence samples, the chemical engineering sentence samples being annotated with reference chemical information;

[0007] Characterizing the characters in the chemical engineering sentence sample to obtain a characterization vector for each character;

[0008] Inputting the representation vector into a chemical information extraction model for processing to obtain a probability that the reference chemical information exists in the chemical sentence sample;

[0009] Calculate the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information;

[0010] Parameters of the chemical information extraction model are updated based on the cross entropy loss.

[0011] Optionally, the characterization vector is input into a chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical statement sample, including:

[0012] Extracting a first feature from k representation vectors of characters in a k neighborhood of an i-th character in the chemical engineering sentence sample;

[0013] Inputting the first feature into a first gated convolutional network based on a first chemical entity in the reference chemical information and a second gated convolutional network based on a second chemical entity in the reference chemical information for processing, respectively, to obtain a first context feature vector and a second context feature vector;

[0014] Inputting the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing respectively, to obtain a first attention feature vector and a second attention feature vector;

[0015] Concatenate the first attention feature vector and the second attention feature vector to obtain a concatenated vector;

[0016] The concatenated vector is input into a classifier for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample.

[0017] Optionally, the first feature is respectively input into a first gated convolutional network based on a first chemical entity in the reference chemical information and a second gated convolutional network based on a second chemical entity in the reference chemical information for processing to obtain a first context feature vector and a second context feature vector, including:

[0018] Using a first nonlinear activation function to perform nonlinear activation on the first feature to obtain a first activated feature;

[0019] fusing the first feature with the embedding vector of the first chemical entity to obtain a first fused feature;

[0020] Using a second nonlinear activation function to perform nonlinear activation on the first fused feature to obtain a second activated feature;

[0021] Calculating the product of the first activation feature and the second activation feature to obtain a first context feature vector;

[0022] Using a third nonlinear activation function to perform nonlinear activation on the first feature to obtain a third activated feature;

[0023] fusing the first feature with the embedding vector of the second chemical entity to obtain a second fused feature;

[0024] Using a fourth nonlinear activation function to perform nonlinear activation on the second fused feature to obtain a fourth activated feature;

[0025] The product of the third activation feature and the fourth activation feature is calculated to obtain a second context feature vector.

[0026] Optionally, the first context feature vector and the second context feature vector are respectively input into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing to obtain a first attention feature vector and a second attention feature vector, including:

[0027] Performing nonlinear activation on the first context feature vector to obtain a fifth activation feature;

[0028] Calculating a dot product of the fifth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a first value;

[0029] Normalizing the plurality of the first numerical values ​​to obtain a first attention weight of each of the first context feature vectors;

[0030] Calculating the sum of the products of each of the first context feature vectors and the corresponding first attention weights to obtain a first attention feature vector;

[0031] Performing nonlinear activation on the second context feature vector to obtain a sixth activation feature;

[0032] calculating a dot product of the sixth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a second value;

[0033] Normalizing the plurality of second numerical values ​​to obtain a second attention weight of each of the second context feature vectors;

[0034] The sum of the products of each second context feature vector and the corresponding second attention weight is calculated to obtain a second attention feature vector.

[0035] Optionally, obtain a training set, including:

[0036] Collect chemical literature from the entire Internet based on multiple SCRAPY search engines;

[0037] Chemical sentence samples including the first chemical entity, the second chemical entity and the association relationship between the first chemical entity and the second chemical entity are extracted from the chemical literature as a training set.

[0038] Optionally, before inputting the representation vector into the chemical information extraction model for processing, the method further includes:

[0039] The TransE model is used to perform knowledge representation on the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity, and an embedding vector of the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity is obtained.

[0040] In a second aspect, an embodiment of the present invention further provides a chemical information extraction method, wherein a chemical information extraction model is obtained by training using the chemical information extraction model training method provided in the first aspect of the present invention, comprising:

[0041] Get chemical statement;

[0042] Inputting the chemical engineering sentence into the chemical information extraction model for processing to obtain the probability that the target chemical information exists in the chemical engineering sentence;

[0043] The target chemical information is extracted based on the probability.

[0044] In a third aspect, an embodiment of the present invention provides a training device for a chemical information extraction model, comprising:

[0045] A training set acquisition module, used to acquire a training set, wherein the training set includes a plurality of chemical statement samples, and the chemical statement samples are annotated with reference chemical information;

[0046] A character representation module, used for representing characters in the chemical engineering sentence sample to obtain a representation vector of each character;

[0047] A first probability acquisition module is used to input the representation vector into a chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample;

[0048] A loss calculation module, used for calculating the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information;

[0049] A parameter updating module is used to update the parameters of the chemical information extraction model based on the cross entropy loss.

[0050] In a fourth aspect, an embodiment of the present invention further provides a computer device, including:

[0051] one or more processors;

[0052] A storage device for storing one or more programs;

[0053] When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the chemical information extraction model provided in the first aspect of the present invention, or implement the chemical information extraction method provided in the second aspect of the present invention.

[0054] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, it implements a training method for a chemical information extraction model as provided in the first aspect of the present invention, or implements a chemical information extraction method as provided in the second aspect of the present invention.

[0055] The training method of the chemical information extraction model provided by the embodiment of the present invention includes: obtaining a training set, the training set includes multiple chemical sentence samples, the chemical sentence samples are annotated with reference chemical information, the characters in the chemical sentence samples are characterized, and the characterization vectors of each character are obtained, and the characterization vectors are input into the chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence samples, and the cross entropy loss of the chemical sentence samples is calculated based on the probability and the reference chemical information, and the parameters of the chemical information extraction model are updated based on the cross entropy loss. The chemical information extraction model is trained by the training method of the chemical information extraction model, so as to extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitate data management, and provide great help to the scientific research, production, and experiments of the chemical industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 A flow chart of a method for training a chemical information extraction model provided in Example 1 of the present invention;

[0057] Figure 2A is a flow chart of a training method for a chemical information extraction model provided in Embodiment 2 of the present invention;

[0058] Figure 2B A schematic diagram of collecting chemical literature provided by an embodiment of the present invention;

[0059] Figure 2C A processing flow chart of a chemical information extraction model provided by an embodiment of the present invention;

[0060] Figure 3A is a flow chart of chemical information extraction provided by Embodiment 3 of the present invention;

[0061] Figure 3B A chemical entity association diagram provided by an embodiment of the present invention;

[0062] Figure 4 A schematic diagram of the structure of a training device for a chemical information extraction model provided in Embodiment 4 of the present invention;

[0063] Figure 5 A schematic diagram of the structure of a chemical information extraction device provided in Embodiment 5 of the present invention;

[0064] Figure 6 A schematic diagram of the structure of a computer device provided in Embodiment 6 of the present invention. DETAILED DESCRIPTION

[0065] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0066] Embodiment 1

[0067] Figure 1 This is a flowchart of a method for training a chemical information extraction model provided in the first embodiment of the present invention. This embodiment can be applied to training a chemical information extraction model, which is used to extract structured data from chemical engineering literature containing chemical information of non- / semi-structured data. The method can be executed by a training device for a chemical information extraction model provided in the embodiment of the present invention. The device can be implemented in software and / or hardware and integrated in a computer device provided in the embodiment of the present invention, such as Figure 1 As shown, the method specifically comprises the following steps:

[0068] S101. Obtain a training set.

[0069] The training set includes a plurality of chemical engineering sentence samples, and the chemical engineering sentence samples are annotated with reference chemical information. Exemplarily, in some embodiments of the present invention, literature and materials on chemical components and their reactions can be collected from the entire network, and chemical engineering sentence samples can be screened out therefrom. Chemical component reaction information (chemical information) is collected through Chemscr.com as a chemical component reaction knowledge base (hereinafter referred to as Chemscr knowledge base) required for training machine deep learning, and chemical engineering sentence samples are annotated.

[0070] S102: Characterize the characters in the chemical engineering sentence sample to obtain a characterization vector for each character.

[0071] In some embodiments of the present invention, the characters in the chemical engineering sentence samples are processed by word vector embedding to obtain a representation vector for representing each character. Specifically, the characters can be understood as placeholders in the chemical engineering sentence samples, and each word or punctuation occupies one character.

[0072] S103, inputting the representation vector into the chemical information extraction model for processing, and obtaining the probability that the reference chemical information exists in the chemical sentence sample.

[0073] Specifically, the representation vector of each character is input into the initial chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample. Exemplarily, the representation vectors of three or more consecutive characters in the chemical sentence sample can be input into the chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the three or more consecutive characters.

[0074] In an embodiment of the present invention, the network structure of the chemical information extraction model may include a common convolutional neural network, an attention network, etc., which is not limited in the embodiment of the present invention.

[0075] S104. Calculate the cross entropy loss of the chemical sentence samples based on the probability and reference chemical information.

[0076] Specifically, the cross entropy loss of the probability obtained in the above steps and the reference chemical information is calculated by a cross entropy loss function, which is often used in classification problems, and the cross entropy is used to describe the distance between two distributions. Of course, in other embodiments of the present invention, other losses (such as square error loss, absolute loss, etc.) can also be calculated, which is not limited in the embodiments of the present invention.

[0077] S105. Update the parameters of the chemical information extraction model based on the cross entropy loss.

[0078] In an embodiment of the present invention, the cross entropy losses corresponding to each chemical statement sample in the training set are accumulated and summed to obtain the total loss of the training set, and the parameters of the chemical information extraction model are updated based on the total loss. Exemplarily, in some embodiments of the present invention, the total loss is compared with a preset value, and when the total loss is greater than the preset value, the parameters of the chemical information extraction model are updated, and the step of obtaining the training set is returned to train the chemical information extraction model again until the total loss is less than or equal to the preset value, then it is determined that the training of the chemical information extraction model is completed.

[0079] The training method of the chemical information extraction model provided by the embodiment of the present invention includes: obtaining a training set, the training set includes multiple chemical sentence samples, the chemical sentence samples are annotated with reference chemical information, the characters in the chemical sentence samples are characterized, and the characterization vectors of each character are obtained, and the characterization vectors are input into the chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence samples, and the cross entropy loss of the chemical sentence samples is calculated based on the probability and the reference chemical information, and the parameters of the chemical information extraction model are updated based on the cross entropy loss. The chemical information extraction model is trained by the training method of the chemical information extraction model, so as to extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitate data management, and provide great help to the scientific research, production, and experiments of the chemical industry.

[0080] Embodiment 2

[0081] Figure 2A is a flow chart of a training method for a chemical information extraction model provided in the second embodiment of the present invention. This embodiment is refined on the basis of the above-mentioned first embodiment, and describes in detail the process of the chemical information extraction model processing chemical sentence samples, such as Figure 2A As shown, the method includes:

[0082] S201. Obtain a training set.

[0083] The training set includes a plurality of chemical engineering sentence samples, and the chemical engineering sentence samples are annotated with reference chemical information. Exemplarily, in some embodiments of the present invention, literature and materials on chemical components and their reactions can be collected from the entire network, and chemical engineering sentence samples can be screened out therefrom. Chemical component reaction information (chemical information) is collected through the chemical source network (chemscr.com) as a chemical component reaction knowledge base (hereinafter referred to as chemscr knowledge base) required for training machine deep learning, and chemical engineering sentence samples are annotated. In a specific embodiment of the present invention, chemical engineering literature is collected from the entire network based on multiple SCRAPY searchers, and then, chemical engineering sentence samples including a first chemical entity, a second chemical entity, and an association relationship between the first chemical entity and the second chemical entity are extracted from the chemical engineering literature as a training set.

[0084] Figure 2B A schematic diagram of collecting chemical literature provided by an embodiment of the present invention, such as Figure 2B As shown, by way of example, by using a SCRAPY-based search engine framework to search various chemical information websites, the system can deploy multiple SCRAPYD search engine servers to implement the operation and management of the search engines in the entire network.

[0085] Furthermore, in order to avoid the defensive blocking of IP by websites due to frequent website data crawling, which leads to the failure of crawling data, the proxy IP pool module is used. By constantly changing the proxy IP to access the target website, the success rate of information crawling can be ensured. In addition, the use of the memory-based REDIS key-value database can not only ensure efficient data refresh, but also ensure the speed of the SCRAPYD searcher framework to read the proxy IP.

[0086] By using multiple SCRAPYD searcher servers to synchronize information searches, a large number of write links entering the full-text data server will cause data write failures. To solve this problem, the system converts a large number of parallel database write requests after crawling the cluster, deploys a data write-back queue, and coordinates the data write-back queue through the data write-back scheduler to improve the input write success rate. In addition, high-speed serial writes ensure data security.

[0087] The crawling task scheduler is used to centrally control the release of tasks to the search server cluster, which can ensure the balanced distribution of tasks to the greatest extent and effectively utilize each search server.

[0088] Provides a JSON-based WEB control API to ensure the implementation of target crawling and the control and scheduling of searcher server clusters.

[0089] S202: Characterize the characters in the chemical engineering sentence sample to obtain a characterization vector for each character.

[0090] In some embodiments of the present invention, the characters in the chemical engineering sentence samples are processed by word vector embedding to obtain a representation vector for each character. Word embedding refers to converting a word into a vector representation. Specifically, the word embedding method can be implemented by one-hot encoding or Word2Vec algorithm, etc., which will not be described in detail in the embodiments of the present invention.

[0091] Figure 2C A processing flow chart of a chemical information extraction model provided by an embodiment of the present invention, such as Figure 2C As shown in the figure, the embedding layer is used to embed each character [w1, w2, ..., w n ] is mapped to a d-dimensional representation vector x i ∈R d , so as to obtain the characterization vector xi of each character to form a vector sequence X=[x1, x2, ..., x n ].

[0092] S203: extracting a first feature from k representation vectors of characters in a k neighborhood of the ith character in the chemical engineering sentence sample.

[0093] The first feature is extracted from k representation vectors of characters in the k neighborhood of the i-th character in the chemical engineering sentence sample, where k may be a positive integer greater than or equal to 2.

[0094] like Figure 2C As shown, after the characters in the chemical sentence sample are represented and the representation vector xi of each character is obtained, the first feature c is extracted from the k representation vectors of the characters in the k neighborhood of the i-th character in the chemical sentence sample. i The first feature corresponding to the characterization vector of each character constitutes a feature sequence C = [c1, c2, ..., c n ], where n is the number of characters in the chemical sentence sample.

[0095] Specifically, k representation vectors of characters in the k neighborhood of the i-th character can be input into a convolutional network for convolution operation to obtain the first feature. Specifically, for the vector sequence X, the convolution operation at position i can be shown as follows:

[0096] c i =f(x i:i+k-1 *w c +b C )

[0097] Among them, w C ∈R d×k is the convolution kernel, f is the nonlinear activation function, * is the convolution operation, x i:i+k-1 are the k representation vectors of the characters in the k neighborhood of the i-th character.

[0098] S204, inputting the first feature into a first gated convolutional network based on the first chemical entity in the reference chemical information and a second gated convolutional network based on the second chemical entity in the reference chemical information for processing, to obtain a first context feature vector and a second context feature vector.

[0099] In an embodiment of the present invention, the first feature is input into a first gated convolutional network based on a first chemical entity in the reference chemical information and a second gated convolutional network based on a second chemical entity in the reference chemical information for processing, thereby obtaining a first context feature vector and a second context feature vector. The gated convolution controls the propagation of the convolutional feature and controls additional gated units at the same time. Figure 2C As shown, in the embodiment of the present invention, the first gated convolutional network and the second gated convolutional network both have two nonlinear function gates, namely the Tanh function and the ReLu function. The specific processing process of the first gated convolutional network and the second gated convolutional network is as follows:

[0100] 1. Use the first nonlinear activation function to perform nonlinear activation on the first feature to obtain the first activated feature.

[0101] The first feature is nonlinearly activated using a first nonlinear activation function to obtain a first activated feature. Specifically, the first nonlinear activation function is a Tanh function. In one embodiment of the present invention, extracting the first feature ci from the k representation vectors of the characters in the k neighborhood of the i-th character in the chemical sentence sample and nonlinearly activating the first feature using the first nonlinear activation function are implemented in the same formula, and the specific formula is as follows:

[0102]

[0103] in, is the first activated feature, is the convolution kernel, is the bias parameter.

[0104] 2. Fusing the first feature with the embedding vector of the first chemical entity to obtain a first fused feature.

[0105] Specifically, the embedding vector of the first chemical entity is introduced, and the first feature is fused with the embedding vector of the first chemical entity to obtain a first fused feature.

[0106] Specifically, before the representation vector is input into the chemical information extraction model for processing, it also includes:

[0107] The TransE model is used to perform knowledge representation on the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity, and an embedding vector of the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity is obtained.

[0108] Specifically, through the annotation of the above chemical sentence samples, triples can be extracted from the chemical component reaction dataset and the chemscr knowledge base. The triples of the chemscr knowledge base are directly extracted. Then, in order to extract triples for the chemical component reaction dataset, the entity pairs of the chemical components are first extracted, and then the relationship between these pairs is annotated based on the chemscr knowledge base. For entity pairs that exist in the chemical component reaction dataset but cannot be found in the chemscr knowledge base, we use manual annotation. In this way, we obtain enough triple samples for subsequent knowledge representation learning.

[0109] The TransE model is used to take the sorted triple samples as the correct triples (c, r, d) for machine learning. The TransE model models the relationship as the transformation from the chemical component from the first chemical entity to the second chemical entity, that is, e c +e r ≈e d , the loss function of TransE is defined as follows:

[0110]

[0111] Where S is the set of correct triples, S′ is the set of negative triples (i.e. incorrect triples), and γ>0 is the margin between the correct triples and the negative triples. The correct triple S is extracted from the chemical component reaction dataset and the chemscr knowledge base. The negative triple S′ replaces the chemical substance in the correct triple with a random entity. c, r, d are the first chemical entity, the association relationship, and the second chemical entity, respectively, and e c , e r , e dare the embedding vector of the first chemical entity, the embedding vector of the association relationship, and the embedding vector of the second chemical entity, respectively.

[0112] 3. Use a second nonlinear activation function to perform nonlinear activation on the first fusion feature to obtain a second activation feature.

[0113] The first fused feature is nonlinearly activated by a second nonlinear activation function to obtain a second activated feature. Specifically, the second nonlinear activation function is a ReLu function. In one embodiment of the present invention, the first feature ci is extracted from the k representation vectors of the characters in the k neighborhood of the i-th character in the chemical sentence sample, the first feature is fused with the embedding vector of the first chemical entity, and the first fused feature is nonlinearly activated by the second nonlinear activation function in the same formula. The specific formula is as follows:

[0114]

[0115] in, is the second activated feature, is the convolution kernel, is the bias parameter, is the transfer matrix.

[0116] 4. Calculate the product of the first activation feature and the second activation feature to obtain a first context feature vector.

[0117] Specifically, the first activation feature With the second activation feature Multiply the corresponding elements to get the first context feature vector

[0118] 5. Use a third nonlinear activation function to perform nonlinear activation on the first feature to obtain a third activated feature.

[0119] The third nonlinear activation function is used to perform nonlinear activation on the first feature to obtain a third activated feature. Specifically, the third nonlinear activation function is a Tanh function. In one embodiment of the present invention, extracting the first feature ci from the k representation vectors of the characters in the k neighborhood of the i-th character in the chemical sentence sample and performing nonlinear activation on the first feature using the third nonlinear activation function are implemented in the same formula, and the specific formula is as follows:

[0120]

[0121] in, is the third activation feature, is the convolution kernel, is the bias parameter.

[0122] 6. Fuse the first feature with the embedding vector of the second chemical entity to obtain a second fused feature.

[0123] Specifically, the embedding vector of the second chemical entity is introduced, and the first feature is fused with the embedding vector of the second chemical entity to obtain a second fused feature.

[0124] 7. Use the fourth nonlinear activation function to perform nonlinear activation on the second fused feature to obtain the fourth activated feature.

[0125] The second fused feature is nonlinearly activated by a fourth nonlinear activation function to obtain a fourth activated feature. Specifically, the fourth nonlinear activation function is a ReLu function. In one embodiment of the present invention, the first feature ci is extracted from the k representation vectors of the characters in the k neighborhood of the i-th character in the chemical sentence sample, the first feature is fused with the embedding vector of the second chemical entity, and the second fused feature is nonlinearly activated by the fourth nonlinear activation function in the same formula. The specific formula is as follows:

[0126]

[0127] in, is the fourth activation feature, is the convolution kernel, is the bias parameter, is the transfer matrix.

[0128] 8. Calculate the product of the third activation feature and the fourth activation feature to obtain a second context feature vector.

[0129] Specifically, the third activation feature With the fourth activation feature Multiply the corresponding elements to get the second context feature vector

[0130] S205. Input the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing respectively, to obtain a first attention feature vector and a second attention feature vector.

[0131] For example, Figure 2C As shown, step S205 may include the following sub-steps:

[0132] 1. Perform nonlinear activation on the first context feature vector to obtain the fifth activation feature.

[0133] Specifically, a nonlinear activation function Tanh is used to perform nonlinear activation on the first context feature to obtain the fifth activation feature.

[0134] 2. Calculate the dot product of the fifth activation feature and the embedding vector of the association relationship between the first chemical entity and the second chemical entity to obtain a first value.

[0135] Specifically, the above two steps can be implemented by the following formula:

[0136]

[0137] Among them, g i is the first value corresponding to the i-th first context feature vector, ⊙ is the dot product operation, that is, the elements in the two feature vectors are multiplied and then summed, W g ∈R k×l is the transfer matrix, b g is the bias parameter.

[0138] 3. Normalize the multiple first numerical values ​​to obtain the first attention weight of each first context feature vector.

[0139] Specifically, for the obtained [g1, g2, …, g n ], the first attention weight of each first context feature vector is defined using a softmax logistic regression function:

[0140]

[0141] Among them, α i is the first attention weight corresponding to the i-th first context feature vector.

[0142] 4. Calculate the sum of the products of each first context feature vector and the corresponding first attention weight to obtain the first attention feature vector.

[0143] Specifically, the sum of the products of each first context feature vector and the corresponding first attention weight is calculated to obtain the first attention feature vector. The specific calculation formula is as follows:

[0144]

[0145] Among them, m c is the first attention feature vector.

[0146] 5. Perform nonlinear activation on the second context feature vector to obtain the sixth activation feature.

[0147] Specifically, the nonlinear activation function Tanh is used to perform nonlinear activation on the second context feature to obtain the sixth activation feature.

[0148] 6. Calculate the dot product of the sixth activation feature and the embedding vector of the association relationship between the first chemical entity and the second chemical entity to obtain a second value.

[0149] Specifically, the above two steps can be implemented by the following formula:

[0150]

[0151] Among them, h i is the second value corresponding to the i-th second context feature vector, ⊙ is the dot product operation, that is, the elements in the two feature vectors are multiplied and then summed, W h ∈R k×l is the transfer matrix, b h is the bias parameter.

[0152] 7. Normalize the multiple second numerical values ​​to obtain the second attention weight of each second context feature vector.

[0153] Specifically, for the obtained [h1, h2, …, h n ], the second attention weight of each second context feature vector is defined using a softmax logistic regression function:

[0154]

[0155] Among them, b i is the second attention weight corresponding to the i-th second context feature vector.

[0156] 8. Calculate the sum of the products of each second context feature vector and the corresponding second attention weight to obtain the second attention feature vector.

[0157] Specifically, the sum of the products of each second context feature vector and the corresponding second attention weight is calculated to obtain the second attention feature vector. The specific calculation formula is as follows:

[0158]

[0159] Among them, m d is the second attention feature vector.

[0160] S206. Concatenate the first attention feature vector and the second attention feature vector to obtain a concatenated vector.

[0161] Specifically, the first attention feature vector m c and the second attention feature vector m d Perform concatenation (concat) to obtain a concatenated vector m.

[0162] S207, input the concatenated vector into a classifier for processing, and obtain the probability that the reference chemical information exists in the chemical sentence sample.

[0163] Specifically, the concatenated vector is input into the classifier for processing, and the classifier maps the concatenated vector to between [0, 1] to obtain the probability that the reference chemical information exists in the chemical sentence sample. Exemplarily, the specific processing process of the classifier is shown in the following formula:

[0164] o=relu(W h m+b H )

[0165] p(y=j|T)=softmax(W o o+b o )

[0166] Among them, o is the activation feature obtained by nonlinearly activating the concatenated vector using the relu function. is the transfer matrix, b o ∈R 2 is the bias parameter, and p(y=j|T) is the probability that the chemical sentence sample T predicted by the model contains reference chemical information.

[0167] S208. Calculate the cross entropy loss of the chemical sentence samples based on the probability and reference chemical information.

[0168] Specifically, the cross entropy loss function is used to calculate the cross entropy loss of the probability obtained in the above steps and the reference chemical information. The calculation formula of the cross entropy loss is as follows:

[0169]

[0170] Where N is the number of chemical engineering sentence samples in the training set, p(y (t) |T (t) ) is the probability that the t-th chemical statement sample T predicted by the model contains reference chemical information.

[0171] The total loss of the cross entropy loss corresponding to each chemical sentence sample in the training set is calculated using the above cross entropy loss calculation formula.

[0172] S209. Update the parameters of the chemical information extraction model based on the cross entropy loss.

[0173] Exemplarily, in some embodiments of the present invention, the total loss is compared with a preset value. When the total loss is greater than the preset value, the parameters of the chemical information extraction model are updated, and the step of obtaining the training set is returned to train the chemical information extraction model again until the total loss is less than or equal to the preset value, then it is determined that the training of the chemical information extraction model is completed.

[0174] The training method of the chemical information extraction model provided by the embodiment of the present invention includes: obtaining a training set, the training set includes multiple chemical sentence samples, the chemical sentence samples are annotated with reference chemical information, the characters in the chemical sentence samples are characterized, and the characterization vectors of each character are obtained, and the characterization vectors are input into the chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence samples, and the cross entropy loss of the chemical sentence samples is calculated based on the probability and the reference chemical information, and the parameters of the chemical information extraction model are updated based on the cross entropy loss. The chemical information extraction model is trained by the training method of the chemical information extraction model, so as to extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitate data management, and provide great help to the scientific research, production, and experiments of the chemical industry.

[0175] Embodiment 3

[0176] Figure 3A is a flow chart of chemical information extraction provided in the third embodiment of the present invention. This embodiment can be used to extract structured data from chemical literature containing chemical information of non- / semi-structured data. The method adopts the chemical information extraction model trained by the training method of the chemical information extraction model provided in the previous embodiment of the present invention. The method can be executed by the chemical information extraction device provided in the embodiment of the present invention. The device can be implemented in software and / or hardware and integrated in the computer device provided in the embodiment of the present invention, such as Figure 3A As shown, the method specifically comprises the following steps:

[0177] S301. Obtain chemical engineering statements.

[0178] Chemical engineering statements may include texts, statements, documents, etc. encountered in actual application processes, and the embodiments of the present invention do not limit this.

[0179] S302: Input the chemical engineering sentence into the chemical information extraction model for processing to obtain the probability that the target chemical information exists in the chemical engineering sentence.

[0180] The chemical information extraction model is a chemical information extraction model trained by the training method of the chemical information extraction model in the aforementioned embodiment. Specifically, the processing process of the chemical information extraction model has been described in detail in the aforementioned embodiment, and the embodiment of the present invention will not be repeated here. The chemical sentence is input into the trained chemical information extraction model for processing to obtain the probability of the target chemical information existing in the chemical sentence.

[0181] S303, extracting target chemical information based on probability.

[0182] Exemplarily, the obtained probability is compared with a preset value. When the probability is greater than the preset value (the preset value can be set to 0.8), it is determined that the chemical statement contains chemical information, and the chemical information is extracted and stored in the Neo4j graph database. Neo4i supports efficient graph operations and query entity relationships.

[0183] After storing the chemical information, you only need to use the cypher query language to perform a target query, enter the target chemical entity, and then you can query the chemical entities associated with the target query entity. Specifically, the query statement is as follows:

[0184] MATCH(n1{title:"Methyl bromide"})-[]->(n2)RETURN n1,n2

[0185] Figure 3B A chemical entity association graph provided in an embodiment of the present invention can query multiple chemical entities associated with "methyl bromide" by simply inputting the target chemical entity "methyl bromide".

[0186] The chemical information method provided in the embodiment of the present invention adopts the chemical information extraction model trained by the training method of the chemical information extraction model provided in the embodiment of the present invention, including: obtaining chemical sentences, inputting the chemical sentences into the chemical information extraction model for processing, obtaining the probability of the existence of target chemical information in the chemical sentences, and extracting the target chemical information based on the probability. This method can extract structured data from chemical literature containing chemical information of non- / semi-structured data, facilitates data management, and provides great help to scientific research, production, and experiments in the chemical industry.

[0187] Embodiment 4

[0188] Figure 4 A schematic diagram of a training device for a chemical information extraction model provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the training device of the chemical information extraction model includes:

[0189] A training set acquisition module 401 is used to acquire a training set, wherein the training set includes a plurality of chemical statement samples, and the chemical statement samples are annotated with reference chemical information;

[0190] A character characterization module 402 is used to characterize the characters in the chemical engineering sentence sample to obtain a characterization vector of each character;

[0191] A first probability acquisition module 403 is used to input the representation vector into a chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample;

[0192] A loss calculation module 404, used to calculate the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information;

[0193] The parameter updating module 405 is used to update the parameters of the chemical information extraction model based on the cross entropy loss.

[0194] In some embodiments of the present invention, the first probability acquisition module 403 includes:

[0195] A first feature extraction submodule, for extracting a first feature from k representation vectors of characters in a k neighborhood of an i-th character in the chemical engineering sentence sample;

[0196] A context feature vector acquisition submodule, used for inputting the first feature into a first gated convolutional network based on the first chemical entity in the reference chemical information and a second gated convolutional network based on the second chemical entity in the reference chemical information for processing, so as to obtain a first context feature vector and a second context feature vector;

[0197] an attention feature vector acquisition submodule, configured to input the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing, to obtain a first attention feature vector and a second attention feature vector;

[0198] A concatenation submodule, configured to concatenate the first attention feature vector with the second attention feature vector to obtain a concatenated vector;

[0199] The first probability acquisition submodule is used to input the concatenated vector into a classifier for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample.

[0200] In some embodiments of the present invention, the context feature vector acquisition submodule includes:

[0201] A first activation unit, configured to perform nonlinear activation on the first feature by using a first nonlinear activation function to obtain a first activated feature;

[0202] A first fusion unit, used for fusing the first feature with the embedding vector of the first chemical entity to obtain a first fused feature;

[0203] A second activation unit, configured to perform nonlinear activation on the first fusion feature by using a second nonlinear activation function to obtain a second activation feature;

[0204] A first product unit, used for calculating the product of the first activation feature and the second activation feature to obtain a first context feature vector;

[0205] A third activation unit, configured to perform nonlinear activation on the first feature by using a third nonlinear activation function to obtain a third activated feature;

[0206] A second fusion unit, used for fusing the first feature with the embedding vector of the second chemical entity to obtain a second fused feature;

[0207] a fourth activation unit, configured to perform nonlinear activation on the second fused feature by using a fourth nonlinear activation function to obtain a fourth activated feature;

[0208] The second product unit is used to calculate the product of the third activation feature and the fourth activation feature to obtain a second context feature vector.

[0209] In some embodiments of the present invention, the attention feature vector acquisition submodule includes:

[0210] a fifth activation unit, configured to perform nonlinear activation on the first context feature vector to obtain a fifth activation feature;

[0211] A first dot product calculation unit, configured to calculate a dot product of the fifth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a first value;

[0212] A first normalization processing unit, used for normalizing the plurality of the first numerical values ​​to obtain a first attention weight of each of the first context feature vectors;

[0213] a first summing unit, configured to calculate the sum of products of the first context feature vectors and the corresponding first attention weights to obtain a first attention feature vector;

[0214] a sixth activation unit, configured to perform nonlinear activation on the second context feature vector to obtain a sixth activation feature;

[0215] A second dot product calculation unit, configured to calculate a dot product of the sixth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a second value;

[0216] A second normalization processing unit, used for normalizing the plurality of second numerical values ​​to obtain a second attention weight of each of the second context feature vectors;

[0217] The second summing unit is used to calculate the sum of the products of each second context feature vector and the corresponding second attention weight to obtain a second attention feature vector.

[0218] In some embodiments of the present invention, the training set acquisition module 401 includes:

[0219] The literature collection submodule is used to collect chemical literature from the entire Internet based on multiple SCRAPY search engines;

[0220] The extraction submodule is used to extract chemical sentence samples including the first chemical entity, the second chemical entity and the association relationship between the first chemical entity and the second chemical entity from the chemical literature as a training set.

[0221] In some embodiments of the present invention, the device further comprises:

[0222] The embedding vector acquisition module is used to use the TransE model to perform knowledge representation on the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity before inputting the representation vector into the chemical information extraction model for processing, so as to obtain the embedding vector of the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity.

[0223] The above-mentioned chemical information extraction model training device can execute the chemical information extraction model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0224] Embodiment 5

[0225] Figure 5 A schematic diagram of the structure of a chemical information extraction device provided in Embodiment 5 of the present invention is shown in FIG. Figure 5 As shown, the chemical information extraction device comprises:

[0226] A chemical engineering statement acquisition module 501 is used to acquire chemical engineering statements;

[0227] The second probability acquisition module 502 is used to input the chemical engineering sentence into the chemical information extraction model for processing to obtain the probability of the target chemical information existing in the chemical engineering sentence;

[0228] The chemical information extraction module 503 is used to extract the target chemical information based on the probability.

[0229] The chemical information extraction device can execute the chemical information extraction method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0230] Embodiment 6

[0231] Embodiment 6 of the present invention provides a computer device, Figure 6 A schematic diagram of the structure of a computer device provided in Embodiment 6 of the present invention is shown in FIG. Figure 6As shown, the computer device includes a processor 601, a memory 602, a communication module 603, an input device 604 and an output device 605; the number of processors 601 in the computer device can be one or more. Figure 6 A processor 601 is taken as an example; the processor 601, memory 602, communication module 603, input device 604 and output device 605 in the computer device can be connected by a bus or other means. Figure 6 The above processor 601, memory 602, communication module 603, input device 604 and output device 605 can be integrated on a control mainboard of a computer device.

[0232] The memory 602 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as the training method of the chemical information extraction model or the module corresponding to the chemical information extraction method in the embodiment of the present invention. The processor 601 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 602, that is, the training method of the chemical information extraction model or the chemical information extraction method provided in the above embodiment is implemented.

[0233] The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 602 may further include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0234] The communication module 603 is used to establish a connection with an external device (such as a smart terminal) and realize data interaction with the external device. The input device 604 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device.

[0235] The present embodiment provides a computer device that can execute the chemical information extraction model training method or chemical information extraction method provided in any of the above embodiments of the present invention, and has specific corresponding functions and beneficial effects.

[0236] Embodiment 7

[0237] Embodiment 7 of the present invention provides a storage medium containing computer executable instructions, on which a computer program is stored. When the program is executed by a processor, the training method of the chemical information extraction model or the chemical information extraction method provided in any of the above embodiments of the present invention is implemented.

[0238] The training methods of chemical information extraction models include:

[0239] Obtaining a training set, the training set comprising a plurality of chemical engineering sentence samples, the chemical engineering sentence samples being annotated with reference chemical information;

[0240] Characterizing the characters in the chemical engineering sentence sample to obtain a characterization vector for each character;

[0241] Inputting the representation vector into a chemical information extraction model for processing to obtain a probability that the reference chemical information exists in the chemical sentence sample;

[0242] Calculate the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information;

[0243] Parameters of the chemical information extraction model are updated based on the cross entropy loss.

[0244] Chemical information extraction methods include:

[0245] Get chemical statement;

[0246] Inputting the chemical engineering sentence into the chemical information extraction model for processing to obtain the probability that the target chemical information exists in the chemical engineering sentence;

[0247] The target chemical information is extracted based on the probability.

[0248] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present invention is not limited to the method operations described above, and can also execute the training method of the chemical information extraction model provided by the embodiment of the present invention or related operations in the chemical information extraction method.

[0249] It should be noted that, for the device, equipment and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0250] Through the above description of the implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a robot, a personal computer, a server, or a network device, etc.) to perform the training method of the chemical information extraction model or the chemical information extraction method described in any embodiment of the present invention.

[0251] It is worth noting that in the above-mentioned device, the various modules, sub-modules and units included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0252] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0253] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0254] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A training method for a chemical information extraction model, characterized in that: include: Obtaining a training set, the training set comprising a plurality of chemical engineering sentence samples, the chemical engineering sentence samples being annotated with reference chemical information; Characterizing the characters in the chemical engineering sentence sample to obtain a characterization vector for each character; Inputting the representation vector into a chemical information extraction model for processing to obtain a probability that the reference chemical information exists in the chemical sentence sample; Calculate the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information; Updating parameters of the chemical information extraction model based on the cross entropy loss; The inputting the representation vector into the chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample includes: Extracting a first feature from k representation vectors of characters in a k neighborhood of an i-th character in the chemical engineering sentence sample; Inputting the first feature into a first gated convolutional network based on a first chemical entity in the reference chemical information and a second gated convolutional network based on a second chemical entity in the reference chemical information for processing, respectively, to obtain a first context feature vector and a second context feature vector; Inputting the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing respectively, to obtain a first attention feature vector and a second attention feature vector; Concatenate the first attention feature vector and the second attention feature vector to obtain a concatenated vector; The concatenated vector is input into a classifier for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample.

2. The training method of the chemical information extraction model according to claim 1, characterized in that: The first feature is respectively input into a first gated convolutional network based on a first chemical entity in the reference chemical information and a second gated convolutional network based on a second chemical entity in the reference chemical information for processing to obtain a first context feature vector and a second context feature vector, including: Using a first nonlinear activation function to perform nonlinear activation on the first feature to obtain a first activated feature; fusing the first feature with the embedding vector of the first chemical entity to obtain a first fused feature; Using a second nonlinear activation function to perform nonlinear activation on the first fused feature to obtain a second activated feature; Calculating the product of the first activation feature and the second activation feature to obtain a first context feature vector; Using a third nonlinear activation function to perform nonlinear activation on the first feature to obtain a third activated feature; fusing the first feature with the embedding vector of the second chemical entity to obtain a second fused feature; Using a fourth nonlinear activation function to perform nonlinear activation on the second fused feature to obtain a fourth activated feature; The product of the third activation feature and the fourth activation feature is calculated to obtain a second context feature vector.

3. The training method of the chemical information extraction model according to claim 1, characterized in that: Inputting the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing respectively, to obtain a first attention feature vector and a second attention feature vector, comprising: Performing nonlinear activation on the first context feature vector to obtain a fifth activation feature; Calculating a dot product of the fifth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a first value; Normalizing the plurality of the first numerical values ​​to obtain a first attention weight of each of the first context feature vectors; Calculating the sum of the products of each of the first context feature vectors and the corresponding first attention weights to obtain a first attention feature vector; Performing nonlinear activation on the second context feature vector to obtain a sixth activation feature; calculating a dot product of the sixth activation feature and an embedding vector of an association relationship between the first chemical entity and the second chemical entity to obtain a second value; Normalizing the plurality of second numerical values ​​to obtain a second attention weight of each of the second context feature vectors; The sum of the products of each second context feature vector and the corresponding second attention weight is calculated to obtain a second attention feature vector.

4. The training method of the chemical information extraction model according to any one of claims 1 to 3, characterized in that: Get the training set, including: Collect chemical literature from the entire Internet based on multiple SCRAPY search engines; Chemical sentence samples including the first chemical entity, the second chemical entity and the association relationship between the first chemical entity and the second chemical entity are extracted from the chemical literature as a training set.

5. The method for training a chemical information extraction model according to any one of claims 1 to 3, characterized in that: Before the characterization vector is input into the chemical information extraction model for processing, the method further includes: The TransE model is used to perform knowledge representation on the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity, and an embedding vector of the first chemical entity, the second chemical entity, and the association relationship between the first chemical entity and the second chemical entity is obtained.

6. A chemical information extraction method, characterized in that: The chemical information extraction model trained by the training method of the chemical information extraction model according to any one of claims 1 to 5 comprises: Get chemical statement; Inputting the chemical engineering sentence into the chemical information extraction model for processing to obtain the probability that the target chemical information exists in the chemical engineering sentence; The target chemical information is extracted based on the probability.

7. A training device for a chemical information extraction model, characterized in that: include: A training set acquisition module, used to acquire a training set, wherein the training set includes a plurality of chemical statement samples, and the chemical statement samples are annotated with reference chemical information; A character representation module, used for representing characters in the chemical engineering sentence sample to obtain a representation vector of each character; A first probability acquisition module is used to input the representation vector into a chemical information extraction model for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample; A loss calculation module, used for calculating the cross entropy loss of the chemical sentence sample based on the probability and the reference chemical information; A parameter updating module, used for updating the parameters of the chemical information extraction model based on the cross entropy loss; The first probability acquisition module includes: A first feature extraction submodule, for extracting a first feature from k representation vectors of characters in a k neighborhood of an i-th character in the chemical engineering sentence sample; A context feature vector acquisition submodule, used for inputting the first feature into a first gated convolutional network based on the first chemical entity in the reference chemical information and a second gated convolutional network based on the second chemical entity in the reference chemical information for processing, so as to obtain a first context feature vector and a second context feature vector; an attention feature vector acquisition submodule, configured to input the first context feature vector and the second context feature vector into an attention network based on the association relationship between the first chemical entity and the second chemical entity for processing, to obtain a first attention feature vector and a second attention feature vector; A concatenation submodule, configured to concatenate the first attention feature vector with the second attention feature vector to obtain a concatenated vector; The first probability acquisition submodule is used to input the concatenated vector into a classifier for processing to obtain the probability that the reference chemical information exists in the chemical sentence sample.

8. A computer device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the training method of the chemical information extraction model as described in any one of claims 1-5, or implement the chemical information extraction method as described in claim 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the training method of the chemical information extraction model as described in any one of claims 1 to 5, or implements the chemical information extraction method as described in claim 6.