Standardized methods, apparatuses, devices, and computer-readable media for terminology

By obtaining word vectors of the original terms through contrastive learning training of the target language representation model, the low accuracy of existing terminology standardization processing schemes is solved, and higher matching accuracy is achieved.

CN115758168BActive Publication Date: 2026-02-06ANHUI IFLYHEALTH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211415096.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2026-02-06
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

Existing terminology standardization processing schemes calculate similarity by measuring the degree of text overlap between the original term and the standard term. This results in low accuracy in matching the standard term, and there are many cases where the original term and the standard term have a high degree of text overlap but do not actually match.

Method used

The target language representation model is used to learn and train the initial language representation model by comparing multiple term triples to obtain the word vectors of the original terms. The similarity between the word vectors of the original terms and the standard terms is calculated to determine the standard terms that match the original terms.

Benefits of technology

It improves the accuracy of matching standard terms and avoids identifying standard terms with high text overlap but no actual match as matching standard terms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115758168B_ABST
    Figure CN115758168B_ABST
Patent Text Reader

Abstract

The application provides a standardization method, device and equipment of a term and a computer readable medium. The method comprises the following steps: obtaining an original term, inputting the original term into a target language representation model, and obtaining and outputting a word vector of the original term from the target language representation model. The target language representation model is obtained by contrastive learning training of an initial language representation model through a plurality of term triplets. The term triplets comprise a term sample, a positive sample and a negative sample. The similarity between the original term and a standard term is calculated according to the word vector of the original term and the word vector of the standard term. Then, the standard term with the highest similarity to the original term is determined as the standard term matched with the original term. Since the target language representation model is obtained through contrastive learning of the plurality of term triplets, the accuracy of matching the standard term is improved, and the standard term with a high degree of coincidence with the text of the original term but not actually matched with the original term is avoided from being determined as the matched standard term.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of text processing, and in particular to a term standardization method, device, equipment and computer readable medium. BACKGROUND

[0002] In many fields such as medical treatment, construction engineering, and part manufacturing, terms in the field are often used. These terms have complex and diverse characteristics. For example, in the medical field, different terms may be used to express the same diagnosis, surgery, medicine, or symptom. In order to avoid the risk of inconsistency in the use of terms, it is often necessary to standardize complex terms. The existing term standardization processing scheme is to calculate the similarity between the original term (i.e., the term that needs to be standardized) and each standard term by using Jaccard, BM25, and other similarity algorithms. The standard term with the highest similarity to the original term is determined as the standard term that matches the original term, and the standardization of the original term is realized.

[0003] However, in the existing term standardization processing scheme, the similarity calculation is mainly performed by calculating the text overlap degree between the original term and the standard term. However, in actual applications, there are many cases where the text overlap degree between the original term and the standard term is high, but they are not actually matched, which leads to poor processing effect and low accuracy of matching standard terms in the existing term standardization processing scheme. For example, the text overlap degree between "coronary heart disease" and "heart disease" is high, but the standard term of "coronary heart disease" is not "heart disease". SUMMARY

[0004] Therefore, the embodiments of the present application provide a term standardization method, device, equipment and computer readable medium to improve the accuracy of matching standard terms.

[0005] To achieve the above object, the embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, the present application discloses a term standardization method, comprising:

[0007] obtaining an original term; wherein the original term is a term that needs to be standardized;

[0008] inputting the original term into a target language representation model, and obtaining and outputting a word vector of the original term by the target language representation model; wherein the word vector of the original term is used to represent a word meaning of the original term; the target language representation model is obtained by contrastive learning training of an initial language representation model by a plurality of term triplets; the term triplets comprise a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample; an actual standard term corresponding to the positive sample is consistent with an actual standard term corresponding to the term sample; an actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample;

[0009] For each standard term, a similarity between the original term and the standard term is calculated according to the word vector of the original term and a word vector of the standard term; wherein the word vector of the standard term is obtained by inputting the standard term into the target language representation model and outputted by the target language representation model;

[0010] The standard term with the highest similarity to the original term is determined as the standard term matched with the original term.

[0011] Optionally, in the above method for standardizing a term, the target language representation model is further obtained by contrastive learning training of an initial language representation model by a plurality of split information triplets; wherein the split information triplets comprise split information of a term sample, split information of a positive sample corresponding to the term sample, and split information of a negative sample corresponding to the term sample; the split information is used to explain an entity annotation result.

[0012] Optionally, in the above method for standardizing a term, before the similarity between the original term and the standard term is calculated according to the word vector of the original term and the word vector of the standard term for each standard term, the method further comprises:

[0013] split information of the original term is processed according to a target entity annotation model and the original term; wherein the target entity annotation model is obtained by training an initial entity annotation model by a plurality of term samples pre-annotated with entities;

[0014] The split information of the original term is input into the target language representation model, and a word vector of the split information of the original term is obtained and output by the target language representation model; wherein the word vector of the split information of the original term is used to explain a word meaning of the split information of the original term;

[0015] For each standard term, a similarity between the original term and the standard term is calculated according to the word vector of the original term and a word vector of the standard term; wherein the word vector of the standard term is obtained by inputting the standard term into the target language representation model and outputted by the target language representation model;

[0016] For each standard term, the similarity between the word vector of the original term and the word vector of the standard term is calculated, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term is calculated; wherein the word vector of the split information of the standard term is obtained by inputting the split information of the standard term into the target language representation model and outputting by the target language representation model; the split information of the standard term is obtained according to the standard term and the target entity annotation model processing;

[0017] According to the calculated similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, the similarity between the original term and the standard term is calculated.

[0018] Optionally, in the above-mentioned standardization method of the term, the training process of the target language representation model comprises:

[0019] A training set is constructed; wherein the training set comprises a plurality of term triplets;

[0020] According to the target entity annotation model and each sample included in the plurality of term triplets, the split information of each sample is processed; wherein the target entity annotation model is obtained by training an initial entity annotation model with a plurality of pre-annotated term samples;

[0021] Each sample included in the plurality of term triplets is input into an initial language representation model, and the word vector of each sample is obtained and output by the initial language representation model; and the split information of each sample is input into the initial language representation model, and the word vector of the split information of each sample is obtained and output by the initial language representation model;

[0022] According to the word vector of all the samples and the word vector of the split information of the samples, the final loss value of the initial language representation model is calculated; wherein the final loss value of the initial language representation model is used to indicate the processing effect of the initial language representation model; the lower the final loss value of the initial language representation model, the higher the similarity between the term sample and the positive sample of the term sample, and the lower the similarity between the term sample and the negative sample of the term sample;

[0023] According to the final loss value of the initial language representation model, parameters of the initial language representation model are adjusted until the final loss value of the adjusted initial language representation model meets a preset convergence condition, and the adjusted initial language representation model is determined as the target language representation model.

[0024] Optionally, in the standardization method of the term, the final loss value of the initial language representation model is calculated according to the word vectors of all the samples and the word vectors of the split information of the samples.

[0025] According to the word vectors of all the samples, a first loss value of the initial language representation model is calculated; wherein the first loss value is used to indicate the processing effect of the initial language representation model on the term triple; the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is.

[0026] According to the word vectors of the split information of all the samples, a second loss value of the initial language representation model is calculated; wherein the second loss value is used to indicate the processing effect of the initial language representation model on the split information triple; the lower the second loss value is, the higher the similarity between the word vector of the split information of the term sample and the word vector of the split information of the positive sample is, and the lower the similarity between the word vector of the split information of the term sample and the word vector of the split information of the negative sample is.

[0027] According to the first loss value and the second loss value of the initial language representation model, a final loss value of the initial language representation model is calculated.

[0028] Optionally, in the standardization method of the term, the training process of the target language representation model comprises:

[0029] A training set is constructed; wherein the training set comprises a plurality of term triples;

[0030] Each sample included in the plurality of term triples is respectively input into an initial language representation model, and a word vector of each sample is obtained and output by the initial language representation model;

[0031] According to the word vectors of all the samples, a first loss value of the initial language representation model is calculated; wherein the first loss value is used to indicate the processing effect of the initial language representation model on the term triple; the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is.

[0032] According to the first loss value of the initial language representation model, the parameters of the initial language representation model are adjusted until the first loss value of the adjusted initial language representation model meets the preset convergence condition, and the adjusted initial language representation model is determined as the target language representation model.

[0033] Optionally, in the standardization method of the term, the process of obtaining the negative sample corresponding to the term sample comprises:

[0034] From the plurality of negative example terms, one of the N negative example terms with the highest similarity to the term sample is selected as the negative sample corresponding to the term sample; or, from the plurality of negative example terms, one negative example term with a similarity greater than a first threshold to the term sample is selected as the negative sample corresponding to the term sample; wherein, the negative example term refers to a term whose corresponding actual standard term is inconsistent with the actual standard term corresponding to the term sample; N is a positive integer.

[0035] In a second aspect, the present application discloses a term standardization device, comprising:

[0036] An acquisition unit is configured to acquire a original term; wherein, the original term is a term that needs to be standardized;

[0037] A first processing unit is configured to input the original term into a target language representation model, and obtain and output a word vector of the original term by the target language representation model; wherein, the word vector of the original term is used to represent the word meaning of the original term; the target language representation model is obtained by contrastive learning training of an initial language representation model by a plurality of term triplets; the term triplets comprise a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample; the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample; the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample;

[0038] A first calculation unit is configured to calculate the similarity between the original term and a standard term according to the word vector of the original term and the word vector of the standard term for each standard term; wherein, the word vector of the standard term is obtained by inputting the standard term into the target language representation model and outputting by the target language representation model;

[0039] A determination unit is configured to determine the standard term with the highest similarity to the original term as the standard term matched with the original term.

[0040] In a third aspect, the present application discloses a computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method of any one of the above first aspect.

[0041] In a fourth aspect, the present application discloses a standardization device of a term, comprising:

[0042] one or more processors;

[0043] a storage device having one or more programs stored thereon;

[0044] When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of the above first aspect.

[0045] Based on the above-mentioned term standardization method provided by the embodiments of the present application, the word vector of the original term is obtained and output by the target language representation model by inputting the original term into the target language representation model. The word vector of the original term is used to represent the word meaning of the original term. Since the target language representation model is obtained by contrastive learning training of the initial language representation model through a plurality of term triplets, and the term triplet includes: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample, the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample, and the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample, therefore, the target language representation model learns the difference between the term sample and the negative sample corresponding to the term sample, and the similarity between the term sample and the positive sample corresponding to the term sample through contrastive learning training. Then, for each standard term, the similarity between the original term and the standard term is calculated according to the word vector of the original term and the word vector of the standard term, and when the standard term with the highest similarity with the original term is determined as the standard term matched with the original term, the accuracy of the determined standard term matched with the original term is high, and the standard term with high text coincidence degree but not actually matched with the original term will not be determined as the matched standard term. BRIEF DESCRIPTION OF DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.

[0047] Figure 1 A flowchart of the term standardization method disclosed by the embodiments of the present application;

[0048] Figure 2a A training flowchart of a target language representation model disclosed by an embodiment of the present application;

[0049] Figure 2b An entity annotation flowchart disclosed by an embodiment of the present application;

[0050] Figure 3 Another training flowchart of a target language representation model disclosed by an embodiment of the present application;

[0051] Figure 4 A flowchart of a method for calculating a final loss value of an initial language representation model disclosed by an embodiment of the present application;

[0052] Figure 5 A flowchart of another method for standardizing a term disclosed by an embodiment of the present application;

[0053] Figure 6 A term standardization flowchart of “right shoulder soft tissue contusion” and “right temporal parietal contusion” disclosed by an embodiment of the present application;

[0054] Figure 7 A structural schematic diagram of a term standardization device disclosed by an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0056] In the present application, the term “comprises”, “comprising”, or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without more limitations, the element defined by the phrase “comprising a” does not exclude the presence of additional identical elements in the process, method, article, or device including the element.

[0057] Referring to Figure 1 The embodiment of the present application discloses a method for standardizing a term, which is used to match a standard term for a term that needs to be standardized (i.e., the original term mentioned in the embodiment of the present application). The method specifically includes the following steps:

[0058] S101, acquire a original term, wherein the original term is a term that needs to be standardized.

[0059] The standardization processing is an operation of converting the original term into a corresponding standard term. The original term can be understood as a term that does not conform to the category of the standard term specified in the field, and therefore needs to be standardized. For example, in the medical field, the original term acquired in step S101 is right shoulder soft tissue contusion, which is not a standard term and needs to be converted into a corresponding standard term by performing Figure 1 The flow shown converts the right shoulder soft tissue contusion into a corresponding standard term. The original term acquired in step S101 can be in text format.

[0060] The number of original terms acquired in step S101 is not limited in the embodiments of the present application, and can be only one original term or multiple original terms. The standardization processing of any original term is applicable to Figure 1 The method shown.

[0061] For example, the scenario of performing step S101 can be that the user inputs a term that needs to be standardized (i.e., the original term) in the input box, and then the system acquires the original term input by the user, and then performs Figure 1 The flow shown. For another example, the scenario of performing step S101 can also be that an article is imported into the system, and the system acquires all terms mentioned in the article (i.e., the original term) from the article, and performs Figure 1 The method shown.

[0062] It should be noted that the way and process of acquiring the original term are not limited in the embodiments of the present application.

[0063] S102, input the original term into the target language representation model, and obtain and output the word vector of the original term by the target language representation model, wherein the word vector of the original term is used to represent the word meaning of the original term, and the target language representation model is obtained by contrastive learning training of the initial language representation model through a plurality of term triplets, the term triplets include: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample, the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample, and the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample.

[0064] The target language representation model is used to output a word vector (also referred to as a word representation), and the function of the target language representation model can also be understood as converting a text format term into a word vector representing the word meaning of the term in a vector form. Therefore, in step S102, when the original term is input into the target language representation model, the target language representation model processes the original term into a word vector of the original term, and then outputs the word vector of the original term. The word vector of the original term can represent the word meaning of the original term in a vector form.

[0065] The initial language representation model can be understood as a model before contrastive learning training using a plurality of term triplets, for example, a (Bidirectional Encoder Representations from Transformers, BERT) pre-training model can be selected as the initial language representation model. The model type of the initial language representation model is not limited in the embodiments of the present application. The target language representation model is a model obtained after contrastive learning training of the initial language representation model.

[0066] A term triplet is a set of data containing three samples. Specifically, the term triplet includes a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample. The term sample, the positive sample corresponding to the term sample, and the negative sample corresponding to the term sample can all be understood as samples for training a model (for example, the target language representation model in the embodiments of the present application). These samples can be obtained by searching the network, collecting the database, and the like. The collection method of the term sample is not limited in the embodiments of the present application.

[0067] For each term triplet, the actual standard term corresponding to the term sample in the term triplet is the same as the actual standard term corresponding to the positive sample. The actual standard term corresponding to the term sample is different from the actual standard term corresponding to the negative sample. The standard term refers to a term uniformly used in the art. The actual standard term corresponding to the term sample refers to the standard term actually matched by the term sample. Similarly, the actual standard term corresponding to the positive sample refers to the standard term actually matched by the positive sample, and the actual standard term corresponding to the negative sample refers to the standard term actually matched by the negative sample.

[0068] For each term triplet, the construction process of the term triplet can be: from a plurality of terms (hereinafter referred to as negative example terms) whose actual standard terms corresponding to the term sample are different, selecting the negative sample corresponding to the term sample. And from a plurality of terms (hereinafter referred to as positive example terms) whose actual standard terms corresponding to the term sample are the same, selecting the positive sample corresponding to the term sample.

[0069] It should be noted that one term sample can be in multiple different term triples. Specifically, in the process of constructing term triples, for a certain term sample, if n negative samples corresponding to the term sample are selected, N positive samples corresponding to the term sample are also selected. Then, for the term sample, n negative samples corresponding to the term sample, and N positive samples corresponding to the term sample, n*N term triples in which the term sample is located can be constructed. For example, a certain term sample has terms A and B as negative samples, and has term C as a positive sample. The term sample, term A, and term C form a term triple, and the term sample, term B, and term C form another term triple.

[0070] It should also be noted that the selected positive and negative samples can be standard terms or non-standard terms. For example, the actual standard term corresponding to the term sample can be directly selected as a positive sample, and the embodiments of the present application do not limit this.

[0071] Specifically, since the target language representation model is obtained by contrastively learning and training the initial language representation model based on multiple term triples, and the term triples include term samples, positive samples corresponding to the term samples, and negative samples corresponding to the term samples, the target language representation model can learn the similarities between the term samples and the positive samples corresponding to the term samples, and can learn the differences between the term samples and the negative samples corresponding to the term samples by contrasting the term samples and the positive samples corresponding to the term samples and the negative samples corresponding to the term samples. Furthermore, the similarity between the word vector of the term sample output by the target language representation model and the word vector of the positive sample corresponding to the term sample (hereinafter referred to as the positive sample) is large, and the similarity between the word vector of the term sample and the word vector of the negative sample corresponding to the term sample (hereinafter referred to as the negative sample) is small.

[0072] Optionally, in an embodiment of the present application, in order to improve the efficiency of the process of training the target language representation model, some negative example terms with high coincidence degree with the text of the term sample can be selected as the negative samples corresponding to the term sample. For example, for each term triple, the process of obtaining the negative samples corresponding to the term sample in the term triple includes:

[0073] From the multiple negative example terms, one of the N negative example terms with the highest similarity to the term sample is selected as the negative sample corresponding to the term sample. Alternatively, from the multiple negative example terms, one negative example term with a similarity greater than a first threshold to the term sample is selected as the negative sample corresponding to the term sample. The negative example term refers to a term whose corresponding actual standard term is inconsistent with the actual standard term corresponding to the term sample, and N is a positive integer.

[0074] The N negative example terms with the highest similarity to the term sample belong to the negative example terms with high similarity to the term sample in terms of text, characters, etc. One of the N negative example terms with the highest similarity to the term sample is selected as the negative sample corresponding to the term sample. The negative sample corresponding to the term sample has very high similarity to the term sample in terms of text or characters, and it is difficult to distinguish the negative sample from the term sample by text or characters. Therefore, selecting one of the N negative example terms with the highest similarity to the term sample as the negative sample corresponding to the term sample can enable the target language representation model to have the ability to distinguish the negative sample with very high text coincidence degree from the term sample, i.e., the target language representation model can make the similarity between the word vector of the negative sample and the word vector of the term sample low, achieving the purpose of distinguishing. The value of N can be set arbitrarily according to actual application scenarios, experience, etc. For example, N can be 1, i.e., the negative example with the highest similarity to the term sample is selected.

[0075] Similarly, one of the negative example terms with a similarity greater than the first threshold to the term sample is selected from the plurality of negative example terms. The negative example term also belongs to the term with high similarity to the term sample in terms of text, characters, etc., and can also have the effect of enabling the target language representation model to have the ability to distinguish the negative sample with very high text coincidence degree from the term sample. The first threshold can be set by experience, artificially, etc., and embodiments of the present application do not limit this.

[0076] For the negative example terms with low text coincidence degree to the term sample and large word meaning difference, the initial language representation model does not need to be trained by contrast learning, and it is easy to make the similarity between the word vector of the negative example term and the word vector of the term sample low. Therefore, preferentially selecting one of the N negative example terms with the highest similarity to the term sample or selecting one of the negative example terms with a similarity greater than the first threshold to the term sample as the negative sample can improve the training efficiency and enable the model to focus on distinguishing the term sample with high text coincidence degree from the negative sample corresponding to the term sample during the training process.

[0077] The similarity between the negative example term and the term sample can be calculated in many ways, for example, the similarity between the negative example term and the term sample can be calculated by Jaccard, BM25, or the like. For example, the Jaccard algorithm calculates the similarity between two texts by calculating the degree of overlap between the two texts, that is, in the embodiment of the present application, the similarity can be measured by calculating the ratio of the intersection and the union of the negative example term and the term sample. For example, the intersection of the two terms "surgical infection" and "medical infection" is 3 (i.e., 3 characters overlap), and the union is 4, so the similarity between them is 3 / 4, which is equal to 0.75. For another example, the negative example term and the term sample can also be represented by a vector based on a deep learning method, and then the Euclidean distance or cosine similarity of the word vector is calculated to measure the similarity between the negative example term and the term sample. For example, the word2vec or BERT model can be used to represent the negative example term and the term sample as a word vector, and then the Euclidean distance or cosine similarity between the two word vectors is calculated. The embodiment of the present application does not limit the way of calculating the similarity between the negative example term and the term sample.

[0078] It should be noted that there are many ways to obtain the negative sample corresponding to the term sample, for example, one of the plurality of negative example terms can be selected as the negative sample, and the embodiment of the present application does not limit this.

[0079] Optionally, there are many ways to obtain the positive sample corresponding to the term sample, for example, one of the positive example terms can be selected as the positive sample corresponding to the term sample, and the actual standard term corresponding to the term sample can also be directly selected as the positive sample corresponding to the term sample, and the embodiment of the present application does not limit this. Wherein, the positive example term is a term consistent with the actual standard term corresponding to the term sample.

[0080] It should be further noted that the positive sample, the negative sample corresponding to the term sample, and the term sample are actually all term samples, and the difference is that the positive sample and the negative sample corresponding to the term sample are selected based on the term sample.

[0081] Optionally, refer to Figure 2a In an embodiment of the present application, the training process of the target language representation model comprises:

[0082] S201, constructing a training set, wherein the training set comprises a plurality of term triples.

[0083] Wherein, the way of obtaining the term sample, the positive sample corresponding to the term sample, and the negative sample corresponding to the term sample in the term triple can refer to the foregoing description, which will not be repeated here.

[0084] S202, input each sample included in the plurality of term triplets into an initial language representation model respectively, and obtain and output a word vector of each sample by the initial language representation model.

[0085] Specifically, the execution process of step S202 can also be understood as inputting each term sample in the training set, the positive sample corresponding to the term sample, and the negative sample corresponding to the term sample into the initial language representation model respectively, and then the initial language representation model can obtain and output the word vector of each term sample, the word vector of the positive sample corresponding to the term sample, and the word vector of the negative sample corresponding to the term sample.

[0086] The word vector can also be understood as a low-dimensional dense numerical representation of the word meaning. The word vector of the term sample is used to represent the word meaning of the term sample, and by analogy, the word vector of the positive sample corresponding to the term sample is used to represent the word meaning of the positive sample corresponding to the term sample, and the word vector of the negative sample corresponding to the term sample is used to represent the word meaning of the negative sample corresponding to the term sample.

[0087] The initial language representation model can select a model for representing semantics (such as word meaning), such as a BERT model, a word2vec model, etc.

[0088] S203, according to the word vectors of all samples, a first loss value of the initial language representation model is calculated, wherein the first loss value is used to indicate the processing effect of the initial language representation model on the term triplets, and the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is.

[0089] In step S203, the processing effect of the initial language representation model on the term triplets indicated by the first loss value can be understood as the processing effect of the initial language representation model on the similarity between the word vector of the term sample and the word vector of the positive sample in the term triplets, and the difference between the word vector of the term sample and the word vector of the negative sample in the term triplets, that is, for each term triplet, the higher the similarity between the word vector of the term sample and the word vector of the positive sample output by the initial language representation model in the term triplet, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample, the better the processing effect of the initial language representation model, that is, the lower the first loss value calculated.

[0090] Optionally, in an embodiment of the present application, the step S203 is performed by calculating the loss value of each term triple according to the word vector corresponding to the term triple, and then calculating the first loss value according to the loss value of each term triple. The loss value of a term triple is used to indicate the processing effect of the initial language representation model on the term triple. The word vector corresponding to the term triple includes the word vector of the term sample, the word vector of the positive sample, and the word vector of the negative sample. The word vector corresponding to the term triple can be understood as a combination of word vectors belonging to the same term triple in all word vectors output by the initial language representation model.

[0091] Optionally, in another embodiment of the step S203, the embodiment includes: for each term triple, substituting the word vector of the term sample in the term triple, the word vector of the positive sample corresponding to the term sample, and the word vector corresponding to all term triples into the first loss function to calculate the loss value of the term triple. Then the loss value of the term triple can be used as the first loss value, and the model parameters are adjusted according to the first loss value. The sum of the loss values of all term triples can also be used as the first loss value, and the model parameters are adjusted according to the first loss value.

[0092] wherein the first loss function is: wherein, is the loss value of the i-th term triple. i is the word vector of the term sample in the i-th term triple, is the word vector of the positive sample corresponding to the term sample in the i-th term triple, and N is the total number of input term triples, is the word vector of the negative sample in the j-th term triple, is the word vector of the positive sample in the j-th term triple, and τ is a hyperparameter used for normalizing the similarity. sim() represents a function for calculating the cosine similarity.

[0093] S204, adjusting the parameters of the initial language representation model according to the first loss value of the initial language representation model, until the first loss value of the adjusted initial language representation model meets the preset convergence condition, and determining the adjusted initial language representation model as the target language representation model.

[0094] Specifically, the process of performing step S204 is: after step S203 calculates the first loss value of the initial language representation model, adjusting the parameters of the initial language representation model according to the first loss value, and then re-executing steps S203 to S204, until the first loss value of the adjusted initial language representation model meets the preset convergence condition, the adjusted initial language representation model is determined as the target language representation model. The preset convergence condition can be that the first loss value is lower than the first loss value threshold.

[0095] Since the first loss value can reflect the processing effect of the initial language representation model on the term triplets, after adjusting the parameters of the initial language representation model according to the first loss value of the initial language representation model, the ability of the adjusted initial language representation model to distinguish the difference between the term sample and the negative sample corresponding to the term sample and the ability to identify the similarity between the term sample and the positive sample corresponding to the term sample will become stronger and stronger, until the target language representation model that meets the preset convergence condition is obtained.

[0096] Optionally, in an embodiment of the present application, the target language representation model is also obtained by contrastive learning training of the initial language representation model through a plurality of split information triplets. The split information triplet includes: split information of the term sample, split information of the positive sample corresponding to the term sample, and split information of the negative sample corresponding to the term sample, and the split information is used to explain the entity annotation result.

[0097] The entity annotation result is used to explain the entity category of each word. For example, the entity category of each word in the term "right wrist soft tissue injury" is: right side is the direction category, wrist is the main part category, soft tissue is the secondary part category, and injury is the symptom description category. The split information triplet has a one-to-one correspondence with the term triplet. That is, by processing each sample in the term triplet, the split information of each sample in the term triplet is obtained, and the split information of each sample in the term triplet is combined into a split information triplet. In the contrastive learning training process of the target language representation model, in addition to contrasting the difference and similarity between the texts of the three samples in the term triplet, the difference and similarity between the split information of the three samples in the term triplet can also be contrasted. Compared with the text information of the term triplet, the split information is more fine-grained information. In the training process of the target language representation model: if the split information triplet is also used for contrastive learning training, then the target language representation model can further improve the ability to distinguish the term sample and the negative sample corresponding to the term sample by learning the similarity between the split information of the term sample and the split information of the positive sample corresponding to the term sample, and learning the difference between the split information of the term sample and the split information of the negative sample corresponding to the term sample.

[0098] In the embodiments of the present application, the essence of the target language representation model performing contrastive learning is to make the word vectors of samples with different meanings in the term triplets have greater differences through training. The samples in the input term triplets of the contrast model are actually in text format. When using the term triplets for contrastive learning training, the text is taken as a whole for contrastive learning training. Splitting the information triplets is more fine-grained entity granularity information compared to the overall text information of the samples, which can make up for the loss in the overall text information part, so that the distinguishing effect of the model is better.

[0099] Optionally, in an embodiment of the present application, the construction process of the split information triplets is as follows:

[0100] According to the target entity annotation model and each sample included in the plurality of term triplets in the training set, split information of each sample is processed. The target entity annotation model is obtained by training an initial entity annotation model using a plurality of pre-annotated term samples.

[0101] The initial entity annotation model can be understood as an initial model before being trained using a plurality of pre-annotated term samples. The initial entity annotation model can be selected from BERT-CRF, a general information extraction unified framework, BERT+MRC, etc. The embodiments of the present application do not limit the model type of the initial entity annotation model.

[0102] The pre-annotated term sample can be understood as a term sample that has been pre-annotated with entity categories. Taking the term sample "right wrist soft tissue injury" as an example, the term sample can be split into three entities: right side, wrist, soft tissue, and injury, wherein the entity category of the right side is orientation, the entity category of the wrist is main part, the entity category of the soft tissue is secondary part, and the entity category of the injury is symptom description. Therefore, when pre-annotating the term sample, the annotation rule according to BIO can be used. Specifically, the three characters "soft", "group", and "weave" in "right wrist soft tissue injury" can be pre-annotated as three categories of B-secondary part, I-secondary part, and I-secondary part. Combining the B at the beginning and the continuous I of the same type into a word, it can be known that "soft tissue" is "secondary part". Thus, the purpose of named entity recognition is achieved. Similarly, the right side in "right wrist soft tissue injury" can be annotated as B-orientation and I-orientation, respectively, the wrist can be annotated as B-main part and I-main part, the soft tissue can be annotated as B-secondary part and I-secondary part, and the injury can be annotated as B-symptom description and I-symptom description. After pre-annotating a plurality of term samples, they are input into the initial entity annotation model for training, and a target entity annotation model with entity annotation function is obtained.

[0103] For example, taking BERT-CRF as the initial entity annotation model, the BERT layer is used to obtain the word representation of each character in the sample, that is, the word vector. Then, this word vector is fed into CRF to learn the transition relationship between characters. Finally, BERT-CRF obtains the entity annotation result of the sample.

[0104] Since the target entity annotation model can perform entity recognition and annotation on term samples, it is possible to obtain the splitting information of each sample based on the target entity annotation model and each sample included in multiple term triples in the training set. The splitting information of the sample can explain the entity annotation result of the sample.

[0105] Optionally, one implementation method involves processing each sample based on the target entity annotation model and each sample included in multiple term triples in the training set to obtain the splitting information of each sample, including:

[0106] Each sample in multiple term triples is input into the target entity annotation model, which then obtains and outputs the entity annotation result for each sample. For each sample, the entity annotation result is then transformed to obtain the sample's splitting information.

[0107] Specifically, the format of the entity annotation results output by the target entity annotation model cannot be directly used in the contrastive learning training process of the target language representation model. Therefore, it is necessary to transform the entity annotation results of the sample to obtain the sample's split information. The sample's split information is used to describe the entity annotation results of the sample, and the format of the sample's split information can be processed by the target language representation model.

[0108] For example, such as Figure 2b As shown, taking BERT-CRF as the target entity annotation model as an example, the term sample "right wrist soft tissue injury" is input into the target entity annotation model. After passing through the BERT layer and CRF layer in the target entity annotation model, the entity annotation results corresponding to each character are obtained. In "right wrist soft tissue injury," the characters "soft," "tissue," and "organism" are labeled as B-sub-location, I-sub-location, and I-sub-location, respectively. "Right" in "right wrist soft tissue injury" is labeled as B-direction and I-direction, "wrist" as B-major location and I-major location, "soft tissue" as B-sub-location and I-sub-location, and "injury" as B-symptom description and I-symptom description. After the target entity annotation model outputs this entity annotation result, the entity annotation result of the term sample is further transformed to obtain the split information that can be processed by the target language representation model.

[0109] For example, a special character can be used to represent an entity category, and then according to the entity annotation result of the sample, the special character corresponding to the entity category of the sample is added to the sample to obtain the split information of the sample. For example, taking the term sample "right wrist soft tissue injury" as an example, after the term sample "right wrist soft tissue injury" is input into the target entity annotation model, the obtained and output entity annotation result is: the entity category of "right side" is direction, the entity category of "wrist" is main part, the entity category of "soft tissue" is secondary part, and the entity category of "injury" is symptom description. When converting the entity annotation result, the special character [unused1] can be used to represent "direction", the special character [unused2] can be used to represent "main part", the special character [unused3] can be used to represent "secondary part", and the special character [unused4] can be used to represent "symptom description". Then, "right wrist soft tissue injury" can be converted into "[unused1] right [unused2] wrist [unused3] soft tissue [unused4] injury" split information.

[0110] Optionally, referring to Figure 3 In another embodiment of the present application, if the target language representation model is obtained by further comparative learning training of the initial language representation model through a plurality of split information triplets, the training process of the target language representation model can be:

[0111] S301, constructing a training set, wherein the training set includes a plurality of term triplets.

[0112] The process and principle of performing step S301 can be referred to the aforementioned Figure 2a step S201, which will not be described here.

[0113] S302, according to the target entity annotation model and each sample included in the plurality of term triplets, processing to obtain the split information of each sample, wherein the target entity annotation model is obtained by training the initial entity annotation model through a plurality of pre-annotated term samples.

[0114] The process and principle of processing to obtain the split information of each sample according to the target entity annotation model and each sample included in the plurality of term triplets can be referred to the aforementioned related introduction of the construction process of the split information triplet, which will not be described here.

[0115] S303, inputting each sample included in the plurality of term triplets into the initial language representation model respectively, and obtaining and outputting the word vector of each sample by the initial language representation model.

[0116] The execution process and principle of step S303 can be referred to the aforementioned Figure 2aThe step S202 is described above and will not be repeated here.

[0117] S304, inputting the split information of each sample into the initial language representation model to obtain and output the word vector of the split information of each sample by the initial language representation model.

[0118] In the split information of each sample, the split information of the term sample, the split information of the positive sample corresponding to the term sample, and the split information of the negative sample corresponding to the term sample are combined into a split information triple, therefore, step S304 can also be understood as inputting the split information of each sample included in all split information triples into the initial language representation model, and then obtaining and outputting the word vector corresponding to all split information triples by the initial language representation model. The word vector corresponding to the split information triple includes: the word vector of the split information of the term sample, the word vector of the split information of the positive sample corresponding to the term sample, and the word vector of the split information of the negative sample corresponding to the term sample.

[0119] The execution sequence of step S304 and step S303 is not limited in the embodiments of the present application. The execution process and principle of step S304 are similar to those of step S303, and the only difference is that step S303 inputs each sample included in multiple term triples, and then obtains the word vector of the sample. In step S304, the input is the split information of the sample, and then the word vector of the split information is obtained.

[0120] S305, calculating the final loss value of the initial language representation model according to the word vector of all samples and the word vector of the split information of the sample, wherein the final loss value of the initial language representation model is used to indicate the processing effect of the initial language representation model, and the lower the final loss value of the initial language representation model, the higher the similarity between the term sample and the positive sample of the term sample, and the lower the similarity between the term sample and the negative sample of the term sample.

[0121] In the embodiments of the present application, since the final loss value is calculated according to the word vector of all samples and the word vector of the split information of the sample processed by the initial language representation model, the processing effect indicated by the final loss value can be understood as: the processing effect of the initial language representation model on the similarity between the word vector of the term sample in the term triple and the word vector of the positive sample, and the difference between the word vector of the term sample in the term triple and the word vector of the negative sample; and the processing effect of the initial language representation model on the similarity between the word vector of the split information of the term sample in the split information triple and the word vector of the split information of the positive sample, and the difference between the word vector of the split information of the term sample in the split information triple and the word vector of the split information of the negative sample.

[0122] According to the parameter adjustment of the final loss value of the embodiment of the present application, the model can learn the similarity between the word vector of the term sample in the term triple and the word vector of the positive sample, and the difference between the word vector of the term sample and the word vector of the negative sample. The model can also learn the similarity between the word vector of the split information of the term sample in the split information triple and the word vector of the split information of the positive sample, and the difference between the word vector of the split information of the term sample and the word vector of the split information of the negative sample. Further, the target language representation model obtained through the final training has the ability to distinguish the term sample and the negative sample corresponding to the term sample.

[0123] Optionally, referring to Figure 4 In an embodiment of the present application, an implementation of step S305 is performed, including:

[0124] S401, according to the word vector of all samples, the first loss value of the initial language representation model is calculated, wherein the first loss value is used to indicate the processing effect of the initial language representation model on the term triple, the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is.

[0125] The execution process and principle of step S401 can be referred to the foregoing Figure 2a The step S203 is shown, and details are not repeated here.

[0126] S402, according to the word vector of the split information of all samples, the second loss value of the initial language representation model is calculated, wherein the second loss value is used to indicate the processing effect of the initial language representation model on the split information triple, the lower the second loss value is, the higher the similarity between the word vector of the split information of the term sample and the word vector of the split information of the positive sample is, and the lower the similarity between the word vector of the split information of the term sample and the word vector of the split information of the negative sample is.

[0127] Specifically, the second loss value used to indicate the processing effect of the initial language representation model on the split information triple can be understood as the processing effect of the initial language representation model on the similarity between the word vector of the split information of the term sample in the split information triple and the word vector of the split information of the positive sample, and the difference between the word vector of the split information of the term sample and the word vector of the split information of the negative sample, that is, for each split information triple, the higher the similarity between the word vector of the split information of the term sample and the word vector of the split information of the positive sample output by the initial language representation model in the split information triple is, and the lower the similarity between the word vector of the split information of the term sample and the word vector of the split information of the negative sample is, the better the processing effect of the initial language representation model is, that is, the lower the calculated second loss value is.

[0128] Optionally, in an embodiment of the present application, the step S402 is performed by calculating the loss value of each split information triple according to the word vector corresponding to each split information triple, and then calculating the second loss value according to the loss value of each split information triple. The loss value of a split information triple is used to indicate the processing effect of the initial language representation model on the split information triple. The word vector corresponding to the split information triple includes the word vector of the split information of the term sample, the word vector of the split information of the positive sample, and the word vector of the split information of the negative sample. The word vector corresponding to the split information triple can be understood as a combination of the word vectors belonging to the same split information triple in all the word vectors output by the initial language representation model.

[0129] Optionally, in another embodiment of the step S402, the embodiment includes: for each split information triple, substituting the word vector of the split information of the term sample in the split information triple, the word vector of the corresponding positive sample of the term sample, and the word vector corresponding to all split information triples into the second loss function to calculate the loss value of the split information triple. Then the loss value of the split information triple can be used as the second loss value, and the model parameters are adjusted according to the second loss value. The sum of the loss values of all split information triples can also be used as the second loss value, and the model parameters are adjusted according to the second loss value.

[0130] wherein the second loss function is: wherein, is the loss value of the i-th split information triple. i is the word vector of the split information of the term sample in the i-th split information triple, is the word vector of the split information of the positive sample in the i-th split information triple, and N is the total number of input split information triples, is the word vector of the split information of the negative sample in the j-th split information triple, is the word vector of the split information of the positive sample in the j-th split information triple, and τ is a hyperparameter used for normalizing the similarity. sim() represents a function for calculating the cosine similarity.

[0131] S403, calculating the final loss value of the initial language representation model according to the first loss value and the second loss value of the initial language representation model.

[0132] The first loss value is used to indicate a processing effect of the initial language representation model on the term triple, and the second loss value is used to indicate a processing effect of the initial language representation model on the split information triple. The split information triple can effectively amplify the rationality of the word meaning represented by the word vector corresponding to the term triple. By combining the first loss value and the second loss value of the initial language representation model, a final loss value that can measure the processing effect of the initial language representation model can be obtained. The smaller the final loss value is, the better the rationality of the word meaning represented by the word vector output by the initial language representation model is, and the easier it is to distinguish the term sample and the negative sample corresponding to the term sample.

[0133] Optionally, in an embodiment of the present application, the final loss value of the initial language representation model can be calculated according to the first loss value, the second loss value and a hyperparameter of the initial language representation model. The hyperparameter is a parameter for balancing the contrast loss of the sample in the term triple and the contrast loss of the split information in the split information triple.

[0134] For example, for each term triple, the loss value of the term triple and the loss value of the corresponding split information triple are substituted into the third loss function formula to calculate the final loss value of the term triple. Then, the final loss value of the term triple can be used as the final loss value of the current initial language representation model for parameter adjustment, or the sum of the final loss values of all term triples can be used as the final loss value of the current initial language representation model for parameter adjustment.

[0135] The third loss function formula is: wherein, is the loss value of the i th term triple, and λ is a hyperparameter, is the loss value of the i th split information triple, is the final loss value of the i th term triple.

[0136] S306, according to the final loss value of the initial language representation model, adjusting the parameters of the initial language representation model until the final loss value of the adjusted initial language representation model meets the preset convergence condition, and determining the adjusted initial language representation model as the target language representation model.

[0137] The parameters of the initial language representation model are adjusted according to the final loss value, and then steps S303 to S306 are re-executed until the final loss value of the adjusted initial language representation model meets the preset convergence condition, and the adjusted initial language representation model is determined as the target language representation model. The preset convergence condition can be that the final loss value is lower than the second loss value threshold.

[0138] Since the final loss value can reflect the processing effect of the initial language representation model on the terminology triplets, after adjusting the parameters of the initial language representation model according to the final loss value of the initial language representation model, the ability of the adjusted initial language representation model to distinguish the difference between the negative sample corresponding to the terminology sample and the terminology sample and the ability of the adjusted initial language representation model to identify the similarity between the positive sample corresponding to the terminology sample and the terminology sample will become stronger and stronger until the target language representation model that meets the preset convergence condition is obtained.

[0139] S103、for each standard terminology, according to the word vector of the original terminology and the word vector of the standard terminology, the similarity between the original terminology and the standard terminology is calculated, wherein the word vector of the standard terminology is obtained by inputting the standard terminology into the target language representation model and output by the target language representation model.

[0140] After obtaining the word vector of the original terminology through the target language representation model in step S102, the similarity between the original terminology and each standard terminology is calculated respectively. Specifically, for each standard terminology, the similarity between the word vector of the original terminology and the word vector of the standard terminology can be calculated, and then the similarity between the original terminology and the standard terminology is obtained.

[0141] The similarity between the word vector of the original terminology and the word vector of the standard terminology can be the Euclidean distance or the cosine similarity between the word vector of the original terminology and the word vector of the standard terminology. The embodiments of the present application do not limit the way of calculating the similarity between the original terminology and the standard terminology according to the word vector of the original terminology and the word vector of the standard terminology.

[0142] The word vector of the standard terminology is obtained by inputting the standard terminology into the target language representation model and output by the target language representation model, and the specific process is similar to the process of obtaining the word vector of the original terminology, which will not be repeated here. Since the standard terminology is fixed, the word vector of each standard terminology can be calculated in advance, and then the pre-calculated word vector of each standard terminology is used to execute step S103. Alternatively, when executing step S103, for each standard terminology, the standard terminology is input into the target language representation model, and the word vector of the standard terminology is obtained and output by the target language representation model, and then the similarity between the original terminology and the standard terminology is calculated according to the word vector of the original terminology and the word vector of the standard terminology.

[0143] Since the target language representation model used in step S102 is obtained by contrastive learning training of the initial language representation model by multiple term triplets, the target language representation model learns the difference between the term sample and the negative sample corresponding to the term sample, and the similarity between the term sample and the positive sample corresponding to the term sample through contrastive learning training. The word vector of the original term and the word vector of the standard term output by the target language representation model can more reasonably represent the word meaning. Then, when the similarity between the original term and the standard term with high text coincidence degree but actually not matching is calculated in step S103, a lower similarity is calculated.

[0144] S104, determining the standard term with the highest similarity to the original term as the standard term matching the original term.

[0145] By obtaining the similarity between the original term and each standard term in step S103, the standard term with the highest similarity to the original term is selected as the standard term matching the original term, that is, the standard term with the highest similarity to the original term is considered as the actual standard term of the original term.

[0146] The term standardization method provided by the embodiment of the application inputs the original term into the target language representation model to obtain and output the word vector of the original term by the target language representation model. The word vector of the original term is used to represent the word meaning of the original term. Since the target language representation model is obtained by contrastive learning training of the initial language representation model by multiple term triplets, and the term triplet includes: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample, the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample, and the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample, therefore, the target language representation model learns the difference between the term sample and the negative sample corresponding to the term sample, and the similarity between the term sample and the positive sample corresponding to the term sample through contrastive learning training. Then, when the similarity between the original term and each standard term is calculated according to the word vector of the original term and the word vector of the standard term, and the standard term with the highest similarity to the original term is determined as the standard term matching the original term, the accuracy of the determined standard term matching the original term is high, and the standard term with high text coincidence degree but actually not matching the original term will not be determined as the matching standard term.

[0147] Reference Figure 5If the target language representation model in the embodiment of the present application is also obtained by training the initial language representation model through multiple split information triplets, based on the above-mentioned standardization method of terms proposed in the embodiment of the present application, another standardization method of terms is also proposed in the embodiment of the present application, which further improves the accuracy of matching the standard terms by using the split information of the original terms and the split information of the standard terms in the process of matching the original terms with the standard terms. Specifically, Figure 5 The method shown includes the following steps:

[0148] S501, obtaining an original term, wherein the original term is a term that needs to be standardized.

[0149] The execution process and principles of step S501 can be referred to the aforementioned step S101, which will not be described here.

[0150] S502, inputting the original term into the target language representation model to obtain and output the word vector of the original term by the target language representation model, wherein the word vector of the original term is used to represent the word meaning of the original term, and the target language representation model is obtained by training the initial language representation model through multiple term triplets and multiple split information triplets.

[0151] The term triplet includes: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample, the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample, and the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample. The split information triplet includes: split information of the term sample, split information of the positive sample corresponding to the term sample, and split information of the negative sample corresponding to the term sample, and the split information is used to explain the entity annotation result.

[0152] The construction process of the target language representation model can be referred to the related description of the aforementioned Figure 3 part, which will not be described here. The execution process of step S502 can be referred to the aforementioned step S102, which will not be described here.

[0153] S503, obtaining the split information of the original term according to the target entity annotation model and the original term, wherein the target entity annotation model is obtained by training the initial entity annotation model through multiple pre-annotated term samples.

[0154] The execution process and principles of step S503 can be referred to the aforementioned related introduction of "obtaining the split information of each sample according to the target entity annotation model and the multiple term triplets in the training set", which will not be described here.

[0155] S504, input the split information of the original term into the target language representation model, obtain and output the word vector of the split information of the original term by the target language representation model, wherein the word vector of the split information of the original term is used to indicate the word meaning of the split information of the original term.

[0156] The difference between steps S504 and S502 is that the target language representation model in step S504 processes the original term, and thus obtains the word vector of the original term, while the target language representation model in step S504 processes the split information of the original term, and thus obtains the word vector of the split information of the original term. The word vector of the split information of the original term is used to represent the word meaning of the split information of the original term, i.e., the word meaning of the entity annotation result of the original term. The word vector of the original term is used to represent the word meaning of the original term itself. The execution process and principle of step S504 can refer to the foregoing step S502, which will not be described here.

[0157] The execution sequence between steps S503-S504 and steps S501-S502 is not limited in the embodiments of the present application.

[0158] S505, for each standard term, calculate the similarity between the word vector of the original term and the word vector of the standard term, and calculate the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, wherein the word vector of the split information of the standard term is obtained by inputting the split information of the standard term into the target language representation model and outputting by the target language representation model, and the split information of the standard term is obtained according to the standard term and the target entity annotation model.

[0159] The calculation process and principle of the similarity between the word vector of the original term and the word vector of the standard term can refer to the related content in the foregoing step S103, which will not be described here. The acquisition process of the word vector of the standard term can also refer to the related content in the foregoing step S103, which will not be described here.

[0160] The calculation process of the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term is also similar to the process of the similarity between the word vector of the original term and the word vector of the standard term. The similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term can be the Euclidean distance or the cosine similarity between the word vector of the split information of the split information of the original term and the word vector of the split information of the standard term. The embodiments of the present application do not limit the way of calculating the similarity between the split information of the original term and the split information of the standard term according to the word vector of the split information of the original term and the word vector of the split information of the standard term.

[0161] The obtaining process of the word vector of the split information of the standard term is: obtaining the split information of the standard term according to the standard term and the target entity labeling model. Then the split information of the standard term is input into the target language representation model to obtain and output the word vector of the split information of the standard term. Wherein, the process and principle of obtaining the split information of the standard term according to the standard term and the target entity labeling model can refer to the related introduction of step S302, and the only difference is that the processing object of the target entity labeling model is different.

[0162] S506, according to the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, the similarity between the original term and the standard term is calculated.

[0163] When the original term and the standard term are similar, the word vector of the original term will be similar to the word vector of the standard term, and the word vector of the split information of the original term will also be similar to the word vector of the split information of the standard term, so the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, can reflect the similarity between the original term and the standard term, by combining the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, the similarity between the original term and the standard term can be calculated. And since the similarity between the original term and the standard term calculated in step S506 considers both the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term, which is more granular, it can more accurately reflect the similarity between the original term and the standard term, and thus the accuracy of the standard term matched in subsequent step S507 according to the similarity is higher.

[0164] Optionally, the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term can be averaged, and the average value obtained is taken as the similarity between the original term and the standard term. The similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term can also be summed according to the preset weight to obtain the similarity between the original term and the standard term.

[0165] S507, the standard term with the highest similarity with the original term is determined as the standard term matched with the original term.

[0166] The execution process and principle of step S507 can refer to the aforementioned step S104, and will not be described here.

[0167] For example, the processing process of the embodiment of the present application for the two original terms "right shoulder soft tissue contusion" and "right temporal top abrasion" is as shown in the following table: Figure 6 The original terms "right shoulder soft tissue contusion" and "right temporal top abrasion" are respectively input into the target language representation model, and the word vector of "right shoulder soft tissue contusion" and the word vector of "right temporal top abrasion" are obtained and output by the target language representation model. The original terms "right shoulder soft tissue contusion" and "right temporal top abrasion" are also respectively input into the target entity annotation model, and the split information of "right shoulder soft tissue contusion" and the split information of "right temporal top abrasion" are obtained. Then the split information of "right shoulder soft tissue contusion" and the split information of "right temporal top abrasion" are respectively input into the target language representation model, and the word vector of the split information of "right shoulder soft tissue contusion" and the word vector of the split information of "right temporal top abrasion" are output by the target language representation model. The word vector of "right shoulder soft tissue contusion", the word vector of "right temporal top abrasion", the word vector of the split information of "right shoulder soft tissue contusion", and the word vector of the split information of "right temporal top abrasion" are respectively input into the standard term library, and the standard term with the highest similarity to "right shoulder soft tissue contusion" is found in the standard term library according to the word vector of "right shoulder soft tissue contusion" and the word vector of the split information of "right shoulder soft tissue contusion", and the standard term with the highest similarity to "right temporal top abrasion" is found in the standard term library according to the word vector of "right temporal top abrasion" and the word vector of the split information of "right temporal top abrasion". After matching, the standard term matched with "right shoulder soft tissue contusion" is: shoulder soft tissue contusion. The standard term matched with "right temporal top abrasion" is: right temporal top skin abrasion.

[0168] Referring to Figure 7 Based on the above-mentioned standardization method of terms proposed by the embodiment of the present application, the embodiment of the present application correspondingly discloses a standardization device of terms, which comprises an acquisition unit 701, a first processing unit 702, a first calculation unit 703, and a determination unit 704.

[0169] The acquisition unit 701 is configured to acquire an original term; wherein the original term is a term that needs to be standardized;

[0170] The first processing unit 702 is configured to input the original term into a target language representation model, and obtain and output a word vector of the original term from the target language representation model; wherein the word vector of the original term is used to represent a word meaning of the original term; the target language representation model is obtained by performing contrastive learning training on an initial language representation model based on a plurality of term triplets; the term triplets comprise a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample; an actual standard term corresponding to the positive sample is consistent with an actual standard term corresponding to the term sample; an actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample.

[0171] Optionally, the target language representation model is further obtained by performing contrastive learning training on the initial language representation model based on a plurality of split information triplets; wherein the split information triplets comprise split information of the term sample, split information of the positive sample corresponding to the term sample, and split information of the negative sample corresponding to the term sample; the split information is used to explain an entity annotation result.

[0172] The first computing unit 703 is configured to, for each standard term, calculate a similarity between the original term and the standard term based on the word vector of the original term and a word vector of the standard term; wherein the word vector of the standard term is obtained by inputting the standard term into the target language representation model and output from the target language representation model.

[0173] The determining unit 704 is configured to determine a standard term with the highest similarity to the original term as a standard term matched with the original term.

[0174] Optionally, the term standardization apparatus further comprises a second processing unit and a third processing unit.

[0175] The second processing unit is configured to obtain split information of the original term based on a target entity annotation model and the original term; wherein the target entity annotation model is obtained by training an initial entity annotation model based on a plurality of term samples pre-annotated with entities.

[0176] The third processing unit is configured to input the split information of the original term into the target language representation model, and obtain and output a word vector of the split information of the original term from the target language representation model; wherein the word vector of the split information of the original term is used to represent a word meaning of the split information of the original term; and the first computing unit 703 comprises a first computing subunit and a second computing subunit.

[0177] The first calculation subunit is configured to calculate the similarity between the word vector of the original term and the word vector of the standard term, and calculate the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term for each standard term; wherein the word vector of the split information of the standard term is obtained by inputting the split information of the standard term into the target language representation model and output by the target language representation model; and the split information of the standard term is obtained by processing the standard term and the target entity annotation model;

[0178] The second calculation subunit is configured to calculate the similarity between the original term and the standard term according to the similarity between the word vector of the original term and the word vector of the standard term, and the similarity between the word vector of the split information of the original term and the word vector of the split information of the standard term.

[0179] Optionally, the term standardization device further comprises:

[0180] The first construction unit is configured to construct a training set; wherein the training set comprises a plurality of term triplets;

[0181] The fourth processing unit is configured to obtain the split information of each sample by processing the target entity annotation model and each sample included in the plurality of term triplets; wherein the target entity annotation model is obtained by training an initial entity annotation model by a plurality of pre-annotated term samples;

[0182] The fifth processing unit is configured to input each sample included in the plurality of term triplets into an initial language representation model respectively, obtain and output the word vector of each sample by the initial language representation model, and input the split information of each sample into the initial language representation model, obtain and output the word vector of the split information of each sample by the initial language representation model;

[0183] The second calculation unit is configured to calculate the final loss value of the initial language representation model according to the word vector of all the samples and the word vector of the split information of the samples; wherein the final loss value of the initial language representation model is used to indicate the processing effect of the initial language representation model; the lower the final loss value of the initial language representation model, the higher the similarity between the term sample and the positive sample of the term sample, and the lower the similarity between the term sample and the negative sample of the term sample;

[0184] The first adjusting unit is configured to adjust parameters of the initial language representation model according to a final loss value of the initial language representation model until a final loss value of an adjusted initial language representation model meets a preset convergence condition, and determine the adjusted initial language representation model as the target language representation model.

[0185] Optionally, the second calculating unit comprises a third calculating sub-unit, a fourth calculating sub-unit and a fifth calculating sub-unit.

[0186] The third calculating sub-unit is configured to calculate a first loss value of the initial language representation model according to word vectors of all the samples; wherein the first loss value is used to indicate a processing effect of the initial language representation model on the term triple; the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is.

[0187] The fourth calculating sub-unit is configured to calculate a second loss value of the initial language representation model according to word vectors of split information of all the samples; wherein the second loss value is used to indicate a processing effect of the initial language representation model on the split information triple; the lower the second loss value is, the higher the similarity between the word vector of the split information of the term sample and the word vector of the split information of the positive sample is, and the lower the similarity between the word vector of the split information of the term sample and the word vector of the split information of the negative sample is.

[0188] The fifth calculating sub-unit is configured to calculate a final loss value of the initial language representation model according to the first loss value and the second loss value of the initial language representation model.

[0189] Optionally, the standardization device of the term further comprises:

[0190] The second constructing unit is configured to construct a training set; wherein the training set comprises a plurality of term triples;

[0191] The sixth processing unit is configured to input each sample included in the plurality of term triples into an initial language representation model respectively, and obtain and output a word vector of each sample by the initial language representation model;

[0192] a third calculation unit, configured to calculate a first loss value of the initial language representation model according to the word vectors of all the samples; wherein the first loss value is used to indicate a processing effect of the initial language representation model on the term triple; the lower the first loss value is, the higher the similarity between the word vector of the term sample and the word vector of the positive sample is, and the lower the similarity between the word vector of the term sample and the word vector of the negative sample is;

[0193] a second adjustment unit, configured to adjust parameters of the initial language representation model according to the first loss value of the initial language representation model, until the first loss value of the adjusted initial language representation model meets a preset convergence condition, and then determine the adjusted initial language representation model as the target language representation model.

[0194] Optionally, the standardization device of the term further comprises:

[0195] a selection unit, configured to select one of N negative example terms with the highest similarity to the term sample from a plurality of negative example terms as a negative sample corresponding to the term sample, or select one negative example term with a similarity greater than a first threshold to the term sample from a plurality of negative example terms as a negative sample corresponding to the term sample; wherein the negative example term refers to a term whose corresponding actual standard term is inconsistent with the actual standard term corresponding to the term sample; N is a positive integer.

[0196] The standardized device of the terms provided by the embodiment of the application provides that the first processing unit 702 inputs the original term into the target language representation model, and obtains and outputs the word vector of the original term by the target language representation model. The word vector of the original term is used to represent the word meaning of the original term. Since the target language representation model is obtained by comparative learning training of the initial language representation model by the plurality of term triplets, and the term triplet includes: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample, the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample, and the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample, therefore, the target language representation model learns the difference between the term sample and the negative sample corresponding to the term sample, and the similarity between the term sample and the positive sample corresponding to the term sample by comparative learning training. Then, the first calculation unit 703 calculates the similarity between the original term and the standard term according to the word vector of the original term and the word vector of the standard term for each standard term, and the determination unit 704 determines the standard term with the highest similarity with the original term as the standard term matched with the original term. When the determination unit 704 determines the standard term matched with the original term, the accuracy of the standard term matched with the original term determined by the determination unit 704 is high, and the standard term with high text coincidence degree but not actually matched with the original term will not be determined as the matched standard term.

[0197] The embodiment of the application further discloses a computer readable medium, which stores a computer program, wherein the program is executed by a processor to realize the term standardization method in any one of the above embodiments of the application.

[0198] The embodiment of the application further discloses a term standardization device, comprising:

[0199] One or more processors;

[0200] A storage device, which stores one or more programs;

[0201] When the one or more programs are executed by the one or more processors, the one or more processors realize the term standardization method in any one of the above embodiments of the application.

[0202] The various embodiments described in this specification are described in progressive order of complexity, from the simplest embodiment to more complex embodiments. Identify commonalities in the various embodiments so that the disclosure is not redundant. Each embodiment is directed to the differences between that embodiment and the other embodiments. In particular, the system or system embodiments are described more simply because they are substantially similar to the method embodiments. The system or system embodiments are described with reference to the method embodiments. The systems and system embodiments described above are merely illustrative of the principles of this application. Any feature in a drawing figure can be implemented in either hardware or software, or a combination thereof, and one skilled in the art would understand that the features of the examples described in this specification can be combined or modified in any number of ways, and that the application is not limited to only the examples described in this specification. The disclosure can be implemented with both hardware and software, and the disclosure is not limited to only the examples described in this specification.

[0203] Those skilled in the art will further appreciate that the units and algorithms described in connection with the examples disclosed herein can be embodied directly in hardware, software, or a combination thereof. To the extent that the disclosure herein describes concrete examples in terms of specific components and processes, those terms are used only to facilitate explanation of the disclosure. The disclosure should not be construed as limited to the specific examples described herein, but rather should be understood to cover all alternatives consistent with the principles of the present disclosure.

[0204] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments of the present application will be apparent to those of skill in the art upon reviewing the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead should be given with reference to the appended claims, along with their full scope of equivalents.

Claims

1. A method for standardizing terminology, characterized in that, include: Obtain the original terminology; wherein, the original terminology is the terminology that needs to be standardized. The original terms are input into the target language representation model, which then obtains and outputs word vectors for the original terms. The word vectors represent the meaning of the original terms. The target language representation model is trained by comparing and contrasting multiple term triples with an initial language representation model. Each term triple includes a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample. The actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample. The actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample. For each standard term, the similarity between the original term and the standard term is calculated based on the word vectors of the original term and the standard term; wherein, the word vectors of the standard term are obtained by inputting the standard term into the target language representation model and outputting it from the target language representation model; The standard term with the highest similarity to the original term is determined as the standard term that matches the original term; The target language representation model is further obtained by comparative learning training the initial language representation model through multiple split information triples; wherein, the split information triples include: split information of term samples, split information of positive samples corresponding to the term samples, and split information of negative samples corresponding to the term samples; the split information is used to describe the entity annotation results, and the entity annotation results are used to represent the entity category of each word in the term, and the entity category includes: location category, main part category, secondary part category, and symptom description category; Before calculating the similarity between the original term and the standard term based on the word vectors of the original term and the standard term for each standard term, the method further includes: Based on the target entity annotation model and the original terminology, the splitting information of the original terminology is obtained; wherein, the target entity annotation model is obtained by training an initial entity annotation model with multiple pre-annotated terminology samples; The original term's segmentation information is input into the target language representation model, which then obtains and outputs word vectors of the original term's segmentation information; wherein, the word vectors of the original term's segmentation information are used to explain the word meanings of the original term's segmentation information. Specifically, for each standard term, the similarity between the original term and the standard term is calculated based on the word vectors of the original term and the standard term, including: For each standard term, the similarity between the word vector of the original term and the word vector of the standard term is calculated, and the similarity between the word vector of the segmentation information of the original term and the word vector of the segmentation information of the standard term is also calculated; wherein, the word vector of the segmentation information of the standard term is obtained by inputting the segmentation information of the standard term into the target language representation model and outputting it; the segmentation information of the standard term is obtained by processing the standard term and the target entity annotation model; The similarity between the original term and the standard term is calculated based on the similarity between the word vectors of the original term and the standard term, as well as the similarity between the word vectors of the split information of the original term and the split information of the standard term.

2. The method according to claim 1, characterized in that, The training process of the target language representation model includes: Construct a training set; wherein the training set includes multiple term triples; Based on the target entity annotation model and each sample included in the multiple term triples, the splitting information of each sample is obtained; wherein, the target entity annotation model is obtained by training an initial entity annotation model with multiple pre-annotated term samples; Each sample in a plurality of term triples is input into an initial language representation model, and the initial language representation model obtains and outputs the word vector of each sample; and the splitting information of each sample is input into the initial language representation model, and the initial language representation model obtains and outputs the word vector of the splitting information of each sample. Based on the word vectors of all the samples and the word vectors of the sample splitting information, the final loss value of the initial language representation model is calculated; wherein, the final loss value of the initial language representation model is used to illustrate the processing effect of the initial language representation model; the lower the final loss value of the initial language representation model, the higher the similarity between the term sample and the positive sample of the term sample, and the lower the similarity between the term sample and the negative sample of the term sample; Based on the final loss value of the initial language representation model, the parameters of the initial language representation model are adjusted until the final loss value of the adjusted initial language representation model meets the preset convergence condition. Then, the adjusted initial language representation model is determined as the target language representation model.

3. The method according to claim 2, characterized in that, The step of calculating the final loss value of the initial language representation model based on the word vectors of all the samples and the word vectors of the sample splitting information includes: Based on the word vectors of all the samples, a first loss value of the initial language representation model is calculated; wherein, the first loss value is used to illustrate the processing effect of the initial language representation model on the term triples; the lower the first loss value, the higher the similarity between the word vectors of the term samples and the word vectors of the positive samples, and the lower the similarity between the word vectors of the term samples and the word vectors of the negative samples. Based on the word vectors of the segmentation information of all the samples, a second loss value of the initial language representation model is calculated; wherein, the second loss value is used to illustrate the processing effect of the initial language representation model on the segmentation information triples; the lower the second loss value, the higher the similarity between the word vectors of the segmentation information of the term sample and the word vectors of the segmentation information of the positive sample, and the lower the similarity between the word vectors of the segmentation information of the term sample and the word vectors of the segmentation information of the negative sample; The final loss value of the initial language representation model is calculated based on the first and second loss values ​​of the initial language representation model.

4. The method according to claim 1, characterized in that, The training process of the target language representation model includes: Construct a training set; wherein the training set includes multiple term triples; Each sample included in the plurality of term triples is input into the initial language representation model, and the initial language representation model obtains and outputs the word vector of each sample; Based on the word vectors of all samples, a first loss value of the initial language representation model is calculated; wherein, the first loss value is used to illustrate the processing effect of the initial language representation model on the term triples; the lower the first loss value, the higher the similarity between the word vectors of the term samples and the word vectors of the positive samples, and the lower the similarity between the word vectors of the term samples and the word vectors of the negative samples. Based on the first loss value of the initial language representation model, the parameters of the initial language representation model are adjusted until the first loss value of the adjusted initial language representation model meets the preset convergence condition. Then, the adjusted initial language representation model is determined as the target language representation model.

5. The method according to claim 1, characterized in that, The process of obtaining the negative samples corresponding to the term samples includes: From a plurality of negative sample terms, one of the N negative sample terms with the highest similarity to the term sample is selected as the negative sample corresponding to the term sample; or, from a plurality of negative sample terms, one negative sample term with a similarity greater than a first threshold to the term sample is selected as the negative sample corresponding to the term sample; wherein, the negative sample term refers to a term whose corresponding actual standard term is inconsistent with the actual standard term corresponding to the term sample; N is a positive integer.

6. A terminology standardization device, characterized in that, include: An acquisition unit is used to acquire original terms; wherein the original terms are terms that need to be standardized. The first processing unit is configured to input the original terminology into a target language representation model, and obtain and output word vectors of the original terminology from the target language representation model; wherein, the word vectors of the original terminology are used to represent the word meaning of the original terminology; the target language representation model is obtained by comparative learning training an initial language representation model through multiple term triples; the term triple includes: a term sample, a positive sample corresponding to the term sample, and a negative sample corresponding to the term sample; the actual standard term corresponding to the positive sample is consistent with the actual standard term corresponding to the term sample; the actual standard term corresponding to the negative sample is inconsistent with the actual standard term corresponding to the term sample. The first calculation unit is used to calculate the similarity between the original term and the standard term for each standard term, based on the word vector of the original term and the word vector of the standard term; wherein the word vector of the standard term is obtained by inputting the standard term into the target language representation model and outputting it from the target language representation model. The determining unit is used to determine the standard term with the highest similarity to the original term as the standard term that matches the original term; The target language representation model is further obtained by comparative learning training the initial language representation model through multiple split information triples; wherein, the split information triples include: split information of term samples, split information of positive samples corresponding to the term samples, and split information of negative samples corresponding to the term samples; the split information is used to describe the entity annotation results, and the entity annotation results are used to represent the entity category of each word in the term, and the entity category includes: location category, main part category, secondary part category, and symptom description category; The standardization device for the terminology further includes: a second processing unit and a third processing unit; The second processing unit is used to process the target entity annotation model and the original terminology to obtain the splitting information of the original terminology; wherein the target entity annotation model is obtained by training an initial entity annotation model with multiple pre-annotated terminology samples; The third processing unit is used to input the splitting information of the original term into the target language representation model, and the target language representation model obtains and outputs the word vectors of the splitting information of the original term; wherein, the word vectors of the splitting information of the original term are used to explain the word meaning of the splitting information of the original term. The first calculation unit includes: a first calculation subunit and a second calculation subunit. The first calculation subunit is used to calculate the similarity between the word vector of the original term and the word vector of the standard term for each standard term, and to calculate the similarity between the word vector of the segmentation information of the original term and the word vector of the segmentation information of the standard term; wherein, the word vector of the segmentation information of the standard term is obtained by inputting the segmentation information of the standard term into the target language representation model and outputting it by the target language representation model; the segmentation information of the standard term is obtained by processing the standard term and the target entity annotation model; The second calculation subunit is used to calculate the similarity between the original term and the standard term based on the similarity between the word vectors of the original term and the standard term, and the similarity between the word vectors of the split information of the original term and the split information of the standard term.

7. A computer-readable medium, characterized in that, It stores a computer program thereon, wherein the program, when executed by a processor, implements the method as described in any one of claims 1 to 5.

8. A standardized terminology device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Term standardization method and device

    CN112711652A

  • Entity recognition model generation method and device and entity extraction method and device

    CN113010638A