Method and device for establishing term identification model, method and device for establishing term identification

By filtering and deleting term annotation data, a high-quality training set is formed, which solves the problem of low accuracy of existing term recognition models and improves recognition accuracy.

CN113642329BActive Publication Date: 2024-10-29ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010343731.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-27
Publication Date
2024-10-29
Estimated Expiration
2040-04-27

AI Technical Summary

Technical Problem

In existing term recognition methods, there are errors in automatic annotation based on term dictionaries, resulting in inaccurate training samples, which in turn affects the recognition accuracy of the term recognition model.

Method used

By obtaining annotation data based on the preset automatic annotation method, a certain proportion of term annotations is deleted, high-quality annotation data is selected as a training set, two term recognition models are trained using different training sets, and the loss difference is calculated to select the ones that meet the quality requirements. The annotated data is used to form the final training set for model training.

Benefits of technology

The recognition accuracy of the term recognition model is improved, and the screening of term annotation quality and the effectiveness of model training are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113642329B_ABST
    Figure CN113642329B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for establishing a term recognition model, a term recognition method and device, and relates to the field of artificial intelligence technology, and can solve the problem of low accuracy of existing term recognition. The method of the present invention mainly includes: obtaining a first training set; deleting a certain proportion of term annotations in the first training set to obtain a second training set; performing model training based on the first training set to obtain a first term recognition model, and performing model training based on the second training set to obtain a second term recognition model; based on the difference in losses obtained by performing term recognition on a specific data set using the first term recognition model and the second term recognition model, respectively, screening out annotation data that meets the term annotation quality requirements from a specific data set as a third training set; performing model training using the third training set to obtain the final required term recognition model. The present invention is mainly applicable to scenarios in which a term recognition model is established based on a neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and device for establishing a terminology recognition model, and a method and device for terminology recognition. Background Art

[0002] Terminology is a collection of names used to represent concepts in a specific subject area. For example, in the field of clothing, there are terms such as dress, high heels, and hat. Terminology recognition has research significance in the field of natural language processing, especially in machine translation and cross-language information retrieval.

[0003] At present, the methods of terminology recognition mainly include manual recognition methods and automatic recognition methods. Among them, in order to realize the automatic recognition of terms, it is necessary to first annotate the corpus with terms according to the terminology dictionary to obtain the annotated data, and then randomly select part of the annotated data as training samples for model training to obtain the terminology recognition model, and finally use the terminology recognition model to perform terminology recognition on the sentences to be recognized. However, since the terminology dictionary is a set of terms accumulated based on experience, it may not be possible to annotate all the terms in the corpus based on the terminology dictionary, so the training samples obtained by randomly selecting part of the annotated data themselves have certain errors, which leads to the low accuracy of the trained terminology recognition model in recognizing terms. Summary of the invention

[0004] In view of this, the method and device for establishing a terminology recognition model, and the method and device for terminology recognition provided by the present invention aim to solve the problem of low accuracy in existing term recognition.

[0005] In a first aspect, the present invention provides a method for establishing a term recognition model, the method comprising:

[0006] Acquire a first training set, wherein the first training set includes annotated data obtained by annotating terms on a first corpus based on a preset automatic annotation method;

[0007] Deleting a certain proportion of term annotations in the first training set to obtain a second training set;

[0008] Performing model training based on the first training set to obtain a first term recognition model, and performing model training based on the second training set to obtain a second term recognition model;

[0009] According to the difference in losses obtained by performing term recognition on a specific data set using the first term recognition model and the second term recognition model respectively, annotated data that meets the term annotation quality requirements are screened out from the specific data set as a third training set; the specific data set is annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus;

[0010] The third training set is used to perform model training to obtain the final required term recognition model.

[0011] Optionally, the step of selecting annotated data that meets the term annotation quality requirement from the specific data set as a third training set according to the difference in losses obtained by performing term recognition on the specific data set using the first term recognition model and the second term recognition model, respectively, comprises:

[0012] Using the first term recognition model and the second term recognition model respectively to perform term recognition on the original sentence corresponding to the annotated data in the specific data set, and annotating the recognized terms; the original sentence is the sentence before the term is annotated based on the preset automatic annotation method;

[0013] For the same original sentence, respectively calculating the labeling loss of the first term recognition model and the labeling loss of the second term recognition model, and calculating the difference between the labeling loss of the first term recognition model and the labeling loss of the second term recognition model to obtain the loss difference;

[0014] The labeled data whose loss difference is greater than a preset threshold is selected from the specific data set as the third training set.

[0015] Optionally, for the same original sentence, respectively calculating the labeling loss of the first term recognition model and the labeling loss of the second term recognition model includes:

[0016] For the same original sentence, using a preset loss function, calculating the term annotation results of the first term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the first term recognition model;

[0017] For the same original sentence, the preset loss function is used to calculate the term annotation results of the second term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the second term recognition model.

[0018] Optionally, if the term dictionary used by the preset automatic annotation method is updated, the method further includes:

[0019] Based on the updated term dictionary, re-annotate the terminology of the corpus using the preset automatic annotation method;

[0020] Filtering the annotated data that meets the term annotation quality requirements from the annotated data after the re-term annotation;

[0021] The terminology recognition model required finally is updated based on the screened annotation data.

[0022] Optionally, deleting a certain proportion of term annotations in the first training set to obtain the second training set includes:

[0023] Randomly deleting a certain proportion of term annotations in the first training set to obtain the second training set;

[0024] Alternatively, the field to which each term in the first training set belongs is determined, and a certain proportion of term annotations are randomly deleted for each field to obtain the second training set.

[0025] Optionally, the preset automatic labeling method is a remote supervision method.

[0026] In a second aspect, the present invention provides a term identification method, the method comprising:

[0027] Get user data information;

[0028] Identifying the product names in the user data information based on a term recognition model; the term recognition model is obtained by using the method for establishing the term recognition model described in the first aspect;

[0029] Marking the product name in the user data information;

[0030] By analyzing user data information labeled with product names, user preferences are determined, and products are recommended to the user based on the user preferences.

[0031] In a third aspect, the present invention provides a term identification method, the method comprising:

[0032] Obtain data information including names generated in a preset platform;

[0033] Recognize the names of people in the data information based on a term recognition model; the term recognition model is obtained by using the method for establishing the term recognition model described in the first aspect;

[0034] Marking the name of the person in the data information;

[0035] According to the preset name analysis rules, the data information marked with the name is analyzed to obtain statistical information on the name.

[0036] In a fourth aspect, the present invention provides a term identification method, the method comprising:

[0037] Obtain medical data information;

[0038] Identifying the medical names in the medical data information based on a term recognition model; the term recognition model is obtained by using the method for establishing the term recognition model described in the first aspect;

[0039] The medical name in the medical data information is highlighted.

[0040] In a fifth aspect, the present invention provides a device for establishing a term recognition model, the device comprising:

[0041] An acquisition unit, configured to acquire a first training set, wherein the first training set includes annotated data obtained by annotating terms on a first corpus based on a preset automatic annotation method;

[0042] a deleting unit, used for deleting a certain proportion of term annotations in the first training set to obtain a second training set;

[0043] A first training unit, configured to perform model training based on the first training set to obtain a first term recognition model, and to perform model training based on the second training set to obtain a second term recognition model;

[0044] A screening unit, configured to screen out annotated data that meets the term annotation quality requirement from the specific data set as a third training set according to a difference in losses obtained by performing term recognition on the specific data set using the first term recognition model and the second term recognition model respectively; the specific data set is annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus;

[0045] The second training unit is used to perform model training using the third training set to obtain the final required term recognition model.

[0046] Optionally, the screening unit includes:

[0047] a labeling module, configured to perform term recognition on the original sentences corresponding to the labeled data in the specific data set using the first term recognition model and the second term recognition model respectively, and label the recognized terms; the original sentences are sentences before the term labeling is performed based on the preset automatic labeling method;

[0048] A calculation module, used for respectively calculating the labeling loss of the first term recognition model and the labeling loss of the second term recognition model for the same original sentence, and calculating the difference between the labeling loss of the first term recognition model and the labeling loss of the second term recognition model to obtain the loss difference;

[0049] A screening module is used to screen out the labeled data whose loss difference is greater than a preset threshold from the specific data set as the third training set.

[0050] Optionally, the calculation module is used to calculate, for the same original sentence, the term annotation results of the first term recognition model and the term annotation results in the specific data set using a preset loss function to obtain the annotation loss of the first term recognition model; and for the same original sentence, using the preset loss function to calculate the term annotation results of the second term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the second term recognition model.

[0051] Optionally, the device further comprises:

[0052] An updating unit is used for re-annotating the corpus with the preset automatic annotation method based on the updated terminology dictionary if the terminology dictionary used by the preset automatic annotation method is updated; filtering out the annotation data that meets the terminology annotation quality requirements from the re-annotated annotation data; and updating the final required terminology recognition model based on the filtered annotation data.

[0053] Optionally, the deletion unit is used to randomly delete the certain proportion of term annotations in the first training set to obtain the second training set;

[0054] Alternatively, the field to which each term in the first training set belongs is determined, and a certain proportion of term annotations are randomly deleted for each field to obtain the second training set.

[0055] Optionally, the preset automatic labeling method is a remote supervision method.

[0056] In a sixth aspect, the present invention provides a terminology recognition device, the device comprising:

[0057] An acquisition unit, used for acquiring user data information;

[0058] an identification unit, configured to identify the commodity name in the user data information based on a term identification model; the term identification model is obtained by using the method for establishing the term identification model described in the first aspect;

[0059] A marking unit, used to mark the product name in the user data information;

[0060] A determination unit, configured to determine user preferences by analyzing user data information labeled with product names;

[0061] A recommendation unit is used to recommend products to the user according to the user's preferences.

[0062] In a seventh aspect, the present invention provides a term identification device, the device comprising:

[0063] An acquisition unit, used to acquire data information including names generated in a preset platform;

[0064] A recognition unit, used for recognizing the name of a person in the data information based on a term recognition model; the term recognition model is obtained by using the method for establishing the term recognition model described in the first aspect;

[0065] A marking unit, used to mark a person's name in the data information;

[0066] The analysis unit is used to analyze the data information marked with the name according to the preset name analysis rules to obtain statistical information on the name.

[0067] In an eighth aspect, the present invention provides a term identification device, the device comprising:

[0068] An acquisition unit, used for acquiring medical data information;

[0069] An identification unit, used for identifying the medical names in the medical data information based on a terminology identification model; the terminology identification model is obtained by using the method for establishing the terminology identification model described in the first aspect;

[0070] The output unit is used to highlight the medical name in the medical data information.

[0071] In a ninth aspect, the present invention provides a storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method as described in any one of the first to fourth aspects.

[0072] In a tenth aspect, the present invention provides an electronic device, the electronic device comprising a storage medium and a processor;

[0073] The processor is adapted to implement each instruction;

[0074] The storage medium is suitable for storing a plurality of instructions;

[0075] The instructions are suitable for being loaded by the processor and executing the method as described in any one of the first to fourth aspects.

[0076] By means of the above technical scheme, the method and device for establishing a terminology recognition model and the method and device for terminology recognition provided by the present invention can, after annotating the corpus with terms based on a preset automatic annotation method to obtain annotated data, instead of directly randomly selecting a part of the annotated data for model training, first screen out relatively comprehensively annotated annotated data (i.e., high-quality annotated data) from these annotated data, and then use the screened high-quality annotated data for model training, thereby obtaining a terminology recognition model with a higher terminology recognition accuracy. Specifically, after selecting a part of the annotated data, it is used as the first training set, and the annotated data after deleting a certain proportion of the term annotations in the first training set is used as the second training set; secondly, a first term recognition model with relatively high quality is obtained based on the first training set, and a second term recognition model with relatively low quality is obtained based on the second training set; then, the difference between the loss of term recognition performed on a specific data set (i.e., data selected from other annotated data in the annotated corpus except the first training set) by the first term recognition model with relatively high quality and the loss of term recognition performed on the specific data set by the second term recognition model with relatively low quality is used to judge whether the quality of the term annotation originally performed on the specific data set meets the requirements, and the annotated data that meets the quality requirements is selected from the annotated data as the final training set required for model training for model training, thereby greatly improving the recognition accuracy of the term recognition model finally trained.

[0077] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0079] Figure 1 A flowchart of a method for establishing a term recognition model provided by an embodiment of the present invention is shown;

[0080] Figure 2 and Figure 3 A schematic diagram of a method for establishing a term recognition model provided by an embodiment of the present invention is shown;

[0081] Figure 4 A flowchart of a method for screening labeled data provided by an embodiment of the present invention is shown;

[0082] Figure 5 A block diagram showing a device for establishing a term recognition model provided by an embodiment of the present invention;

[0083] Figure 6 A block diagram showing another device for establishing a term recognition model provided by an embodiment of the present invention is shown;

[0084] Figure 7 A block diagram showing a composition of a term identification device provided by an embodiment of the present invention is shown;

[0085] Figure 8 A block diagram showing another device for identifying terminology provided by an embodiment of the present invention is shown;

[0086] Fig. 9 A block diagram showing the composition of another terminology recognition device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0087] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0088] In order to improve the accuracy of the term recognition model in identifying terms, the present invention can, after obtaining the annotated data by annotating the corpus with terms based on the preset automatic annotation method, not directly randomly select a part of the annotated data for model training, but first screen out the annotated data with relatively comprehensive annotations (i.e., high-quality annotated data) from these annotated data, and then use the screened high-quality annotated data for model training, so as to obtain a term recognition model with higher term recognition accuracy. Figure 1-3 As shown, the method for establishing a term recognition model provided by the embodiment of the present invention mainly includes:

[0089] 101. Obtain a first training set.

[0090] The first training set includes the annotated data obtained after the first corpus is annotated with terms based on a preset automatic annotation method. The preset automatic annotation method includes but is not limited to a remote supervision method; the first corpus includes a preset number of original sentences (i.e., unlabeled sentences). Among them, remote supervision is usually applied to relationship extraction tasks to automatically construct training annotation data, thereby saving manual annotation costs. In the term mining task, assuming that there is a term dictionary and unlabeled corpus, if a character string of the corpus is contained in the term dictionary, the character string is labeled as a term.

[0091] For example, for a sentence to be labeled "I bought a long-sleeved dress and a pair of black high heels.", if the term dictionary contains "high heels", then "high heels" can be marked as a term; if the term dictionary contains "high heels" and "dress", then both "high heels" and "dress" can be marked as terms.

[0092] When specifically marking, a symbol may be assigned to each character in the sentence, and the symbol corresponding to the term is different from the symbol corresponding to the non-term. For example, if only "high heels" is marked as a term in the above sentence, then the marking string corresponding to the sentence is "OOOOOOOOOOOOOOBIIO", where O represents a non-term character, B represents the start boundary of the term, and I represents the middle or end boundary of the term. If the embodiment of the present invention uses this marking method to mark the first corpus, the marked data in the first training set includes the original sentence and the corresponding marked string.

[0093] When the fonts in the first corpus are all the same, the term marking function can be implemented by modifying the font of a certain string, or other marking methods can be used. The embodiment of the present invention does not limit the specific marking method.

[0094] In addition, when performing terminology tagging, the terminology dictionary used may include only one field of terminology dictionary or multiple fields of terminology dictionary. And when including terminology dictionaries of multiple fields (such as e-commerce, medical, computer, etc.), the terminology dictionaries and sentences to be tagged in different fields need to be distributed relatively evenly to ensure that the final trained terminology recognition model has relatively small differences in the accuracy of terminology recognition in different fields.

[0095] 102. Delete a certain proportion of term annotations in the first training set to obtain a second training set.

[0096] When the first training set includes terms of one field, the term annotations of a certain proportion in the first training set can be randomly deleted to obtain the second training set; when the first training set includes terms of multiple fields, the term annotations of a certain proportion in the first training set can be randomly deleted to obtain the second training set, or the field to which each term in the first training set belongs can be determined first, and then the term annotations of a certain proportion are randomly deleted for each field to obtain the second training set. The certain proportion can be determined based on experience. For example, it can be determined through experiments that when the first proportion is 20%-30%, the annotation quality of the determined third training set is the highest.

[0097] When the term is marked by the "OBI" method mentioned in step 101, the specific implementation method of deleting the term mark can be: modify the "B" and "I" symbols corresponding to the term word to the "O" symbol. When the term is marked by modifying the font, the font can be changed back to the original font.

[0098] 103. Perform model training based on the first training set to obtain a first term recognition model, and perform model training based on the second training set to obtain a second term recognition model.

[0099] Among them, the neural network structures used to train the first term recognition model and the second term recognition model include but are not limited to the following: Bi-LSTM (Bi-directional Long Short-Term Memory), RNN (Recurrent Neural Network), CNN (Convolutional Neural Networks), and Tranformer.

[0100] 104. According to the difference in losses obtained by performing term recognition on a specific data set using the first term recognition model and the second term recognition model respectively, annotated data that meets the term annotation quality requirements are selected from the specific data set as a third training set.

[0101] Wherein, the specific data set is the annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus. In the specific implementation, a first preset number of sentences can be taken from the corpus as the first corpus for term annotation to obtain a first training set, and a second preset number of sentences can be taken from the corpus as the second corpus for term annotation to obtain a specific data set, and there are no repeated sentences in the first corpus and the second corpus. Alternatively, the corpus is directly annotated with terms, and then a part of the annotated data is taken as the first training set, and the other part is taken as the specific data set. In addition, in order to adjust the parameters in the term recognition model and determine the recognition effect of the term recognition model, the third corpus and the fourth corpus that are not repeated with the first corpus and the second corpus can also be taken from the corpus for term annotation to obtain a verification set and a test set, or two parts that are not repeated with the first training set and the specific data set can be directly taken from all the annotated data corresponding to the corpus as the verification set and the test set respectively. Among them, the number of specific data sets is much larger than the first training set, and the first training set: validation set: test set can be N:1:1, and N is greater than 1.

[0102] Since the second training set is based on the first training set with some term annotations deleted, the number of annotated terms in the second training set is relatively small, so the second term recognition model trained based on the second training set will have a lower recognition accuracy than the first term recognition model trained based on the first training set. The first term recognition model produces annotation losses when annotating the original sentences in the specific data set compared to the original term annotations of the specific data set. Similarly, the second term recognition model also produces annotation losses when annotating the original sentences in the specific data set compared to the original term annotations of the specific data set. The greater the difference between the two annotation losses, the higher the quality of the originally annotated terms in the specific data set. Therefore, the quality of each annotated data in the specific data set can be judged by this loss difference, and the annotated data with better quality can be selected as the training set required for the final term recognition model training.

[0103] 105. Perform model training using the third training set to obtain the final required term recognition model.

[0104] The network structure used to train the final term recognition model is the same as the neural network structure used by the first term recognition model and the second term recognition model.

[0105] The method for establishing a term recognition model provided by an embodiment of the present invention can, after annotating the corpus with terms based on a preset automatic annotation method to obtain annotated data, not directly randomly select a part of the annotated data for model training, but first screen out relatively comprehensively annotated annotated data (i.e., high-quality annotated data) from these annotated data, and then use the screened high-quality annotated data for model training, so as to obtain a term recognition model with a higher term recognition accuracy. Specifically, after selecting a part of the annotated data, it is used as the first training set, and the annotated data after deleting a certain proportion of the term annotations in the first training set is used as the second training set; secondly, a first term recognition model with relatively high quality is obtained based on the first training set, and a second term recognition model with relatively low quality is obtained based on the second training set; then, the difference between the loss of term recognition performed on a specific data set (i.e., data selected from other annotated data in the annotated corpus except the first training set) by the first term recognition model with relatively high quality and the loss of term recognition performed on the specific data set by the second term recognition model with relatively low quality is used to judge whether the quality of the term annotation originally performed on the specific data set meets the requirements, and the annotated data that meets the quality requirements is selected from the annotated data as the final training set required for model training for model training, thereby greatly improving the recognition accuracy of the term recognition model finally trained.

[0106] Optionally, the specific implementation of step 104 may be as follows: Figure 4 As shown, specifically including:

[0107] 1041. Use the first term recognition model and the second term recognition model to perform term recognition on original sentences corresponding to the annotated data in the specific data set, and annotate the recognized terms.

[0108] The original sentence is a sentence before the terminology is annotated based on the preset automatic annotation method. For example, if a specific data set includes annotated data after the terminology is annotated for "dress" and "high heels" in "I bought a long-sleeved dress and a pair of black high heels.", then the corresponding original sentence is "I bought a long-sleeved dress and a pair of black high heels." After the original sentence is identified by the first term recognition model, both "dress" and "high heels" will be annotated with terms. After the original sentence is identified by the second term recognition model, only "dress" may be annotated with terms.

[0109] 1042. For the same original sentence, respectively calculate the labeling loss of the first term recognition model and the labeling loss of the second term recognition model, and calculate the difference between the labeling loss of the first term recognition model and the labeling loss of the second term recognition model to obtain the loss difference.

[0110] For the same original sentence, the term labeling results of the first term recognition model and the term labeling results in the specific data set are calculated using a preset loss function to obtain the labeling loss of the first term recognition model; for the same original sentence, the term labeling results of the second term recognition model and the term labeling results in the specific data set are calculated using the preset loss function to obtain the labeling loss of the second term recognition model. The preset loss function includes but is not limited to the cross entropy loss function.

[0111] The loss function is used to measure the inconsistency between the predicted value and the true value of your model. It is a non-negative real-valued function. The smaller the loss function, the better the robustness of the model. Among them, the term labeling results of the first term recognition model and the second term recognition model are both predicted values, and the term labeling results in a specific data set are true values, so the labeling loss can be calculated based on the predicted value and the true value.

[0112] 1043. Filter out the labeled data whose loss difference is greater than a preset threshold from the specific data set as the third training set.

[0113] The greater the difference between the annotation loss of the first term recognition model and the annotation loss of the second term recognition model, the higher the quality of the annotation data in the specific data set, that is, the more comprehensive the annotated terms are. Therefore, a difference threshold can be set empirically, and the annotation data greater than the difference threshold can be determined as relatively high-quality annotation data, and these annotation data can be selected as the third training set for the final term recognition model training.

[0114] Furthermore, with the diversification of languages, new terms will appear in various fields, so the terminology dictionary needs to be constantly updated, and thus the terminology recognition model also needs to be constantly updated to ensure the accuracy of terminology recognition. Therefore, if the terminology dictionary used by the preset automatic annotation method is updated, the corpus can be re-annotated with the preset automatic annotation method based on the updated terminology dictionary, and then the annotation data that meets the terminology annotation quality requirements can be screened out from the re-annotated annotation data, and finally the final required terminology recognition model can be updated based on the screened annotation data. Among them, the specific implementation method of screening out the annotation data that meets the terminology annotation quality requirements from the re-annotated annotation data is the same as the above steps 101-104, which will not be repeated here.

[0115] The terminology recognition model provided by the embodiment of the present invention can be applied to a variety of terminology recognition scenarios. For example, the terminology recognition model can be used to identify product names from user data in the e-commerce field (such as product review information, communication information with merchants, communication information with e-commerce customer service, etc.). The terminology recognition model can also be used to identify personal names from data in the fields of music, movie ticketing, etc. (such as lyrics, user reviews, movie introductions, etc.). The terminology recognition model can also be used to identify drug names or disease names from data in the medical field (such as diagnosis books, test reports, etc.).

[0116] The following examples illustrate the specific implementation methods of term recognition in the above three fields:

[0117] (I) E-commerce field:

[0118] A1. Obtain user data information.

[0119] The user data information includes product review information, communication information with merchants, communication information with e-commerce customer service, etc.

[0120] A2. Identify the product names in the user data information based on a term recognition model.

[0121] The term identification model is established by using the above-mentioned method for establishing the term identification model, and the terms involved in establishing the term identification model by using the above-mentioned method include product names.

[0122] A3. Mark the product name in the user data information.

[0123] A4. Analyze the user data information marked with product names to determine user preferences, and recommend products to the user based on the user preferences.

[0124] (II) Music, movie ticket sales and other fields

[0125] B1. Obtain data information including names generated in a preset platform.

[0126] The preset platform includes but is not limited to a music platform, a movie ticketing platform, etc. The data information is data information including a person's name, for example, lyrics, music introduction, user comments, movie introduction, etc.

[0127] B2. Recognize the names of people in the data information based on the term recognition model.

[0128] The term recognition model is established by adopting the above-mentioned method for establishing the term recognition model, and the terms involved in establishing the term recognition model by adopting the above-mentioned method include names of people.

[0129] B3. Mark the name of the person in the data information.

[0130] B4. Analyze the data information marked with the names according to the preset name analysis rules to obtain statistical information on the names.

[0131] The annotated names include, but are not limited to, names of characters in lyrics or movies and TV shows, and names of actors (including singers and movie actors). Specifically, the user comments annotated with the names can be analyzed to obtain the user's preference for the person, and other movies and songs performed by the actor can be recommended to the user. The user's attention to each name can also be counted and ranked.

[0132] (III) Medical field

[0133] C1. Obtain medical data information.

[0134] Among them, medical data information includes diagnosis certificates, test reports, etc.

[0135] C2. Identify the medical names in the medical data information based on a term recognition model.

[0136] The term recognition model is established by using the above-mentioned method for establishing the term recognition model, and the terms involved in establishing the term recognition model by using the above-mentioned method include medical names, which include drug names and disease names.

[0137] C3. Highlight the medical name in the medical data information so that medical staff can quickly read valid information from the medical data information.

[0138] Further, according to the above-mentioned dialogue model training method embodiment, another embodiment of the present invention also provides a device for establishing a term recognition model, such as Figure 5 As shown, the device comprises:

[0139] An acquisition unit 21 is used to acquire a first training set, wherein the first training set includes annotated data obtained by annotating terms on a first corpus based on a preset automatic annotation method;

[0140] A deleting unit 22, configured to delete a certain proportion of term annotations in the first training set to obtain a second training set;

[0141] A first training unit 23, configured to perform model training based on the first training set to obtain a first term recognition model, and perform model training based on the second training set to obtain a second term recognition model;

[0142] A screening unit 24 is used to screen out annotated data that meets the term annotation quality requirements from the specific data set as a third training set according to the difference in losses obtained by performing term recognition on the specific data set using the first term recognition model and the second term recognition model respectively; the specific data set is annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus;

[0143] The second training unit 25 is used to perform model training using the third training set to obtain the final required term recognition model.

[0144] Optional, such as Figure 6 As shown, the screening unit 24 includes:

[0145] The tagging module 241 is used to perform terminology recognition on the original sentence corresponding to the annotated data in the specific data set using the first term recognition model and the second term recognition model respectively, and to tag the recognized terms; the original sentence is the sentence before the terminology is annotated based on the preset automatic tagging method;

[0146] A calculation module 242, configured to calculate, for the same original sentence, the labeling loss of the first term recognition model and the labeling loss of the second term recognition model, respectively, and calculate the difference between the labeling loss of the first term recognition model and the labeling loss of the second term recognition model to obtain the loss difference;

[0147] The screening module 243 is used to screen out the labeled data whose loss difference is greater than a preset threshold from the specific data set as the third training set.

[0148] Optionally, the calculation module 242 is used to calculate, for the same original sentence, the term annotation results of the first term recognition model and the term annotation results in the specific data set using a preset loss function to obtain the annotation loss of the first term recognition model; and for the same original sentence, using the preset loss function to calculate the term annotation results of the second term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the second term recognition model.

[0149] Optional, such as Figure 6 As shown, the device also includes:

[0150] The updating unit 26 is used for re-termining the corpus using the preset automatic annotation method based on the updated terminology dictionary if the terminology dictionary used by the preset automatic annotation method is updated; filtering out the annotation data that meets the terminology annotation quality requirements from the re-termined annotation data; and updating the final required terminology recognition model based on the filtered annotation data.

[0151] Optionally, the deleting unit 22 is used to randomly delete the certain proportion of term annotations in the first training set to obtain the second training set;

[0152] Alternatively, the field to which each term in the first training set belongs is determined, and a certain proportion of term annotations are randomly deleted for each field to obtain the second training set.

[0153] Optionally, the preset automatic labeling method is a remote supervision method.

[0154] The device for establishing a term recognition model provided by an embodiment of the present invention can, after annotating the corpus with terms based on a preset automatic annotation method to obtain annotated data, not directly randomly select a part of the annotated data for model training, but first screen out relatively comprehensively annotated annotated data (i.e., high-quality annotated data) from these annotated data, and then use the screened high-quality annotated data for model training, so as to obtain a term recognition model with a higher term recognition accuracy. Specifically, after selecting a part of the annotated data, it is used as the first training set, and the annotated data after deleting a certain proportion of the term annotations in the first training set is used as the second training set; secondly, a first term recognition model with relatively high quality is obtained based on the first training set, and a second term recognition model with relatively low quality is obtained based on the second training set; then, the difference between the loss of term recognition performed on a specific data set (i.e., data selected from other annotated data in the annotated corpus except the first training set) by the first term recognition model with relatively high quality and the loss of term recognition performed on the specific data set by the second term recognition model with relatively low quality is used to judge whether the quality of the term annotation originally performed on the specific data set meets the requirements, and the annotated data that meets the quality requirements is selected from the annotated data as the final training set required for model training for model training, thereby greatly improving the recognition accuracy of the term recognition model finally trained.

[0155] Further, according to the above-mentioned term identification method embodiment, another embodiment of the present invention also provides a term identification device, such as Figure 7 As shown, the device comprises:

[0156] An acquisition unit 31 is used to acquire user data information;

[0157] An identification unit 32, used to identify the product name in the user data information based on a term identification model; the term identification model is obtained by using the above-mentioned term identification model establishment method;

[0158] A marking unit 33, used to mark the product name in the user data information;

[0159] A determination unit 34, configured to determine user preferences by analyzing user data information labeled with product names;

[0160] The recommendation unit 35 is used to recommend products to the user according to the user's preferences.

[0161] Further, according to the above-mentioned term identification method embodiment, another embodiment of the present invention also provides a term identification device, such as Figure 8 As shown, the device comprises:

[0162] An acquisition unit 41 is used to acquire data information including a person's name generated in a preset platform;

[0163] The recognition unit 42 is used to recognize the name of the person in the data information based on the term recognition model; the term recognition model is obtained by using the above-mentioned term recognition model establishment method;

[0164] A marking unit 43, used to mark the name of a person in the data information;

[0165] The analyzing unit 44 is used to analyze the data information marked with the name according to the preset name analysis rules to obtain statistical information on the name.

[0166] Further, according to the above-mentioned term identification method embodiment, another embodiment of the present invention also provides a term identification device, such as Fig. 9 As shown, the device comprises:

[0167] An acquisition unit 51 is used to acquire medical data information;

[0168] An identification unit 52, used for identifying the medical name in the medical data information based on a terminology recognition model; the terminology recognition model is obtained by using the above-mentioned method for establishing the terminology recognition model;

[0169] The output unit 53 is used to highlight the medical name in the medical data information.

[0170] Furthermore, another embodiment of the present invention provides a storage medium, wherein the storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method as described above.

[0171] When the program stored in the storage medium provided by the embodiment of the present invention is executed, after annotating the corpus with terms based on a preset automatic annotation method to obtain annotated data, instead of directly randomly selecting a part of the annotated data for model training, relatively comprehensive annotated data (i.e., high-quality annotated data) is first screened out from these annotated data, and then the screened out high-quality annotated data is used for model training, so as to obtain a term recognition model with higher term recognition accuracy.

[0172] Furthermore, another embodiment of the present invention provides an electronic device, the electronic device comprising a storage medium and a processor;

[0173] The processor is adapted to implement each instruction;

[0174] The storage medium is suitable for storing a plurality of instructions;

[0175] The instructions are suitable for being loaded by the processor and executing the method as described above.

[0176] The electronic device provided by the embodiment of the present invention can, after annotating the terms in a corpus based on a preset automatic annotation method to obtain annotated data, not directly randomly select a part of the annotated data for model training, but first screen out relatively comprehensively annotated annotated data (i.e., high-quality annotated data) from these annotated data, and then use the screened high-quality annotated data for model training, so as to obtain a term recognition model with a higher term recognition accuracy.

[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0178] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.

[0179] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0180] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for disclosing an embodiment of the present invention.

[0181] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0182] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0183] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0184] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0185] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement the method and apparatus for establishing a term recognition model according to an embodiment of the present invention, and some or all functions of some or all components in the term recognition method and apparatus. The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0186] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for establishing a term recognition model. It is characterized in that The method comprises: Acquire a first training set, wherein the first training set includes annotated data obtained by annotating terms on a first corpus based on a preset automatic annotation method; Deleting a certain proportion of term annotations in the first training set to obtain a second training set; Performing model training based on the first training set to obtain a first term recognition model, and performing model training based on the second training set to obtain a second term recognition model; According to the difference in losses obtained by performing term recognition on a specific data set using the first term recognition model and the second term recognition model respectively, annotated data that meets the term annotation quality requirements are screened out from the specific data set as a third training set; the specific data set is annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus; Using the third training set to perform model training to obtain the final required term recognition model; Among them, according to the loss difference obtained by using the first term recognition model and the second term recognition model to perform term recognition on a specific data set respectively, the annotated data that meets the term annotation quality requirements are screened out from the specific data set as a third training set, including: using the first term recognition model and the second term recognition model to perform term recognition and annotation on the original data corresponding to the annotated data in the specific data set respectively to obtain the loss difference; according to the loss difference, the annotated data that meets the term annotation quality requirements are screened out from the specific data set as the third training set, wherein the original sentence is a sentence before term annotation is performed based on the preset automatic annotation method.

2. The method according to claim 1, It is characterized in that The step of respectively using the first term recognition model and the second term recognition model to perform term recognition and labeling on the original data corresponding to the labeled data in the specific data set to obtain the loss difference includes: For the same original sentence, respectively calculating the labeling loss of the first term recognition model and the labeling loss of the second term recognition model, and calculating the difference between the labeling loss of the first term recognition model and the labeling loss of the second term recognition model to obtain the loss difference; The method further comprises: selecting, from the specific data set, labeled data that meets the term labeling quality requirement according to the loss difference as the third training set, including: selecting, from the specific data set, labeled data whose loss difference is greater than a preset threshold as the third training set.

3. The method according to claim 2, It is characterized in that For the same original sentence, respectively calculating the labeling loss of the first term recognition model and the labeling loss of the second term recognition model includes: For the same original sentence, using a preset loss function, calculating the term annotation results of the first term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the first term recognition model; For the same original sentence, the preset loss function is used to calculate the term annotation results of the second term recognition model and the term annotation results in the specific data set to obtain the annotation loss of the second term recognition model.

4. The method according to claim 1, It is characterized in that If the term dictionary used by the preset automatic annotation method is updated, the method further includes: Based on the updated term dictionary, re-annotate the terminology of the corpus using the preset automatic annotation method; Filtering the annotated data that meets the term annotation quality requirements from the annotated data after the re-term annotation; The terminology recognition model required finally is updated based on the screened annotation data.

5. The method according to claim 1, It is characterized in that The step of deleting a certain proportion of the term annotations in the first training set to obtain the second training set comprises: Randomly deleting a certain proportion of term annotations in the first training set to obtain the second training set; Alternatively, the field to which each term in the first training set belongs is determined, and a certain proportion of term annotations are randomly deleted for each field to obtain the second training set.

6. The method according to any one of claims 1 to 5, It is characterized in that The preset automatic labeling method is a remote supervision method.

7. A term identification method, It is characterized in that The method comprises: Get user data information; Identify the product names in the user data information based on a term recognition model; the term recognition model is obtained by using the method for establishing a term recognition model according to any one of claims 1 to 6; Marking the product name in the user data information; By analyzing user data information labeled with product names, user preferences are determined, and products are recommended to the user based on the user preferences.

8. A term identification method, It is characterized in that The method comprises: Obtain data information including names generated in a preset platform; Recognize the names of people in the data information based on a term recognition model; the term recognition model is obtained by using the method for establishing a term recognition model according to any one of claims 1 to 6; Marking the name of the person in the data information; According to the preset name analysis rules, the data information marked with the name is analyzed to obtain statistical information on the name.

9. A term identification method, It is characterized in that The method comprises: Obtain medical data information; Identify the medical names in the medical data information based on a term recognition model; the term recognition model is obtained by using the method for establishing a term recognition model according to any one of claims 1 to 6; The medical name in the medical data information is highlighted.

10. A device for establishing a term recognition model, It is characterized in that The device comprises: An acquisition unit, configured to acquire a first training set, wherein the first training set includes annotated data obtained by annotating terms on a first corpus based on a preset automatic annotation method; a deleting unit, used for deleting a certain proportion of term annotations in the first training set to obtain a second training set; A first training unit, configured to perform model training based on the first training set to obtain a first term recognition model, and to perform model training based on the second training set to obtain a second term recognition model; A screening unit, configured to screen out annotated data that meets the term annotation quality requirement from the specific data set as a third training set according to a difference in losses obtained by performing term recognition on the specific data set using the first term recognition model and the second term recognition model respectively; the specific data set is annotated data after the second corpus is annotated with terms using the preset automatic annotation method; the first corpus and the second corpus belong to the same corpus; A second training unit is used to perform model training using the third training set to obtain a final required term recognition model; The screening unit is further used to screen out the annotated data that meets the term annotation quality requirements from the specific data set as a third training set according to the loss difference obtained by performing term recognition on the specific data set using the first term recognition model and the second term recognition model respectively through the following steps: performing term recognition and annotation on the original data corresponding to the annotated data in the specific data set using the first term recognition model and the second term recognition model respectively to obtain the loss difference; and screening out the annotated data that meets the term annotation quality requirements from the specific data set as the third training set according to the loss difference, wherein the original sentence is the sentence before term annotation is performed based on the preset automatic annotation method.

11. A terminology recognition device, It is characterized in that The device comprises: An acquisition unit, used for acquiring user data information; an identification unit, configured to identify the commodity name in the user data information based on a term identification model; the term identification model is obtained by using the method for establishing a term identification model according to any one of claims 1 to 6; A marking unit, used to mark the product name in the user data information; A determination unit, configured to determine user preferences by analyzing user data information labeled with product names; A recommendation unit is used to recommend products to the user according to the user's preferences.

12. A terminology recognition device, It is characterized in that The device comprises: An acquisition unit, used to acquire data information including names generated in a preset platform; A recognition unit, used for recognizing the name of a person in the data information based on a term recognition model; the term recognition model is obtained by using the method for establishing a term recognition model according to any one of claims 1 to 6; A marking unit, used to mark a person's name in the data information; The analysis unit is used to analyze the data information marked with the name according to the preset name analysis rules to obtain statistical information on the name.

13. A terminology recognition device, It is characterized in that The device comprises: An acquisition unit, used for acquiring medical data information; An identification unit, used for identifying the medical names in the medical data information based on a term identification model; the term identification model is obtained by using the method for establishing a term identification model according to any one of claims 1 to 6; The output unit is used to highlight the medical name in the medical data information.

14. A storage medium, It is characterized in that The storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 9.

15. An electronic device, It is characterized in that The electronic device includes a storage medium and a processor; The processor is adapted to implement each instruction; The storage medium is suitable for storing a plurality of instructions; The instructions are suitable for being loaded by the processor and executing the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Term extraction method and apparatus

    CN107544958A

  • Named entity recognition method and device, storage medium and terminal device

    CN110287480A