Information extraction method, device, equipment and storage medium

Through the pre-trained trigger word and target information extraction model, the trigger word training model with K data is used to solve the problem of poor accuracy of unstructured data information extraction, and the accuracy of information extraction is improved. It is suitable for intelligent interactive platforms. Knowledge graph construction and data quality optimization.

CN114036276BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111317510.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-09
Publication Date
2024-12-20
Estimated Expiration
2041-11-09

AI Technical Summary

Technical Problem

The prior art has poor accuracy in unstructured data information extraction, making it difficult to effectively extract event information in text.

Method used

The pre-trained trigger word extraction model and target information extraction model are used to divide the sample data into K parts, and the trigger word extraction model is obtained based on the trigger word training of one piece of data and other data in the K parts of data, and the trigger is used. As input, the target information is obtained through the target information extraction model.

Benefits of technology

It improves the accuracy of information extraction, reduces extraction errors, and is suitable for knowledge graph construction and data quality optimization in scenarios such as intelligent interactive platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114036276B_ABST
    Figure CN114036276B_ABST
Patent Text Reader

Abstract

The present invention discloses an information extraction method, device, equipment and storage medium. The information extraction method includes: obtaining data to be extracted; inputting the data to be extracted into a pre-trained trigger word extraction model to obtain trigger words; inputting the data to be extracted and the trigger words into a pre-trained target information extraction model to obtain target information; wherein the pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts, and training according to the trigger word labels of one data in the K parts and other data. Since the present invention first obtains the trigger words through the trigger word extraction model, and then uses the trigger words as input to obtain the target information through the target information extraction model, and the trigger word extraction model is obtained by dividing the sample data set into K parts, and training according to the trigger word labels of one data in the K parts and other data, the accuracy of information extraction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to an information extraction method, device, equipment and storage medium. Background Art

[0002] With the development of science and technology, artificial intelligence has gradually entered various fields. In the field of natural language processing, it is usually necessary to extract information from unstructured data. That is, for massive amounts of unstructured text, it is necessary to use natural language processing technology to extract event information from the text.

[0003] Currently, information is usually extracted using a triple extraction method. Due to the complexity of language and the diversity of events, when extracting information from unstructured data, how to improve the accuracy of information extraction is an urgent problem to be solved by technical personnel in this field. Summary of the invention

[0004] The present invention provides an information extraction method, device, equipment and storage medium, which are used to solve the problem of poor information extraction accuracy in the prior art.

[0005] In a first aspect, the present invention discloses an information extraction method, the method comprising:

[0006] Get the data to be extracted;

[0007] Inputting the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word;

[0008] Inputting the data to be extracted and the trigger word into a pre-trained target information extraction model to obtain target information;

[0009] The pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger words of one data and other data in the K parts of data, where K is a positive integer greater than 1.

[0010] In an optional implementation, the trigger word extraction model is obtained by:

[0011] Dividing the sample data set into K parts to obtain K parts of sample data;

[0012] Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0013] The first pre-training model is trained according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model.

[0014] In an optional implementation, the extracting trigger words of other sample data includes:

[0015] According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

[0016] In an optional implementation, the target information extraction model is obtained by:

[0017] For each sample data, obtaining location information of the trigger word from the sample data;

[0018] Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model;

[0019] The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

[0020] In an optional implementation, the sample data set is an unstructured text sample.

[0021] In a second aspect, the present invention further discloses an information extraction device, the device comprising:

[0022] An acquisition module, configured to acquire data to be extracted;

[0023] A first extraction module is configured to input the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word;

[0024] The second extraction module is configured to input the data to be extracted and the trigger words into a pre-trained target information extraction model to obtain target information; wherein the pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts, and training according to the trigger words of one data in the K parts and other data, where K is a positive integer greater than 1.

[0025] In a possible implementation, the device further includes a first training module, and the first training module is used to obtain the trigger word extraction model in the following manner:

[0026] Dividing the sample data set into K parts to obtain K parts of sample data;

[0027] Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0028] The first pre-training model is trained according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model.

[0029] In a possible implementation, the first training module is specifically used to:

[0030] According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

[0031] In a possible implementation, the device further includes a second training module, and the second training module is used to obtain the target information extraction model in the following manner:

[0032] For each sample data, obtaining location information of the trigger word from the sample data;

[0033] Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model;

[0034] The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

[0035] In a possible implementation manner, the sample data set is an unstructured text sample.

[0036] In a third aspect, an embodiment of the present invention further provides an information extraction device, the device comprising:

[0037] processor;

[0038] a memory for storing instructions executable by the processor;

[0039] The processor is configured to execute the instructions to implement the following steps:

[0040] Get the data to be extracted;

[0041] Inputting the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word;

[0042] Inputting the data to be extracted and the trigger word into a pre-trained target information extraction model to obtain target information;

[0043] The pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger words of one data and other data in the K parts of data, where K is a positive integer greater than 1.

[0044] In a possible implementation, the processor is specifically configured to obtain the trigger word extraction model in the following manner:

[0045] Dividing the sample data set into K parts to obtain K parts of sample data;

[0046] Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0047] The first pre-training model is trained according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model.

[0048] In a possible implementation manner, the processor is specifically configured to:

[0049] According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

[0050] In a possible implementation manner, the processor is specifically configured to obtain the target information extraction model in the following manner:

[0051] For each sample data, obtaining location information of the trigger word from the sample data;

[0052] Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model;

[0053] The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

[0054] In a possible implementation manner, the sample data set is an unstructured text sample.

[0055] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the information extraction method as described in any one of the first aspects.

[0056] The beneficial effects of the present invention are as follows:

[0057] The present invention discloses an information extraction method, device, equipment and storage medium, the information extraction method comprising: obtaining data to be extracted; inputting the data to be extracted into a pre-trained trigger word extraction model to obtain trigger words; inputting the data to be extracted and the trigger words into a pre-trained target information extraction model to obtain target information; wherein the pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts, and training according to the trigger words of one of the K parts and other data. Since the present invention first obtains the trigger words through the trigger word extraction model, and then uses the trigger words as input to obtain the target information through the target information extraction model, and the trigger word extraction model is obtained by dividing the sample data set into K parts, and training according to the trigger word labels of one of the K parts and other data, the accuracy of information extraction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be 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 labor.

[0059] Figure 1 A schematic diagram of an intelligent interaction platform provided by an embodiment of the present invention;

[0060] Figure 2 A schematic diagram of a flow chart of an information extraction method provided by an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of a process for obtaining a trigger word extraction model provided by an embodiment of the present invention;

[0062] Figure 4 A schematic diagram of constructing a knowledge base provided by an embodiment of the present invention;

[0063] Figure 5 A schematic diagram of adding a remote supervision tag provided by an embodiment of the present invention;

[0064] Figure 6 A schematic diagram of a process for obtaining a target information extraction model provided by an embodiment of the present invention;

[0065] Figure 7 A schematic diagram of a conditional data normalization (Conditional Layer Normalization) provided in an embodiment of the present invention;

[0066] Figure 8 A schematic diagram of the overall solution provided for an embodiment of the present invention;

[0067] Fig. 9 A schematic diagram of the structure of an information extraction device provided by an embodiment of the present invention;

[0068] Fig.10 A schematic diagram of the structure of an information extraction device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] The application background of the present invention originates from the intelligent interaction platform, which integrates all modules required for natural language interaction, such as conversation platform, training platform, annotation platform, etc. Figure 1 As shown in the figure, the training platform needs to extract key information from massive unstructured texts for supervised learning, the annotation platform needs to structure massive unstructured texts in the financial field, and the conversation platform needs to automatically extract entities in scenarios such as FAQ (frequency asked question) and KBQA (knowledge based question answer) based on the characteristics of financial texts. Therefore, for the intelligent interactive platform, each sub-platform has the need for structural processing of unstructured texts, that is, to extract information from unstructured data.

[0071] Unstructured data is not so easily organized or formatted. Collecting, processing, and analyzing unstructured data is a major challenge. This creates some problems because unstructured data makes up the vast majority of data available on the web, and it is growing every year. With more information available on the web, and much of it being unstructured, finding ways to use it has become an important strategy for many businesses. More traditional data analysis tools and methods are not enough to get the job done.

[0072] Structured data, as you can tell from the name, is highly organized and neatly formatted data. It is the type of data that can be put into tables and spreadsheets. It may not be the easiest type of data for people to find, but compared to unstructured data, it is undoubtedly the easier type of data for people to work with, while computers, on the other hand, can easily search it.

[0073] Traditionally, unstructured text is structured by using a relation extraction model, which uses a triple extraction method. That is, given a sentence text, two entities in the sentence and the relationship between the entities are extracted to form a triple (s, p, o), where s is subject, indicating the main entity, o is object, indicating the guest entity, and p is predicate, indicating the relationship between the two entities. In general, (s, p, o) can be understood as "s's p is o", that is, the relationship between the two entities of the main entity is the guest entity.

[0074] Of course, there may be more than two entities in a sentence, and thus more than one relationship, so what needs to be done is to extract as many and correct relationship entity pairs in the sentence as possible. For example, if the input text is "Charles Aranquilla, born on April 17, 1989 in Santiago, Chile, Chilean professional football player, midfielder, plays for the German Football League Bayer Leverkusen Football Club", then the extraction is done in the form of triples, and the extraction result can be: s is Charles Aranquilla, p is the place of birth, and o is Santiago, Chile, that is, the main entity is Charles Aranquilla, the object entity is Santiago, Chile, and the relationship between the two entities is the place of birth. Entities generally refer to nouns, such as names of people, places, times, organization names, etc. This relationship type is pre-defined based on the training set.

[0075] However, the traditional triple extraction method has limited expressive power and cannot accurately extract effective information from the text, resulting in low accuracy of the final result.

[0076] Based on the above problems, the present application provides an information extraction method, which pre-trains a trigger word extraction model and a target information extraction model, wherein the trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger word labels of one data in the K parts and other data. The trigger word extraction model provided in the embodiment of the present invention can reduce the error of extracting trigger words, thereby improving the accuracy of information extraction.

[0077] For example, KBQA in the conversation platform of the intelligent interactive platform needs to automatically extract attributes from entities when constructing the knowledge graph. This process can be solved by the present invention. Through automated extraction, the construction of the knowledge graph is greatly improved and the data quality of the entire interactive platform is optimized.

[0078] It should be noted that the knowledge graph extracts entities and relationships between entities from specific resources to construct a knowledge base. The knowledge system it contains is usually highly field-specific and professional. The knowledge graph is constructed from top to bottom, mainly including schema design, entity recognition, relationship extraction, entity linking, knowledge fusion, knowledge calculation and other links. The key is how to automatically extract information to obtain candidate knowledge units. The technologies involved include: entity extraction, relationship extraction and attribute extraction, collectively referred to as information extraction.

[0079] In order to improve the accuracy of information extraction, this application provides an information extraction method, such as Figure 2 As shown, the method includes:

[0080] S201, obtaining data to be extracted;

[0081] In a specific implementation, the data to be extracted may be unstructured text.

[0082] Automatically extracting information from unstructured text can improve extraction efficiency and save manpower.

[0083] S202. Input the data to be extracted into a pre-trained trigger word extraction model to obtain trigger words; wherein the pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts, and training based on the trigger words of one data in the K parts and other data, where K is a positive integer greater than 1.

[0084] In the specific implementation, the trigger word extraction model is pre-trained, such as Figure 3 As shown, the trigger word extraction model can be obtained in the following ways:

[0085] S301, dividing the sample data set into K parts to obtain K parts of sample data;

[0086] S302, traverse K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0087] S303: Train the first pre-training model according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain a trigger word extraction model.

[0088] Specifically, the sample data set is divided into K parts, and K-fold division can be performed. The sample data set needs to be divided into a training set and a test level. The sample data set can be divided into a training set and a test level according to the label. K-fold cross-validation divides the training set into K smaller sets, and each K-fold will follow the following process: (1) K-1 parts of sample data are used as training data to train the model; (2) The remaining 1 part of sample data is used for model verification (that is, it is used as a test set to calculate the performance indicators of the model, such as accuracy).

[0089] In an embodiment of the present invention, it is necessary to traverse K portions of sample data. First, randomly select one portion of sample data from the K portions of sample data, and extract the trigger words of each portion of sample data from the remaining (K-1) portions of sample data to obtain a remote knowledge base. The remote knowledge base stores all the trigger words extracted from the (K-1) portions of sample data. For any portion of sample data, remotely supervised trigger words are added from the remote knowledge base by matching. Then, randomly select one portion of sample data from the (K-1) portions of sample data, and execute the above steps again until all sample data have completed the above steps.

[0090] It should be noted that after extracting sample data for the second time, when extracting the trigger words for each sample data, any one piece of data processed for the first time is included.

[0091] For example, the sample data set is divided into 4 parts, namely 1, 2, 3, and 4. A randomly selected sample data is 4, and trigger words are extracted for 1, 2, and 3, and then the extracted trigger words are matched to 4; a randomly selected sample data is 2 from 1, 2, and 3, and trigger words are extracted for 1, 3, and 4, and then the extracted trigger words are matched to 2; a randomly selected sample data is 1 from 1 and 3, and trigger words are extracted for 2, 3, and 4, and then the extracted trigger words are matched to 4; trigger words are extracted for 1, 2, and 4, and then the extracted trigger words are matched to 3.

[0092] In implementation, the embodiment of the present application can introduce a remote supervision method to provide additional "labels", which are also called trigger words (Trigger). First, the sample data set is K-folded, and the sample data set is divided into K portions of sample data. Then 1 portion of sample data is extracted. For the remaining (K-1) portions of data, the trigger words are counted. Using the remote supervision algorithm, a remote knowledge base Trigger = ∑trigger can be obtained. i , where trigger iis the i-th trigger word counted from (K-1) pieces of data. All trigger words come from (K-1) pieces of sample data. For the remaining 1 piece of sample data, the remote supervision label is added from the remote knowledge base Trigger by matching.

[0093] like Figure 4 As shown in the figure, this is the process of knowledge base construction, in which the training set is cross-constructed internally, and the test set uses the entire training set as the knowledge base. Figure 4 In the above, labels are extracted for the three divided sentences, that is, trigger word extraction. Among them, the trigger word extraction for "On February 11, the acquisition of Yiyang Communication Co., Ltd. became the top priority" is performed, and the extracted trigger word is "acquisition", and the trigger word extraction for "After multiple rounds of financing, it finally went public" is performed, and the extracted trigger word is "listing", and the trigger word extraction for "In the first quarter, due to the epidemic, a total loss of 18 billion was made" is performed, and the extracted trigger word is "loss". All the trigger words "acquisition", "listing", and "loss" are from K-1 data, that is, from the three divided sentences. "Acquisition", "listing", and "loss" constitute the remote knowledge base. For the remaining data, the remote supervision label added by matching is obtained from the remote knowledge base, which is "Acquisition and seeking listing is the current option to avoid losses".

[0094] It is worth noting that the example of knowledge base construction in the above situation is only used to illustrate the process of knowledge base construction and remote supervision providing additional labels. For other K values, the principle is the same as the above process and will not be repeated here.

[0095] Figure 5 This is a summary diagram of the process, in which the K divided sample data initially have no remote labels, and trigger words are extracted from (K-1) sample data to form a label library (remote knowledge base). For the remaining sample data, that is, the i-th sample data, a remote supervision label is added. The process of adding the remote supervision label is based on matching the remote knowledge base.

[0096] Among them, 1≤i≤K. After i traverses all values ​​from 1 to K, remote supervision labels are added to all K sample data, that is, all K sample data have remote supervision labels. At this time, the remote supervision labels are used as input information to train the first pre-trained model, and a trigger word extraction model is obtained, which can effectively avoid omission problems in trigger word discovery, thereby greatly reducing error propagation.

[0097] It should be noted that the first pre-trained model in the embodiment of the present invention is an initial model that has not been trained. The training process of the model is a prior art and will not be described in detail in the present invention.

[0098] In some embodiments, the trigger words of other sample data (ie, K-1 pieces of sample data) may be extracted based on the event type, and the trigger words corresponding to the event type may be extracted from the sample data.

[0099] For example Figure 4 As shown in the figure, for "On February 11, the acquisition of Yiyang Communication Co., Ltd. became the top priority", it can be judged that the content event type is an "acquisition" event, so the extracted trigger word (Trigger) is "acquisition".

[0100] S203: input the data to be extracted and the trigger words into a pre-trained target information extraction model to obtain the target information.

[0101] In some embodiments, the target information extraction model can be obtained by the following methods: Figure 6 shown.

[0102] S601, for each sample data, obtaining the location information of the trigger word from the sample data;

[0103] S602: training a second pre-trained model according to the sample data, the preset distance vector and the position information to obtain a target information extraction model;

[0104] The trigger words are obtained by inputting sample data into a pre-trained trigger word extraction model.

[0105] The target information in the embodiment of the present invention may include argument roles and arguments.

[0106] Since the target information generally appears near the trigger word in the original text, the embodiment of the present invention considers the distance between the trigger word and the target information when extracting the target information, thereby further improving the accuracy of the target information extraction.

[0107] For the extracted trigger words, as prior information, it is used to extract the argument information. The trigger word information and the trigger word position information are considered in the argument extraction process. Among them, the R&D personnel discovered the "adjacent" characteristics of the trigger words and the arguments through a lot of analysis and induction, that is, in general, the argument body will appear near the trigger word in the text. Therefore, the present invention introduces relative distance as the input of the entire argument extraction.

[0108] In Transformer models such as Bert, the main Normalization method is LayerNormalization, so it is natural to think of turning the corresponding β and γ into functions of the input conditions to control the generation behavior of the Transformer model. This is the clue idea of ​​Conditional Layer Normalization.

[0109] like Figure 7 As shown, the present invention uses BERT, and there are ready-made, unconditional β and γ, which are both vectors of fixed length. The input conditions can be transformed to the same dimension as β and γ through two different transformation matrices, and then the two transformation results are added to β and γ respectively. In order to prevent the original pre-training weights from being disturbed, the two transformation matrices can be initialized with all zeros (single-layer neural networks can be initialized with all zeros, and continuous multi-layer neural networks should not be initialized with all zeros), so that in the initial state, the model still remains consistent with the original pre-training model.

[0110] The overall idea of ​​the present invention is to divide the event extraction task into three stages: Figure 8 As shown, the trigger word extraction module is first used to extract trigger words from the data to be extracted, and then the argument extraction module and the argument role extraction module are used to extract arguments and argument roles respectively, and finally the results are merged.

[0111] Figure 8 The argument extraction module and argument role extraction module in are the target information extraction model in the embodiment of the present invention.

[0112] The information extraction method provided in the embodiment of the present invention advocates splitting the text information extraction task in a finer granularity, abandons the method of triple extraction, integrates prior information in the extraction subtask, and in the use of prior information, adds the position of the prior information (trigger word) and the distance from the text to the trigger word and other information to the Bert input, thereby improving the accuracy of information extraction.

[0113] Based on the same inventive concept, an information extraction device is also provided in an embodiment of the present invention. Since the principle of solving the problem by the device is similar to that of the information extraction method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0114] like Fig. 9 As shown, an information extraction device provided by an embodiment of the present invention may include:

[0115] The acquisition module 901 is configured to acquire the data to be extracted;

[0116] The first extraction module 902 is configured to input the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word;

[0117] The second extraction module 903 is configured to input the data to be extracted and the trigger words into a pre-trained target information extraction model to obtain target information; wherein the pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts, and training based on trigger words of one data in the K parts and other data, where K is a positive integer greater than 1.

[0118] In a possible implementation, the device further includes a first training module, and the first training module is used to obtain the trigger word extraction model in the following manner:

[0119] Dividing the sample data set into K parts to obtain K parts of sample data;

[0120] Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0121] The first pre-training model is trained according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model.

[0122] In a possible implementation, the first training module is specifically used to:

[0123] According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

[0124] In a possible implementation, the device further includes a second training module, and the second training module is used to obtain the target information extraction model in the following manner:

[0125] For each sample data, obtaining location information of the trigger word from the sample data;

[0126] Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model;

[0127] The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

[0128] In a possible implementation manner, the sample data set is an unstructured text sample.

[0129] Based on the same inventive concept, an information extraction device is also provided in an embodiment of the present invention. Since the principle of solving the problem by the device is similar to that of the information extraction method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0130] like Fig.10 As shown, an information extraction device provided by an embodiment of the present invention includes:

[0131] Processor 1001;

[0132] A memory 1002 for storing instructions executable by the processor;

[0133] The processor 1001 is configured to execute the instructions to implement the following steps:

[0134] Get the data to be extracted;

[0135] Inputting the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word;

[0136] Inputting the data to be extracted and the trigger word into a pre-trained target information extraction model to obtain target information;

[0137] The pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger words of one data and other data in the K parts of data, where K is a positive integer greater than 1.

[0138] In a possible implementation, the processor 1001 is specifically configured to obtain the trigger word extraction model in the following manner:

[0139] Dividing the sample data set into K parts to obtain K parts of sample data;

[0140] Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K;

[0141] The first pre-training model is trained according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model.

[0142] In a possible implementation, the processor 1001 is specifically configured to: extract, according to the event type, a trigger word corresponding to the event type from the other sample data.

[0143] In a possible implementation manner, the processor 1001 is specifically configured to obtain the target information extraction model in the following manner:

[0144] For each sample data, obtaining location information of the trigger word from the sample data;

[0145] Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model;

[0146] The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

[0147] In a possible implementation manner, the sample data set is an unstructured text sample.

[0148] Furthermore, an embodiment of the present invention also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the information extraction method as described in any one of the above items is implemented.

[0149] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine, so that the instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.

[0150] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.

[0151] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. An information extraction method, characterized in that: The method includes: Get the data to be extracted; Inputting the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word; Inputting the data to be extracted and the trigger word into a pre-trained target information extraction model to obtain target information; The pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger words of one data and other data in the K parts of data, where K is a positive integer greater than 1; The trigger word extraction model is obtained by the following method: Dividing the sample data set into K parts to obtain K parts of sample data; Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K; Training the first pre-training model according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model; The target information extraction model is obtained by: For each sample data, obtaining location information of the trigger word from the sample data; Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model; The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

2. The method according to claim 1, characterized in that The trigger words for extracting other sample data include: According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

3. The method according to claim 1 or 2, characterized in that The sample data set is an unstructured text sample.

4. An information extraction device, characterized in that: The device comprises: An acquisition module, configured to acquire data to be extracted; A first extraction module is configured to input the data to be extracted into a pre-trained trigger word extraction model to obtain a trigger word; A second extraction module is configured to input the data to be extracted and the trigger word into a pre-trained target information extraction model to obtain target information; The pre-trained trigger word extraction model is obtained by dividing the sample data set into K parts and training according to the trigger words of one data and other data in the K parts of data, where K is a positive integer greater than 1; The device also includes a first training module, which is used to obtain the trigger word extraction model in the following manner: Dividing the sample data set into K parts to obtain K parts of sample data; Traverse the K pieces of sample data, select the i-th piece of data from the K pieces of sample data, extract trigger words from other sample data, and match the extracted trigger words to the i-th piece of sample data to obtain the trigger words of the i-th piece of sample data, 1≤i≤K; Training the first pre-training model according to each piece of sample data and the trigger word corresponding to each piece of sample data to obtain the trigger word extraction model; The device also includes a second training module, which is used to obtain the target information extraction model in the following manner: For each sample data, obtaining location information of the trigger word from the sample data; Training a second pre-trained model according to the sample data, the preset distance vector and the location information to obtain the target information extraction model; The trigger word is obtained by inputting the sample data into a pre-trained trigger word extraction model.

5. The device according to claim 4, characterized in that The first training module is specifically used for: According to the event type, a trigger word corresponding to the event type is extracted from the other sample data.

6. The device according to claim 4 or 5, characterized in that The sample data set is an unstructured text sample.

7. An information extraction device, characterized in that: The device comprises: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the information extraction method as claimed in any one of claims 1 to 3.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the information extraction method according to any one of claims 1 to 3 is implemented.