Cross-culture entity translation method and device, equipment and storage medium

By building a multilingual knowledge graph and automatically retrieving related entity names, the problems of strong data dependence and low entity name translation efficiency in the existing technology are solved, and lower data dependence and higher translation efficiency are achieved.

CN119808800AInactive Publication Date: 2025-04-11HUAZHONG NORMAL UNIV

Patent Information

Application Number
CN202510312640.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the data dependence and low entity name translation efficiency cannot effectively solve the translation problem of cross-language entity name.

Method used

By building a multilingual knowledge graph, the most relevant entity names are automatically retrieved and instantly integrated during the translation process, reducing dependence on data enhancement.

Benefits of technology

Reduces data dependence, reduces the scale of training data and the consumption of computing resources, avoids frequent retraining, and improves the efficiency and accuracy of entity name translation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808800A_ABST
    Figure CN119808800A_ABST
Patent Text Reader

Abstract

The invention provides a cross-culture entity translation method and device, equipment and a storage medium, and the method comprises the steps: constructing a multi-language knowledge graph; the multi-language knowledge graph comprises entity names, entity descriptions and mutual relations among entities; obtaining a source language text, encoding the source language text to obtain a source language vector, optimizing the embedded representation of the entities in the multi-language knowledge graph, and retrieving a plurality of target entities most related to the source language text from the multi-language knowledge graph; and based on the source language text and the target entity, constructing a knowledge enhanced source text, and matching entity names of the target entity in a source language and a target language. By means of the entity name translation method and device, dependency on data is lower, the scale of training data and consumption of computing resources are reduced, and the problems that in the prior art, data dependency is high, and entity name translation efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine translation and retrieval enhancement technology, and in particular to a cross-cultural entity translation method, device, equipment and storage medium. Background Art

[0002] With the emergence of multilingual large language models (LLMs) and the widespread availability of massive multilingual datasets, the field of machine translation (MT) has developed significantly. More and more research is devoted to improving the performance of machine translation systems so that they can perform high-quality translations between different languages. In recent years, researchers have proposed methods to improve machine translation systems by enhancing generation through retrieval, especially improving the translation quality of low-frequency words during reasoning. This method introduces external knowledge into the generation process, allowing the model to refer to relevant information during translation, thereby improving the accuracy of translation.

[0003] Although guiding or constraining the translation process has been proven to be an effective direction to improve the translation quality of machine translation systems, translating texts containing entity names still faces great challenges. Existing research mainly focuses on the transliteration and creative translation of entity names, and fails to fully explore the cross-language transformation of entity names in the same writing system. Current methods rely on data augmentation to cover more entity names, that is, by performing certain transformations or extensions on the original training data to generate more diverse data, thereby improving the generalization ability of the model. However, this results in large training datasets and high consumption of computing resources. In addition, these methods also require frequent retraining to incorporate the names of emerging entities and update entities whose names have changed.

[0004] There is currently no effective solution to the problems of strong data dependency and low efficiency in entity name translation in existing related technologies. Summary of the invention

[0005] The present invention provides a cross-cultural entity translation method, device, equipment and storage medium, which automatically retrieve the most relevant entity names from a constructed multilingual knowledge graph and integrate them in real time during the translation process, so as to solve the defects of strong data dependence and low efficiency of entity name translation in the prior art.

[0006] In a first aspect, the present invention provides a cross-cultural entity translation method, comprising: Constructing a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities; Acquire a source language text, encode the source language text to obtain a source language vector, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve a number of target entities that are most relevant to the source language text from the multilingual knowledge graph; Based on the source language text and the target entity, construct a knowledge-enhanced source text, and match the entity name of the target entity in the source language and the target language; The knowledge-enhanced source text is input into a translation model, and combined with the embedding representation of the target entity to generate a target text translated from the source language text.

[0007] According to a cross-cultural entity translation method provided by the present invention, a multilingual knowledge graph is constructed, including: A number of entities are extracted from an open source knowledge base, and the multilingual knowledge graph is constructed based on entity names, unique identifiers, and multilingual entity descriptions of the entities.

[0008] According to a cross-cultural entity translation method provided by the present invention, the source language text is encoded to obtain a source language vector, the embedding representation of the entity in the multilingual knowledge graph is optimized, and several target entities most relevant to the source language text are retrieved from the multilingual knowledge graph, including: Associating entities contained in the source language text with the source language text, and encoding the source language text using a universal vector model to obtain the source language vector; Representing entities in the multilingual knowledge graph as tuples; A sampling strategy for difficult samples is introduced to retrieve positive samples and negative samples from the multilingual knowledge graph; Generate and optimize the embedding representation of entities in the multilingual knowledge graph based on the positive samples and the negative samples; With the goal of minimizing the model loss, the parameters of the encoder of the universal vector model are updated by back propagation, and a relevance score of each entity in the multilingual knowledge graph to the source language text is determined; According to the relevance score between each entity in the multilingual knowledge graph and the source language text, a number of target entities most relevant to the source language text are retrieved.

[0009] According to a cross-cultural entity translation method provided by the present invention, a sampling strategy for difficult samples is introduced to retrieve positive samples and negative samples from the multilingual knowledge graph, including: Retrieving entities in the multilingual knowledge graph, and selecting entities that are highly relevant to the source language text from the multilingual knowledge graph as positive samples; Entities in the multilingual knowledge graph are retrieved, and entities having the same entity name as the source language text but being semantically unrelated are selected from the multilingual knowledge graph as negative samples.

[0010] According to a cross-cultural entity translation method provided by the present invention, when searching for entities in the multilingual knowledge graph, unsupervised intensive information retrieval is performed using a comparative learning approach.

[0011] According to a cross-cultural entity translation method provided by the present invention, the knowledge-enhanced source text includes a source language text, a special mark, an entity name of the entity in the source language, and an entity name of the entity in the target language; The special marker is used to indicate the start of entity name translation.

[0012] According to a cross-cultural entity translation method provided by the present invention, the knowledge-enhanced source text is input into a translation model, and combined with the embedding representation of the target entity, a target text translated from the source language text is generated, including: Inputting the knowledge-enhanced source text into the encoder of the translation model to obtain the hidden state of the encoder; Adding the embedded representation of the target entity to the hidden state of the encoder to obtain a target hidden state; The target hidden state is input into the decoder of the translation model for decoding to generate a target text after translating the source language text.

[0013] In a second aspect, the present invention further provides a cross-cultural entity translation device, comprising: A graph construction module, used to construct a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities; A knowledge retrieval module, configured to obtain a source language text, encode the source language text to obtain a source language vector, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve a number of target entities most relevant to the source language text from the multilingual knowledge graph; A knowledge enhancement module, used to construct a knowledge enhanced source text based on the source language text and the target entity, and to match the entity name of the target entity in the source language and the target language; The text generation module is used to input the knowledge-enhanced source text into a translation model, and generate a target text after translating the source language text in combination with the embedded representation of the target entity.

[0014] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the cross-cultural entity translation method as described in the first aspect above is implemented.

[0015] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the cross-cultural entity translation method as described in the first aspect above.

[0016] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the cross-cultural entity translation method as described in the first aspect above is implemented.

[0017] Compared with the prior art, the present invention has the following beneficial effects: 1. The cross-cultural entity translation method provided by the present invention automatically retrieves the most relevant entity names from the multilingual knowledge graph and integrates them instantly during the translation process, rather than relying on data enhancement to memorize all possible entity name translations for each pair of source and target languages. It has lower dependence on data and also reduces the scale of training data and the consumption of computing resources, avoiding frequent retraining to adapt to newly emerging entities or name changes, and solving the problems of strong data dependence and low efficiency of entity name translation in existing related technologies.

[0018] 2. The present invention adopts a method combining contrastive learning with difficult sample sampling, which greatly improves the accuracy of entity retrieval in multilingual question-answering tasks. The introduced difficult sample sampling strategy enhances the model's ability to distinguish entities with similar names but different semantics. The addition of contrastive learning further optimizes the model by maximizing the retrieval possibility of positive sample entities and minimizing the retrieval possibility of negative sample entities, significantly improving the model's ability to distinguish between positive and negative samples, and enhancing the model's robustness and applicability in natural language processing tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 is a flow chart of the cross-cultural entity translation method provided by the present invention; Figure 2 It is a structural block diagram of the cross-cultural entity translation device provided by the present invention; Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] The present invention provides a cross-cultural entity translation method. Figure 1 is a flow chart of the cross-cultural entity translation method provided by the present invention, such as Figure 1 As shown, the method comprises the following steps: Step S101, constructing a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities.

[0023] Step S102, obtain the source language text, encode the source language text, obtain the source language vector, optimize the embedded representation of the entity in the multilingual knowledge graph, and retrieve several target entities most relevant to the source language text from the multilingual knowledge graph.

[0024] Step S103, constructing a knowledge-enhanced source text based on the source language text and the target entity, and matching the entity names of the target entity in the source language and the target language.

[0025] Step S104: input the knowledge-enhanced source text into the translation model, and generate a target text after translating the source language text in combination with the embedded representation of the target entity.

[0026] In this method, a multilingual knowledge graph is first constructed, which includes entity names, entity descriptions, and relationships between entities in different languages. Then, the source language text to be translated is obtained, and the source language text is encoded to obtain a source language vector. The embedding representation of entities in the multilingual knowledge graph is optimized, and target entities are screened out from the multilingual knowledge graph. These target entities are all entities most relevant to the source language text. Based on the target entities and the source language text, a knowledge-enhanced source text is constructed. In the knowledge-enhanced source text, the entity names of the target entities in the source language and the target language are matched. Finally, the knowledge-enhanced source text is input into the translation model, combined with the embedding representation of the target entity, to obtain the target text, and the translation of the source language text is realized. In the above process, by automatically retrieving the most relevant entity names from the multilingual knowledge graph and integrating them instantly in the translation process, instead of relying on data enhancement to memorize all possible entity name translations for each pair of source and target languages, the dependence on data is lower, and the scale of training data and the consumption of computing resources are reduced, avoiding frequent retraining to adapt to newly emerging entities or name changes, and solving the problems of strong data dependence and low efficiency of entity name translation in existing related technologies.

[0027] In some of the embodiments, step S101, constructing a multilingual knowledge graph, includes: extracting a number of entities from an open source knowledge base, and constructing a multilingual knowledge graph based on the entity names, unique identifiers and multilingual entity descriptions of the entities.

[0028] Exemplarily, this embodiment utilizes the open source knowledge base Wikidata as the basis of a multilingual knowledge graph, which includes entities and their attribute information worldwide, supports multilingual entity names and descriptions, and includes entity descriptions that can help distinguish synonyms, i.e., entities with the same name.

[0029] Extract the unique identifier of the entity, the multilingual name of the entity, the multilingual description of the entity and other attributes from the Wikidata knowledge base to form a multilingual knowledge graph ,in, is a collection of entities, is a set of relations.

[0030] In some of the embodiments, step S102, encoding the source language text to obtain a source language vector, optimizing the embedding representation of the entity in the multilingual knowledge graph, and retrieving several target entities most relevant to the source language text from the multilingual knowledge graph, includes: associating the source language text with the entities contained therein, and encoding the source language text using a general vector model to obtain the source language vector; representing the entities in the multilingual knowledge graph as tuples; introducing a sampling strategy for difficult samples to retrieve positive samples and negative samples from the multilingual knowledge graph; generating and optimizing the embedding representation of the entity in the multilingual knowledge graph based on the positive samples and negative samples; updating the parameters of the model through back propagation with the goal of minimizing the model loss, and determining the relevance score of each entity in the multilingual knowledge graph with the source language text; and retrieving several target entities most relevant to the source language text according to the relevance score of each entity in the multilingual knowledge graph with the source language text.

[0031] Specifically, a sampling strategy for difficult samples is introduced to retrieve positive and negative samples from a multilingual knowledge graph, including: retrieving entities in the multilingual knowledge graph and selecting entities that are highly relevant to the source language text from the multilingual knowledge graph as positive samples; retrieving entities in the multilingual knowledge graph and selecting entities that have the same entity names as the source language text but are semantically irrelevant from the multilingual knowledge graph as negative samples.

[0032] For example, the metadata of the retriever training dataset comes from the Mintaka dataset, which is a complex natural multilingual question answering (QA) dataset with entity annotations for each question. and its language ,in, is a word in the source language. An example of source language text information is shown below: .

[0033] In the above example, we associate each text with a specific entity, and use the bge-m3 model to encode the source language text to obtain the source language vector Then, the constructed multilingual knowledge graph Entities in Represented as a tuple, the specific formula is as follows:

[0034] in, Indicates the entity name, Represents entity description. And each entity is represented by the bge-m3 model Converted to vector representation of entity .

[0035] In order to improve the learning effect of the model, in this embodiment, a sampling strategy for difficult samples is introduced to select entities that are highly related to the source language text from the knowledge graph as positive samples. ;choose with the same name but different from the source text t Semantically irrelevant difficult negative examples Each training instance of the encoder consists of Composition, among which, is the source language text, is the positive sample entity vector representation, is the vector representation of the negative sample entity, which is obtained by encoding the encoder. This sampling strategy helps the model learn how to distinguish entities with the same name, improving its accuracy and robustness in retrieval tasks.

[0036] Furthermore, in order to more effectively distinguish positive and negative samples during the training process, when retrieving entities in the multilingual knowledge graph, a contrastive learning method is used to perform unsupervised dense information retrieval to maximize the relevant entity The retrieval possibility of minimizing irrelevant entities The retrieval possibility of More accurate embedding representation , the parameters of the encoder of the general vector model are updated using back propagation according to the loss function, and the loss function is as follows:

[0037] Among them, L represents the model loss, is the cosine similarity function, which calculates the relevance score between each entity and the source text through cosine similarity. The calculation formula is as follows:

[0038] Then, based on the relevance score results, the most relevant entities as the target entity , the specific formula is as follows:

[0039]

[0040] in, , Indicates the entity name, Represents an entity description. An example of an entity is shown below: .

[0041] In some embodiments, the knowledge-enhanced source text includes source language text, special tags, entity names of entities in the source language, and entity names of entities in the target language. The special tags are used to indicate the start of entity name translation.

[0042] For example, given the source language Source language text in and the target entity retrieved by the knowledge retriever , construct a knowledge-enhanced source text, the specific formula is as follows:

[0043] in, represents the knowledge-enhanced source text, is a special marker that indicates the start of entity name translation. Is Entity In the source language The entity name in Is Entity In the target language The entity names in , come from the multilingual knowledge graph.

[0044] In some of the embodiments, a knowledge-enhanced source text is input into a translation model and combined with an embedded representation of a target entity to generate a target text translated from the source language text, including: inputting the knowledge-enhanced source text into an encoder of the translation model to obtain a hidden state of the encoder; adding an embedded representation of the target entity to the hidden state of the encoder to obtain a target hidden state; and inputting the target hidden state into a decoder of the translation model for decoding to generate a target text translated from the source language text.

[0045] Exemplarily, this embodiment selects a pre-trained Transformer model of an encoder-decoder architecture to enhance the source text Input into the model's encoder to obtain the encoder's hidden state , the specific formula is as follows:

[0046] in, Indicates that the encoder is in position i Then, the embedding representation of the retrieved target entity is Prepend the hidden state to the encoder To obtain the new encoder hidden state, that is, the target hidden state, the specific formula is as follows:

[0047] in, represents the target hidden state. Finally, the decoder fusion strategy is adopted to convert the hidden state Input into the decoder of the translation model, enabling it to focus on the entity embedding representation from the retriever and fuse it with its own hidden state to finally obtain the translated target text .

[0048] The present invention also provides a cross-cultural entity translation device. The cross-cultural entity translation device provided by the present invention is described below. The cross-cultural entity translation device described below and the cross-cultural entity translation method described above can be referred to each other. Figure 2 is a structural block diagram of the cross-cultural entity translation device provided by the present invention, such as Figure 2 As shown, the device comprises: A graph construction module 201 is used to construct a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities; The knowledge retrieval module 202 is used to obtain the source language text, encode the source language text, obtain the source language vector, optimize the embedding representation of the entity in the multilingual knowledge graph, and retrieve several target entities that are most relevant to the source language text from the multilingual knowledge graph; The knowledge enhancement module 203 is used to construct a knowledge enhanced source text based on the source language text and the target entity, and match the entity name of the target entity in the source language and the target language; The text generation module 204 is used to input the knowledge-enhanced source text into the translation model, and generate a target text after translating the source language text in combination with the embedded representation of the target entity.

[0049] When the device is in use, first, the graph construction module 201 constructs a multilingual knowledge graph, which includes the entity names, entity descriptions and relationships between entities of different entities in different languages. Then, the knowledge retrieval module 202 obtains the source language text to be translated, and encodes the source language text to obtain the source language vector. The embedded representation of the entity in the multilingual knowledge graph is optimized, and the target entities are screened out from the multilingual knowledge graph. These target entities are all the entities most relevant to the source language text. The knowledge enhancement module 203 constructs a knowledge-enhanced source text based on the target entity and the source language text. In the knowledge-enhanced source text, the entity names of the target entity in the source language and the target language are matched and corresponded. Finally, the text generation module 204 inputs the knowledge-enhanced source text into the translation model, combines the embedded representation of the target entity, obtains the target text, and realizes the translation of the source language text. In the above process, by automatically retrieving the most relevant entity names from the multilingual knowledge graph and integrating them instantly in the translation process, instead of relying on data enhancement to memorize all possible entity name translations for each pair of source and target languages, the dependence on data is lower, and the scale of training data and the consumption of computing resources are reduced, avoiding frequent retraining to adapt to newly emerging entities or name changes, and solving the problems of strong data dependence and low efficiency of entity name translation in existing related technologies.

[0050] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 301, a communications interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communications interface 302 and the memory 303 communicate with each other via the communication bus 304. The processor 301 may call the logic instructions in the memory 303 to execute the cross-cultural entity translation method, which includes: Build a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and the relationships between entities; Obtain source language text, encode the source language text, obtain source language vectors, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve several target entities that are most relevant to the source language text from the multilingual knowledge graph; Based on the source language text and the target entity, construct the knowledge-enhanced source text, and match the entity names of the target entity in the source language and the target language; The knowledge-enhanced source text is input into the translation model and combined with the embedded representation of the target entity to generate the target text after the source language text is translated.

[0051] In addition, the logic instructions in the above-mentioned memory 303 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0052] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored in a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the cross-cultural entity translation method provided by the above methods, the method includes: Build a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and the relationships between entities; Obtain source language text, encode the source language text, obtain source language vectors, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve several target entities that are most relevant to the source language text from the multilingual knowledge graph; Based on the source language text and the target entity, construct the knowledge-enhanced source text, and match the entity names of the target entity in the source language and the target language; The knowledge-enhanced source text is input into the translation model and combined with the embedded representation of the target entity to generate the target text after the source language text is translated.

[0053] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the cross-cultural entity translation method provided by the above methods, the method comprising: Build a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and the relationships between entities; Obtain source language text, encode the source language text, obtain source language vectors, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve several target entities that are most relevant to the source language text from the multilingual knowledge graph; Based on the source language text and the target entity, construct the knowledge-enhanced source text, and match the entity names of the target entity in the source language and the target language; The knowledge-enhanced source text is input into the translation model and combined with the embedded representation of the target entity to generate the target text after the source language text is translated.

[0054] The device embodiments described above are merely illustrative, wherein 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 modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0055] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A cross-cultural entity translation method, characterized in that: include: Constructing a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities; Acquire a source language text, encode the source language text to obtain a source language vector, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve a number of target entities that are most relevant to the source language text from the multilingual knowledge graph; Based on the source language text and the target entity, construct a knowledge-enhanced source text, and match the entity name of the target entity in the source language and the target language; The knowledge-enhanced source text is input into a translation model, and combined with the embedding representation of the target entity to generate a target text translated from the source language text.

2. The cross-cultural entity translation method according to claim 1, characterized in that: Build a multilingual knowledge graph, including: A number of entities are extracted from an open source knowledge base, and the multilingual knowledge graph is constructed based on entity names, unique identifiers, and multilingual entity descriptions of the entities.

3. The cross-cultural entity translation method according to claim 1, characterized in that: Encoding the source language text to obtain a source language vector, optimizing the embedding representation of entities in the multilingual knowledge graph, and retrieving a number of target entities most relevant to the source language text from the multilingual knowledge graph, including: Associating entities contained in the source language text with the source language text, and encoding the source language text using a universal vector model to obtain the source language vector; Representing entities in the multilingual knowledge graph as tuples; A sampling strategy for difficult samples is introduced to retrieve positive samples and negative samples from the multilingual knowledge graph; Generate and optimize the embedding representation of entities in the multilingual knowledge graph based on the positive samples and the negative samples; With the goal of minimizing the model loss, the parameters of the encoder of the universal vector model are updated by back propagation, and a relevance score of each entity in the multilingual knowledge graph to the source language text is determined; According to the relevance score between each entity in the multilingual knowledge graph and the source language text, a number of target entities most relevant to the source language text are retrieved.

4. The cross-cultural entity translation method according to claim 3, characterized in that: A sampling strategy for difficult samples is introduced to retrieve positive samples and negative samples from the multilingual knowledge graph, including: Retrieving entities in the multilingual knowledge graph, and selecting entities that are highly relevant to the source language text from the multilingual knowledge graph as positive samples; Entities in the multilingual knowledge graph are retrieved, and entities having the same entity name as the source language text but being semantically unrelated are selected from the multilingual knowledge graph as negative samples.

5. The cross-cultural entity translation method according to claim 4, characterized in that: When searching for entities in the multilingual knowledge graph, unsupervised intensive information retrieval is performed using contrastive learning.

6. The cross-cultural entity translation method according to claim 1, characterized in that: The knowledge-enhanced source text includes source language text, special tags, entity names of entities in the source language, and entity names of entities in the target language; The special marker is used to indicate the start of entity name translation.

7. The cross-cultural entity translation method according to claim 1, characterized in that: Inputting the knowledge-enhanced source text into a translation model, combining it with the embedding representation of the target entity, and generating a target text translated from the source language text, including: Inputting the knowledge-enhanced source text into the encoder of the translation model to obtain the hidden state of the encoder; Adding the embedded representation of the target entity to the hidden state of the encoder to obtain a target hidden state; The target hidden state is input into the decoder of the translation model for decoding to generate a target text after translating the source language text.

8. A cross-cultural entity translation device, characterized in that: include: A graph construction module, used to construct a multilingual knowledge graph; the multilingual knowledge graph includes entity names, entity descriptions, and relationships between entities; A knowledge retrieval module, configured to obtain a source language text, encode the source language text to obtain a source language vector, optimize the embedding representation of entities in the multilingual knowledge graph, and retrieve a number of target entities most relevant to the source language text from the multilingual knowledge graph; A knowledge enhancement module, used to construct a knowledge enhanced source text based on the source language text and the target entity, and to match the entity name of the target entity in the source language and the target language; The text generation module is used to input the knowledge-enhanced source text into a translation model, and generate a target text after translating the source language text in combination with the embedded representation of the target entity.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the cross-cultural entity translation method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cross-cultural entity translation method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Cross-language multi-source vertical domain knowledge graph construction method

    CN112199511A

  • Question and answer method and system based on knowledge enhancement generative language model and medium

    CN115759254A

  • Text translation method and device, equipment and storage medium

    CN116415598A

  • Continuous self-learning multi-language neural machine translation method and storage medium

    CN117252212A

  • Pre-training language model knowledge graph completion method in combination with comparative learning

    CN117829280A

Cited By

  • Cross-language information retrieval method and device based on vectorization model

    CN121434375A