CN111950303A - Medical text translation method, device and storage medium - Google Patents
Medical text translation method, device and storage medium Download PDFInfo
- Publication number
- CN111950303A CN111950303A CN202011115345.3A CN202011115345A CN111950303A CN 111950303 A CN111950303 A CN 111950303A CN 202011115345 A CN202011115345 A CN 202011115345A CN 111950303 A CN111950303 A CN 111950303A
- Authority
- CN
- China
- Prior art keywords
- word
- medical
- translated
- text
- feature vector
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/58—Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
Abstract
The application relates to the field of medical science and technology, and particularly discloses a medical text translation method, a medical text translation device and a storage medium. The method comprises the following steps: acquiring a medical text to be translated; extracting semantic features of the medical text to be translated to obtain a first feature vector; acquiring a target characteristic vector corresponding to the medical text to be translated, wherein the target characteristic vector is used for representing a medical knowledge graph corresponding to the medical text to be translated; splicing the first feature vector and the target feature vector to obtain a second feature vector; and translating the medical text to be translated according to the second feature vector. The embodiment of the application is beneficial to improving the accuracy of medical text translation.
Description
Technical Field
The application relates to the technical field of text recognition, in particular to a medical text translation method, a medical text translation device and a storage medium.
Background
Machine translation has been a long time, and has made great progress from statistical language models to deep learning models, and the progress of translation is mainly reflected in the general translation field, for example, translation of everyday phrases. However, progress in medical text translation is slow. Mainly because of the existence of a large number of proper nouns and medical terms in the medical field, the translation in the medical literature and the translation in the sentences related to the medical literature have great defects, and the situation of translation errors often occurs, and manual adjustment is needed for the situation.
Therefore, the existing translation precision of the medical text is low, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a medical text translation method, a medical text translation device and a storage medium. The accuracy of medical text translation is improved by combining the medical knowledge map.
In a first aspect, an embodiment of the present application provides a medical text translation method, including:
acquiring a medical text to be translated;
extracting semantic features of the medical text to be translated to obtain a first feature vector;
acquiring a target characteristic vector corresponding to the medical text to be translated, wherein the target characteristic vector is used for representing a medical knowledge graph corresponding to the medical text to be translated;
splicing the first feature vector and the target feature vector to obtain a second feature vector;
and translating the medical text to be translated according to the second feature vector.
In a second aspect, an embodiment of the present application provides a medical text translation apparatus, including:
the acquiring unit is used for acquiring a medical text to be translated;
the processing unit is used for extracting semantic features of the medical text to be translated to obtain a first feature vector;
the acquiring unit is further configured to acquire a target feature vector corresponding to the medical text to be translated, where the target feature vector is used to represent a medical knowledge graph corresponding to the medical text to be translated;
the processing unit is further configured to splice the first feature vector and the target feature vector to obtain a second feature vector;
the processing unit is further configured to translate the medical text to be translated according to the second feature vector.
In a third aspect, embodiments of the present application provide a medical text translation device, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, which stores a computer program, where the computer program makes a computer execute the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, the computer being operable to cause a computer to perform the method according to the first aspect.
The embodiment of the application has the following beneficial effects:
it can be seen that, in the embodiment of the application, in the process of translating the medical text to be translated, the medical knowledge map corresponding to the medical text to be translated is fused, so that the prior knowledge corresponding to the text to be translated is fused in the second feature vector, and further the accuracy of translation is improved, especially the accuracy of translation of medical special terms or medical proper nouns is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a medical text translation method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a neural network provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a self-attention mechanism provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of a neural network training method according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a medical text translation apparatus according to an embodiment of the present application;
fig. 6 is a block diagram illustrating functional units of a medical text translation apparatus according to an embodiment of the present application.
Detailed Description
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, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, result, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
To facilitate understanding of the technical solutions of the present application, related terms related to the present application are explained.
Medical knowledge mapping: is composed of a medical entity, a description corresponding to the medical entity (i.e., an explanation of the medical entity), and a medical protocol corresponding to the medical entity. For example, a gastric cancer medical knowledge-graph includes the medical entity "gastric cancer" of gastric cancer medicine, which is correspondingly described as "gastric cancer is a malignant tumor originating from gastric mucosal epithelium", and the corresponding medical treatment protocol includes: variability of gastric cancer, gastric cancer symptoms, the spread and metastatic pathways of gastric cancer, and the like.
Referring to fig. 1, fig. 1 is a schematic flow chart of a medical text translation method according to an embodiment of the present application. The method is applied to a medical text translation device. The method comprises the following steps:
101: the medical text translation device acquires a medical text to be translated.
Alternatively, the medical text to be translated may be input by the user in an information input field of the medical text translation apparatus.
102: and the medical text translation device extracts semantic features of the medical text to be translated to obtain a first feature vector.
Illustratively, each word in each text to be translated is subjected to embedding processing, and a word vector corresponding to each word is obtained. The words mentioned in the application are complete words in Chinese and complete words in English, and the words mentioned later are similar to each other and are not described again.
The word embedding process for each word may be implemented by one-hot (one-hot). For example, each word may be encoded according to its position in the medical text to be translated. For example, the text to be translated is "I am a student", one-hot encoding is performed on each word, so that a word vector corresponding to the word "I" is (1, 0,0, 0), a word vector corresponding to the word "am" is (0, 1,0, 0), a word vector corresponding to the word "a" is (0, 0,1, 0), and a word vector corresponding to the word "student" is (0, 0,0, 1).
And then, semantic feature extraction is carried out according to the word vector corresponding to each word to obtain the first feature vector. The semantic feature extraction can be realized through a semantic feature extraction network, the semantic feature extraction network is trained in advance, and the training process of the semantic feature extraction network is described later and is not described too much here.
In one embodiment of the present application, the number of the semantic feature extraction networks may be one or more, and in a case where the number of the semantic feature extraction networks is multiple, an output result of a previous semantic feature extraction network needs to be used as input data of a next semantic feature extraction network. Illustratively, each semantic feature extraction network may be of a long-short term memory network or a recurrent neural network, or the like.
The number of semantic feature extraction networks is taken as an example in the present application.
As shown in fig. 2, the word vector corresponding to each word is input to the semantic feature extraction network, and semantic feature extraction is performed on the text to be translated, so as to obtain the first feature vector.
In one embodiment of the present application, the semantic feature extraction network further includes an attention module. Therefore, the attention module performs weighting processing on the word vector corresponding to each word to obtain a target word vector corresponding to each word.
Exemplarily, as shown in fig. 3, a word vector corresponding to a word a is encoded to obtain a key value vector, a query vector and a value vector corresponding to the word a, where the word a is any one word in the medical text to be translated; then, determining the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and taking the similarity as the weight between the word A and each word; and according to the weight between the word A and each word, carrying out weighting processing on the value vector corresponding to each word to obtain a target word vector corresponding to the word A.
For example, the query vector corresponding to each word can be represented by formula (1):
wherein j is more than or equal to 1 and less than or equal to n, n is the number of words in the text to be translated, WqFor a first network parameter of the neural network,for the query vector corresponding to the jth word of the n words,is the word vector corresponding to the jth word, and n is an integer greater than or equal to 1.
For example, the key value vector corresponding to each word can be represented by formula (2):
wherein, WkIs a second network parameter of the neural network,the key value vector corresponding to the jth word.
Illustratively, the value vector corresponding to each word can be represented by equation (3):
wherein, WvIs a third network parameter of the neural network,the key value vector corresponding to the jth word.
Then, determining the similarity between the query vector of the word a and the key value vector corresponding to each word, and obtaining the weight between the word a and each word, for example, the weight between the word a and each word can be represented by formula (4):
wherein the content of the first and second substances,the similarity between the key value vectors corresponding to the word a and the jth word in the n words, i.e. the weight between the word a and the jth word,and (4) determining a query vector corresponding to the A-th word, and dist is distance calculation operation.
And finally, according to the weight between the word A and each word, carrying out weighting processing on the value vector corresponding to each word to obtain a fourth feature vector corresponding to the word A.
Illustratively, the fourth feature vector corresponding to the word a can be represented by formula (5):
wherein the content of the first and second substances,is the target word vector for the word a,the value vector corresponding to the jth word.
It can be seen that according to the self-attention mechanism, the influence of the previous and subsequent words on the current word can be fused into the target word vector corresponding to the current word, rather than identifying each word in an isolated manner, i.e. the context information where the current word is located is fused, so that the translation accuracy can be improved.
103: the medical text translation device acquires a target feature vector corresponding to the medical text to be translated, and the target feature vector is used for representing a medical knowledge map corresponding to the medical text to be translated.
For example, all medical knowledge maps in the medical field may be vectorized to obtain a third feature vector corresponding to each medical knowledge map. Since the medical knowledge map is essentially a relationship composed of a plurality of medical texts. Therefore, each medical text contained in the medical knowledge graph can be vectorized through a similar word embedding method, and then a plurality of word vectors corresponding to a plurality of medical texts are spliced to obtain a third feature vector corresponding to each medical graph.
Further, determining a first entity word corresponding to each medical knowledge graph, and labeling a third feature vector corresponding to each medical knowledge graph according to the first entity word, for example, labeling a gastric cancer for the third feature vector if the first entity word is gastric cancer; then, determining a second entity word in the text to be translated, and determining a second entity label according to the second entity word; finally, the second entity label is compared with the first entity labels corresponding to the third feature vectors one by one to obtain first entity labels matched with the second entity labels, and the third feature vectors corresponding to the matched first entity labels are used as target feature vectors corresponding to the medical texts to be translated.
By way of example, first entity labels may also be added to all medical knowledge maps in the medical field according to the first entity words in each medical knowledge map, that is, the first entity words of each medical knowledge map are identified, and the first entity labels are added to each medical knowledge map according to the first entity words; then, determining a second entity label corresponding to the text to be translated, namely identifying a second entity word in the text to be translated, and determining the second entity label corresponding to the text to be translated according to the second entity word; finally, determining a first entity label matched with the second entity label, and taking a medical knowledge graph corresponding to the matched first entity label as a target medical knowledge graph; vectorizing the target medical knowledge graph to obtain a target characteristic vector corresponding to the medical text to be translated.
In the present application, the target medical knowledge graph is determined first, and then the target medical knowledge graph is subjected to vector quantization as an example.
Illustratively, as shown in fig. 2, the medical knowledge graph may be vectorized through a graph transformation network to obtain a target feature vector, where the graph transformation network may be a deepwalk network or a transit network, and so on. The present application does not limit the type of atlas-switching network.
It should be understood that the recognition of the entity words to the medical knowledge graph or the text to be translated can be performed through a neural network or can be realized through dictionary matching, and the recognition mode of the entity words is not limited in the application. The neural network may be a convolutional neural network, a cyclic neural network, a long-short term memory network, a bert model, or the like.
104: and the medical text translation device splices the first characteristic vector and the target characteristic vector to obtain a second characteristic vector.
Illustratively, the first feature vector and the target feature vector are transversely spliced to obtain a second feature vector. For example, if the first feature vector is (0, 0,0, … …, 1) and the target feature vector is (1, 0,0 … …, 1), the first feature vector and the second feature vector are spliced to obtain a third feature vector which is (0, 0,0, … …,1, 1,0,0 … …, 1).
105: and the medical text translation device translates the medical text to be translated according to the second feature vector.
For example, as shown in fig. 2, the third feature vector may be input to a decoding network for decoding, so as to obtain a translation result corresponding to the text to be translated.
The translation using the feature vector can be implemented by an existing decoding network (Decoder).
In particular, the decoding network comprises a plurality of stack layers. Inputting the third feature vector to a first stack layer of the plurality of stack layers to obtain the probability of each word of the third feature vector falling into the dictionary library, and determining the translation result of the first stack layer according to the probability of each word, namely taking the word corresponding to the maximum probability as the translation result of the first stack layer; then, inputting the translation result of the first stack layer and the third feature vector into a second stack layer for continuing translation to translate a first word and a second word; and repeating the steps until the last stack layer outputs the translation result corresponding to the text to be translated.
Illustratively, as shown in FIG. 2, the first word "I" may be translated through the first stack layer; then, the first word "I" and the second word "I" are translated through the second stack layer; and the rest is repeated until the last stack layer is translated into 'I suffers from three terminal gastric cancers'.
It can be seen that, in the embodiment of the application, in the process of translating the medical text to be translated, the medical knowledge map corresponding to the medical text to be translated is fused, so that the prior knowledge corresponding to the text to be translated is fused in the second feature vector, and further the accuracy of translation is improved, especially the accuracy of translation of medical special terms or medical proper nouns is improved.
In some possible embodiments, the medical text to be translated includes chinese medical text or english medical text, and the medical knowledge map is a chinese medical knowledge map if the medical text to be translated is chinese medical text and an english medical knowledge map if the medical text to be translated is english medical text.
It should be understood that the language type of the medical text to be translated is not intended to limit the present application. In practical application, the medical text to be translated may be a medical text in any one language, and the medical knowledge graph is a medical knowledge graph corresponding to the language type.
In some possible embodiments, before performing semantic feature extraction on the medical text to be translated to obtain a first feature vector, the method further includes:
acquiring vertical keywords in the medical text to be translated and third entity words corresponding to the vertical keywords;
standardizing the third entity words according to the vertical keywords to obtain fourth entity words;
and replacing the third entity word in the text to be translated with the fourth entity word to obtain a new medical text to be translated, and translating the new medical text to be translated.
Illustratively, word embedding processing can be performed on each word in the vertical keyword to obtain a word vector corresponding to each word in the vertical keyword; then, extracting semantic features according to word vectors corresponding to each word in the vertical keywords to obtain third feature vectors for representing the semantic features of the vertical keywords; performing word embedding processing on the third entity word to obtain a word vector corresponding to each word in the third entity word; then, according to a self-attention mechanism, processing the third feature vector and a word vector corresponding to each word in the third entity word to obtain a target word vector corresponding to each word in the third entity word, namely calculating the similarity between the third feature vector and the word vector corresponding to each word in the third entity word, taking the similarity as the weight between the third feature vector and each word, and then performing point multiplication operation on the weight corresponding to each word and the word vector corresponding to each word to obtain the target word vector corresponding to each word; extracting semantic features according to the target word vector corresponding to each word in the third entity word to obtain a fourth feature vector for representing the third entity word; and finally, determining the probability of each standardized entity word according to the fourth feature vector, and taking the standardized keyword with the maximum probability as the fourth entity word.
The standardized keywords are keywords obtained by previously standardizing entity words corresponding to various diseases in the medical field. The relationship between the standardized keywords and the diseases is clear and corresponding to each other.
It can be understood that if the vertical keyword or the third entity word is an english word, performing word embedding processing on the vertical keyword, that is, performing word embedding processing on each character in the vertical keyword or the third entity word to obtain a character vector corresponding to each character.
It can be seen that, in the embodiment, the entity words are standardized first, and even if the entity words in the text to be translated input by the user are wrong, the entity words can be converted into corresponding standardized keywords. Moreover, in the standardization process, a self-attention mechanism is added, the matching degree between the third entity word and the vertical type keyword is considered, the effect of the word belonging to the medical field in the third entity word can be amplified, the effect of the word not belonging to the medical field in the third entity word is weakened, and the standardization accuracy can be improved.
In one embodiment of the present application, the medical text translation method of the present application can also be applied to the field of smart medical treatment. For example, a doctor can quickly and accurately obtain a translation result through the medical text translation method, so that the translation result can be used for data query or medical record query, the diagnosis process of the doctor can be effectively assisted, and the development of medical science and technology is promoted.
Referring to fig. 4, fig. 4 is a schematic flow chart of a neural network training method according to an embodiment of the present disclosure. The method comprises the following steps:
401: and acquiring a training text.
The training text is a training text of the labeled real translation result, that is, the training text includes a training label.
402: and inputting the training text into the neural network to obtain a translation result of the training text.
Exemplarily, semantic feature extraction can be performed on the training text through the neural network to obtain a feature vector corresponding to the training text; similarly, vectorizing the medical knowledge graph corresponding to the training text to obtain a target feature vector corresponding to the training sample; and splicing the target characteristic vector and the characteristic vector, and translating by using the spliced vector.
403: and adjusting the network parameters of the neural network according to the translation result of the training text and the training labels so as to train the neural network.
Determining a first loss according to the difference between the translation result and the training label; and updating the network parameters of the neural network according to the first loss and the gradient descent method.
Illustratively, the first loss may be represented by equation (6):
wherein the content of the first and second substances,for the first loss, N is the number of words in the training sample,for the word vector corresponding to the ith word in the training sample,and dist is a distance calculation operation for a word vector corresponding to the ith word in the translation result.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a medical text translation device according to an embodiment of the present application. As shown in fig. 5, a medical text translation device 500 includes a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising instructions for:
acquiring a medical text to be translated;
extracting semantic features of the medical text to be translated to obtain a first feature vector;
acquiring a target characteristic vector corresponding to the medical text to be translated, wherein the target characteristic vector is used for representing a medical knowledge graph corresponding to the medical text to be translated;
splicing the first feature vector and the target feature vector to obtain a second feature vector;
and translating the medical text to be translated according to the second feature vector.
In some possible embodiments, the above program is specifically configured to, in obtaining the target feature vector corresponding to the medical text to be translated, execute the following steps:
vectorizing all medical knowledge maps in the medical field to obtain a third feature vector corresponding to each medical knowledge map, and adding a first entity label to the third feature vector corresponding to each medical knowledge map according to a first entity word in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a third feature vector corresponding to the matched first entity label as a target feature vector corresponding to the medical text to be translated.
In some possible embodiments, the above program is specifically configured to, in obtaining the target feature vector corresponding to the medical text to be translated, execute the following steps:
adding first entity labels to all medical knowledge maps in the medical field according to the first entity words in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a medical knowledge graph corresponding to the matched first entity label as a target medical knowledge graph;
vectorizing the target medical knowledge graph to obtain a target characteristic vector corresponding to the medical text to be translated.
In some possible embodiments, in terms of performing semantic feature extraction on the medical text to be translated to obtain the first feature vector, the above-mentioned program is specifically configured to execute the following steps:
performing word embedding processing on each word in the medical text to be translated to obtain a word vector corresponding to each word;
and extracting semantic features according to the word vector corresponding to each word to obtain the first feature vector.
In some possible embodiments, before performing semantic feature extraction based on the word vector corresponding to each word to obtain the first feature vector, the program is further configured to execute the following steps:
determining a target word vector corresponding to each word according to a self-attention mechanism and the word vector corresponding to each word;
in terms of extracting semantic features according to a word vector corresponding to each word to obtain the first feature vector, the program is specifically configured to execute the following steps: and extracting semantic features according to the target word vector corresponding to each word to obtain the first feature vector.
In some possible embodiments, the program is specifically configured to, in determining the target feature vector corresponding to each word based on the self-attention mechanism and the word vector corresponding to each word, execute the following steps:
coding a word vector corresponding to a word A to obtain a key value vector, a query vector and a value vector corresponding to the word A, wherein the word A is any one word in the medical text to be translated;
determining the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and taking the similarity as the weight between the word A and each word;
and according to the weight between the word A and each word, carrying out weighting processing on the value vector corresponding to each word to obtain a target word vector corresponding to the word A.
In some possible embodiments, the medical text to be translated includes chinese medical text or english medical text, and the medical knowledge map is a chinese medical knowledge map if the medical text to be translated is chinese medical text and an english medical knowledge map if the medical text to be translated is english medical text.
Referring to fig. 6, fig. 6 is a block diagram illustrating functional units of a medical text translation apparatus according to an embodiment of the present application. The medical text translation apparatus 600 includes: an acquisition unit 601 and a processing unit 602, wherein:
an obtaining unit 601, configured to obtain a medical text to be translated;
the processing unit 602 is configured to perform semantic feature extraction on the medical text to be translated to obtain a first feature vector;
the obtaining unit 601 is further configured to obtain a target feature vector corresponding to the medical text to be translated, where the target feature vector is used to represent a medical knowledge graph corresponding to the medical text to be translated;
the processing unit 602 is further configured to splice the first feature vector and the target feature vector to obtain a second feature vector;
the processing unit 602 is further configured to translate the medical text to be translated according to the second feature vector.
In some possible embodiments, in terms of obtaining the target feature vector corresponding to the medical text to be translated, the obtaining unit 601 is specifically configured to:
vectorizing all medical knowledge maps in the medical field to obtain a third feature vector corresponding to each medical knowledge map, and adding a first entity label to the third feature vector corresponding to each medical knowledge map according to a first entity word in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a third feature vector corresponding to the matched first entity label as a target feature vector corresponding to the medical text to be translated.
In some possible embodiments, in terms of obtaining the target feature vector corresponding to the medical text to be translated, the obtaining unit 601 is specifically configured to:
adding first entity labels to all medical knowledge maps in the medical field according to the first entity words in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a medical knowledge graph corresponding to the matched first entity label as a target medical knowledge graph;
vectorizing the target medical knowledge graph to obtain a target characteristic vector corresponding to the medical text to be translated.
In some possible embodiments, in terms of performing semantic feature extraction on the medical text to be translated to obtain a first feature vector, the processing unit 602 is specifically configured to:
performing word embedding processing on each word in the medical text to be translated to obtain a word vector corresponding to each word;
and extracting semantic features according to the word vector corresponding to each word to obtain the first feature vector.
In some possible embodiments, before performing semantic feature extraction according to a word vector corresponding to each word to obtain the first feature vector, the processing unit 602 is further configured to: determining a target word vector corresponding to each word according to a self-attention mechanism and the word vector corresponding to each word;
in terms of performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector, the processing unit 602 is specifically configured to: and extracting semantic features according to the target word vector corresponding to each word to obtain the first feature vector.
In some possible embodiments, in terms of determining the target feature vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word, the processing unit 602 is specifically configured to:
coding a word vector corresponding to a word A to obtain a key value vector, a query vector and a value vector corresponding to the word A, wherein the word A is any one word in the medical text to be translated;
determining the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and taking the similarity as the weight between the word A and each word;
and according to the weight between the word A and each word, carrying out weighting processing on the value vector corresponding to each word to obtain a target word vector corresponding to the word A.
In some possible embodiments, the medical text to be translated includes chinese medical text or english medical text, and the medical knowledge map is a chinese medical knowledge map if the medical text to be translated is chinese medical text and an english medical knowledge map if the medical text to be translated is english medical text.
Embodiments of the present application also provide a computer storage medium, which stores a computer program, where the computer program is executed by a processor to implement part or all of the steps of any one of the medical text translation methods as described in the above method embodiments.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the medical text translation methods as recited in the above method embodiments.
It should be understood that the medical text translation apparatus in the present application may include a smart Phone (e.g., an Android Phone, an iOS Phone, a Windows Phone, etc.), a tablet computer, a palm computer, a notebook computer, a Mobile Internet device MID (MID), a wearable device, or the like. The medical text translation devices described above are merely examples, and are not exhaustive, including but not limited to the medical text translation devices described above. In practical applications, the medical text translation apparatus may further include: intelligent vehicle-mounted terminal, computer equipment and the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software program module.
The integrated units, if implemented in the form of software program modules and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (10)
1. A medical text translation method, comprising:
acquiring a medical text to be translated;
extracting semantic features of the medical text to be translated to obtain a first feature vector;
acquiring a target characteristic vector corresponding to the medical text to be translated, wherein the target characteristic vector is used for representing a medical knowledge graph corresponding to the medical text to be translated;
splicing the first feature vector and the target feature vector to obtain a second feature vector;
and translating the medical text to be translated according to the second feature vector.
2. The method according to claim 1, wherein the obtaining of the target feature vector corresponding to the medical text to be translated comprises:
vectorizing all medical knowledge maps in the medical field to obtain a third feature vector corresponding to each medical knowledge map, and adding a first entity label to the third feature vector corresponding to each medical knowledge map according to a first entity word in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a third feature vector corresponding to the matched first entity label as a target feature vector corresponding to the medical text to be translated.
3. The method according to claim 1, wherein the obtaining of the target feature vector corresponding to the medical text to be translated comprises:
adding first entity labels to all medical knowledge maps in the medical field according to the first entity words in each medical knowledge map;
determining a second entity label corresponding to the text to be translated according to a second entity word in the text to be translated;
determining a first entity label matched with the second entity label, and taking a medical knowledge graph corresponding to the matched first entity label as a target medical knowledge graph;
vectorizing the target medical knowledge graph to obtain a target characteristic vector corresponding to the medical text to be translated.
4. The method according to any one of claims 1 to 3, wherein the performing semantic feature extraction on the medical text to be translated to obtain a first feature vector comprises:
performing word embedding processing on each word in the medical text to be translated to obtain a word vector corresponding to each word;
and extracting semantic features according to the word vector corresponding to each word to obtain the first feature vector.
5. The method of claim 4, wherein before performing semantic feature extraction on the word vector corresponding to each word to obtain the first feature vector, the method further comprises:
determining a target word vector corresponding to each word according to a self-attention mechanism and the word vector corresponding to each word;
the extracting semantic features according to the word vector corresponding to each word to obtain the first feature vector includes:
and extracting semantic features according to the target word vector corresponding to each word to obtain the first feature vector.
6. The method of claim 5, wherein determining the target feature vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word comprises:
coding a word vector corresponding to a word A to obtain a key value vector, a query vector and a value vector corresponding to the word A, wherein the word A is any one word in the medical text to be translated;
determining the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and taking the similarity as the weight between the word A and each word;
and according to the weight between the word A and each word, carrying out weighting processing on the value vector corresponding to each word to obtain a target word vector corresponding to the word A.
7. The method according to any one of claims 2 or 3,
the medical text to be translated comprises a Chinese medical text or an English medical text, the medical knowledge map is a Chinese medical knowledge map under the condition that the medical text to be translated is the Chinese medical text, and the medical knowledge map is an English medical knowledge map under the condition that the medical text to be translated is the English medical text.
8. A medical text translation device, comprising:
the acquiring unit is used for acquiring a medical text to be translated;
the processing unit is used for extracting semantic features of the medical text to be translated to obtain a first feature vector;
the acquiring unit is further configured to acquire a target feature vector corresponding to the medical text to be translated, where the target feature vector is used to represent a medical knowledge graph corresponding to the medical text to be translated;
the processing unit is further configured to splice the first feature vector and the target feature vector to obtain a second feature vector;
the processing unit is further configured to translate the medical text to be translated according to the second feature vector.
9. A medical text translation device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method according to any one of claims 1-7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011115345.3A CN111950303B (en) | 2020-10-19 | 2020-10-19 | Medical text translation method, device and storage medium |
PCT/CN2020/132476 WO2021179693A1 (en) | 2020-10-19 | 2020-11-27 | Medical text translation method and device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011115345.3A CN111950303B (en) | 2020-10-19 | 2020-10-19 | Medical text translation method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111950303A true CN111950303A (en) | 2020-11-17 |
CN111950303B CN111950303B (en) | 2021-01-08 |
Family
ID=73357037
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011115345.3A Active CN111950303B (en) | 2020-10-19 | 2020-10-19 | Medical text translation method, device and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111950303B (en) |
WO (1) | WO2021179693A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021179693A1 (en) * | 2020-10-19 | 2021-09-16 | 平安科技(深圳)有限公司 | Medical text translation method and device, and storage medium |
CN114582494A (en) * | 2022-03-03 | 2022-06-03 | 数坤(北京)网络科技股份有限公司 | Diagnostic result analysis method, diagnostic result analysis device, storage medium and electronic equipment |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114004228A (en) * | 2021-10-28 | 2022-02-01 | 泰康保险集团股份有限公司 | Medical text data standardization processing method and device |
CN114168751B (en) * | 2021-12-06 | 2024-07-09 | 厦门大学 | Medical text label identification method and system based on medical knowledge conceptual diagram |
CN117332282B (en) * | 2023-11-29 | 2024-03-08 | 之江实验室 | Knowledge graph-based event matching method and device |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170686A (en) * | 2017-12-29 | 2018-06-15 | 科大讯飞股份有限公司 | Text interpretation method and device |
CN108228574A (en) * | 2017-12-07 | 2018-06-29 | 科大讯飞股份有限公司 | Text translation processing method and device |
CN109740168A (en) * | 2019-01-09 | 2019-05-10 | 北京邮电大学 | A kind of classic of TCM ancient Chinese prose interpretation method based on knowledge of TCM map and attention mechanism |
CN110046252A (en) * | 2019-03-29 | 2019-07-23 | 北京工业大学 | A kind of medical textual hierarchy method based on attention mechanism neural network and knowledge mapping |
CN110334219A (en) * | 2019-07-12 | 2019-10-15 | 电子科技大学 | The knowledge mapping for incorporating text semantic feature based on attention mechanism indicates learning method |
CN110502621A (en) * | 2019-07-03 | 2019-11-26 | 平安科技(深圳)有限公司 | Answering method, question and answer system, computer equipment and storage medium |
CN110727806A (en) * | 2019-12-17 | 2020-01-24 | 北京百度网讯科技有限公司 | Text processing method and device based on natural language and knowledge graph |
US20200117861A1 (en) * | 2017-04-14 | 2020-04-16 | Salesforce.Com, Inc. | Neural Machine Translation with Latent Tree Attention |
CN111191464A (en) * | 2020-01-17 | 2020-05-22 | 珠海横琴极盛科技有限公司 | Semantic similarity calculation method based on combined distance |
US20200193097A1 (en) * | 2018-12-17 | 2020-06-18 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Text translation method, device,and storage medium |
CN111488462A (en) * | 2020-04-02 | 2020-08-04 | ***通信集团江苏有限公司 | Recommendation method, device, equipment and medium based on knowledge graph |
CN111723570A (en) * | 2020-06-09 | 2020-09-29 | 平安科技(深圳)有限公司 | Medicine knowledge graph construction method and device and computer equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111950303B (en) * | 2020-10-19 | 2021-01-08 | 平安科技(深圳)有限公司 | Medical text translation method, device and storage medium |
-
2020
- 2020-10-19 CN CN202011115345.3A patent/CN111950303B/en active Active
- 2020-11-27 WO PCT/CN2020/132476 patent/WO2021179693A1/en active Application Filing
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200117861A1 (en) * | 2017-04-14 | 2020-04-16 | Salesforce.Com, Inc. | Neural Machine Translation with Latent Tree Attention |
CN108228574A (en) * | 2017-12-07 | 2018-06-29 | 科大讯飞股份有限公司 | Text translation processing method and device |
CN108170686A (en) * | 2017-12-29 | 2018-06-15 | 科大讯飞股份有限公司 | Text interpretation method and device |
US20200193097A1 (en) * | 2018-12-17 | 2020-06-18 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Text translation method, device,and storage medium |
CN109740168A (en) * | 2019-01-09 | 2019-05-10 | 北京邮电大学 | A kind of classic of TCM ancient Chinese prose interpretation method based on knowledge of TCM map and attention mechanism |
CN110046252A (en) * | 2019-03-29 | 2019-07-23 | 北京工业大学 | A kind of medical textual hierarchy method based on attention mechanism neural network and knowledge mapping |
CN110502621A (en) * | 2019-07-03 | 2019-11-26 | 平安科技(深圳)有限公司 | Answering method, question and answer system, computer equipment and storage medium |
CN110334219A (en) * | 2019-07-12 | 2019-10-15 | 电子科技大学 | The knowledge mapping for incorporating text semantic feature based on attention mechanism indicates learning method |
CN110727806A (en) * | 2019-12-17 | 2020-01-24 | 北京百度网讯科技有限公司 | Text processing method and device based on natural language and knowledge graph |
CN111191464A (en) * | 2020-01-17 | 2020-05-22 | 珠海横琴极盛科技有限公司 | Semantic similarity calculation method based on combined distance |
CN111488462A (en) * | 2020-04-02 | 2020-08-04 | ***通信集团江苏有限公司 | Recommendation method, device, equipment and medium based on knowledge graph |
CN111723570A (en) * | 2020-06-09 | 2020-09-29 | 平安科技(深圳)有限公司 | Medicine knowledge graph construction method and device and computer equipment |
Non-Patent Citations (1)
Title |
---|
刘良: "基于领域知识图谱的智能问答关键技术研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021179693A1 (en) * | 2020-10-19 | 2021-09-16 | 平安科技(深圳)有限公司 | Medical text translation method and device, and storage medium |
CN114582494A (en) * | 2022-03-03 | 2022-06-03 | 数坤(北京)网络科技股份有限公司 | Diagnostic result analysis method, diagnostic result analysis device, storage medium and electronic equipment |
CN114582494B (en) * | 2022-03-03 | 2022-11-15 | 数坤(北京)网络科技股份有限公司 | Diagnostic result analysis method, diagnostic result analysis device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111950303B (en) | 2021-01-08 |
WO2021179693A1 (en) | 2021-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111950303B (en) | Medical text translation method, device and storage medium | |
CN112242187B (en) | Medical scheme recommendation system and method based on knowledge graph characterization learning | |
KR102401942B1 (en) | Method and apparatus for evaluating translation quality | |
CN110705206B (en) | Text information processing method and related device | |
CN112528637B (en) | Text processing model training method, device, computer equipment and storage medium | |
CN110347790B (en) | Text duplicate checking method, device and equipment based on attention mechanism and storage medium | |
CN111488742B (en) | Method and device for translation | |
CN111967261B (en) | Cancer stage information processing method, device and storage medium | |
CN112131883A (en) | Language model training method and device, computer equipment and storage medium | |
CN113094478B (en) | Expression reply method, device, equipment and storage medium | |
CN113158656B (en) | Ironic content recognition method, ironic content recognition device, electronic device, and storage medium | |
CN113657105A (en) | Medical entity extraction method, device, equipment and medium based on vocabulary enhancement | |
CN112270184A (en) | Natural language processing method, device and storage medium | |
CN112364664A (en) | Method and device for training intention recognition model and intention recognition and storage medium | |
CN116050352A (en) | Text encoding method and device, computer equipment and storage medium | |
CN113536784A (en) | Text processing method and device, computer equipment and storage medium | |
CN111666405B (en) | Method and device for identifying text implication relationship | |
CN113591493B (en) | Translation model training method and translation model device | |
CN113066510B (en) | Vowel weak reading detection method and device | |
CN112287217B (en) | Medical document retrieval method, medical document retrieval device, electronic equipment and storage medium | |
CN114155957A (en) | Text determination method and device, storage medium and electronic equipment | |
CN115115432A (en) | Artificial intelligence based product information recommendation method and device | |
CN114328894A (en) | Document processing method, document processing device, electronic equipment and medium | |
CN112016281A (en) | Method and device for generating wrong medical text and storage medium | |
CN113065333A (en) | Method and device for recognizing word types |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |