Information extraction model training, information extraction method, device, equipment and medium

By integrating label semantic information into the training method of the information extraction model, the problems of high error rate and low efficiency of manually labeled data in the existing technology are solved, and the training efficiency and accuracy of the information extraction model are improved.

CN115757739BActive Publication Date: 2026-04-14DAERGUAN DATA (CHENGDU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DAERGUAN DATA (CHENGDU) CO LTD
Filing Date
2022-11-28
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing information extraction models suffer from high annotation costs and low accuracy when dealing with text files with very little expert-annotated data, leading to extended project delivery times.

Method used

By acquiring information to extract training data, label vector output sub-model and character vector output sub-model are used to perform label and character recognition, similarity data is calculated and input into the classifier model for classification and recognition, and label semantic information is fused to improve model training efficiency and accuracy.

Benefits of technology

It improves the training efficiency and accuracy of the information extraction model, reduces the error rate and workload of manual annotation, and ensures good model performance even with limited data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757739B_ABST
    Figure CN115757739B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses an information extraction model training method, an information extraction method, an information extraction device, an information extraction equipment and a medium. The information extraction model training method comprises the following steps: obtaining information extraction training data; inputting the information extraction training data into a label vector output submodel of an information extraction model for label identification to obtain a label representation vector of the information extraction training data; inputting the information extraction training data into a character vector output submodel of the information extraction model for character identification to obtain a character representation vector of the information extraction training data; calculating similarity data of the label representation vector and the character representation vector; and inputting the similarity data into a classifier model of the information extraction model for classification identification to obtain an information classification result of the information extraction training data. The technical scheme of the embodiment of the application can improve the training efficiency and model precision of the information extraction model, and further improve the efficiency and accuracy of information extraction.
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 artificial intelligence technology, and in particular to an information extraction model training, information extraction method, apparatus, device and medium. Background Technology

[0002] With the development of technology, information extraction technology has emerged in an endless stream. Information extraction technology can convert documents into statistically analyzable structured data through algorithmic models, enabling practitioners to quickly and accurately obtain meaningful and valuable textual information.

[0003] Currently, when extracting information, technicians typically use a Bi-LSTM (Bidirectional Long Short-Term Memory) + BERT (Bidirectional Encoder Representation from Transformers) + CRF (Conditional Random Field) model.

[0004] In the process of developing this invention, the inventors discovered the following problems with the existing technology: While the aforementioned model performs well with massive amounts of data, it becomes increasingly costly for technical personnel to annotate text files with very little expert-annotated data, leading to a gradual decrease in annotation accuracy and a significant potential delay in project delivery. Summary of the Invention

[0005] This invention provides an information extraction model training, information extraction method, apparatus, device, and medium, which can improve the training efficiency and model accuracy of the information extraction model, thereby improving the efficiency and accuracy of information extraction.

[0006] According to one aspect of the present invention, a method for training an information extraction model is provided, comprising:

[0007] Acquire information extraction training data; wherein, the information extraction training data includes data labeled with defined structures;

[0008] The information extraction training data is input into the label vector output sub-model of the information extraction model for label recognition, thereby obtaining the label representation vector of the information extraction training data.

[0009] The information extraction training data is input into the character vector output sub-model of the information extraction model for character recognition, thereby obtaining the character representation vector of the information extraction training data.

[0010] Calculate the similarity data between the tag representation vector and the character representation vector;

[0011] The similarity data is input into the classifier model of the information extraction model for classification and recognition, thereby obtaining the information classification result of the information extraction training data.

[0012] Further, calculating the similarity data between the tag representation vector and the character representation vector includes:

[0013] Calculate the inner product of the tag representation vector and the character representation vector;

[0014] The result of the inner product operation between the tag representation vector and the character representation vector is used as the similarity data between the tag representation vector and the character representation vector.

[0015] Furthermore, the similarity data is input into the classifier model of the information extraction model for classification and recognition, to obtain the information classification result of the information extraction training data, including:

[0016] The similarity data is classified and identified using the classifier model to obtain multiple label recognition results; wherein, the label recognition results include label type and label probability;

[0017] The label recognition result, including the target label probability, is used as the information classification result of the information extraction training data.

[0018] Furthermore, the process of obtaining information to extract training data includes:

[0019] Obtain the original dataset;

[0020] Filter the original dataset to include labeled entities in the filtered text data;

[0021] Determine the entity type and tag name of the filtered text data;

[0022] Based on the entity type and tag name of the filtered text data, the filtered file report data is annotated according to the set structure tag annotation data to obtain annotated text data;

[0023] The labeled text data is segmented to obtain the information extraction training data.

[0024] Furthermore, the information extraction training data includes bidding entity text data; the set structure label annotation data includes annotation label identifiers and natural semantic entity label data; the annotation label identifiers include entity label start label identifiers, entity label subsequent label identifiers, and non-entity label identifiers.

[0025] According to another aspect of the present invention, an information extraction method is provided, comprising:

[0026] Obtain the data to be extracted;

[0027] The data to be extracted is input into the information extraction model to obtain the information extraction result of the data to be extracted;

[0028] The information extraction model is trained using the information extraction model training method described in any embodiment of the present invention.

[0029] According to another aspect of the present invention, an information extraction model training apparatus is provided, comprising:

[0030] The training data acquisition module is used to acquire information extraction training data; wherein, the information extraction training data includes data labeled with defined structures.

[0031] The label representation vector acquisition module is used to input the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, and obtain the label representation vector of the information extraction training data.

[0032] The character representation vector acquisition module is used to input the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, and obtain the character representation vector of the information extraction training data.

[0033] A similarity data calculation module is used to calculate the similarity data between the tag representation vector and the character representation vector;

[0034] The label classification result acquisition module is used to input the similarity data into the classifier model of the information extraction model for classification and recognition, and obtain the information classification result of the information extraction training data.

[0035] According to another aspect of the present invention, an information extraction apparatus is provided, comprising:

[0036] The data to be extracted module is used to acquire the data to be extracted.

[0037] The information extraction result acquisition module is used to input the data to be extracted into the information extraction model to obtain the information extraction result of the data to be extracted.

[0038] The information extraction model is trained using the information extraction model training method described in any embodiment of the present invention.

[0039] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0040] At least one processor; and

[0041] A memory communicatively connected to the at least one processor; wherein,

[0042] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to execute the information extraction model training method described in the embodiments of the present invention, or to implement the information extraction method as described in the embodiments of the present invention.

[0043] According to another aspect of the present invention, a computer storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the information extraction model training method described in the embodiments of the present invention, or to implement the information extraction method described in the embodiments of the present invention.

[0044] The technical solution of this invention involves acquiring information extraction training data; inputting the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data; inputting the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data; calculating the similarity data between the label representation vector and the character representation vector; and inputting the similarity data into the classifier model of the information extraction model for classification recognition, obtaining the information classification result of the information extraction training data. Correspondingly, after the information extraction model is trained, the data to be extracted can be input into the information extraction model to obtain the information extraction result of the data to be extracted. This technical solution of the present invention solves the problems of high error rate and low annotation efficiency in the prior art when training information extraction models by fusing label semantic information into the model, thereby improving the training efficiency and model accuracy of the information extraction model, and thus improving the efficiency and accuracy of information extraction.

[0045] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart of an information extraction model training method provided in Embodiment 1 of the present invention;

[0048] Figure 2 This is a flowchart of another information extraction model training method provided in Embodiment 2 of the present invention;

[0049] Figure 3 This is a flowchart of an information extraction method provided in Embodiment 3 of the present invention;

[0050] Figure 4 This is an application scenario diagram of information extraction model training and information extraction provided by an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of the structure of an information extraction model training device provided in Embodiment 4 of the present invention;

[0052] Figure 6 This is a schematic diagram of the structure of an information extraction device provided in Embodiment 5 of the present invention;

[0053] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0054] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0055] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0056] Example 1

[0057] Figure 1 This is a flowchart of an information extraction model training method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where an information extraction model is trained using sample data including label semantic information. The method can be executed by an information extraction model training device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device or a server device; the embodiments of the present invention do not limit the specific type of electronic device. Accordingly, as... Figure 1 As shown, the method includes the following operations:

[0058] S110, Obtain information and extract training data.

[0059] The information extraction training data can be text data obtained by converting the original data using a file processing tool.

[0060] In this embodiment, optionally, data from a user database or data stored and used by the end user can be converted into text data using OCR (optical character recognition). For example, characters printed on a document can be examined using a scanner or digital camera, and character recognition methods can be used to convert the character shapes into computer text, which can then be used as input data for model training.

[0061] S120. Input the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, and obtain the label representation vector of the information extraction training data.

[0062] The information extraction model can be used to identify and output structured information from unstructured text, including named entity recognition, relation extraction, etc. The label vector output sub-model can be used to extract the label category from the training data based on the input information. The label representation vector can be a vector representing the label name, with one label representation vector corresponding to one label category.

[0063] In this embodiment, the information extraction training data is used as input data and fed into the label vector output sub-model of the information extraction model. Through training and learning, the label representation vector of the information extraction training data is obtained, and the label category is identified.

[0064] S130. Input the information extraction training data into the character vector output sub-model of the information extraction model to perform character recognition, and obtain the character representation vector of the information extraction training data.

[0065] Among them, the character vector output sub-model can be a model used to implement the vectorized representation and output of each character; the character representation vector can be a vector used to represent characters, with one character corresponding to one character representation vector.

[0066] In this embodiment, the information extraction training data is used as input data and fed into the character vector output sub-model of the extraction model. Through training and learning, the character representation vector of the information extraction training data is obtained, and character recognition is realized.

[0067] S140. Calculate the similarity data between the tag representation vector and the character representation vector.

[0068] The similarity data can be used to represent the degree of similarity between the label representation vector and the character representation vector.

[0069] In this embodiment of the invention, the Chebyshev distance between two vectors can be calculated using the label representation vector and the character representation vector, and the similarity between the two vectors can be determined based on the Chebyshev distance. Alternatively, the Euclidean distance between two vectors can be calculated using the label representation vector and the character representation vector, and the similarity between the two vectors can be determined based on the Euclidean distance.

[0070] S150. Input the similarity data into the classifier model of the information extraction model for classification and recognition, and obtain the information classification result of the information extraction training data.

[0071] The classifier model can be a classification function that maps input data to one of the given categories, thus classifying the data.

[0072] In this embodiment of the invention, the similarity between the label representation vector and the character representation vector is used as input data to the classifier model of the information extraction model, and is fed into the classifier model of the information extraction model to obtain the information classification result of the information extraction training data.

[0073] This invention first acquires information extraction training data and inputs it into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data. Then, the information extraction training data is input into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data. Next, the similarity data between the label representation vector and the character representation vector is calculated. Finally, the obtained similarity data is input into the classifier model of the information extraction model for classification, obtaining the information classification result of the information extraction training data. By fusing label semantic information into the model, the high error rate and low annotation efficiency of manually labeled data in existing technologies for training information extraction models can be addressed, improving the training efficiency and model accuracy of the information extraction model, thereby improving the efficiency and accuracy of information extraction.

[0074] Example 2

[0075] Figure 2 This is a flowchart of another information extraction model training method provided in Embodiment 2 of the present invention. This embodiment is based on the above embodiment and is further specified. In this embodiment, various specific optional implementation methods are given for obtaining information extraction training data, calculating label representation vectors and character representation vectors, and calculating similarity data. Accordingly, as Figure 2 As shown, the method in this embodiment may include:

[0076] S210. Obtain the original dataset.

[0077] S220. Filter the text data, including labeled entities, from the original dataset.

[0078] S230. Determine the entity type and tag name of the filtered text data.

[0079] The original dataset can be data from a user database or various data stored and used by end users; it is unprocessed or unsimplified data, and may or may not be in a machine-readable format. The filtered text data can be manually filtered text data containing various entity labels. Entity types are the categories of entities determined based on the filtered text dataset. Label names are semantically meaningful names given to the entity types in the filtered text dataset.

[0080] In this embodiment, the obtained original dataset is processed by text recognition to extract text data corresponding to the original dataset; then, the obtained text data is filtered to obtain filtered text data including labeled entities; and then the entity type is changed to entity labels with semantic meaning.

[0081] For example, in the power sector, the original dataset for bidding documents can be the original bidding document data stored in the power system. First, the original bidding document data is converted into text data using OCR text recognition. Then, text data containing various entities is filtered out from the text data as the filtered text data. Entities can be "Purchase Num," "Purchase Person," and "Other" from the original bidding document, and their corresponding label names can be natural semantic names such as "Purchase Number," "Purchase Person," and "Non-Entity Field."

[0082] S240. Based on the entity type and tag name of the filtered text data, the filtered file data is annotated according to the set structure tag annotation data to obtain annotated text data.

[0083] S250. The labeled text data is segmented to obtain the information extraction training data.

[0084] The structure label annotation data can be a structure obtained by combining annotation label identifiers and natural semantic entity label data; the annotation text data can be filtered file data that has been annotated with the structure label.

[0085] Specifically, the screened text data is labeled according to the set structure tags to add semantic information to the screened text data. Optionally, the natural semantic entity tag data is labeled by introducing a labeling tag identifier to obtain labeled text data. Then, the obtained labeled text data is segmented with a fixed sequence length to obtain information extraction training data.

[0086] In an optional embodiment of the present invention, the information extraction training data may include bidding entity text data; the set structure tag labeled data may include a labeling tag identifier and natural semantic entity tag data; the labeling tag identifier may include an entity tag start labeling identifier, an entity tag subsequent labeling identifier, and a non-entity tag labeling identifier.

[0087] Among them, the labeling tag identifier may be an identifier type with a set structure. In a specific example, the labeling tag identifier may be a BIO (B-begin, I-inside, O-outside, BIO labeling mode) labeling identifier. The BIO labeling identifier labels each element as "B-X", "I-X", or "O". Correspondingly, the start labeling identifier may be "B-X", indicating that the segment where this element is located belongs to type X and this element is at the beginning of this segment; the entity tag subsequent labeling identifier may be "I-X", indicating that the segment where this element is located belongs to type X and this element is in the middle of this segment; the non-entity tag labeling identifier may be "O", indicating that it does not belong to any type; the natural semantic entity tag data may be an entity tag with semantic information, represented by Tag (label); the structure of the set structure tag labeled data is in the form of BIO+Tag.

[0088] Exemplarily, the screened text data may be "......Procurement scope State Grid Anhui Guangming Property Development Co., Ltd. 202......"; among them, the entity type is; Purchase Person; the label name is: Purchaser. Then, labeling the above screened file data according to the set structure tag labeled data, the obtained labeled text data is: {Cai: O; Gou: O; Fan: O; Wei: O; Guo: O; Wang: O; An: B; Hui: I; Guang: I; Ming: I; Wu: I; Ye: I; Fa: I; Zhan: I; You: I; Xian: I; Gong: I; Si: I; 2: O; 0: O; 2: O;}, after obtaining the labeled text data, the labeled text is segmented with a sequence length of 512 characters to obtain information extraction training data.

[0089] S260. Input the information extraction training data into the label vector output sub-model of the information extraction model for label recognition to obtain the label representation vector of the information extraction training data.

[0090] Continuing with the example above, let's designate the LabelBert Emcoder model as the label vector output sub-model of the information extraction model. The information extraction training data is used as input to the LabelBert Emcoder model. After model learning and training, label representation vectors are obtained, with dimensions [batch_size * tag_num * 768], and saved. Here, batch_size represents the number of training set samples; tag_num represents the total number of label categories; and 768 represents that each label is represented by 768 vectors.

[0091] S270. Input the information extraction training data into the character vector output sub-model of the information extraction model to perform character recognition, and obtain the character representation vector of the information extraction training data.

[0092] Continuing with the example above, let's designate the character vector output sub-model of the information extraction model as the bert-base-chinese model. The information extraction training data is used as input to the bert-base-chinese model. After model learning and training, character representation vectors are obtained, with dimensions [batch_size*512*768], and saved. Here, batch_size represents the number of samples in the training set; 512 indicates that the information extraction training data contains 512 characters; and 768 represents that each character is represented by 768 vectors.

[0093] S280. Calculate the inner product of the tag representation vector and the character representation vector.

[0094] S290. The result of the inner product operation of the tag representation vector and the character representation vector is used as the similarity data between the tag representation vector and the character representation vector.

[0095] The inner product is an operation between two vectors.

[0096] In this embodiment of the invention, the inner product operation is performed on the label representation vector and the character representation vector, and the result of the inner product operation is used as the similarity data between the label representation vector and the character representation vector.

[0097] Continuing with the example above, the tag representation vector is a vector of dimension [batch_size * tag_num * 768], and the character representation vector is a vector of dimension [batch_size * 512 * 768]. The inner product of these two vectors yields a vector of dimension [batch_size * 512 * tag_num]. This vector is then used as the similarity data between the tag representation vector and the character representation vector. Here, tag_num represents the total number of tag categories.

[0098] S2100. The similarity data is classified and identified using the classifier model to obtain multiple label recognition results.

[0099] S2110. The label recognition result, including the target label probability, is used as the information classification result of the information extraction training data.

[0100] The label recognition result includes label type and label probability; the target label probability can be the maximum probability value used to represent the target label.

[0101] In this embodiment of the invention, the classifier model performs classification and recognition based on similarity data. It can choose to use the softmax function to classify and recognize multiple labels to obtain the label recognition result, and then use the target label with the highest probability value as the information classification result of the information extraction training data.

[0102] Taking the above example as an example, the similarity between the label representation vector and the character representation vector is obtained by using the softmax function to obtain the probability value of each type of label. The cross-entropy loss value between the target label with the highest probability value and the real data is selected as the training target. When the model reaches the minimum loss value, the model reaches the optimal state and the model is saved.

[0103] This invention first acquires information extraction training data and inputs it into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data. Then, the information extraction training data is input into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data. Next, the similarity data between the label representation vector and the character representation vector is calculated. Finally, the obtained similarity data is input into the classifier model of the information extraction model for classification, obtaining the information classification result of the information extraction training data. By fusing label semantic information into the model, the high error rate and low annotation efficiency of manually labeled data in existing technologies for training information extraction models are solved. This improves the training efficiency and model accuracy of the information extraction model, while still achieving good model performance even with limited data.

[0104] Example 3

[0105] Figure 3This is a flowchart of an information extraction method provided in Embodiment 3 of the present invention. This embodiment is applicable to situations where information extraction is performed using the information extraction model trained in the above embodiments. The method can be executed by an information extraction device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. This electronic device can be a terminal device or a server device. The embodiments of the present invention do not limit the specific type of electronic device. Accordingly, as... Figure 3 As shown, the method in this embodiment may include:

[0106] S310. Obtain the data to be extracted.

[0107] The data to be extracted can be data from which information needs to be extracted using an information extraction model.

[0108] In this embodiment, the text data to be filtered is segmented with 512 as the longest sequence to obtain the data to be extracted.

[0109] S320. Input the data to be extracted into the information extraction model to obtain the information extraction result of the data to be extracted.

[0110] The information extraction model can be used to identify and output structured information from unstructured text, including named entity recognition and relation extraction. Furthermore, the information extraction model is trained using the information extraction model training method provided in any embodiment of the present invention; the information extraction result can be a unified organizational form obtained by structuring the information contained in the text.

[0111] In this embodiment of the invention, the information extraction model is designated as the Token Bert Encoder model. The data to be extracted is used as input to the Token Bert Encoder model to obtain the representation vector of each character. Then, the tag representation vector of each tag is loaded, and the similarity between the two is obtained by calculating the product of each character vector and the tag representation vector. Next, a threshold is set to statistically determine the BIO-Tag type of each character, and the prediction result of information extraction is obtained according to the BIO rules.

[0112] The technical solution of this invention involves acquiring information extraction training data; inputting the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data; inputting the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data; calculating the similarity data between the label representation vector and the character representation vector; and inputting the similarity data into the classifier model of the information extraction model for classification recognition, obtaining the information classification result of the information extraction training data. Correspondingly, after the information extraction model is trained, the data to be extracted can be input into the information extraction model to obtain the information extraction result of the data to be extracted. This technical solution of the present invention solves the problems of high error rate and low annotation efficiency in the prior art when training information extraction models by fusing label semantic information into the model, thereby improving the training efficiency and model accuracy of the information extraction model, and thus improving the efficiency and accuracy of information extraction.

[0113] Specific application scenarios

[0114] To more clearly illustrate the technical solutions provided in the embodiments of the present invention, the embodiments of the present invention use OCR as a document processing tool, BIO+Tag structured data as labeled text data, and power industry bidding documents as the original dataset, specifically explaining the information extraction model training method and information extraction method provided in the embodiments of the present invention.

[0115] Figure 4 This is an application scenario diagram of information extraction model training and information extraction provided by an embodiment of the present invention. First, the bidding documents of the power industry are used to obtain text data using OCR recognition technology. Then, filtered text data including tagged entities is extracted from the text data. Simultaneously, the entity types and tag names in the filtered text data are determined. For example... Figure 4 As shown, the entities in the filtered text data are “Purchase Num”, “Purchase Person”, and “Other”, which are the entity types in the filtered text data; the corresponding “Purchase Number”, “Purchase Person”, and “Non-Entity Field” are the tag names in the filtered text data.

[0116] Furthermore, the screened file data is labeled according to the entity type and tag name of the screened text in accordance with the set structure tag annotation data. Suppose that "......Procurement Scope Guowang Anhui Guangming Property Development Co., Ltd. 202......" is the obtained screened text data. In this case, the entity type is: Purchase Person; and the tag name is: Purchaser. By labeling the above screened file data according to the set structure tag annotation data, the labeled text data obtained is: {Procurement: O; Scope: O; Guowang: O; Anhui: O; Guangming: O; Property: O; Development: O; Co., Ltd.: O; 2: O; 0: O; 2: O;}. After obtaining the labeled text data, the labeled text is segmented with a sequence length of 256 characters to obtain information extraction training data.

[0117] Next, the information extraction training data with a sequence length of 512 is used as the input data and fed into the label vector output sub-model Label Bert Encoder of the information extraction model for learning and training to obtain the representation vector of the label, with a dimension of [batch_size * tag_num * 768], and it is saved locally at the same time.

[0118] Furthermore, the information extraction training data with a sequence length of 512 is used as the input data and fed into the character vector output sub-model Token Bert Encoder of the information extraction model for learning and training to obtain the representation vector of the character, with a dimension of [batch_size * 512 * 768].

[0119] Furthermore, the label representation vector is loaded, and the inner product operation is performed between the label representation vector [batch_size * tag_num * 768] and the character representation vector [batch_size * 512 * 768] to obtain the similarity data between the label representation vector and the character representation vector, with a dimension of [batch_size * 512 * tag_num]. The similarity data is processed through the softmax function to obtain the probability values of various labels. The cross-entropy loss value between the target label with the maximum probability value and the real data is selected as the training target. When the loss value of the model reaches the minimum, the model reaches the optimal state, and the model is saved.

[0120] After the information extraction model is trained, text data is acquired and segmented into segments with a maximum length of 512, serving as the text data to be extracted. Further, this text data is used as input and fed into the Token Bert Encoder, the character vector output sub-model of the information extraction model, for learning and training to obtain the representation vector for each character. Then, the local label representation vector is loaded, and the inner product of each character vector and label representation vector is calculated to obtain the similarity data between the character vector and the label representation vector. Finally, a threshold is set to statistically determine the BIO-Tag type of each character, and the final extraction prediction result is obtained according to the BIO rules.

[0121] By utilizing the above-mentioned combination scheme as a means of training and extracting information extraction models, it is possible to integrate label semantic information into the model. This addresses the problems of high error rate and low efficiency of manual annotation when training information extraction models in existing technologies. It can improve the training efficiency and model accuracy of information extraction models, thereby improving the efficiency and accuracy of information extraction.

[0122] Example 4

[0123] Figure 5 This is a schematic diagram of the structure of an information extraction model training device provided in Embodiment 4 of the present invention, as shown below. Figure 5 As shown, the device includes: a training data acquisition module 410, a label representation vector acquisition module 420, a character representation vector acquisition module 430, a similarity data calculation module 440, and a label classification result acquisition module 450, wherein:

[0124] The training data acquisition module 410 is used to: acquire information extraction training data. The information extraction training data includes data labeled with defined structures.

[0125] The label representation vector acquisition module 420 is used to: input the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, and obtain the label representation vector of the information extraction training data.

[0126] The character representation vector acquisition module 430 is used to: input the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, and obtain the character representation vector of the information extraction training data.

[0127] The similarity data calculation module 440 is used to calculate the similarity data between the tag representation vector and the character representation vector.

[0128] The label classification result acquisition module 450 is used to: input the similarity data into the classifier model of the information extraction model for classification and recognition, and obtain the information classification result of the information extraction training data.

[0129] The above technical solution first acquires information extraction training data and inputs it into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data. Then, the information extraction training data is input into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data. Next, the similarity data between the label representation vector and the character representation vector is calculated. Finally, the obtained similarity data is input into the classifier model of the information extraction model for classification, obtaining the information classification result of the information extraction training data. By fusing label semantic information into the model, the high error rate and low annotation efficiency of manually labeled data in existing technologies for training information extraction models are solved. This improves the training efficiency and model accuracy of the information extraction model, thereby improving the efficiency and accuracy of information extraction.

[0130] Optionally, the similarity data calculation module 440 is specifically used to: calculate the inner product of the label representation vector and the character representation vector; and use the result of the inner product operation of the label representation vector and the character representation vector as the similarity data between the label representation vector and the character representation vector.

[0131] Optionally, the label classification result acquisition module 450 is specifically used to: classify and identify the similarity data through the classifier model to obtain multiple label recognition results; wherein, the label recognition results include label type and label probability; and use the label recognition results including the target label probability as the information classification results of the information extraction training data.

[0132] Optionally, the training data acquisition module 410 is specifically used for: acquiring the original dataset; filtering text data including labeled entities from the original dataset; determining the entity type and label name of the filtered text data; labeling the filtered text data according to the entity type and label name of the filtered text data and the set structure label annotation data to obtain labeled text data; and segmenting the labeled text data to obtain the information extraction training data.

[0133] Optionally, the information extraction training data includes bidding entity text data; the set structure label annotation data includes annotation label identifiers and natural semantic entity label data; the annotation label identifiers include entity label start label identifiers, entity label subsequent label identifiers, and non-entity label identifiers.

[0134] The aforementioned information extraction model training apparatus can execute the information extraction model training method provided in any embodiment of the present invention, and possesses the corresponding functional modules and beneficial effects for executing the information extraction model training method. Technical details not described in detail in this embodiment can be found in the information extraction model training method provided in any embodiment of the present invention.

[0135] Example 5

[0136] Figure 6 This is a schematic diagram of the structure of an information extraction device provided in Embodiment 5 of the present invention, as shown below. Figure 6 As shown, the device includes: a data acquisition module 510 to be extracted and an information extraction result acquisition module 520, wherein:

[0137] The data acquisition module 510 is used to acquire the data to be extracted.

[0138] The information extraction result acquisition module 520 is used to: input the data to be extracted into the information extraction model to obtain the information extraction result of the data to be extracted; wherein, the information extraction model is trained by the information extraction model training method described in any embodiment of the present invention.

[0139] The technical solution of this invention involves acquiring information extraction training data; inputting the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, obtaining the label representation vector of the information extraction training data; inputting the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, obtaining the character representation vector of the information extraction training data; calculating the similarity data between the label representation vector and the character representation vector; and inputting the similarity data into the classifier model of the information extraction model for classification recognition, obtaining the information classification result of the information extraction training data. Correspondingly, after the information extraction model is trained, the data to be extracted can be input into the information extraction model to obtain the information extraction result of the data to be extracted. This technical solution of the present invention solves the problems of high error rate and low annotation efficiency in the prior art when training information extraction models by fusing label semantic information into the model, thereby improving the training efficiency and model accuracy of the information extraction model, and thus improving the efficiency and accuracy of information extraction.

[0140] The information extraction device described above can execute the information extraction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in this embodiment can be found in the information extraction method provided in any embodiment of the present invention.

[0141] Example 6

[0142] Figure 7A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0143] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0144] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0145] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as information extraction model training methods or information extraction methods.

[0146] In some embodiments, the information extraction model training method or information extraction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the information extraction model training method or information extraction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the information extraction model training method or information extraction method by any other suitable means (e.g., by means of firmware).

[0147] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0148] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0149] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0151] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0152] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

Claims

1. A method for training an information extraction model, characterized in that, include: Acquire information extraction training data; wherein the information extraction training data includes set structure label annotation data; wherein the set structure label annotation data includes natural semantic entity label data; The information extraction training data is input into the label vector output sub-model of the information extraction model for label recognition, thereby obtaining the label representation vector of the information extraction training data. The information extraction training data is input into the character vector output sub-model of the information extraction model for character recognition, thereby obtaining the character representation vector of the information extraction training data. Calculate the similarity data between the tag representation vector and the character representation vector; The similarity data is input into the classifier model of the information extraction model for classification and recognition, and the information classification result of the information extraction training data is obtained. The process of obtaining information and extracting training data includes: Obtain the original dataset; Filter the original dataset to include labeled entities in the filtered text data; Determine the entity type and tag name of the filtered text data; Based on the entity type and tag name of the filtered text data, the filtered text data is annotated according to the set structure tag annotation data to obtain annotated text data; The labeled text data is segmented to obtain the information extraction training data.

2. The method according to claim 1, characterized in that, The calculation of the similarity data between the tag representation vector and the character representation vector includes: Calculate the inner product of the tag representation vector and the character representation vector; The result of the inner product operation between the tag representation vector and the character representation vector is used as the similarity data between the tag representation vector and the character representation vector.

3. The method according to claim 1, characterized in that, The step of inputting the similarity data into the classifier model of the information extraction model for classification and recognition, to obtain the information classification result of the information extraction training data, includes: The similarity data is classified and identified using the classifier model to obtain multiple label recognition results; wherein, the label recognition results include label type and label probability; The label recognition result, including the target label probability, is used as the information classification result of the information extraction training data.

4. The method according to any one of claims 1-3, characterized in that, The information extraction training data includes bidding entity text data; the set structure label annotation data also includes annotation label identifiers; the annotation label identifiers include entity label start label identifiers, entity label subsequent label identifiers, and non-entity label identifiers.

5. An information extraction method, characterized in that, include: Obtain the data to be extracted; The data to be extracted is input into the information extraction model to obtain the information extraction result of the data to be extracted; The information extraction model is trained using the information extraction model training method described in any one of claims 1-4.

6. An information extraction model training device, characterized in that, include: The training data acquisition module is used to acquire information extraction training data; wherein, the information extraction training data includes set structure label annotation data; wherein, the set structure label annotation data includes natural semantic entity label data; The label representation vector acquisition module is used to input the information extraction training data into the label vector output sub-model of the information extraction model for label recognition, and obtain the label representation vector of the information extraction training data. The character representation vector acquisition module is used to input the information extraction training data into the character vector output sub-model of the information extraction model for character recognition, and obtain the character representation vector of the information extraction training data. A similarity data calculation module is used to calculate the similarity data between the tag representation vector and the character representation vector; The label classification result acquisition module is used to input the similarity data into the classifier model of the information extraction model for classification and recognition, and obtain the information classification result of the information extraction training data. The step of obtaining information to extract training data includes: Obtain the original dataset; Filter the original dataset to include labeled entities in the filtered text data; Determine the entity type and tag name of the filtered text data; Based on the entity type and tag name of the filtered text data, the filtered text data is annotated according to the set structure tag annotation data to obtain annotated text data; The labeled text data is segmented to obtain the information extraction training data.

7. An information extraction device, characterized in that, include: The data to be extracted module is used to acquire the data to be extracted. The information extraction result acquisition module is used to input the data to be extracted into the information extraction model to obtain the information extraction result of the data to be extracted. The information extraction model is trained using the information extraction model training method described in any one of claims 1-4.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the information extraction model training method of any one of claims 1-4, or to implement the information extraction method of claim 5.

9. A computer storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the information extraction model training method of any one of claims 1-4, or the information extraction method of claim 5.

Citation Information

Patent Citations

  • Method and device for determining similar text, storage medium and electronic equipment

    CN111126054A

  • Joint extraction method for named entities and relationships in judicial domain

    CN113221567A