A method for extracting pollutant information from English literature based on deep learning
The deep learning model is used to extract pollutant information from English environmental monitoring literature, which solves the problem of low data collection efficiency in the existing technology, realizes chemical named entity recognition and relationship extraction, builds an updateable database, and improves the quality of pollutants. Information collection efficiency.
Patent Information
- Application Number
- CN202210414714.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-20
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2042-04-20
AI Technical Summary
Existing technology cannot effectively construct an entity relationship network of pollutants and their key information in subdivided fields, and cannot automatically and efficiently extract pollutant information from English environmental monitoring literature, resulting in low data collection efficiency.
Using the pollutant information extraction method from English literature based on deep learning, by building a term dictionary suitable for environmental monitoring, using the Bi-LSTM+CRF model for entity extraction and the Bi-GRU model for relationship extraction, the relationship between pollutant names and concentrations is established. network of relationships.
Realized the identification and relationship extraction of chemical named entities in English environmental monitoring literature, built an updateable chemical inventory database, greatly improved the efficiency of pollutant information collection, replaced manual reading, and improved chemical concentration statistics accuracy and efficiency.
Smart Images

Figure CN114662495B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental science and artificial intelligence, and in particular to a method for extracting pollutant information from English literature based on deep learning. Background Art
[0002] With the development of environmental science, the monitoring data for environmental media such as the atmosphere, water, sediment, and soil have increased significantly. A large number of previous research results provide environmental exposure levels of regional pollutants, providing a reference for related research and management. In the era of big data, manual reading can no longer meet the current needs for comprehensive and efficient data collection. Instead, automatic reading by computers and the collection of text information by text mining methods have been the main prospects in related fields in recent years.
[0003] The current research on text mining models is mainly the interdisciplinary and expansion of general artificial intelligence. Among them, deep learning models have gradually attracted the attention of literature review work due to their deeper language expression layer and higher learning efficiency. At present, the fields that have been applied include structured database construction, knowledge graph construction, and literature content analysis. For example, patent CN1041999972 B proposed named entity recognition and relationship extraction of news data, constructed an entity network, and obtained the relationship between news terms; patent CN 104298651 B proposed named entity recognition of biomedical terms and relationship extraction of protein interactions, and provided protein interaction relationship data retrieval services. Text mining models that are highly dependent on terminology dictionaries cannot be used in different fields. If an entity relationship network of pollutants and their key information in a subdivided field can be established, all existing chemical reporting information can be retrieved based on the relevant pollutant information in the entity network, and a database of chemical exposure detected in the environment can be constructed. Therefore, it is an important task to build a self-built dictionary based on the list of chemicals with environmental risks and construct an entity relationship network of pollutant information suitable for environmental monitoring related literature. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for extracting pollutant information from English literature based on deep learning. By subdividing the chemical catalog library and the deep learning network architecture, the pollutant information in the environmental monitoring literature is collected and analyzed, and a relationship network between the pollutant names and concentrations is constructed to obtain updateable English terms and pollutant exposure concentration information.
[0005] To achieve the above purpose, the technical solution provided by the present invention is:
[0006] A method for extracting pollutant information from English literature based on deep learning, including:
[0007] Based on the existing chemical inventory, a terminology dictionary suitable for text mining of local environmental monitoring literature is constructed;
[0008] Obtain original documents, perform word segmentation on them, and construct raw document corpus;
[0009] Build entity extraction model and relationship extraction model;
[0010] Preprocess the raw document corpus to obtain training sets and test sets for entity extraction models and relationship extraction models;
[0011] The entity extraction model and the relationship extraction model are trained through the training set to obtain the trained entity extraction model and the relationship extraction model;
[0012] Input the test set into the trained entity extraction model for recognition to obtain the entity recognition result;
[0013] Input the entity recognition results and test set data into the trained relation extraction model to obtain the relation extraction results.
[0014] Furthermore, the corpus segmentation of the original document includes:
[0015] The original document is processed by a phrase extraction algorithm based on mutual information and left-right entropy to obtain the mutual information value and left-right entropy of the text segment;
[0016] Score and rank the text phrases in the original document based on mutual information and left-right entropy;
[0017] The top-ranked text phrases are extracted and added to the word segmentation dictionary for text segmentation. The text phrase scores are adjusted according to the word segmentation results to obtain a raw document corpus with clear word boundaries.
[0018] Furthermore, the entity extraction model adopts a Bi-LSTM+CRF model, and the relationship extraction model adopts a Bi-GRU model.
[0019] Furthermore, the preprocessing of the raw literature corpus includes:
[0020] Combine the BIO annotation model and term dictionary to annotate the words in the raw literature corpus, and convert the annotated words into chemical names that conform to the input format of the Bi-LSTM+CRF model;
[0021] The Bi-LSTM+CRF model is used to identify the chemical names and output the corresponding concentrations;
[0022] The concentrations are identified and the named entities of the chemicals are restored.
[0023] Furthermore, the BIO annotation model is defined as follows:
[0024] B represents the first character of a named entity; I represents a character inside a named entity; E represents the end of a named entity; O represents a character that is not a constituent of a named entity; S represents a single-character named entity;
[0025] Convert the marked words into chemical names that conform to the Bi-LSTM+CRF model input format, including:
[0026] Extract each character and character label in the annotated content and add them to the "character" and "character label" arrays. If the character is a preset character, delete the character and its character label. Use the pad_sequences function to convert the obtained array into a chemical name that conforms to the input format of the Bi-LSTM+CRF model.
[0027] Furthermore, the Bi-LSTM+CRF model is used to identify the chemical names and output the corresponding concentrations, including:
[0028] Load the pre-trained word vectors, match the sample data with the word vectors, and generate the word vector matrix for model training from the successfully matched data;
[0029] The word vector matrix is used as the embedding layer input and encoded by the Bi-LSTM layer. The output of the Bi-LSTM layer is the label score of each word. The label with the highest score is selected as the label of the word.
[0030] Introduce the CRF layer for sentence-level sequence labeling;
[0031] Finally the concentration is identified and extracted.
[0032] Furthermore, encoding through the Bi-LSTM layer includes:
[0033] The Bi-LSTM layer automatically extracts sentence features and converts the char embedding sequence (x1, x2, x3, ..., x n ) as the input of each time step of Bi-LSTM, and the hidden state output of the forward LSTM Hidden state sequence with reverse LSTM Position splicing of hidden states output at each position Get the complete hidden state sequence The output of the Bi-LSTM layer is the label score of each word, and finally the label with the highest score is selected as the label of the word.
[0034] Furthermore, the constructed relation extraction model includes:
[0035] The first layer of the model network is Bi-GRU; each GRU unit includes a reset gate r t and an update gate z t , update gate z t Used to control the output h at the previous moment t-1 With the current input x t The degree of preservation of the information contained in is taken as the output h of the gating unit at time t t ; and reset gate r t By x t Determine the previous moment h t-1 The degree of forgetting of information in the calculation is used to obtain the memory at the current moment. And the current hidden state h after the update gate t , the update gate z of the GRU unit at time t t , reset gate t , New Memory The final hidden state h t The calculation is as follows:
[0036] z t =σ(W z ·[h t-1 ,x t ])
[0037] r t =σ(W r ·[h t-1 ,x t ])
[0038]
[0039]
[0040] Among them, σ() is the sigmoid nonlinear activation function, which is used to enhance the model's ability to process nonlinear data, σ(x) = 1 / (1+e -x ),* represents dot product, tanh(x)=(e x -e -x ) / (e x +e -x ), W, W r , W z is the weight matrix of the model, [] means connecting two vectors;
[0041] The second layer of the model network is the word-level attention layer: w = {w1,w2,...,w T} will h t By processing the following formula, we can get u t =tanh(W w ·h t +bw );
[0042] The third layer of the model network is the sentence-level attention layer:
[0043] The sentence feature value composed of the output s of the word-level attention layer is used as the input of the sentence-level attention layer, and the randomly initialized word context vector u is added s For joint training, v is the vector sum of all sentences, and the specific formula is as follows:
[0044] u i =tanh(W s ·s i +b s )
[0045]
[0046]
[0047] The fourth layer of the model network is the Softmax classifier:
[0048] The Softmax classifier maps v to a set of vectors whose elements are in the interval [0,1] and whose sum is 1, as shown in the following formula:
[0049] y=Soft max(v),y=[y1,y2,...,y N ] and y i ∈[0,1] and ∑y i =1
[0050] Among them, N is the number of relationship labels, that is, the number of relationship extraction categories.
[0051] Furthermore, a randomly initialized word context vector u is added during the word-level attention layer training process w The word-level attention layer is added to calculate the correlation between words and relations, forming a sentence vector of the word-level attention layer. The calculation formula of the word-level attention layer is as follows:
[0052]
[0053]
[0054] where α t For the word u t with u w is the normalized representation of , and s is the weighted word vector representation at the current moment.
[0055] Furthermore, during the training of the relationship extraction model, the L2 regularization method is added to constrain the relationship extraction network. The dropout strategy is introduced during the training process, the suppression probability is set, and the batch Adam optimization method is used for model parameter training.
[0056] Compared with the prior art, the principles and advantages of this technical solution are as follows:
[0057] The model's deep learning network architecture performs named entity recognition and relationship extraction based on chemical names in environmental monitoring literature. It not only realizes the named entity recognition of chemicals in the original English literature, but also extracts the relationship between chemicals and detection concentrations. Based on this, a set of updateable chemical list databases is obtained, and a data set of chemicals in the literature and environmental detection concentrations is constructed, which greatly improves the efficiency of information collection in such literature and replaces manual reading for the statistical work of regional reported chemical concentrations. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the services required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 This is a principle flow chart of a method for extracting pollutant information from English literature based on deep learning according to the present invention;
[0060] Figure 2 This is a schematic diagram of the Bi-LSTM+CRF model principle;
[0061] Figure 3 This is an illustration of the Bi-GRU model principle. DETAILED DESCRIPTION
[0062] The present invention will be further described below in conjunction with specific embodiments:
[0063] The method for extracting pollutant information from English literature based on deep learning described in this embodiment includes:
[0064] S1. Based on the existing chemical inventory, construct a terminology dictionary suitable for text mining of local environmental monitoring literature;
[0065] S2, obtain the original documents, perform word segmentation on the original documents, and construct the raw document corpus;
[0066] In this step, the corpus segmentation of the original document includes:
[0067] The original document is processed by a phrase extraction algorithm based on mutual information and left-right entropy to obtain the mutual information value and left-right entropy of the text segment;
[0068] Score and rank the text phrases in the original document based on mutual information and left-right entropy;
[0069] The top-ranked text phrases are extracted and added to the word segmentation dictionary for text segmentation. The text phrase scores are adjusted according to the word segmentation results to obtain a raw document corpus with clear word boundaries.
[0070] S3. Construct an entity extraction model and a relationship extraction model; the entity extraction model adopts the Bi-LSTM+CRF model, and the relationship extraction model adopts the Bi-GRU model.
[0071] S4, preprocessing the raw document corpus to obtain training sets and test sets for entity extraction models and relationship extraction models;
[0072] In this step, the preprocessing of the raw literature corpus includes:
[0073] S4-1. Combine the BIO annotation model and term dictionary to annotate the words in the raw literature corpus, and convert the annotated words into chemical names that conform to the input format of the Bi-LSTM+CRF model;
[0074] The definition of the BIO annotation model includes:
[0075] B represents the first character of a named entity; I represents a character inside a named entity; E represents the end of a named entity; O represents a character that is not a constituent of a named entity; S represents a single-character named entity;
[0076] Convert the marked words into chemical names that conform to the Bi-LSTM+CRF model input format, including:
[0077] Extract each character and character label from the annotated content and add them to the "character" and "character label" arrays. If the character is a preset character, delete the character and its character label. Use the pad_sequences function to convert the resulting array into a chemical name that conforms to the input format of the Bi-LSTM+CRF model. The preset characters are ",.!?:'':;、.".
[0078] S4-2. Use the Bi-LSTM+CRF model to identify the chemical name and output the corresponding concentration (including the concentration value and the unit of the concentration value);
[0079] This step includes:
[0080] Load the pre-trained word vectors, and use sample data to look up the word vector table to generate a word vector matrix for training;
[0081] The word vector matrix is used as the embedding layer input and encoded by the Bi-LSTM layer. The output of the Bi-LSTM layer is the label score of each word. The label with the highest score is selected as the label of the word.
[0082] Introduce the CRF layer for sentence-level sequence labeling;
[0083] Finally the concentration is identified and extracted.
[0084] In the above, the encoding through the Bi-LSTM layer includes:
[0085] The Bi-LSTM layer automatically extracts sentence features and converts the char embedding sequence (x1, x2, x3, ..., x n ) as the input of each time step of Bi-LSTM, and the hidden state output of the forward LSTM Hidden state sequence with reverse LSTM Position splicing of hidden states output at each position Get the complete hidden state sequence The output of the Bi-LSTM layer is the label score of each word, and finally the label with the highest score is selected as the label of the word.
[0086] S4-3. Identify the concentration and restore the named entity of the chemical.
[0087] The restoration process is as follows:
[0088] If the current letter Y0 is marked as B, it means that the letter is the beginning of a named entity. If the next letter Y1 is marked as E, it means that the letter is the end of a named entity. Y0 and Y1 together constitute a named entity; if Y1 is marked as I, continue to judge the next letter Y2 until the letter Yn is marked as E, then Y0, Y1, Y2,…, Yn together constitute a named entity; if the current letter is marked as S, it means that the word is a single-word named entity; if the current word is marked as O, it means that the word is a non-entity constituent word.
[0089] S5. Train the entity extraction model and the relationship extraction model using the training set to obtain trained entity extraction model and relationship extraction model;
[0090] In the above, the relation extraction model includes:
[0091] The first layer of the model network is Bi-GRU; each GRU unit includes a reset gate r t and an update gate z t , update gate zt Used to control the output h at the previous moment t-1 With the current input x t The degree of preservation of the information contained in is taken as the output h of the gating unit at time t t ; and reset gate r t By x t Determine the previous moment h t-1 The degree of forgetting of information in the calculation is used to obtain the memory at the current moment. And the current hidden state h after the update gate t , the update gate z of the GRU unit at time t t , reset gate t , New Memory The final hidden state h t The calculation is as follows:
[0092] z t =σ(W z ·[h t-1 ,x t ])
[0093] r t =σ(W r ·[h t-1 ,x t ])
[0094]
[0095]
[0096] Among them, σ() is the sigmoid nonlinear activation function, which is used to enhance the model's ability to process nonlinear data, σ(x) = 1 / (1+e -x ),* represents dot product, tanh(x)=(e x -e -x ) / (e x +e -x ), W, W r , W z is the weight matrix of the model, [] means connecting two vectors;
[0097] The second layer of the model network is the word-level attention layer: w = {w1,w2,...,w T} will h t By processing the following formula, we can get u t =tanh(W w ·h t +b w );
[0098] The third layer of the model network is the sentence-level attention layer:
[0099] The sentence feature value composed of the output s of the word-level attention layer is used as the input of the sentence-level attention layer, and the randomly initialized word context vector u is added s For joint training, v is the vector sum of all sentences, and the specific formula is as follows:
[0100] u i =tanh(W s ·s i +b s )
[0101]
[0102]
[0103] The fourth layer of the model network is the Softmax classifier:
[0104] The Softmax classifier maps v to a set of vectors whose elements are in the interval [0,1] and whose sum is 1, as shown in the following formula:
[0105] y=Soft max(v),y=[y1,y2,...,y N ] and y i ∈[0,1] and ∑y i =1
[0106] Among them, N is the number of relationship labels, that is, the number of relationship extraction categories.
[0107] By adding a word-level attention layer to calculate the correlation between words and relations, a word-level attention layer sentence vector is formed. The calculation formula of the word-level attention layer is as follows:
[0108]
[0109]
[0110] where α t For the word u t with u w is the normalized representation of , and s is the weighted word vector representation at the current moment.
[0111] During the training of the relationship extraction model, the L2 regularization method is added to constrain the relationship extraction network. The dropout strategy is introduced during the training process, the suppression probability is set, and the batch Adam optimization method is used for model parameter training.
[0112] S6. Input the test set into the trained entity extraction model for recognition to obtain entity recognition results;
[0113] S7. Input the entity recognition results and the test set data into the trained relation extraction model to obtain the relation extraction results.
[0114] To demonstrate the effectiveness and superiority of the present invention, the following English literature pollutant information extraction method based on deep learning performs named entity recognition and relationship extraction on shale gas characteristic pollutant concentration information.
[0115] The experimental data set is the English literature on shale gas mining site pollution in the Web of Science database. The trained model is used to test and verify the effectiveness of the Bi-LSTM+CRF+Bi-GRU neural network model. The evaluation task is to identify and extract the concentration and chemical entities in the English literature and extract the corresponding relationship between the two. In this example, the Bi-LSTM+CRF+Bi-GRU model is implemented using the TensorFlow deep learning framework and the programming language is Python.
[0116] The specific steps include:
[0117] (1) Literature collection
[0118] The literature in this example is the literature on shale gas exploitation from 2000 to 2020 in the Web of Knowledge database. First, the search formula "TS = ((Toxicity OR ToxicologyOR Ecotoxicology) OR ("Hydraulic Fracturing" OR "hydraulic Fracture" OR "Hydraulic-fracturing") OR (Risk OR Evaluation) AND (Shale gas OR Shale) AND SU = (EnvironmentOR Geochemistry OR Ecology OR Toxicology) AND PY = 2000-2020" is used to retrieve and collect literature on shale gas characteristic pollutants from 2000 to 2020 in the Web of Knowledge database. The literature included in this field is randomly selected as the research corpus, with a random sampling rate of 10%, and 670 documents are obtained.
[0119] (2) Corpus Preprocessing
[0120] The 670 documents were converted from PDF format to readable and writable TXT format using the Pdfminer function package. The dataset was loaded, and each line contained at least one word and one tag. Sentences were separated by spaces, and a sentence set was returned. The Word2Vec word vector tool was used for word segmentation. The English word segmentation and part-of-speech tagging operations were performed on the text after word segmentation to obtain the text of the entity type to be annotated. The classification set annotation method used in this example is the BIO system, as shown in Table 1.
[0121] Table 1. Entity classification and annotation system
[0122]
[0123]
[0124] In the text format after the corpus is processed, the first column is the words in the text, the second column is the part of speech of the word, and the third column represents the entity represented by the word in the sentence, as shown in Table 2.
[0125] Table 2. Examples of entity annotations
[0126] Words in the text BIO Labeling The O concentration O of O Ethanol B-Chem is O 16.7 B-Num mg / L B-Conc
[0127] (3) Word vector matrix generation
[0128] This example uses the Word2Vec word vector tool to train the unlabeled corpus of the "Hydraulic Fracturing List", a list of pollutants in shale gas production sites provided by the EPA, to obtain word vectors as the initial word vectors of the neural network model, so that the neural network model can apply the rich information contained in the word vectors at the initial stage. Among them, the "Hydraulic Fracturing List" contains the names of 1,172 pollutants and all their aliases. The aliases are obtained through the Pubchem interface during the corpus preprocessing stage. The Word2Vec word vector tool is directly embedded in the model, and no manual word vector training is required.
[0129] (4) Pollutant information collection based on model training
[0130] i) Pre-annotated named entity recognition
[0131] The compound name is used as the first annotation, and entity tagging is achieved by matching the dictionary. The concentration includes numerical values and units, which is used as the second annotation. Its named entity recognition is input into the model through the above-mentioned trained word vector matrix as the embedding layer. After encoding by the Bi-LSTM layer, the original matrix outputs the label score of the word, and the highest score is used as the label of the word. The CRF layer is introduced to perform sentence-level sequence tagging. In the Bi-LSTM+CRF model, the prediction corpus has been preprocessed and cleaned. The text is organized into a format suitable for the constructed model through word segmentation, etc. The prediction corpus is recognized by the model output, and the concentration value is identified and extracted.
[0132] ii) Pre-annotated named entity recognition
[0133] The named entity recognition of compounds is based on the pre-trained pollutant dictionary. The Bi-GRU model is used to perform word-level attention and sentence-level attention layer position recognition and entity label recognition on each compound in the dictionary in the data set. By identifying the concentration, the sentence where the concentration is located is located, and the compound name is compared with the text information in the sentence. After passing through the Softmax classifier, the compound name in the sentence is finally identified based on the location of the concentration. After the Bi-GRU model relationship extraction network, the relationship extraction results of the concentration and the compound name are obtained.
[0134] The trained Bi-LSTM+CRF model recognizes the test data, extracts the recognized classification labels, and converts the corresponding labels into corresponding entity strings as candidate entities. The relationship between different entities is determined based on the position of the candidate entities in the text. In the model, the word vector obtained by the Word2Vec tool will be passed to the bidirectional LSTM layer to train the model.
[0135] After the above steps are performed on the original data, the named entity recognition of the compound concentration can be obtained. However, the correspondence between the compound name and concentration still needs the guidance of the Bi-GRU model to be obtained. Next, the Bi-GRU model will be introduced into the Bi-LSTM+CRF model. On the basis of the named entity recognition of the compound name and compound concentration, the correspondence and relationship extraction are performed. The Bi-GRU model uses the concentration data as entity location information, which can be located in the original text forecast, and the 1172 compounds in the "Hydraulic Fracturing List" are mobilized and set as entity label information. In the sentence located by the concentration data, the 1172 compound names and their aliases are compared one by one to extract the compound name in the sentence.
[0136] The Bi-LSTM+CRF model is used to obtain entity location information and label information, which is then expanded with word vector features to vectorize text information. The Bi-GRU model is used to train the relationship extraction model after the entity location information and entity label information are passed through the model network Bi-GRU, word-level attention layer, sentence-level attention layer, and Softmax classifier, and finally the corresponding relationship between the compound name and its concentration is obtained. The results of named entity recognition and relationship extraction of the three data sets are shown in Table 3, and 20 relationship extraction results of the training set and test set are randomly selected for display, as shown in Table 4.
[0137] Table 3. Entity data statistics of the dataset
[0138] Task Dataset Number of documents Concentration Entity Quantity Number of relations extracted Training set 402 275 47 Validation set 134 93 16 Test Set 134 88 18 total 670 340 81
[0139] Table 4. Results of entity relationship extraction of shale gas pollutants
[0140] Compound Name Concentration value Concentration Unit Ethane 0.1 ppb Zinc chloride 65 mg / L water 100 mg / L Phenanthrene 5 mg / L Polyoxypropylenediamine 2000 ng / L Barium 4.62 mg / L Ozone 19.5 ppb Hexane 0.2 ppb Ethane 0.7 ppb Ethylbenzene 20 mg / kg Aluminum 10,284 mg / kg Arsenic 16.2 mg / kg Barium 1,297 mg / kg Boron 29.1 mg / kg Cadmium 1.9 mg / kg Copper 38.3 mg / kg Lead 54.9 mg / kg Nickel 28.9 mg / kg Zinc 85.2 mg / kg Organics 0.9 mg / kg Benzene 15.6 mg / kg
[0141] Finally, the performance of the named entity recognition results of the Bi-LSTM+CRF+Bi-GRU model is evaluated. Table 5 shows that the overall accuracy of the model is 74.35%, the recall rate is 75.81%, and the F1 value is 75.1%.
[0142] Table 5. Precision, recall and F1 value for each entity type
[0143] Entity Type Accuracy Recall F1 value B-Chem 83.3% 62.5% 71.4% B-Num 87.2% 84.2% 85.7% B-Conc 52.5% 80.8% 63.6% average 74.4% 75.8% 75.1%
[0144] The embodiments described above are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made according to the shape and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for extracting pollutant information from English literature based on deep learning, characterized in that: include: Based on the existing chemical inventory, a terminology dictionary suitable for text mining of local environmental monitoring literature is constructed; Obtain original documents, perform word segmentation on them, and construct raw document corpus; Build entity extraction model and relationship extraction model; Preprocess the raw document corpus to obtain training sets and test sets for entity extraction models and relationship extraction models; The entity extraction model and the relationship extraction model are trained through the training set to obtain the trained entity extraction model and the relationship extraction model; Input the test set into the trained entity extraction model for recognition to obtain the entity recognition result; Input the entity recognition results and test set data into the trained relation extraction model to obtain the relation extraction results of concentration and compound name; The entity extraction model adopts the Bi-LSTM+CRF model, and the relationship extraction model adopts the Bi-GRU model; Preprocessing of raw literature data includes: Combine the BIO annotation model and term dictionary to annotate the words in the raw literature corpus, and convert the annotated words into chemical names that conform to the input format of the Bi-LSTM+CRF model; The Bi-LSTM+CRF model is used to identify the chemical names and output the corresponding concentrations; Identify the concentration and restore the named entity of the chemical; The definition of the BIO annotation model includes: B represents the first character of a named entity; I represents a character inside a named entity; E represents the end of a named entity; O represents a character that is not a constituent of a named entity; S represents a single-character named entity; Convert the marked words into chemical names that conform to the Bi-LSTM+CRF model input format, including: Extract each character and character label from the annotated content, add them to the "character" and "character label" arrays, delete the character and its character label if the character is a preset character, and use the pad_sequences function to convert the obtained array into a chemical name that conforms to the input format of the Bi-LSTM+CRF model; The Bi-LSTM+CRF model is used to identify chemical names and output corresponding concentrations, including: Load the pre-trained word vectors, match the sample data with the word vectors, and generate the word vector matrix for model training from the successfully matched data; The word vector matrix is used as the embedding layer input and encoded by the Bi-LSTM layer. The output of the Bi-LSTM layer is the label score of each word. The label with the highest score is selected as the label of the word. Introduce the CRF layer for sentence-level sequence labeling; Finally, the concentration is identified and extracted; The constructed relation extraction model includes: The first layer of the model network is Bi-GRU; each GRU unit includes a reset gate r t and an update gate z t , update gate z t Used to control the output h at the previous moment t-1 With the current input x t The degree of preservation of the information contained in is taken as the output h of the gating unit at time t t ; and reset gate r t By x t Determine the previous moment h t-1 The degree of forgetting of information in the calculation is used to obtain the memory at the current moment. And the current hidden state h after the update gate t , the update gate z of the GRU unit at time t t , reset gate t , New Memory The final hidden state h t The calculation is as follows: z t =σ(W z ·[h t-1 ,x t ]) r t =σ(W r ·[h t-1 ,x t ]) Among them, σ() is the sigmoid nonlinear activation function, which is used to enhance the model's ability to process nonlinear data, σ(x) = 1 / (1+e -x ),* represents dot product, tanh(x)=(e x -e -x ) / (e x +e -x ), W, W r , W z is the weight matrix of the model, [] means connecting two vectors; The second layer of the model network is the word-level attention layer: w = {w1,w2,...,w T } will h t By processing the following formula, we can get u t =tanh(W w ·h t +b w ); The third layer of the model network is the sentence-level attention layer: The sentence feature value composed of the output s of the word-level attention layer is used as the input of the sentence-level attention layer, and the randomly initialized word context vector u is added s For joint training, v is the vector sum of all sentences, and the specific formula is as follows: u i =tanh(W s ·S i +b s ) The fourth layer of the model network is the Softmax classifier: The Softmax classifier maps v to a set of vectors whose elements are in the interval [0,1] and whose sum is 1, as shown in the following formula: y=Softmax(v),y=[y1,y2,...,y N ] and y i ∈[0,1] and ∑y i =1 Among them, N is the number of relationship labels, that is, the number of relationship extraction categories.
2. According to claim 1, a method for extracting pollutant information from English literature based on deep learning is characterized in that: The corpus segmentation of the original document includes: The original document is processed by a phrase extraction algorithm based on mutual information and left-right entropy to obtain the mutual information value and left-right entropy of the text segment; Score and rank the text phrases in the original document based on mutual information and left-right entropy; The top-ranked text phrases are extracted and added to the word segmentation dictionary for text segmentation. The text phrase scores are adjusted according to the word segmentation results to obtain a raw document corpus with clear word boundaries.
3. The method for extracting pollutant information from English literature based on deep learning according to claim 1, characterized in that: The encoding through the Bi-LSTM layer includes: The Bi-LSTM layer automatically extracts sentence features and converts the char embedding sequence (x1, x2, x3, ..., x n ) as the input of each time step of Bi-LSTM, and the hidden state output of the forward LSTM Hidden state sequence with reverse LSTM Position splicing of hidden states output at each position Get the complete hidden state sequence The output of the Bi-LSTM layer is the label score of each word, and finally the label with the highest score is selected as the label of the word.
4. According to claim 1, a method for extracting pollutant information from English literature based on deep learning is characterized in that: During the training of the word-level attention layer, a randomly initialized word context vector u is added w The word-level attention layer is added to calculate the correlation between words and relations, forming a sentence vector of the word-level attention layer. The calculation formula of the word-level attention layer is as follows: where α t For the word u t with u w is the normalized representation of , and s is the weighted word vector representation at the current moment.
5. According to claim 4, a method for extracting pollutant information from English literature based on deep learning is characterized in that: During the training of the relationship extraction model, the L2 regularization method is added to constrain the relationship extraction network. The dropout strategy is introduced during the training process, the suppression probability is set, and the batch Adam optimization method is used for model parameter training.
