Machine translation method and device based on active agent

By introducing active agents into the machine translation system, using large language models and manual feedback to optimize the translation results, the problems of low efficiency and insufficient accuracy of traditional machine translation are solved, and efficient and high-quality translation results are achieved.

CN118966243APending Publication Date: 2024-11-15WESTLAKE UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411144215.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Traditional machine translation systems rely on manual checksum editing, resulting in low translation efficiency and failure to fully utilize the capabilities of large language models, and there is a problem of inaccurate translation.

Method used

Using an active agent-based machine translation method, through the combination of process controller, strategy generator, translator and evaluator, a large language model is used to generate and score translation candidates, and combined with manual feedback to optimize the translation results to achieve automated and efficient translation.

Benefits of technology

It improves translation efficiency and quality, reduces manual intervention, achieves a balance between translation efficiency and quality, and improves translation effectiveness through continuous improvement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118966243A_ABST
    Figure CN118966243A_ABST
Patent Text Reader

Abstract

The invention relates to a machine translation method and device based on an active agent, according to the method, machine translation of a to-be-translated original document is achieved through the constructed active agent, and the process for achieving the machine translation of the to-be-translated original document comprises the steps that a process controller obtains the to-be-translated original document; the strategy generator is used for acquiring a translation demand and generating a translation strategy and an evaluation strategy according to the translation demand and historical experience; the translator calls a large language model to generate translation candidates for the to-be-translated original document based on a plurality of translation strategies; the evaluator performs scoring based on a large language model on the translation candidates based on a plurality of evaluation strategies, and the translation candidates meeting the consistency requirement serve as translation results; compared with the prior art, the translated target document is generated based on the translation result and is output by the process controller, and the method has the advantages of simultaneously realizing relatively high translation efficiency and translation quality and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine translation, and in particular to a machine translation method and device based on active intelligent agent. Background Art

[0002] Traditional machine translation systems are dominated by humans in the translation process, and machines are used to assist translators in completing translation. For example, translators first use machine translation models to translate, generate a draft translation, and then manually check the translation content, edit and organize it. This process requires the participation of a large number of translators, especially when checking and editing the translation, they need to read and understand the entire original document, and understand and improve the translation word by word. These tasks bring a lot of workload to translators. Although it is much faster than pure manual translation, it does not give full play to the capabilities of the machine translation model.

[0003] With the development of large language model technology, such as ChatGPT and GPT-4, relatively accurate machine translation can be achieved. It can be said that in the translation results, most of the translations are of relatively high quality and can be used directly, while a small number of translations that do not meet the requirements require manual intervention. At the same time, the powerful learning ability of the large language model also provides the possibility of improving translation efficiency, and similar interventions (such as the translation of the same term) do not need to be repeated, and the previous intervention should be automatically brought into the subsequent translation process. Although there are applications in the prior art that use large language models to improve translation efficiency, there is still a lack of inaccurate translation. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a machine translation method and device based on active intelligent agent which can achieve both high translation efficiency and translation quality.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] A machine translation method based on an active agent, the method realizes machine translation of an original document to be translated by means of a constructed active agent, the active agent comprises a process controller, a strategy generator, a translator and an evaluator, and the process of realizing machine translation of the original document to be translated comprises:

[0007] The process controller obtains the original document to be translated;

[0008] The strategy generator is used to obtain translation requirements and generate translation strategies and evaluation strategies based on the translation requirements and historical experience;

[0009] The translator calls a large language model to generate translation candidates for the original document to be translated based on the plurality of translation strategies;

[0010] The evaluator scores the translation candidates based on the large language model based on the multiple evaluation strategies, and takes the translation candidates that meet the consistency requirements as the translation results;

[0011] A translated target document is generated based on the translation result and output by the process controller.

[0012] Furthermore, after the process controller obtains the original document to be translated, it performs semantic paragraph segmentation on the original document to be translated, converts the original document to be translated into a semantic paragraph sequence, and sequentially transmits the paragraphs to be translated in the semantic paragraph sequence and the translation context of the paragraphs to be translated to the translator and the evaluator.

[0013] Furthermore, the translation requirements include the field, style and purpose of the original document to be translated.

[0014] Furthermore, the translation strategy and the evaluation strategy are respectively stored in corresponding strategy lists, and the strategy list is a maintainable open structure list.

[0015] Furthermore, the translation strategy and the evaluation strategy both include large language model selection types and task instructions.

[0016] Furthermore, the strategy generator generates the translation strategy and evaluation strategy through an open source pre-trained language model based on reinforcement learning.

[0017] Furthermore, when the translator generates the translation candidates, a translation hint is constructed according to the translation strategy, the original document to be translated, the paragraph to be translated and the translation context;

[0018] Furthermore, when the evaluator is scoring, an evaluation prompt is constructed according to the evaluation strategy, the original document to be translated, the paragraph to be translated, the translation context and the semantic paragraph translation candidate list.

[0019] Furthermore, the method further comprises:

[0020] When the evaluation result of the evaluator is that the consistency is not satisfied, an action is taken to receive a selection signal or a modification signal for the translation candidate input manually, and a translation result is generated based on the selection signal or the modification signal.

[0021] The present invention also provides a machine translation device based on active agents, including a process controller, a strategy generator, a translator and an evaluator, wherein:

[0022] The process controller is used to obtain the original document to be translated, and call the strategy generator, translator, evaluator and manual feedback interface to process the original document to be translated, and output a translated target document;

[0023] The strategy generator is used to obtain translation requirements and generate translation strategies and evaluation strategies based on the translation requirements and historical experience;

[0024] The translator calls a large language model to generate translation candidates for the original document to be translated based on the plurality of translation strategies;

[0025] The evaluator scores the translation candidates based on the large language model based on the multiple evaluation strategies, and takes the translation candidates that meet the consistency requirements as the translation results;

[0026] The translated target document is generated based on the translation result.

[0027] Furthermore, the device also includes a manual feedback interface, which takes action when the evaluation result of the evaluator does not meet the consistency, receives a selection signal or a modification signal for the translation candidate, and generates a translation result based on the selection signal or the modification signal.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. The present invention realizes machine translation of the original document to be translated by constructing an active intelligent agent. Each part of the active intelligent agent has its own model or algorithm, which can effectively improve the translation efficiency. At the same time, an evaluator is provided to further improve the translation quality through evaluation feedback.

[0030] 2. The translation prompts and evaluation prompts in the translator and evaluator of the present invention are constructed based on translation strategy, original document to be translated, paragraph to be translated, translation context, evaluation strategy, semantic paragraph translation candidate list, etc., which fully utilizes the available information and greatly improves the translation quality.

[0031] 3. The present invention can integrate the advantages of multiple large language models to jointly complete the document translation task and effectively improve the translation quality.

[0032] 4. The present invention combines human in closed loop, active learning and large language model intelligent agent technology, uses machines to lead the translation process, and obtains higher translation efficiency. It uses human assistance to improve the translation quality, and continuously improves the translation effect during use, thereby achieving a balance and continuous improvement in translation efficiency and quality.

[0033] 5. The present invention is a translation process led by a machine and assisted by a translator, which greatly reduces the workload of the translator and increases the degree of automation of the translation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a schematic diagram of the principle of the present invention;

[0035] Figure 2 A schematic diagram of a translation strategy reinforcement learning process in an embodiment of the present invention;

[0036] Figure 3 Schematic diagram of the evaluation strategy reinforcement learning process in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0038] Based on the prior art, it is known that the large language model can dynamically determine the translation style and translation strategy according to the needs of the user. By making full use of this interactive ability, the present invention can continuously adjust during the machine translation process to obtain the best machine translation results. Instead of using a stereotyped style and strategy to translate all the content at once and then have it modified by humans, the self-improvement ability of the machine translation system is greatly improved, reducing the need for human intervention.

[0039] This embodiment provides a machine translation device based on an active agent, which implements machine translation of an original document to be translated through a constructed active agent. The active agent includes a process controller 1, a strategy generator 2, a translator 3 and an evaluator 4, wherein:

[0040] The process controller 1 is used to obtain the original document to be translated, and call the strategy generator, translator, evaluator and manual feedback interface to process the original document to be translated, and output a translated target document;

[0041] The strategy generator 2 is used to obtain translation requirements and generate translation strategies and evaluation strategies based on the translation requirements and historical experience;

[0042] The translator 3 calls a large language model to generate translation candidates for the original document to be translated based on the multiple translation strategies;

[0043] The evaluator 4 scores the translation candidates based on the large language model based on the multiple evaluation strategies, and takes the translation candidates that meet the consistency requirements as the translation results;

[0044] The translated target document is generated based on the translation result.

[0045] The above-mentioned translation device combines human in closed loop, active learning and large language model intelligent agent technology, uses machine to lead the translation process, and achieves higher translation efficiency. At the same time, it uses human assistance to improve the translation quality, thus achieving a balance and continuous improvement in translation efficiency and quality.

[0046] In this embodiment, each part of the active agent has its own model or algorithm for implementation, which is specifically described as follows:

[0047] 1) Process controller

[0048] The process controller controls the entire translation process, inputs the document to be translated, and outputs the translated document. The process controller gradually completes the translation task by calling the other four components. The process controller includes a document segmentation module and a control module. After receiving the document to be translated, the process controller first divides the document into smaller semantic paragraphs based on natural paragraphs. These semantic paragraphs are generally a few sentences that are closely related to each other and need to be translated as a whole. After segmentation, the original document becomes a sequence of semantic paragraphs. The process controller translates the semantic paragraphs one by one by calling other components.

[0049] When translating each semantic paragraph, the context of its translation (translated semantic paragraph) will be provided to the translator and the evaluator to maintain the consistency and coherence of the context. If the translation generated by the translator passes the evaluation of the evaluator, it will be accepted and enter the next semantic paragraph; in a preferred embodiment, a manual feedback interface will be set up. If it does not pass the evaluation of the evaluator, it will enter the manual feedback interface to request manual feedback.

[0050] In the manual feedback interface, the translator can select the best translation from multiple candidate translations or select a candidate translation for manual modification based on the translation context. After the manual feedback is completed, it will automatically enter the next semantic paragraph. Repeat this process until the entire document translation is completed.

[0051] 2) Strategy Generator

[0052] According to the field, style, purpose, etc. of the document to be translated, we can generate corresponding translation strategies and evaluation strategies. The strategy consists of two parts, one is the large language model (LLM), and the other is the instruction of the task (model prompt). All strategies are put together and organized into a strategy list. The strategy list is designed as an open structure, which can be manually maintained, deleted or added during use. New strategy options. In this embodiment, the translation strategy list and the evaluation strategy list are shown in Table 1 and Table 2.

[0053] Table 1 List of translation strategies

[0054]

[0055] Table 2 Evaluation strategy list

[0056]

[0057] What the strategy generator does is to select a suitable strategy from the list based on historical experience and task objectives. The selection and optimization of the strategy are automatically completed by the model, and the newly added strategy has a certain probability of being selected. If the translation it produces receives positive reviews in the evaluation phase and manual feedback phase, its subsequent probability of being selected will increase further. The selection of the strategy is performed by a strategy model, which is adjusted according to manual feedback through reinforcement learning, so that it is continuously optimized during use. Specifically, we use an open source pre-trained language model as the strategy model, and use historical experience data for fine-tuning to obtain the ability to select strategies.

[0058] Translation strategy model: Use reinforcement learning to maximize the expected score.

[0059] Model input: historical experience (source paragraph 1, translation strategy 1, target paragraph 1, score 1, source paragraph 2, translation strategy 2, target paragraph 2, score 2, ...), content to be translated (source paragraph K)

[0060] Model output: translation strategy K

[0061] The reinforcement learning process of the translation strategy model is as follows Figure 2 shown.

[0062] Evaluation strategy model: Use reinforcement learning method to maximize the expected score.

[0063] Model input: historical experience (source paragraph 1, target paragraph 1, evaluation strategy 1, score 1, source paragraph 2, target paragraph 2, evaluation strategy 2, score 2, ...), content to be translated (source paragraph K, target paragraph K)

[0064] Model output: Evaluation strategy K

[0065] The reinforcement learning process of the evaluation strategy model is as follows Figure 3 shown.

[0066] 3) Translator

[0067] The translator constructs a suitable translation prompt based on the top-N translation strategies (each strategy contains a large language model and a task instruction) selected by the strategy generator, the original document, the translation context, the semantic paragraph to be translated, and other information, calls the corresponding language model to generate a translation candidate for the semantic paragraph, and gives an explanation of the translation (what factors were considered to make this translation choice). This embodiment provides a translation example as shown in Table 3.

[0068] Table 3 Translation examples

[0069]

[0070]

[0071] 4) Evaluator

[0072] The evaluator constructs a suitable evaluation prompt based on the top-N evaluation strategies selected by the strategy generator (each strategy contains a large language model and a task instruction), plus the original document, translation context, semantic paragraph to be translated, semantic paragraph translation candidate list and other information, and calls the corresponding language model to evaluate and score the translation candidate. If the evaluation results of multiple evaluation strategies are relatively consistent, the evaluation is passed; if not, the manual feedback interface is entered for arbitration. This embodiment provides an evaluation example as shown in Table 4.

[0073] Table 4 Evaluation examples

[0074]

[0075]

[0076] Based on the N evaluation scores, we can calculate the corresponding consistency index. We use mature and commonly used consistency indicators, such as standard deviation, confidence interval, etc. Taking standard deviation as an example, assuming that N scores are x1 to x N , then

[0077]

[0078] Among them, σ is the standard deviation, which reflects the degree of difference between different scores. Based on this indicator, we can determine a threshold, and when σ is greater than this threshold, it is judged as inconsistent.

[0079] 5) Human feedback interface

[0080] In the preferred implementation, a manual feedback function is also provided, and similar interventions (such as the translation of the same term) should not need to be repeated, and the previous intervention should be automatically brought into the subsequent translation process. In this way, the capabilities of the machine translation model can be fully utilized, the translation process can be simplified, and the most translation tasks can be completed with the least manual intervention.

[0081] In this embodiment, the manual feedback interface displays multiple evaluation results, which are judged and selected by professional translators. The generated data can be used to adjust the evaluator and translation strategy.

[0082] The process of executing the translation method based on the above translation device includes the following steps:

[0083] 1) obtaining an original document to be translated, segmenting the original document to be translated, and generating a semantic paragraph sequence including a plurality of semantic paragraphs;

[0084] 2) Based on the characteristic information of the semantic paragraph, a plurality of optimal translation strategies and evaluation strategies are generated through a strategy model;

[0085] 3) for each of the translation strategies, construct translation hints according to the document to be translated, the translation context and the semantic paragraph to be translated, and generate translation candidates and translation interpretations of the semantic paragraph to be translated;

[0086] 4) for each of the evaluation strategies, construct an evaluation prompt according to the document to be translated, the translation context, the semantic paragraph to be translated and the list of semantic paragraph translation candidates, and generate an evaluation score for each translation candidate;

[0087] 5) When the evaluation scores corresponding to all evaluation strategies are similar, the final translation result is determined; otherwise, the final translation result is determined based on the selection signal or modification signal of the translation candidate input manually;

[0088] 6) Determine whether the original document to be translated has been fully translated. If so, output the translated target document. If not, return to step 3).

[0089] Preferably, the method further comprises: when the evaluation result of the evaluator does not meet the consistency, taking action, receiving a selection signal or a modification signal for the translation candidate input manually, and generating a translation result based on the selection signal or the modification signal.

[0090] If the above method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product is stored in a storage medium, including several instructions for 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 method described in each embodiment 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.

[0091] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The schemes in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and literal scripting language JavaScript, etc.

[0092] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0095] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0096] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A machine translation method based on active agent, characterized in that: The method realizes machine translation of an original document to be translated by constructing an active agent, wherein the active agent includes a process controller, a strategy generator, a translator and an evaluator. The process of realizing machine translation of the original document to be translated includes: The process controller obtains the original document to be translated; The strategy generator is used to obtain translation requirements and generate translation strategies and evaluation strategies based on the translation requirements and historical experience; The translator calls a large language model to generate translation candidates for the original document to be translated based on the plurality of translation strategies; The evaluator scores the translation candidates based on the large language model based on the multiple evaluation strategies, and takes the translation candidates that meet the consistency requirements as the translation results; A translated target document is generated based on the translation result and output by the process controller.

2. The active agent-based machine translation method according to claim 1, characterized in that: After acquiring the original document to be translated, the process controller performs semantic paragraph segmentation on the original document to be translated, converts the original document to be translated into a semantic paragraph sequence, and sequentially transmits the paragraphs to be translated in the semantic paragraph sequence and the translation context of the paragraphs to be translated to the translator and the evaluator.

3. The active agent-based machine translation method according to claim 1, characterized in that: The translation requirements include the field, style and purpose of the original document to be translated.

4. The active agent-based machine translation method according to claim 1, characterized in that: The translation strategy and the evaluation strategy are respectively stored in corresponding strategy lists, and the strategy list is a maintainable open structure list.

5. The active agent-based machine translation method according to claim 1, characterized in that: The translation strategy and the evaluation strategy both include large language model selection types and task instructions.

6. The active agent-based machine translation method according to claim 1, characterized in that: The strategy generator generates the translation strategy and the evaluation strategy through an open source pre-trained language model based on reinforcement learning.

7. The active agent-based machine translation method according to claim 2, characterized in that: When the translator generates the translation candidate, a translation hint is constructed according to the translation strategy, the original document to be translated, the paragraph to be translated and the translation context; When the evaluator performs scoring, an evaluation prompt is constructed according to the evaluation strategy, the original document to be translated, the paragraph to be translated, the translation context and the semantic paragraph translation candidate list.

8. The active agent-based machine translation method according to claim 1, characterized in that: The method further includes: When the evaluation result of the evaluator is that the consistency is not satisfied, an action is taken to receive a selection signal or a modification signal for the translation candidate input manually, and a translation result is generated based on the selection signal or the modification signal.

9. A machine translation device based on active agent, characterized in that: It includes process controller, strategy generator, translator and evaluator, among which, The process controller is used to obtain the original document to be translated, and call the strategy generator, translator, evaluator and manual feedback interface to process the original document to be translated, and output a translated target document; The strategy generator is used to obtain translation requirements and generate translation strategies and evaluation strategies based on the translation requirements and historical experience; The translator calls a large language model to generate translation candidates for the original document to be translated based on the plurality of translation strategies; The evaluator scores the translation candidates based on the large language model based on the multiple evaluation strategies, and takes the translation candidates that meet the consistency requirements as the translation results; The translated target document is generated based on the translation result.

10. The active agent-based machine translation device according to claim 9, characterized in that: The device also includes a manual feedback interface, which takes action when the evaluation result of the evaluator does not meet the consistency, receives a selection signal or a modification signal for the translation candidate, and generates a translation result based on the selection signal or the modification signal.

Citation Information

Cited By

  • Method and system for converting simple and traditional Chinese characters by using language model

    CN121168410A