WO2021179693A1 - Medical text translation method and device, and storage medium - Google Patents

Medical text translation method and device, and storage medium Download PDF

Info

Publication number
WO2021179693A1
WO2021179693A1 PCT/CN2020/132476 CN2020132476W WO2021179693A1 WO 2021179693 A1 WO2021179693 A1 WO 2021179693A1 CN 2020132476 W CN2020132476 W CN 2020132476W WO 2021179693 A1 WO2021179693 A1 WO 2021179693A1
Authority
WO
WIPO (PCT)
Prior art keywords
word
medical
translated
feature vector
text
Prior art date
Application number
PCT/CN2020/132476
Other languages
French (fr)
Chinese (zh)
Inventor
李春宇
朱威
张开明
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021179693A1 publication Critical patent/WO2021179693A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Definitions

  • This application relates to the technical field of text recognition, in particular to a medical text translation method, device and storage medium.
  • Machine translation has gone through a long period of time. It has made great progress from statistical language models to deep learning models.
  • progress in the translation of medical texts has been slow. The main reason is that there are a large number of proper nouns and medical terms in the medical field.
  • the translation of medical documents and the translation of sentences related to medical documents still has great defects, and translation errors often occur. For this situation, it is necessary Manual adjustment.
  • the embodiments of the present application provide a medical text translation method, device and storage medium. By combining medical knowledge graphs, the accuracy of medical text translation is improved.
  • an embodiment of the present application provides a medical text translation method, including:
  • 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 medical text to be translated is translated.
  • an embodiment of the present application provides a medical text translation device, including:
  • the acquiring unit is used to acquire the medical text to be translated
  • a processing unit configured to perform semantic feature extraction on 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, and 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.
  • an embodiment of the present application provides a medical text translation device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are The configuration is performed by the processor to implement the following methods:
  • 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 medical text to be translated is translated.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program causes a computer to execute the following method:
  • 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 medical text to be translated is translated.
  • embodiments of the present application provide a computer program product
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program
  • the computer is operable to cause the computer to execute the computer program as described in the first aspect Methods.
  • the medical knowledge graph corresponding to the medical text to be translated is fused, so that the second feature vector can be fused with prior knowledge corresponding to the text to be translated. Then the accuracy of translation is improved, especially the accuracy of translation of medical terminology or medical terminology.
  • FIG. 1 is a schematic flowchart of a medical text translation method provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of a neural network provided by an embodiment of this application.
  • FIG. 3 is a schematic diagram of a self-attention mechanism provided by an embodiment of the application.
  • FIG. 4 is a schematic flowchart of a neural network training method provided by an embodiment of this application.
  • FIG. 5 is a schematic structural diagram of a medical text translation device provided by an embodiment of the application.
  • Fig. 6 is a block diagram of functional units of a medical text translation device provided by an embodiment of the application.
  • the technical solution of this application can be applied to the fields of artificial intelligence, smart city, digital medical, blockchain and/or big data technology to realize text translation, especially text translation in the medical field.
  • the data involved in this application such as translated text, vectors, and/or tags, can be stored in a database, or can be stored in a blockchain, such as distributed storage through a blockchain, which is not limited by this application .
  • Medical knowledge graph It is composed of a medical entity, a description corresponding to the medical entity (that is, an explanation of the medical entity), and a medical plan corresponding to the medical entity.
  • the gastric cancer medical knowledge map includes the medical entity "gastric cancer” of gastric cancer medicine, and its corresponding description is "gastric cancer is a malignant tumor that originates from the epithelium of the gastric mucosa", and its corresponding medical plans include: differences in gastric cancer, gastric cancer symptoms, and gastric cancer Diffusion and transfer pathways, and so on.
  • FIG. 1 is a schematic flowchart of a medical text translation method provided by an embodiment of the application. This method is applied to medical text translation devices. The method includes the following steps:
  • the medical text translation device obtains the medical text to be translated.
  • the medical text to be translated may be input by the user in the information input field of the medical text translation device.
  • the medical text translation device performs semantic feature extraction on the medical text to be translated to obtain a first feature vector.
  • embedding is performed on each word in each text to be translated to obtain a word vector corresponding to each word.
  • the word mentioned in this application is a complete word in Chinese and a complete word in English. The following words are similar to this and will not be described again.
  • the word embedding process for each word can be realized by one-hot encoding.
  • encoding can be performed according to the position of each word in the medical text to be translated.
  • the text to be translated is "I am a student”
  • one-hot encoding of each word can get the word vector corresponding to the word "I” as (1,0,0,0), and the word corresponding to the word "am”
  • the vector is (0,1,0,0)
  • the word vector corresponding to the word "a” is (0,0,1,0)
  • the word vector corresponding to the word "student” is (0,0,0,1).
  • semantic feature extraction is performed according to the word vector corresponding to each word to obtain the first feature vector.
  • the semantic feature extraction can be achieved through a semantic feature extraction network, which is pre-trained. The training process of the semantic feature extraction network is described later, and it will not be described here too much.
  • the number of the semantic feature extraction network may be one or more. In the case that the number of the semantic feature extraction network is multiple, the output result of the previous semantic feature extraction network needs to be taken as The next semantic feature is extracted from the input data of the network.
  • each semantic feature extraction network may be a long and short-term memory network or a cyclic neural network, and so on.
  • the word vector corresponding to each word is input to the semantic feature extraction network, and the semantic feature extraction of the text to be translated is performed to obtain the first feature vector.
  • the semantic feature extraction network also includes an attention module. Therefore, the word vector corresponding to each word is weighted by the attention module to obtain the target word vector corresponding to each word.
  • the word vector corresponding to word A is encoded to obtain the key value vector, query vector, and value vector corresponding to the word A, and the word A is the word A in the medical text to be translated Any word; then, determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word; according to the word A and each word The weight between each word is weighted to the value vector corresponding to each word to obtain the target word vector corresponding to word A.
  • query vector corresponding to each word can be expressed by formula (1):
  • n is the number of words in the text to be translated
  • W q is the first network parameter of the neural network
  • ⁇ j is the query vector corresponding to the jth word in the n words
  • ⁇ j is The word vector corresponding to the jth word, where n is an integer greater than or equal to 1.
  • the key value vector corresponding to each word can be expressed by formula (2):
  • W k is the second network parameter of the neural network
  • ⁇ j is the key value vector corresponding to the j-th word.
  • W v is the third network parameter of the neural network
  • ⁇ j is the key value vector corresponding to the j-th word.
  • ⁇ j is the similarity between word A and the key value vector corresponding to the j-th word in the n words, that is, the weight between word A and the j-th word, and ⁇ A is the corresponding to the A-th word Query vector, dist is the distance operation.
  • the value vector corresponding to each word is weighted to obtain the fourth feature vector corresponding to the word A.
  • the fourth feature vector corresponding to word A can be expressed by formula (5):
  • ⁇ A is the target word vector of word A
  • ⁇ j is the value vector corresponding to the jth word.
  • the influence of the preceding and following words on the current word can be merged into the target word vector corresponding to the current word, instead of identifying each word in isolation, that is, fusing the context information of the current word. , which can improve the accuracy of translation.
  • the medical text translation device obtains 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.
  • all the medical knowledge graphs in the medical field may be vectorized first to obtain the third feature vector corresponding to each medical knowledge graph. Because the medical knowledge graph is essentially a relationship composed of multiple medical texts. Therefore, it is also possible to separately vectorize each medical text contained in the medical knowledge map through a method similar to word embedding, and then concatenate multiple word vectors corresponding to multiple medical texts to obtain the corresponding medical map The third eigenvector.
  • the first entity word corresponding to each medical knowledge graph is determined, and the third feature vector corresponding to each medical knowledge graph is labeled according to the first entity word. For example, if the first entity word is gastric cancer, it is the The third feature vector is labeled "gastric cancer"; then, the second entity word in the text to be translated is determined, and the second entity tag is determined according to the second entity word; finally, the second entity tag is combined with each third entity
  • the first entity tag corresponding to the feature vector is compared one by one to obtain the first entity tag matching the second entity tag, and the third feature vector corresponding to the matched first entity tag is used as the corresponding to the medical text to be translated Target feature vector.
  • a first entity tag to all medical knowledge maps in the medical field according to the first entity word in each medical knowledge map, that is, to identify the first entity word of each medical knowledge map, and according to the first entity word
  • An entity word adds the first entity tag to each medical knowledge graph; then, the second entity tag corresponding to the text to be translated is determined, that is, the second entity word in the text to be translated is identified, and the second entity word is determined
  • the second entity tag corresponding to the text to be translated is determined, and the medical knowledge graph corresponding to the matched first entity tag is used as the target medical knowledge graph;
  • the medical knowledge graph is vectorized to obtain the target feature vector corresponding to the medical text to be translated.
  • the target medical knowledge graph is determined first, and then the target medical knowledge graph is vectorized as an example for description.
  • the medical knowledge graph can be vectorized through the graph conversion network to obtain the target feature vector, where the graph conversion network can be a deepwalk network or a transE network, and so on.
  • the graph conversion network can be a deepwalk network or a transE network, and so on. This application does not limit the type of the graph conversion network.
  • the entity word recognition on the medical knowledge graph or the text to be translated can be performed through a neural network or through dictionary matching.
  • the present application does not limit the recognition method of the entity word.
  • the neural network may be a convolutional neural network, a cyclic neural network, a long and short-term memory network, a bert model, and so on.
  • the medical text translation device splices the first feature vector and the target feature vector to obtain a second feature vector.
  • the first feature vector and the target feature vector are horizontally spliced to obtain the second feature vector.
  • 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 together
  • the third feature vector is obtained as (0,0,0,...,1,1,0,0...,1).
  • the medical text translation device translates the medical text to be translated according to the second feature vector.
  • the third feature vector may be input to the decoding network for decoding, and the translation result corresponding to the text to be translated is obtained.
  • the use of feature vectors for translation can be achieved through an existing decoding network (Decoder).
  • the decoding network includes multiple stack layers.
  • the third feature vector is first input to the first stack layer of the multiple stack layers to obtain the probability that the third feature vector falls into each word in the dictionary library, and the first feature vector is determined according to the probability of falling into each word.
  • the translation result of a stack layer that is, the word corresponding to the highest probability is used as the translation result of the first stack layer; then, the translation result of the first stack layer and the third feature vector are input to the second stack layer to continue Translate, translate the first word and the second word; and so on, until the last stack layer outputs the translation result corresponding to the text to be translated.
  • the first word “I” can be translated through the first stack layer; then, the first word “I” and the second word “affected” can be translated through the second stack layer; By analogy, until the last stack layer translates "I have three types of terminal gastric cancer.”
  • the medical knowledge map corresponding to the medical text to be translated is fused, so that the second feature vector can be fused with the corresponding to the text to be translated.
  • the accuracy of translation especially the accuracy of translation of medical terminology or medical terminology.
  • the medical text to be translated includes Chinese medical text or English medical text
  • the medical knowledge graph is a Chinese medical knowledge graph
  • the medical knowledge graph is an English medical knowledge graph
  • the language type of the medical text to be translated above should not constitute a limitation to this application.
  • the medical text to be translated may be a medical text in any language
  • the medical knowledge graph is a medical knowledge graph corresponding to the language type.
  • the method before performing semantic feature extraction on the medical text to be translated to obtain the first feature vector, the method further includes:
  • the fourth entity word is used to replace the third entity word in the text to be translated to obtain a new medical text to be translated, and the new medical text to be translated is used for translation.
  • word embedding can be performed on each word in the vertical keyword to obtain the word vector corresponding to each word in the vertical keyword; then, according to each word in the vertical keyword Perform semantic feature extraction on the corresponding word vector to obtain the third feature vector used to characterize the semantic feature of the vertical keyword; perform word embedding processing on the third entity word to obtain the correspondence of each word in the third entity word.
  • the third feature vector and the word vector corresponding to each word in the third entity word are processed to obtain the target word corresponding to each word in the third entity word Vector, that is, calculate the similarity between the third feature vector and the word vector corresponding to each word in the third entity word, and use the similarity as the weight between the third feature vector and each word , And then, the weight corresponding to each word and the word vector corresponding to the word are subjected to a dot product operation to obtain the target word vector corresponding to each word; according to the target word vector corresponding to each word in the third entity word Semantic feature extraction is used to obtain the fourth
  • the standardized keywords are keywords obtained by pre-standardizing the entity words corresponding to various diseases in the medical field.
  • the relationship between the standardized keywords and the disease is unmistakable, and there is a one-to-one correspondence.
  • the word embedding process is performed on the vertical keyword or the third entity word is each character in the English word.
  • the word embedding process is performed to obtain the character vector corresponding to each character.
  • the entity words are standardized first, even if the entity words in the text to be translated input by the user are wrong, they can be converted into corresponding standardized keywords, because the standardized keywords are clear and correct. Yes, avoiding translation errors caused by user input errors.
  • a self-attention mechanism is added to consider the matching degree between the third entity word and the vertical keyword, which can amplify the role of the word belonging to the medical field in the third entity word and weaken it. The role of words that do not belong to the medical field in the third entity word can improve the accuracy of standardization.
  • the medical text translation method of the present application can also be applied to the field of smart medicine.
  • doctors can quickly and accurately obtain the translation results through the medical text translation method, so that the translation results can be used for data query or medical history query, which can effectively assist the doctor's diagnosis process and promote the development of medical technology.
  • FIG. 4 is a schematic flowchart of a neural network training method provided by an embodiment of the application. The method includes the following steps:
  • the training text is the training text of the actual translation result that has been marked, that is, the training text includes the training label.
  • semantic feature extraction can be performed on the training text through the neural network to obtain the feature vector corresponding to the training text; similarly, the medical knowledge graph corresponding to the training text can be vectorized to obtain the target corresponding to the training sample Feature vector:
  • the target feature vector and the feature vector are spliced together, and the spliced vector is used for translation.
  • the first loss is determined according to the difference between the translation result and the training label; the network parameters of the neural network are updated according to the first loss and the gradient descent method.
  • the first loss can be expressed by formula (6):
  • Loss 1 for the first loss, N for the number of words of training labels, ⁇ i for the i-th training vector word corresponding to a word label, ⁇ 'i that corresponds to the translation of the i-th word Word vector, dist is the distance operation.
  • FIG. 5 is a schematic structural diagram of a medical text translation device provided by an embodiment of the application.
  • 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 are configured to be executed by the processor.
  • the above program includes instructions for performing the following steps:
  • 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 medical text to be translated is translated.
  • the above program is specifically used to execute the instructions of the following steps:
  • All medical knowledge maps in the medical field are vectorized to obtain the third feature vector corresponding to each medical knowledge map, and according to the first entity word in each medical knowledge map, it is the third feature corresponding to each medical knowledge map
  • the vector adds the first entity label
  • the above program is specifically used to execute the instructions of the following steps:
  • the target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
  • the above procedure is specifically used to execute the instructions of the following steps:
  • the above program is further used to execute the instructions of the following steps:
  • the above program is specifically used to execute the instructions of the following steps: performing semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector The first feature vector.
  • the above program is specifically used to execute the instructions of the following steps:
  • the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
  • the medical text to be translated includes Chinese medical text or English medical text
  • the medical knowledge graph is a Chinese medical knowledge graph
  • the medical knowledge graph is an English medical knowledge graph
  • the medical text translation device 600 includes: an acquisition unit 601 and a processing unit 602, wherein:
  • the obtaining unit 601 is used to obtain the 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, and 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.
  • the acquiring unit 601 is specifically configured to:
  • All medical knowledge maps in the medical field are vectorized to obtain the third feature vector corresponding to each medical knowledge map, and according to the first entity word in each medical knowledge map, it is the third feature corresponding to each medical knowledge map
  • the vector adds the first entity label
  • the acquiring unit 601 is specifically configured to:
  • the target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
  • the processing unit 602 is specifically configured to:
  • the processing unit 602 before performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector, is further configured to: according to the self-attention mechanism and the corresponding word Word vector, determine the target word vector corresponding to each word;
  • the processing unit 602 is specifically configured to: perform semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector Feature vector.
  • the processing unit 602 is specifically configured to:
  • the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
  • the medical text to be translated includes Chinese medical text or English medical text
  • the medical knowledge graph is a Chinese medical knowledge graph
  • the medical knowledge graph is an English medical knowledge graph
  • the embodiments of the present application also provide a computer (readable) storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to realize any medical treatment as described in the above method embodiments. Part or all of the steps of the text translation method.
  • the storage medium involved in this application such as a computer-readable storage medium, may be non-volatile or volatile.
  • the embodiments of the present application also provide a computer program product.
  • the computer program product includes a non-transitory computer-readable storage medium storing a computer program.
  • the computer program is operable to cause a computer to execute the method described in the foregoing method embodiment. Part or all of the steps of any medical text translation method.
  • the medical text translation device in this application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, handheld computers, notebook computers, mobile Internet Devices (Mobile Internet Devices, abbreviated as: MID) ) Or wearable devices, etc.
  • smart phones such as Android phones, iOS phones, Windows Phone phones, etc.
  • tablet computers such as Samsung phones, iOS phones, Windows Phone phones, etc.
  • handheld computers such as Samsung Galaxy Tabs, etc.
  • notebook computers mobile Internet Devices (Mobile Internet Devices, abbreviated as: MID) ) Or wearable devices, etc.
  • MID mobile Internet Devices
  • wearable devices etc.
  • the above-mentioned medical text translation device is only an example, not an exhaustive list, including but not limited to the above-mentioned medical text translation device.
  • the above-mentioned medical text translation device may also include: smart vehicle-mounted terminals, computer equipment, and so on.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software program modules.
  • the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.

Abstract

A medical text translation method and device, and a storage medium, relating to the field of medical technology. Said method comprises: a medical text translation device acquiring medical text to be translated (101); the medical text translation device performing semantic feature extraction on said medical text to obtain a first feature vector (102); the medical text translation device acquiring a target feature vector corresponding to said medical text, the target feature vector being used to represent a medical knowledge graph corresponding to said medical text (103); the medical text translation device splicing the first feature vector with the target feature vector to obtain a second feature vector (104); and the medical text translation device translating said medical text according to the second feature vector (105). Said method facilitates improving the accuracy of medical text translation.

Description

医疗文本翻译方法、装置及存储介质Medical text translation method, device and storage medium
本申请要求于2020年10月19日提交中国专利局、申请号为202011115345.3,发明名称为“医疗文本翻译方法、装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on October 19, 2020, the application number is 202011115345.3, and the invention title is "medical text translation method, device and storage medium", the entire content of which is incorporated herein by reference Applying.
技术领域Technical field
本申请涉及文本识别技术领域,具体涉及一种医疗文本翻译方法、装置及存储介质。This application relates to the technical field of text recognition, in particular to a medical text translation method, device and storage medium.
背景技术Background technique
机器翻译经历了很长的一段时间,从统计语言模型到深度学习模型有了很大进步,发明人意识到,目前翻译的进步主要体现在通用的翻译领域,比如,对日常用语的翻译。但是,在医疗文本翻译方面进步缓慢。主要是因为医疗领域上存在大量的专有名词和医学术语,导致,在医学文献翻译以及与医学文献相关的语句上的翻译还存在很大缺陷,经常出现翻译错误的情况,对于这种情况需要人工调整。Machine translation has gone through a long period of time. It has made great progress from statistical language models to deep learning models. The inventor realized that the current progress in translation is mainly reflected in the general translation field, such as the translation of everyday words. However, progress in the translation of medical texts has been slow. The main reason is that there are a large number of proper nouns and medical terms in the medical field. As a result, the translation of medical documents and the translation of sentences related to medical documents still has great defects, and translation errors often occur. For this situation, it is necessary Manual adjustment.
因此,现有对医疗文本的翻译精度低,用户体验差。Therefore, the existing translation accuracy of medical texts is low, and the user experience is poor.
发明内容Summary of the invention
本申请实施例提供了一种医疗文本翻译方法、装置及存储介质。通过结合医学知识图谱,提高医疗文本翻译的准确率。The embodiments of the present application provide a medical text translation method, device and storage medium. By combining medical knowledge graphs, the accuracy of medical text translation is improved.
第一方面,本申请实施例提供一种医疗文本翻译方法,包括:In the first aspect, an embodiment of the present application provides a medical text translation method, including:
获取待翻译医疗文本;Obtain the medical text to be translated;
将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
第二方面,本申请实施例提供一种医疗文本翻译装置,包括:In the second aspect, an embodiment of the present application provides a medical text translation device, including:
获取单元,用于获取待翻译医疗文本;The acquiring unit is used to acquire the medical text to be translated;
处理单元,用于将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;A processing unit, configured to perform semantic feature extraction on 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, and 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, an embodiment of the present application provides a medical text translation device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are The configuration is performed by the processor to implement the following methods:
获取待翻译医疗文本;Obtain the medical text to be translated;
将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序使得计算机执行以下方法:In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program causes a computer to execute the following method:
获取待翻译医疗文本;Obtain the medical text to be translated;
将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
第五方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机可操作来使计算机执行如第一方面所述的方法。In a fifth aspect, embodiments of the present application provide a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer is operable to cause the computer to execute the computer program as described in the first aspect Methods.
实施本申请实施例,在待翻译医疗文本进行翻译的过程中,融合了该待翻译医疗文本对应的医学知识图谱,可以使第二特征向量中融合有与该待翻译文本对应的先验知识,进而提高翻译的准确,尤其是提高了对医学专用术语或医学专有名词翻译的准确率。In the implementation of the embodiments of this application, in the process of translating the medical text to be translated, the medical knowledge graph corresponding to the medical text to be translated is fused, so that the second feature vector can be fused with prior knowledge corresponding to the text to be translated. Then the accuracy of translation is improved, especially the accuracy of translation of medical terminology or medical terminology.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
图1为本申请实施例提供的一种医疗文本翻译方法的流程示意图;FIG. 1 is a schematic flowchart of a medical text translation method provided by an embodiment of the application;
图2为本申请实施例提供的一种神经网络的示意图;FIG. 2 is a schematic diagram of a neural network provided by an embodiment of this application;
图3为本申请实施例提供的一种自注意力机制的示意图;FIG. 3 is a schematic diagram of a self-attention mechanism provided by an embodiment of the application;
图4为本申请实施例提供的一种神经网络训练方法的流程示意图;FIG. 4 is a schematic flowchart of a neural network training method provided by an embodiment of this application;
图5为本申请实施例提供的一种医疗文本翻译装置的结构示意图;FIG. 5 is a schematic structural diagram of a medical text translation device provided by an embodiment of the application;
图6为本申请实施例提供的一种医疗文本翻译装置的功能单元组成框图。Fig. 6 is a block diagram of functional units of a medical text translation device provided by an embodiment of the application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third" and "fourth" in the specification and claims of this application and the drawings are used to distinguish different objects, not to describe a specific order . In addition, the terms "including" and "having" and any variations of them are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes unlisted steps or units, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结果或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference to "embodiments" herein means that specific features, results or characteristics described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art clearly and implicitly understand that the embodiments described herein can be combined with other embodiments.
本申请的技术方案可应用于人工智能、智慧城市、数字医疗、区块链和/或大数据技术领域,以实现文本翻译,尤其是医疗领域的文本翻译。可选的,本申请涉及的数据如翻译后的文本、向量和/或标签等可存储于数据库中,或者可以存储于区块链中,比如通过区块链分布式存储,本申请不做限定。The technical solution of this application can be applied to the fields of artificial intelligence, smart city, digital medical, blockchain and/or big data technology to realize text translation, especially text translation in the medical field. Optionally, the data involved in this application, such as translated text, vectors, and/or tags, can be stored in a database, or can be stored in a blockchain, such as distributed storage through a blockchain, which is not limited by this application .
为了便于理解本申请的技术方案,对本申请涉及的相关术语进行解释说明。In order to facilitate the understanding of the technical solutions of the present application, the relevant terms involved in the present application are explained.
医学知识图谱:是由医学实体,与该医学实体对应的描述(即对该医学实体的解释说明)以及与该医学实体对应的医疗方案所组成。比如,胃癌医学知识图谱包括胃癌医学的医学实体“胃癌”,其对应的描述为“胃癌是起源于胃黏膜上皮的恶性肿瘤”,其对应的医疗方案包括:胃癌的差异性、胃癌症状、胃癌的扩散和转移途径,等等。Medical knowledge graph: It is composed of a medical entity, a description corresponding to the medical entity (that is, an explanation of the medical entity), and a medical plan corresponding to the medical entity. For example, the gastric cancer medical knowledge map includes the medical entity "gastric cancer" of gastric cancer medicine, and its corresponding description is "gastric cancer is a malignant tumor that originates from the epithelium of the gastric mucosa", and its corresponding medical plans include: differences in gastric cancer, gastric cancer symptoms, and gastric cancer Diffusion and transfer pathways, and so on.
参阅图1,图1为本申请实施例提供的一种医疗文本翻译方法的流程示意图。该方法 应用于医疗文本翻译装置。该方法包括以下步骤:Refer to FIG. 1, which is a schematic flowchart of a medical text translation method provided by an embodiment of the application. This method is applied to medical text translation devices. The method includes the following steps:
101:医疗文本翻译装置获取待翻译医疗文本。101: The medical text translation device obtains the medical text to be translated.
可选的,该待翻译医疗文本可以是用户在该医疗文本翻译装置的信息输入域中输入的。Optionally, the medical text to be translated may be input by the user in the information input field of the medical text translation device.
102:医疗文本翻译装置将所述待翻译医疗文本进行语义特征提取,得到第一特征向量。102: The medical text translation device performs semantic feature extraction on the medical text to be translated to obtain a first feature vector.
示例性的,对每个待翻译文本中的每个单词进行嵌入处理,得到与每个单词对应的词向量。其中,本申请中所提到的单词在中文中就是一个完整的字,在英文中就是一个完整的单词,后面涉及的单词均与此类似,不再叙述。Exemplarily, embedding is performed on each word in each text to be translated to obtain a word vector corresponding to each word. Among them, the word mentioned in this application is a complete word in Chinese and a complete word in English. The following words are similar to this and will not be described again.
对每个单词进行词嵌入处理可以通过热编码(one-hot)实现。比如,可以根据每个单词在该待翻译医疗文本中的位置进行编码。比如,待翻译文本为“I am a student”,对每个单词进行one-hot编码可得到单词“I”对应的词向量为(1,0,0,0),单词“am”对应的词向量为(0,1,0,0),单词“a”对应的词向量为(0,0,1,0),单词“student”对应的词向量为(0,0,0,1)。The word embedding process for each word can be realized by one-hot encoding. For example, encoding can be performed according to the position of each word in the medical text to be translated. For example, the text to be translated is "I am a student", and one-hot encoding of each word can get the word vector corresponding to the word "I" as (1,0,0,0), and the word corresponding to the word "am" The vector is (0,1,0,0), the word vector corresponding to the word "a" is (0,0,1,0), and the word vector corresponding to the word "student" is (0,0,0,1).
然后,根据每个单词对应的词向量进行语义特征提取,得到该第一特征向量。其中,进行语义特征提取可以通过语义特征提取网络实现,该语义特征提取网络是预先训练好的,后面叙述对该语义特征提取网络的训练过程,在此不做过多描述。Then, semantic feature extraction is performed according to the word vector corresponding to each word to obtain the first feature vector. Among them, the semantic feature extraction can be achieved through a semantic feature extraction network, which is pre-trained. The training process of the semantic feature extraction network is described later, and it will not be described here too much.
在本申请的一个实施方式中,该语义特征提取网络的数量可以为一个或多个,在该语义特征提取网络的数量为多个的情况下,需要将上一个语义特征提取网络的输出结果作为下一个语义特征提取网络的输入数据。示例性的,每个语义特征提取网络可以为长短期记忆网络或者循环神经网络的,等等。In an embodiment of the present application, the number of the semantic feature extraction network may be one or more. In the case that the number of the semantic feature extraction network is multiple, the output result of the previous semantic feature extraction network needs to be taken as The next semantic feature is extracted from the input data of the network. Exemplarily, each semantic feature extraction network may be a long and short-term memory network or a cyclic neural network, and so on.
本申请中以语义特征提取网络的数量为一个举例说明。In this application, the number of semantic feature extraction networks is taken as an example for illustration.
如图2所示,将每个单词对应的词向量输入到该语义特征提取网络,对该待翻译文本进行语义特征提取,得到该第一特征向量。As shown in FIG. 2, the word vector corresponding to each word is input to the semantic feature extraction network, and the semantic feature extraction of the text to be translated is performed to obtain the first feature vector.
在本申请的一个实施方式中,该语义特征提取网络中还包含有注意力模块。因此,通过该注意力模块对每个单词对应的词向量进行加权处理,得到每个单词对应的目标词向量。In an embodiment of the present application, the semantic feature extraction network also includes an attention module. Therefore, the word vector corresponding to each word is weighted by the attention module to obtain the target word vector corresponding to each word.
示例性的,如图3所示,对单词A对应的词向量进行编码,得到与该单词A对应的关键值向量、查询向量以及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;然后,确定该单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将相似度作为单词A与每个单词之间的权重;根据单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到单词A对应的目标词向量。Exemplarily, as shown in FIG. 3, the word vector corresponding to word A is encoded to obtain the key value vector, query vector, and value vector corresponding to the word A, and the word A is the word A in the medical text to be translated Any word; then, determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word; according to the word A and each word The weight between each word is weighted to the value vector corresponding to each word to obtain the target word vector corresponding to word A.
示例性的,每个单词对应的查询向量可以通过公式(1)表示:Exemplarily, the query vector corresponding to each word can be expressed by formula (1):
α j=W q·φ j  (1) α j =W q ·φ j (1)
其中,1≤j≤n,n为待翻译文本中单词的数量,W q为该神经网络的第一网络参数,α j为n个单词中的第j个单词对应的查询向量,φ j为第j个单词对应的词向量,n为大于或等于1的整数。 Among them, 1≤j≤n, n is the number of words in the text to be translated, W q is the first network parameter of the neural network, α j is the query vector corresponding to the jth word in the n words, and φ j is The word vector corresponding to the jth word, where n is an integer greater than or equal to 1.
示例性的,每个单词对应的关键值向量可以通过公式(2)表示:Exemplarily, the key value vector corresponding to each word can be expressed by formula (2):
β j=W k·φ j  (2) β j =W k ·φ j (2)
其中,W k为该神经网络的第二网络参数,β j为第j个单词对应的关键值向量。 Among them, W k is the second network parameter of the neural network, and β j is the key value vector corresponding to the j-th word.
示例性的,每个单词对应的价值向量可以通过公式(3)表示:Exemplarily, the value vector corresponding to each word can be expressed by formula (3):
λ j=W v·φ j  (3) λ j =W v ·φ j (3)
其中,W v为该神经网络的第三网络参数,λ j为第j个单词对应的关键值向量。 Among them, W v is the third network parameter of the neural network, and λ j is the key value vector corresponding to the j-th word.
然后,确定单词A的查询向量与每个单词对应的关键值向量之间的相似度,得到该单词A与每个单词之间的权重,示例性的,单词A与每个单词之间的权重可通过公式(4)表示:Then, determine the similarity between the query vector of the word A and the key value vector corresponding to each word, and obtain the weight between the word A and each word, for example, the weight between the word A and each word It can be expressed by formula (4):
Figure PCTCN2020132476-appb-000001
Figure PCTCN2020132476-appb-000001
其中,ξ j为单词A与n个单词中的第j个单词对应的关键值向量之间的相似度,即单词A与第j个单词之间的权重,α A为第A个单词对应的查询向量,dist为求距离操作。 Among them, ξ j is the similarity between word A and the key value vector corresponding to the j-th word in the n words, that is, the weight between word A and the j-th word, and α A is the corresponding to the A-th word Query vector, dist is the distance operation.
最后,根据该单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到该单词A对应的第四特征向量。Finally, according to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the fourth feature vector corresponding to the word A.
示例性的,单词A对应的第四特征向量可通过公式(5)表示:Exemplarily, the fourth feature vector corresponding to word A can be expressed by formula (5):
Figure PCTCN2020132476-appb-000002
Figure PCTCN2020132476-appb-000002
其中,τ A为单词A的目标词向量,λ j为第j个单词对应的价值向量。 Among them, τ A is the target word vector of word A, and λ j is the value vector corresponding to the jth word.
可以看出,根据自注意力机制,可以将前后单词对当前单词的影响融合到该当前单词对应的目标词向量中,而不是孤立的识别每个单词,即融合了该当前单词所在的上下文信息,可提高翻译准确率。It can be seen that according to the self-attention mechanism, the influence of the preceding and following words on the current word can be merged into the target word vector corresponding to the current word, instead of identifying each word in isolation, that is, fusing the context information of the current word. , Which can improve the accuracy of translation.
103:医疗文本翻译装置获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱。103: The medical text translation device obtains 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.
示例性的,可以先对医疗领域的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量。由于医学知识图谱本质是由多个医疗文本组成的关系。因此,也可以通过类似词嵌入的方法分别对医学知识图谱中包含的每个医疗文本进行向量化,然后,再把多个医疗文本对应的多个个词向量进行拼接,得到每个医学图谱对应的第三特征向量。Exemplarily, all the medical knowledge graphs in the medical field may be vectorized first to obtain the third feature vector corresponding to each medical knowledge graph. Because the medical knowledge graph is essentially a relationship composed of multiple medical texts. Therefore, it is also possible to separately vectorize each medical text contained in the medical knowledge map through a method similar to word embedding, and then concatenate multiple word vectors corresponding to multiple medical texts to obtain the corresponding medical map The third eigenvector.
进一步地,确定每个医学知识图谱对应的第一实体词,根据该第一实体词为每个医学知识图谱对应的第三特征向量打上标签,比如,该第一实体词为胃癌,则为该第三特征向量打上“胃癌”的标签;然后,确定该待翻译文本中的第二实体词,根据该第二实体词确定第二实体标签;最后,将该第二实体标签与每个第三特征向量对应的第一实体标签一一比对,得到与该第二实体标签匹配的第一实体标签,将该匹配的第一实体标签对应的第三特征向量作为与该待翻译医疗文本对应的目标特征向量。Further, the first entity word corresponding to each medical knowledge graph is determined, and the third feature vector corresponding to each medical knowledge graph is labeled according to the first entity word. For example, if the first entity word is gastric cancer, it is the The third feature vector is labeled "gastric cancer"; then, the second entity word in the text to be translated is determined, and the second entity tag is determined according to the second entity word; finally, the second entity tag is combined with each third entity The first entity tag corresponding to the feature vector is compared one by one to obtain the first entity tag matching the second entity tag, and the third feature vector corresponding to the matched first entity tag is used as the corresponding to the medical text to be translated Target feature vector.
示例性的,还可以根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签,即识别每个医学知识图谱的第一实体词,根据该第一实体词为每个医学知识图谱添加第一实体标签;然后,确定与该待翻译文本对应的第二实体标签,即识别该待翻译文本中的第二实体词,根据该第二实体词确定该待翻译文本对应的第二实体标签;最后,确定与该第二实体标签匹配的第一实体标签,并将该匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;对该目标医学知识图谱进行向量化,得到与该待翻译医疗文本对应的目标特征向量。Exemplarily, it is also possible to add a first entity tag to all medical knowledge maps in the medical field according to the first entity word in each medical knowledge map, that is, to identify the first entity word of each medical knowledge map, and according to the first entity word An entity word adds the first entity tag to each medical knowledge graph; then, the second entity tag corresponding to the text to be translated is determined, that is, the second entity word in the text to be translated is identified, and the second entity word is determined The second entity tag corresponding to the text to be translated; finally, the first entity tag matching the second entity tag is determined, and the medical knowledge graph corresponding to the matched first entity tag is used as the target medical knowledge graph; The medical knowledge graph is vectorized to obtain the target feature vector corresponding to the medical text to be translated.
本申请中以先确定目标医学知识图谱,然后对目标医学知识图谱进行向量化为为例进行说明。In this application, the target medical knowledge graph is determined first, and then the target medical knowledge graph is vectorized as an example for description.
示例性的,如图2所示,可以通过图谱转换网络对医学知识图谱进行向量化,得到目 标特征向量,其中,该图谱转换网络可以为deepwalk网络或者transE网络,等等。本申请不对图谱转换网络的类型进行限定。Exemplarily, as shown in Figure 2, the medical knowledge graph can be vectorized through the graph conversion network to obtain the target feature vector, where the graph conversion network can be a deepwalk network or a transE network, and so on. This application does not limit the type of the graph conversion network.
应理解,对医学知识图谱或者待翻译文本进行实体词识别,可以通过神经网络执行,也可以通过字典匹配实现,本申请对实体词的识别方式不进行限定。其中,该神经网络可以为卷积神经网络、循环神经网络、长短期记忆网络,bert模型,等等。It should be understood that the entity word recognition on the medical knowledge graph or the text to be translated can be performed through a neural network or through dictionary matching. The present application does not limit the recognition method of the entity word. Among them, the neural network may be a convolutional neural network, a cyclic neural network, a long and short-term memory network, a bert model, and so on.
104:医疗文本翻译装置将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量。104: The medical text translation device splices the first feature vector and the target feature vector to obtain a second feature vector.
示例性的,将该第一特征向量与该目标特征向量进行横向拼接,得到第二特征向量。比如,第一特征向量为(0,0,0,……,1),目标特征向量为(1,0,0……,1),则将第一特征向量和第二特征向量进行拼接,得到第三特征向量为(0,0,0,……,1,1,0,0……,1)。Exemplarily, the first feature vector and the target feature vector are horizontally spliced to obtain the 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), then the first feature vector and the second feature vector are spliced together, The third feature vector is obtained as (0,0,0,...,1,1,0,0...,1).
105:医疗文本翻译装置根据所述第二特征向量,对所述待翻译医疗文本进行翻译。105: The medical text translation device translates the medical text to be translated according to the second feature vector.
示例性的,如图2所示,可将该第三特征向量输入到解码网络进行解码,得到该待翻译文本对应的翻译结果。Exemplarily, as shown in FIG. 2, the third feature vector may be input to the decoding network for decoding, and the translation result corresponding to the text to be translated is obtained.
其中,使用特征向量进行翻译可以通过现有的解码网络(Decoder)实现。Among them, the use of feature vectors for translation can be achieved through an existing decoding network (Decoder).
具体的,该解码网络包括多个堆栈层。将该第三特征向量先输入到该多个堆栈层中的第一个堆栈层,得到第三特征向量落入字典库中的每个单词的概率,根据落入每个单词的概率确定第一个堆栈层的翻译结果,即将概率最大所对应的单词作为第一个堆栈层的翻译结果;然后,将第一个堆栈层的翻译结果以及该第三特征向量输入到第二个堆栈层继续进行翻译,翻译出第一个单词和第二个单词;依次类推,直至最后一个堆栈层输出该待翻译文本对应的翻译结果。Specifically, the decoding network includes multiple stack layers. The third feature vector is first input to the first stack layer of the multiple stack layers to obtain the probability that the third feature vector falls into each word in the dictionary library, and the first feature vector is determined according to the probability of falling into each word. The translation result of a stack layer, that is, the word corresponding to the highest probability is used as the translation result of the first stack layer; then, the translation result of the first stack layer and the third feature vector are input to the second stack layer to continue Translate, translate the first word and the second word; and so on, until the last stack layer outputs the translation result corresponding to the text to be translated.
示例性的,如图2所示,可通过第一堆栈层翻译出第一单词“我”;然后,通过第二个堆栈层翻译出第一单词“我”和第二单词“患”;依次类推,直至最后一个堆栈层翻译出“我患有三种末期胃癌”。Exemplarily, as shown in Fig. 2, the first word "I" can be translated through the first stack layer; then, the first word "I" and the second word "affected" can be translated through the second stack layer; By analogy, until the last stack layer translates "I have three types of terminal gastric cancer."
可以看出,在本申请实施例中,在待翻译医疗文本进行翻译的过程中,融合了该待翻译医疗文本对应的医学知识图谱,可以使第二特征向量中融合有与该待翻译文本对应的先验知识,进而提高翻译的准确,尤其是提高了对医学专用术语或医学专有名词翻译的准确率。It can be seen that in the embodiment of this 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 second feature vector can be fused with the corresponding to the text to be translated. In order to improve the accuracy of translation, especially the accuracy of translation of medical terminology or medical terminology.
在一些可能的实施方式中,所述待翻译医疗文本包括中文医疗文本或英文医疗文本,且在所述待翻译医疗文本为中文医疗文本的情况下,所述医学知识图谱为中文医学知识图谱,在所述待翻译医疗文本为英文医疗文本的情况下,所述医学知识图谱为英文医学知识图谱。In some possible implementation manners, the medical text to be translated includes Chinese medical text or English medical text, and when the medical text to be translated is a Chinese medical text, the medical knowledge graph is a Chinese medical knowledge graph, In the case that the medical text to be translated is an English medical text, the medical knowledge graph is an English medical knowledge graph.
应理解,上述待翻译医疗文本的语言类型不应对本申请构成限定。在实际应用中,该待翻译医疗文本可以为任意一种语言的医疗文本,且该医学知识图谱为与该语言类型对应的医学知识图谱。It should be understood that the language type of the medical text to be translated above should not constitute a limitation to this application. In practical applications, the medical text to be translated may be a medical text in any language, and the medical knowledge graph is a medical knowledge graph corresponding to the language type.
在一些可能的实施方式中,在将所述待翻译医疗文本进行语义特征提取,得到第一特征向量之前,所述方法还包括:In some possible implementation manners, before performing semantic feature extraction on the medical text to be translated to obtain the first feature vector, the method further includes:
获取所述待翻译医疗文本中的垂类关键词以及与所述垂类关键词对应的第三实体词;Acquiring the vertical keywords in the medical text to be translated and the third entity words corresponding to the vertical keywords;
根据所述垂类关键词,对所述第三实体词进行标准化,得到第四实体词;Standardize the third entity word according to the vertical keywords to obtain a fourth entity word;
使用所述第四实体词替换待翻译文本中的所述第三实体词,得到新的待翻译医疗文本,使用所述新的待医疗翻译文本进行翻译。The fourth entity word is used to replace the third entity word in the text to be translated to obtain a new medical text to be translated, and the new medical text to be translated is used for translation.
示例性的,可对该垂类关键词中的每个单词进行词嵌入处理,得到该垂类关键词中的每个单词对应的词向量;然后,根据该垂类关键词中的每个单词对应的词向量进行语义特征提取,得到用于表征该垂类关键词的语义特征的第三特征向量;对该第三实体词进行词嵌入处理,得到该第三实体词中的每个单词对应的词向量;然后,根据自注意机制,对该 第三特征向量以及该第三实体词中的每个单词对应的词向量进行处理,得到该第三实体词中的每个单词对应的目标词向量,即计算该第三特征向量与该第三实体词中的每个单词对应的词向量之间的相似度,并将该相似度作为该第三特征向量与该每个单词之间的权重,然后,将每个单词对应的权重与该单词对应的词向量进行点乘运算,得到与每个单词对应的目标词向量;根据该第三实体词中的每个单词对应的目标词向量进行语义特征提取,得到用于表征该第三实体词的第四特征向量;最后,根据该第四特征向量,确定落入各个标准化实体词的概率,将概率最大对应的标准化关键词作为该第四实体词。Exemplarily, word embedding can be performed on each word in the vertical keyword to obtain the word vector corresponding to each word in the vertical keyword; then, according to each word in the vertical keyword Perform semantic feature extraction on the corresponding word vector to obtain the third feature vector used to characterize the semantic feature of the vertical keyword; perform word embedding processing on the third entity word to obtain the correspondence of each word in the third entity word Then, according to the self-attention mechanism, the third feature vector and the word vector corresponding to each word in the third entity word are processed to obtain the target word corresponding to each word in the third entity word Vector, that is, calculate the similarity between the third feature vector and the word vector corresponding to each word in the third entity word, and use the similarity as the weight between the third feature vector and each word , And then, the weight corresponding to each word and the word vector corresponding to the word are subjected to a dot product operation to obtain the target word vector corresponding to each word; according to the target word vector corresponding to each word in the third entity word Semantic feature extraction is used to obtain the fourth feature vector used to characterize the third entity word; finally, according to the fourth feature vector, the probability of falling into each standardized entity word is determined, and the standardized keyword corresponding to the highest probability is used as the fourth feature vector. Entity word.
其中,标准化关键词是预先对医疗领域的各种疾病对应的实体词进行标准化后的关键词。该标准化关键词与疾病之间的关系是清楚无误,且一一对应的。Among them, the standardized keywords are keywords obtained by pre-standardizing the entity words corresponding to various diseases in the medical field. The relationship between the standardized keywords and the disease is unmistakable, and there is a one-to-one correspondence.
可以理解,如果该垂类关键词或者第三实体词为英文单词,则对该垂类关键词进行词嵌入处理,就是对该垂类关键词或者第三实体词为英文单词中的每个字符进行词嵌入处理,得到每个字符对应的字符向量。It is understandable that if the vertical keyword or the third entity word is an English word, then the word embedding process is performed on the vertical keyword or the third entity word is each character in the English word. The word embedding process is performed to obtain the character vector corresponding to each character.
可以看出,在本实施方式中,先对实体词进行标准化处理,即使用户输入的待翻译文本中的实体词是错误的,也可以转化为对应的标准化关键词,由于标准化关键词是清楚无误的,避免了由于用户输入错误带来的翻译错误问题。而且,在标准化的过程中,加入了自注意力机制,考虑第三实体词与该垂类关键词之间的匹配度,进而可以放大该第三实体词中属于医疗领域的单词的作用,弱化该第三实体词中不属于医疗领域的单词的作用,可提高标准化的准确度。It can be seen that, in this embodiment, the entity words are standardized first, even if the entity words in the text to be translated input by the user are wrong, they can be converted into corresponding standardized keywords, because the standardized keywords are clear and correct. Yes, avoiding translation errors caused by user input errors. Moreover, in the process of standardization, a self-attention mechanism is added to consider the matching degree between the third entity word and the vertical keyword, which can amplify the role of the word belonging to the medical field in the third entity word and weaken it. The role of words that do not belong to the medical field in the third entity word can improve the accuracy of standardization.
在本申请的一个实施方式中,本申请的医疗文本翻译方法还可以应用到智慧医疗领域。比如,医生可以通过该医疗文本翻译方法快速、准确的,得到翻译结果,从而可以使用该翻译结果进行资料查询或者病历查询,进而可以有效的辅助医生的诊断过程,推动医疗科技的发展。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 medicine. For example, doctors can quickly and accurately obtain the translation results through the medical text translation method, so that the translation results can be used for data query or medical history query, which can effectively assist the doctor's diagnosis process and promote the development of medical technology.
参阅图4,图4为本申请实施例提供的一种神经网络训练方法的流程示意图。该方法包括以下步骤:Refer to FIG. 4, which is a schematic flowchart of a neural network training method provided by an embodiment of the application. The method includes the following steps:
401:获取训练文本。401: Obtain training text.
其中,该训练文本是已标注好的真实翻译结果的训练文本,即该训练文本包括有训练标签。Wherein, the training text is the training text of the actual translation result that has been marked, that is, the training text includes the training label.
402:将所述训练文本输入到所述神经网络,得到对所述训练文本的翻译结果。402: Input the training text to 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 the feature vector corresponding to the training text; similarly, the medical knowledge graph corresponding to the training text can be vectorized to obtain the target corresponding to the training sample Feature vector: The target feature vector and the feature vector are spliced together, and the spliced vector is used for translation.
403:根据所述训练文本的翻译结果以及训练标签,调整所述神经网络的网络参数,以对所述神经网络进行训练。403: Adjust the network parameters of the neural network according to the translation result of the training text and the training label, so as to train the neural network.
即根据该翻译结果与该训练标签之间的差异,确定第一损失;根据该第一损失以及梯度下降法更新该神经网络的网络参数。That is, the first loss is determined according to the difference between the translation result and the training label; the network parameters of the neural network are updated according to the first loss and the gradient descent method.
示例性的,第一损失可以通过公式(6)表示:Exemplarily, the first loss can be expressed by formula (6):
Figure PCTCN2020132476-appb-000003
Figure PCTCN2020132476-appb-000003
其中,Loss 1为第一损失,N为该训练标签单词的数量,σ i为该训练标签中的第i个单词对应的词向量,σ′ i为该翻译结果中的第i个单词对应的词向量,dist为求距离操作。 Wherein, Loss 1 for the first loss, N for the number of words of training labels, σ i for the i-th training vector word corresponding to a word label, σ 'i that corresponds to the translation of the i-th word Word vector, dist is the distance operation.
参阅图5,图5为本申请实施例提供的一种医疗文本翻译装置的结构示意图。如图5所示,医疗文本翻译装置500包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of a medical text translation device provided by an embodiment of the 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 are configured to be executed by the processor. The above program includes instructions for performing the following steps:
获取待翻译医疗文本;Obtain the medical text to be translated;
将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
在一些可能的实施方式中,在获取与所述待翻译医疗文本对应的目标特征向量方面,上述程序具体用于执行以下步骤的指令:In some possible implementation manners, in terms of obtaining the target feature vector corresponding to the medical text to be translated, the above program is specifically used to execute the instructions of the following steps:
医疗领域中的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量,并根据每个医学知识图谱中的第一实体词,为每个医学知识图谱对应的第三特征向量添加第一实体标签;All medical knowledge maps in the medical field are vectorized to obtain the third feature vector corresponding to each medical knowledge map, and according to the first entity word in each medical knowledge map, it is the third feature corresponding to each medical knowledge map The vector adds the first entity label;
根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
确定与所述第二实体标签匹配的第一实体标签,并将所述匹配的第一实体标签对应的第三特征向量作为与所述待翻译医疗文本对应的目标特征向量。Determine a first entity tag that matches the second entity tag, and use a third feature vector corresponding to the matched first entity tag as a target feature vector corresponding to the medical text to be translated.
在一些可能的实施方式中,在获取与所述待翻译医疗文本对应的目标特征向量方面,上述程序具体用于执行以下步骤的指令:In some possible implementation manners, in terms of obtaining the target feature vector corresponding to the medical text to be translated, the above program is specifically used to execute the instructions of the following steps:
根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签;According to the first entity word in each medical knowledge graph, add the first entity tag to all medical knowledge graphs in the medical field;
根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
确定与所述第二实体标签匹配的第一实体标签,并将与所述匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;Determine a first entity tag that matches the second entity tag, and use a medical knowledge graph corresponding to the matched first entity tag as a target medical knowledge graph;
对所述目标医学知识图谱进行向量化,得到与所述待翻译医疗文本对应的目标特征向量。The target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
在一些可能的实施方式中,在将所述待翻译医疗文本进行语义特征提取,得到第一特征向量方面,上述程序具体用于执行以下步骤的指令:In some possible implementation manners, in terms of performing semantic feature extraction on the medical text to be translated to obtain the first feature vector, the above procedure is specifically used to execute the instructions of 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;
根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector.
在一些可能的实施方式中,在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量之前,上述程序还用于执行以下步骤的指令:In some possible implementation manners, before the semantic feature extraction is performed according to the word vector corresponding to each word to obtain the first feature vector, the above program is further used to execute the instructions of the following steps:
根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量;Determine the target word vector corresponding to each word according to the 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 above program is specifically used to execute the instructions of the following steps: performing semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector The first feature vector.
在一些可能的实施方式中,在根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量方面,上述程序具体用于执行以下步骤的指令:In some possible implementation manners, in terms of determining the target word vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word, the above program is specifically used to execute the instructions of the following steps:
对单词A对应的词向量进行编码,得到与所述单词A对应的关键值向量、查询向量以及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;Encoding a word vector corresponding to word A to obtain a key value vector, a query vector, and a value vector corresponding to the word A, where the word A is any word in the medical text to be translated;
确定所述单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将所述相似度作为所述单词A与每个单词之间的权重;Determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word;
根据所述单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理, 得到所述单词A对应的目标词向量。According to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
在一些可能的实施方式中,所述待翻译医疗文本包括中文医疗文本或英文医疗文本,且在所述待翻译医疗文本为中文医疗文本的情况下,所述医学知识图谱为中文医学知识图谱,在所述待翻译医疗文本为英文医疗文本的情况下,所述医学知识图谱为英文医学知识图谱。In some possible implementation manners, the medical text to be translated includes Chinese medical text or English medical text, and when the medical text to be translated is a Chinese medical text, the medical knowledge graph is a Chinese medical knowledge graph, In the case that the medical text to be translated is an English medical text, the medical knowledge graph is an English medical knowledge graph.
参阅图6,图6本申请实施例提供的一种医疗文本翻译装置的功能单元组成框图。医疗文本翻译装置600包括:获取单元601和处理单元602,其中:Refer to FIG. 6, which is a block diagram of the functional unit composition of a medical text translation device provided by an embodiment of the present application. The medical text translation device 600 includes: an acquisition unit 601 and a processing unit 602, wherein:
获取单元601,用于获取待翻译医疗文本;The obtaining unit 601 is used to obtain the medical text to be translated;
处理单元602,用于将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;The processing unit 602 is configured to perform semantic feature extraction on the medical text to be translated to obtain a first feature vector;
获取单元601,还用于获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;The obtaining unit 601 is further configured to obtain a target feature vector corresponding to the medical text to be translated, and the target feature vector is used to represent a medical knowledge graph corresponding to the medical text to be translated;
处理单元602,还用于将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;The processing unit 602 is further configured to splice the first feature vector and the target feature vector to obtain a second feature vector;
处理单元602,还用于根据所述第二特征向量,对所述待翻译医疗文本进行翻译。The processing unit 602 is further configured to translate the medical text to be translated according to the second feature vector.
在一些可能的实施方式中,在获取与所述待翻译医疗文本对应的目标特征向量方面,获取单元601,具体用于:In some possible implementation manners, in terms of acquiring the target feature vector corresponding to the medical text to be translated, the acquiring unit 601 is specifically configured to:
医疗领域中的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量,并根据每个医学知识图谱中的第一实体词,为每个医学知识图谱对应的第三特征向量添加第一实体标签;All medical knowledge maps in the medical field are vectorized to obtain the third feature vector corresponding to each medical knowledge map, and according to the first entity word in each medical knowledge map, it is the third feature corresponding to each medical knowledge map The vector adds the first entity label;
根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
确定与所述第二实体标签匹配的第一实体标签,并将所述匹配的第一实体标签对应的第三特征向量作为与所述待翻译医疗文本对应的目标特征向量。Determine a first entity tag that matches the second entity tag, and use a third feature vector corresponding to the matched first entity tag as a target feature vector corresponding to the medical text to be translated.
在一些可能的实施方式中,在获取与所述待翻译医疗文本对应的目标特征向量方面,获取单元601,具体用于:In some possible implementation manners, in terms of acquiring the target feature vector corresponding to the medical text to be translated, the acquiring unit 601 is specifically configured to:
根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签;According to the first entity word in each medical knowledge graph, add the first entity tag to all medical knowledge graphs in the medical field;
根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
确定与所述第二实体标签匹配的第一实体标签,并将与所述匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;Determine a first entity tag that matches the second entity tag, and use a medical knowledge graph corresponding to the matched first entity tag as a target medical knowledge graph;
对所述目标医学知识图谱进行向量化,得到与所述待翻译医疗文本对应的目标特征向量。The target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
在一些可能的实施方式中,在将所述待翻译医疗文本进行语义特征提取,得到第一特征向量方面,处理单元602,具体用于:In some possible implementation manners, in terms of performing semantic feature extraction on the medical text to be translated to obtain the 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;
根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector.
在一些可能的实施方式中,在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量之前,处理单元602,还用于:根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量;In some possible implementation manners, before performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector, the processing unit 602 is further configured to: according to the self-attention mechanism and the corresponding word Word vector, determine the target word vector corresponding to each word;
在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量方面,处理单元602,具体用于:根据每个单词对应的目标词向量进行语义特征提取,得到所述第一特征向量。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: perform semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector Feature vector.
在一些可能的实施方式中,在根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量方面,处理单元602,具体用于:In some possible implementation manners, in terms of determining the target word 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:
对单词A对应的词向量进行编码,得到与所述单词A对应的关键值向量、查询向量以 及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;Encoding the word vector corresponding to word A to obtain the key value vector, query vector, and value vector corresponding to the word A, where the word A is any word in the medical text to be translated;
确定所述单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将所述相似度作为所述单词A与每个单词之间的权重;Determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word;
根据所述单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到所述单词A对应的目标词向量。According to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
在一些可能的实施方式中,所述待翻译医疗文本包括中文医疗文本或英文医疗文本,且在所述待翻译医疗文本为中文医疗文本的情况下,所述医学知识图谱为中文医学知识图谱,在所述待翻译医疗文本为英文医疗文本的情况下,所述医学知识图谱为英文医学知识图谱。In some possible implementation manners, the medical text to be translated includes Chinese medical text or English medical text, and when the medical text to be translated is a Chinese medical text, the medical knowledge graph is a Chinese medical knowledge graph, In the case that the medical text to be translated is an English medical text, the medical knowledge graph is an English medical knowledge graph.
本申请实施例还提供一种计算机(可读)存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现如上述方法实施例中记载的任何一种医疗文本翻译方法的部分或全部步骤。The embodiments of the present application also provide a computer (readable) storage medium, the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to realize any medical treatment as described in the above method embodiments. Part or all of the steps of the text translation method.
可选的,本申请涉及的存储介质如计算机可读存储介质可以是非易失性的,也可以是易失性的。Optionally, the storage medium involved in this application, such as a computer-readable storage medium, may be non-volatile or volatile.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种医疗文本翻译方法的部分或全部步骤。The embodiments of the present application also provide a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute the method described in the foregoing method embodiment. Part or all of the steps of any medical text translation method.
应理解,本申请中的医疗文本翻译装置可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、掌上电脑、笔记本电脑、移动互联网设备MID(Mobile Internet Devices,简称:MID)或穿戴式设备等。上述医疗文本翻译装置仅是举例,而非穷举,包含但不限于上述医疗文本翻译装置。在实际应用中,上述医疗文本翻译装置还可以包括:智能车载终端、计算机设备等等。It should be understood that the medical text translation device in this application may include smart phones (such as Android phones, iOS phones, Windows Phone phones, etc.), tablet computers, handheld computers, notebook computers, mobile Internet Devices (Mobile Internet Devices, abbreviated as: MID) ) Or wearable devices, etc. The above-mentioned medical text translation device is only an example, not an exhaustive list, including but not limited to the above-mentioned medical text translation device. In practical applications, the above-mentioned medical text translation device may also include: smart vehicle-mounted terminals, computer equipment, and so on.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于可选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited by the described sequence of actions. Because according to this application, some steps can be performed in other order or at the same time. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the involved actions and modules are not necessarily required by this application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in an embodiment, reference may be made to related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件程序模块的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software program modules.
所述集成的单元如果以软件程序模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer readable memory. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, A number of instructions are included to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, abbreviation: ROM), random access device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disc, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the application are described in detail above, and specific examples are used in this article to illustrate the principles and implementation of the application. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the application; at the same time, for Those of ordinary skill in the art, based on the idea of the application, will have changes in the specific implementation and the scope of application. In summary, the content of this specification should not be construed as a limitation to the application.

Claims (20)

  1. 一种医疗文本翻译方法,包括:A medical text translation method, including:
    获取待翻译医疗文本;Obtain the medical text to be translated;
    将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
    获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
    将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
    根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
  2. 根据权利要求1所述的方法,其中,所述获取与所述待翻译医疗文本对应的目标特征向量,包括:The method according to claim 1, wherein said acquiring a target feature vector corresponding to said medical text to be translated comprises:
    对医疗领域中的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量,并根据每个医学知识图谱中的第一实体词,为每个医学知识图谱对应的第三特征向量添加第一实体标签;Vectorize all medical knowledge graphs in the medical field to obtain the third feature vector corresponding to each medical knowledge graph, and according to the first entity word in each medical knowledge graph, set the third feature vector corresponding to each medical knowledge graph. Add the first entity label to the feature vector;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将所述匹配的第一实体标签对应的第三特征向量作为与所述待翻译医疗文本对应的目标特征向量。Determine a first entity tag that matches the second entity tag, and use a third feature vector corresponding to the matched first entity tag as a target feature vector corresponding to the medical text to be translated.
  3. 根据权利要求1所述的方法,其中,所述获取与所述待翻译医疗文本对应的目标特征向量,包括:The method according to claim 1, wherein said acquiring a target feature vector corresponding to said medical text to be translated comprises:
    根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签;According to the first entity word in each medical knowledge graph, add the first entity tag to all medical knowledge graphs in the medical field;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将与所述匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;Determine a first entity tag that matches the second entity tag, and use a medical knowledge graph corresponding to the matched first entity tag as a target medical knowledge graph;
    对所述目标医学知识图谱进行向量化,得到与所述待翻译医疗文本对应的目标特征向量。The target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
  4. 根据权利要求1-3中任一项所述的方法,其中,所述将所述待翻译医疗文本进行语义特征提取,得到第一特征向量,包括:The method according to any one of claims 1 to 3, wherein the extracting semantic features of the medical text to be translated to obtain the 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;
    根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector.
  5. 根据权利要求4所述的方法,其中,在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量之前,所述方法还包括:The method according to claim 4, wherein, before performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector, the method further comprises:
    根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量;Determine the target word vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word;
    所述根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量,包括:The performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector includes:
    根据每个单词对应的目标词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector.
  6. 根据权利要求5所述的方法,其中,所述根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量,包括:The method according to claim 5, wherein the determining the target word vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word comprises:
    对单词A对应的词向量进行编码,得到与所述单词A对应的关键值向量、查询向量以及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;Encoding a word vector corresponding to word A to obtain a key value vector, a query vector, and a value vector corresponding to the word A, where the word A is any word in the medical text to be translated;
    确定所述单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将所述相似度作为所述单词A与每个单词之间的权重;Determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word;
    根据所述单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到所述单词A对应的目标词向量。According to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
  7. 根据权利要求2或3中任一项所述的方法,其中,The method according to any one of claims 2 or 3, wherein:
    所述待翻译医疗文本包括中文医疗文本或英文医疗文本,且在所述待翻译医疗文本为 中文医疗文本的情况下,所述医学知识图谱为中文医学知识图谱,在所述待翻译医疗文本为英文医疗文本的情况下,所述医学知识图谱为英文医学知识图谱。The medical text to be translated includes Chinese medical text or English medical text, and when the medical text to be translated is a Chinese medical text, the medical knowledge graph is a Chinese medical knowledge graph, and the medical text to be translated is In the case of an English medical text, the medical knowledge graph is an English medical knowledge graph.
  8. 一种医疗文本翻译装置,包括:A medical text translation device, including:
    获取单元,用于获取待翻译医疗文本;The acquiring unit is used to acquire the medical text to be translated;
    处理单元,用于将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;A processing unit, configured to perform semantic feature extraction on 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, and 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 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 to Implement the following methods:
    获取待翻译医疗文本;Obtain the medical text to be translated;
    将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
    获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
    将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
    根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
  10. 根据权利要求9所述的装置,其中,所述获取与所述待翻译医疗文本对应的目标特征向量时,具体实现:The device according to claim 9, wherein when said obtaining the target feature vector corresponding to the medical text to be translated, it specifically implements:
    对医疗领域中的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量,并根据每个医学知识图谱中的第一实体词,为每个医学知识图谱对应的第三特征向量添加第一实体标签;Vectorize all medical knowledge graphs in the medical field to obtain the third feature vector corresponding to each medical knowledge graph, and according to the first entity word in each medical knowledge graph, set the third feature vector corresponding to each medical knowledge graph. Add the first entity label to the feature vector;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将所述匹配的第一实体标签对应的第三特征向量作为与所述待翻译医疗文本对应的目标特征向量。Determine a first entity tag that matches the second entity tag, and use a third feature vector corresponding to the matched first entity tag as a target feature vector corresponding to the medical text to be translated.
  11. 根据权利要求9所述的装置,其中,所述获取与所述待翻译医疗文本对应的目标特征向量时,具体实现:The device according to claim 9, wherein when said obtaining the target feature vector corresponding to the medical text to be translated, it specifically implements:
    根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签;According to the first entity word in each medical knowledge graph, add the first entity tag to all medical knowledge graphs in the medical field;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将与所述匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;Determine a first entity tag that matches the second entity tag, and use a medical knowledge graph corresponding to the matched first entity tag as a target medical knowledge graph;
    对所述目标医学知识图谱进行向量化,得到与所述待翻译医疗文本对应的目标特征向量。The target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
  12. 根据权利要求9-11中任一项所述的装置,其中,所述将所述待翻译医疗文本进行语义特征提取,得到第一特征向量时,具体实现:The device according to any one of claims 9-11, wherein when the semantic feature extraction is performed on the medical text to be translated to obtain the first feature vector, it is specifically implemented:
    对所述待翻译医疗文本中的每个单词进行词嵌入处理,得到与每个单词对应的词向量;Performing word embedding processing on each word in the medical text to be translated to obtain a word vector corresponding to each word;
    根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector.
  13. 根据权利要求12所述的装置,其中,在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量之前,所述处理器还用于执行:The device according to claim 12, wherein, before performing semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector, the processor is further configured to execute:
    根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量;Determine the target word vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word;
    所述根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量时,具体 实现:When the semantic feature extraction is performed according to the word vector corresponding to each word, and the first feature vector is obtained, the specific implementation is implemented:
    根据每个单词对应的目标词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector.
  14. 根据权利要求13所述的装置,其中,所述根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量时,具体实现:The device according to claim 13, wherein when the target word vector corresponding to each word is determined according to the self-attention mechanism and the word vector corresponding to each word, the specific realization is achieved:
    对单词A对应的词向量进行编码,得到与所述单词A对应的关键值向量、查询向量以及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;Encoding a word vector corresponding to word A to obtain a key value vector, a query vector, and a value vector corresponding to the word A, where the word A is any word in the medical text to be translated;
    确定所述单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将所述相似度作为所述单词A与每个单词之间的权重;Determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word;
    根据所述单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到所述单词A对应的目标词向量。According to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行以实现以下方法:A computer-readable storage medium in which a computer program is stored, and the computer program is executed by a processor to implement the following method:
    获取待翻译医疗文本;Obtain the medical text to be translated;
    将所述待翻译医疗文本进行语义特征提取,得到第一特征向量;Performing semantic feature extraction on the medical text to be translated to obtain a first feature vector;
    获取与所述待翻译医疗文本对应的目标特征向量,所述目标特征向量用于表征与所述待翻译医疗文本对应的医学知识图谱;Acquiring 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;
    将所述第一特征向量与所述目标特征向量进行拼接,得到第二特征向量;Splicing the first feature vector with the target feature vector to obtain a second feature vector;
    根据所述第二特征向量,对所述待翻译医疗文本进行翻译。According to the second feature vector, the medical text to be translated is translated.
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述获取与所述待翻译医疗文本对应的目标特征向量时,具体实现:15. The computer-readable storage medium according to claim 15, wherein said obtaining the target feature vector corresponding to the medical text to be translated is specifically implemented:
    对医疗领域中的所有医学知识图谱进行向量化,得到每个医学知识图谱对应的第三特征向量,并根据每个医学知识图谱中的第一实体词,为每个医学知识图谱对应的第三特征向量添加第一实体标签;Vectorize all medical knowledge graphs in the medical field to obtain the third feature vector corresponding to each medical knowledge graph, and according to the first entity word in each medical knowledge graph, set the third feature vector corresponding to each medical knowledge graph. Add the first entity label to the feature vector;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将所述匹配的第一实体标签对应的第三特征向量作为与所述待翻译医疗文本对应的目标特征向量。Determine a first entity tag that matches the second entity tag, and use a third feature vector corresponding to the matched first entity tag as a target feature vector corresponding to the medical text to be translated.
  17. 根据权利要求15所述的计算机可读存储介质,其中,所述获取与所述待翻译医疗文本对应的目标特征向量时,具体实现:15. The computer-readable storage medium according to claim 15, wherein said obtaining the target feature vector corresponding to the medical text to be translated is specifically implemented:
    根据每个医学知识图谱中的第一实体词,对医疗领域中的所有医学知识图谱添加第一实体标签;According to the first entity word in each medical knowledge graph, add the first entity tag to all medical knowledge graphs in the medical field;
    根据所述待翻译文本中的第二实体词,确定与所述待翻译文本对应的第二实体标签;Determining a second entity tag corresponding to the text to be translated according to the second entity word in the text to be translated;
    确定与所述第二实体标签匹配的第一实体标签,并将与所述匹配的第一实体标签对应的医学知识图谱作为目标医学知识图谱;Determine a first entity tag that matches the second entity tag, and use a medical knowledge graph corresponding to the matched first entity tag as a target medical knowledge graph;
    对所述目标医学知识图谱进行向量化,得到与所述待翻译医疗文本对应的目标特征向量。The target medical knowledge graph is vectorized to obtain a target feature vector corresponding to the medical text to be translated.
  18. 根据权利要求15-17中任一项所述的计算机可读存储介质,其中,所述将所述待翻译医疗文本进行语义特征提取,得到第一特征向量时,具体实现:18. The computer-readable storage medium according to any one of claims 15-17, wherein when the semantic feature extraction of the medical text to be translated is performed to obtain the first feature vector, the specific implementation is implemented:
    对所述待翻译医疗文本中的每个单词进行词嵌入处理,得到与每个单词对应的词向量;Performing word embedding processing on each word in the medical text to be translated to obtain a word vector corresponding to each word;
    根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the word vector corresponding to each word to obtain the first feature vector.
  19. 根据权利要求18所述的计算机可读存储介质,其中,在根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量之前,所述计算机程序被处理器执行时还用于实现:The computer-readable storage medium according to claim 18, wherein, before the semantic feature extraction is performed according to the word vector corresponding to each word to obtain the first feature vector, the computer program is also used when the computer program is executed by the processor. accomplish:
    根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量;Determine the target word vector corresponding to each word according to the self-attention mechanism and the word vector corresponding to each word;
    所述根据每个单词对应的词向量进行语义特征提取,得到所述第一特征向量时,具体 实现:When the semantic feature extraction is performed according to the word vector corresponding to each word, and the first feature vector is obtained, the specific implementation is implemented:
    根据每个单词对应的目标词向量进行语义特征提取,得到所述第一特征向量。Perform semantic feature extraction according to the target word vector corresponding to each word to obtain the first feature vector.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述根据自注意力机制以及每个单词对应的词向量,确定每个单词对应的目标词向量时,具体实现:The computer-readable storage medium according to claim 19, wherein when the target word vector corresponding to each word is determined according to the self-attention mechanism and the word vector corresponding to each word, the specific realization is implemented:
    对单词A对应的词向量进行编码,得到与所述单词A对应的关键值向量、查询向量以及价值向量,所述单词A为所述待翻译医疗文本中的任意一个单词;Encoding a word vector corresponding to word A to obtain a key value vector, a query vector, and a value vector corresponding to the word A, where the word A is any word in the medical text to be translated;
    确定所述单词A对应的查询向量与每个单词对应的关键值向量之间的相似度,并将所述相似度作为所述单词A与每个单词之间的权重;Determine the similarity between the query vector corresponding to the word A and the key value vector corresponding to each word, and use the similarity as the weight between the word A and each word;
    根据所述单词A与每个单词之间的权重,对每个单词对应的价值向量进行加权处理,得到所述单词A对应的目标词向量。According to the weight between the word A and each word, the value vector corresponding to each word is weighted to obtain the target word vector corresponding to the word A.
PCT/CN2020/132476 2020-10-19 2020-11-27 Medical text translation method and device, and storage medium WO2021179693A1 (en)

Applications Claiming Priority (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
CN202011115345.3 2020-10-19

Publications (1)

Publication Number Publication Date
WO2021179693A1 true WO2021179693A1 (en) 2021-09-16

Family

ID=73357037

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132476 WO2021179693A1 (en) 2020-10-19 2020-11-27 Medical text translation method and device, and storage medium

Country Status (2)

Country Link
CN (1) CN111950303B (en)
WO (1) WO2021179693A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168751A (en) * 2021-12-06 2022-03-11 厦门大学 Medical knowledge concept graph-based medical text label identification method and system
CN114582494A (en) * 2022-03-03 2022-06-03 数坤(北京)网络科技股份有限公司 Diagnostic result analysis method, diagnostic result analysis device, storage medium and electronic equipment
CN117332282A (en) * 2023-11-29 2024-01-02 之江实验室 Knowledge graph-based event matching method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111950303B (en) * 2020-10-19 2021-01-08 平安科技(深圳)有限公司 Medical text translation method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN110727806A (en) * 2019-12-17 2020-01-24 北京百度网讯科技有限公司 Text processing method and device based on natural language and knowledge graph
US20200193097A1 (en) * 2018-12-17 2020-06-18 Beijing Baidu Netcom Science And Technology Co., Ltd. Text translation method, device,and storage medium
CN111950303A (en) * 2020-10-19 2020-11-17 平安科技(深圳)有限公司 Medical text translation method, device and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10565318B2 (en) * 2017-04-14 2020-02-18 Salesforce.Com, Inc. Neural machine translation with latent tree attention
CN108228574B (en) * 2017-12-07 2020-07-28 科大讯飞股份有限公司 Text translation processing method and device
CN108170686B (en) * 2017-12-29 2020-02-14 科大讯飞股份有限公司 Text translation method and device
CN110334219B (en) * 2019-07-12 2023-05-09 电子科技大学 Knowledge graph representation learning method based on attention mechanism integrated with text semantic features
CN111191464A (en) * 2020-01-17 2020-05-22 珠海横琴极盛科技有限公司 Semantic similarity calculation method based on combined distance
CN111488462B (en) * 2020-04-02 2023-09-19 中国移动通信集团江苏有限公司 Recommendation method, device, equipment and medium based on knowledge graph
CN111723570B (en) * 2020-06-09 2023-04-28 平安科技(深圳)有限公司 Construction method and device of medicine knowledge graph and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN110727806A (en) * 2019-12-17 2020-01-24 北京百度网讯科技有限公司 Text processing method and device based on natural language and knowledge graph
CN111950303A (en) * 2020-10-19 2020-11-17 平安科技(深圳)有限公司 Medical text translation method, device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114168751A (en) * 2021-12-06 2022-03-11 厦门大学 Medical knowledge concept graph-based medical text label identification method and system
CN114582494A (en) * 2022-03-03 2022-06-03 数坤(北京)网络科技股份有限公司 Diagnostic result analysis method, diagnostic result analysis device, storage medium and electronic equipment
CN117332282A (en) * 2023-11-29 2024-01-02 之江实验室 Knowledge graph-based event matching method and device
CN117332282B (en) * 2023-11-29 2024-03-08 之江实验室 Knowledge graph-based event matching method and device

Also Published As

Publication number Publication date
CN111950303B (en) 2021-01-08
CN111950303A (en) 2020-11-17

Similar Documents

Publication Publication Date Title
WO2021179693A1 (en) Medical text translation method and device, and storage medium
CN106776711B (en) Chinese medical knowledge map construction method based on deep learning
WO2021189971A1 (en) Medical plan recommendation system and method based on knowledge graph representation learning
CN108959242B (en) Target entity identification method and device based on part-of-speech characteristics of Chinese characters
CN111128394B (en) Medical text semantic recognition method and device, electronic equipment and readable storage medium
WO2021139247A1 (en) Construction method, apparatus and device for medical domain knowledge map, and storage medium
WO2021139257A1 (en) Method and apparatus for selecting annotated data, and computer device and storage medium
WO2021159812A1 (en) Cancer staging information processing method and apparatus, and storage medium
CN111368094A (en) Entity knowledge map establishing method, attribute information acquiring method, outpatient triage method and device
CN112154509A (en) Machine learning model with evolving domain-specific dictionary features for text annotation
CN112151183A (en) Entity identification method of Chinese electronic medical record based on Lattice LSTM model
WO2023029513A1 (en) Artificial intelligence-based search intention recognition method and apparatus, device, and medium
CN112131883A (en) Language model training method and device, computer equipment and storage medium
WO2021190662A1 (en) Medical text sorting method and apparatus, electronic device, and storage medium
CN113657105A (en) Medical entity extraction method, device, equipment and medium based on vocabulary enhancement
CN111444715A (en) Entity relationship identification method and device, computer equipment and storage medium
CN114036902A (en) Medical entity pre-labeling method and device, storage medium and electronic equipment
WO2023168810A1 (en) Method and apparatus for predicting properties of drug molecule, storage medium, and computer device
CN110969005B (en) Method and device for determining similarity between entity corpora
CN113761151A (en) Synonym mining method, synonym mining device, synonym question answering method, synonym question answering device, computer equipment and storage medium
CN113536784A (en) Text processing method and device, computer equipment and storage medium
CN112270184A (en) Natural language processing method, device and storage medium
CN115357710B (en) Training method and device for table description text generation model and electronic equipment
CN116341557A (en) Diabetes medical text named entity recognition method
WO2021179688A1 (en) Medical literature retrieval method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924289

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924289

Country of ref document: EP

Kind code of ref document: A1