Text translation methods, apparatus, devices and storage media

By obtaining the accuracy and discriminability parameters of candidate translation models, and selecting b diverse translation models for integration, the problem of insufficient accuracy of translation results in existing technologies is solved, achieving higher translation accuracy and diversity.

CN115809671BActive Publication Date: 2026-11-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111068501.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-13
Publication Date
2026-11-17
Estimated Expiration
2041-09-13

AI Technical Summary

Technical Problem

When using the BLEU-based greedy search algorithm to select a translation model in existing technologies, it is difficult to improve the accuracy of the translation results.

Method used

By obtaining the accuracy and discriminability parameters of candidate translation models, b diverse translation models are selected for integration. The accuracy and discriminability of the translation models are combined to improve the accuracy of the translation results.

Benefits of technology

It improves the accuracy and diversity of the translation results generated after the translation model is integrated, and enhances the probability of correct prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115809671B_ABST
    Figure CN115809671B_ABST
Patent Text Reader

Abstract

This application discloses a text translation method, apparatus, device, and storage medium. The method includes: obtaining model translations generated by *a* candidate translation models for text to be translated in a target domain; obtaining accuracy parameters and discriminability parameters corresponding to the *a* translation models based on their respective model translations; wherein, for a target translation model among the *a* translation models, the accuracy parameter of the target translation model is used to characterize the translation accuracy of the target translation model, and the discriminability parameter of the target translation model is used to characterize the discriminability between the target translation model and other translation models; and selecting *b* translation models from the *a* translation models based on their respective accuracy and discriminability parameters, wherein the *b* translation models are used for text translation in the target domain. This application can improve the diversity of selected translation models and improve the accuracy of the translation results generated after model integration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a text translation method, apparatus, device, and storage medium. Background Technology

[0002] In the field of machine translation, the accuracy of machine translation results is improved by integrating multiple translation models.

[0003] In related technologies, a greedy search algorithm based on BLEU (Bilingual Evaluation Understudy) is used to determine the set of translation models for integration. In selecting translation models, the BLEU value of each model is first calculated based on the reference translation and the model translations generated by the model for the text to be translated. The BLEU value represents the translation accuracy of the model. Then, several translation models with larger BLEU values ​​are searched and selected as the set of translation models for integration.

[0004] However, using a BLEU-based greedy search in the process of selecting a translation model is not conducive to improving the accuracy of the translation results. Summary of the Invention

[0005] This application provides a text translation method, apparatus, device, and storage medium that, when selecting a translation model, can maintain the diversity of translation models and improve the accuracy of the translation results. The technical solution is as follows:

[0006] According to one aspect of the embodiments of this application, a text translation method is provided, the method comprising:

[0007] Obtain the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1;

[0008] Based on the model translations corresponding to the a translation models, obtain the accuracy parameters and the discriminability parameters corresponding to the a translation models respectively; wherein, for the target translation model among the a translation models, the accuracy parameters of the target translation model are used to characterize the translation accuracy of the target translation model, and the discriminability parameters of the target translation model are used to characterize the discriminability between the target translation model and other translation models;

[0009] Based on the accuracy and discriminability parameters corresponding to the a translation models, b translation models are selected from the a translation models. The b translation models are used for text translation in the target domain, where b is a positive integer less than or equal to a.

[0010] According to one aspect of the embodiments of this application, a text translation apparatus is provided, the apparatus comprising:

[0011] The translation acquisition module is used to acquire the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1.

[0012] The parameter acquisition module is used to acquire the accuracy parameters and the discriminability parameters corresponding to the a translation models based on the model translations corresponding to the a translation models respectively; wherein, for the target translation model among the a translation models, the accuracy parameters of the target translation model are used to characterize the translation accuracy of the target translation model, and the discriminability parameters of the target translation model are used to characterize the discriminability between the target translation model and other translation models;

[0013] The model selection module is used to select b translation models from the a translation models based on the accuracy parameters and discriminability parameters corresponding to the a translation models respectively. The b translation models are used for text translation in the target domain, where b is a positive integer less than or equal to a.

[0014] According to one aspect of the embodiments of this application, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, wherein the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the above-described text translation method.

[0015] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored in the storage medium, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the above-described text translation method.

[0016] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer instructions to implement the above-described text translation method.

[0017] The beneficial effects of the technical solutions provided in this application include at least the following:

[0018] This method obtains model translations generated by *a* candidate translation models for the text to be translated in the target domain. Based on these translations, the discriminancy and accuracy parameters for each candidate model are calculated. Then, *b* translation models are selected for translating the text in the target domain based on these parameters. The accuracy of the translation results obtained by integrating the translation models is related to the accuracy and diversity of the models involved in the integration. This method considers not only the accuracy of the translation models but also the discriminancy between them during the model selection process. This results in the selected *b* translation models having a high degree of discriminancy, increasing the probability of correct prediction and improving the accuracy of the translation results generated after model integration. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the implementation environment of a solution provided in an exemplary embodiment of this application;

[0021] Figure 2 An exemplary schematic diagram of the N-Gram matching process is shown;

[0022] Figure 3 This is a flowchart of a text translation method provided in an exemplary embodiment of this application;

[0023] Figure 4 This is a schematic diagram of a translation model selection process provided in an exemplary embodiment of this application;

[0024] Figure 5 An example is shown, illustrating a comparison of similarity parameters between translation models;

[0025] Figure 6 This is a block diagram of a text translation apparatus provided in an exemplary embodiment of this application;

[0026] Figure 7 This is a block diagram of another exemplary embodiment of the present application providing a text translation apparatus;

[0027] Figure 8 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0029] First, let's introduce the terms used in the embodiments of this application:

[0030] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0031] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0032] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.

[0033] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.

[0034] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.

[0035] NMT (Neural Machine Translation) refers to language translation using computer neural network technology and artificial intelligence to mimic brain neurons. Neural machine translation mainly consists of an encoder and a decoder.

[0036] Model ensemble (ME) is a method used to improve model performance. For example, in machine translation, model ensemble uses the average probability of multiple translation models for a given word at a specific position to determine the final prediction probability. A search algorithm selects the word with the highest prediction probability, and finally, a translation is generated. By integrating the translation models, the accuracy of prediction is effectively improved. The effectiveness of model ensemble depends not only on the accuracy of individual translation models but also on the diversity among the participating models.

[0037] The solutions provided in this application involve technologies such as machine language translation and translation model integration in artificial intelligence, which are specifically illustrated through the following embodiments.

[0038] Figure 1 A schematic diagram of an implementation environment provided by an exemplary embodiment of this application is given. This computer system can be implemented as a translation system. The implementation environment may include: computer device 10, terminal device 20, and server 30.

[0039] Computer device 10 has storage and computing capabilities and is used to search and select a set of translation models. The model search and selection process in computer device 10 is performed on a development set, which contains training text and corresponding reference translations. For a specific domain, computer device 10 determines a set of translation models through search and selection. For text in that domain, the model translations generated by this integrated set of translation models have high accuracy. For different domains, computer device 10 uses search and selection to determine different combinations of translation models and stores these combinations in a translation system. The translation system includes at least several translation models and corresponding combinations of translation models for each domain. In the actual operation of the translation system, the system runs on a test set. The text to be translated in the test set does not have a corresponding reference translation. Based on the domain of the text to be translated, the translation system selects all or several translation models from the corresponding translation model combination to translate the text to be translated in the test set. Since the data in the development set and the test set have the characteristic of being approximately identically distributed, a combination of translation models that can generate a high-accuracy model translation for a certain domain on the development set can also generate a high-accuracy model translation for the text to be translated in the same domain on the test set.

[0040] Terminal device 20 has data transmission capabilities. The translation system can be mounted on terminal device 20. Terminal device 20 runs a client application for a target application, which can be a language translation application, a social application, or other applications that provide translation functions. Terminal device 20 can be an electronic device such as a smartphone, tablet, desktop computer, laptop, smart TV, VR (Virtual Reality) device, or in-vehicle terminal. In some embodiments, terminal device 20 can translate user-inputted text into a model translation. In some embodiments, terminal device 20 can upload user-inputted text to server 30.

[0041] Server 30 provides backend support for terminal device 20. For example, server 30 can be the backend server of the target application, and the aforementioned translation system can be installed on server 30. Server 30 includes functions such as data reception and storage to receive data uploaded by terminal device 20 in real time and translate that data. Server 30 can be a standalone server device, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communication, domain name services, security services, and big data and artificial intelligence platforms.

[0042] The system architecture and business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of the implementation environment and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0043] Before introducing the technical solution of this application, some background technical knowledge involved in this application will be introduced and explained. The following related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.

[0044] The following section introduces the matching rules for N-grams.

[0045] N-gram is an algorithm based on statistical language models. In N-gram matching rules, it is assumed that the nth word is only related to the preceding n-1 words and unrelated to any other word. The basic idea of ​​N-gram is to perform a sliding window operation of size N on the text content, forming a sequence of byte segments of length N, where N is a positive integer. Taking machine learning translation as an example, when measuring the accuracy of the model's translation, N-gram has different meanings depending on the value of N. For example, 1-gram represents the accuracy of word translation in the model's translation, while 2-gram, 3-gram, etc., reflect the fluency of the model's translation to some extent. The larger the N-gram value, the higher the fluency of the model's translation and the better the readability of the text. Typically, the maximum value of N is N0. max =4. Please refer to this. Figure 2 It shows a schematic diagram of the N-gram matching process.

[0046] exist Figure 2In the example with N=3, 3-gram matching was performed on text 1 and text 2. By sliding the window with N=3, text 1 was divided into word set 1 (It is a, is a nice, a nice day), and text 2 was divided into word set 2 (Today is a, is a nice, a nice day). Elements in word set 1 and word set 2 were matched. If a given element in word set 2 could be matched with an element in word set 1, then that element was successfully matched in word set 1. In the example, except for "Today is a", all other elements in word set 2 could be matched with elements in word set 1. Therefore, the 3-gram matching accuracy for text 1 and text 2 was 2 / 3.

[0047] The following is an introduction to BLEU.

[0048] BLEU is a text similarity assessment method that calculates the similarity of n-grams between texts by using N-gram matching rules.

[0049] The following example illustrates the calculation process of BLEU, using the example of calculating the similarity between the model's translation and the reference translation of the text to be translated.

[0050] The BLEU algorithm considers recall, and BLEU calculates the recall rate (Count) using the following formula. clip :

[0051] Count clip =min(count, MAX_Ref_Count)

[0052] Where count is the number of times an element of length n appears in the model translation, and MAX_Ref_Count is the maximum number of times the element appears in the reference translation. By introducing recall, BLEU avoids the problem of excessively high BLEU values ​​caused by a large number of identical elements appearing in the model translation.

[0053] For N-gram BLEU, the accuracy p of the model translation n The calculation formula is as follows:

[0054]

[0055] Here, Candidates represents the model translations, and Count() represents the counting function.

[0056] Based on the above mechanism, the similarity between the model translation and the reference translation can be determined. The accuracy of the model translation is then determined by this similarity. However, for shorter model translations, the accuracy calculated using this method tends to be too high. Therefore, a penalty factor (BP) is introduced in BLEU:

[0057]

[0058] Where c is the length of the model translation and r is the length of the reference translation, BP = 1 when c > r, and BP = e when c ≤ r. (1-r / c) .

[0059] Finally, the formula for calculating BLEU between the model translation and the reference translation is as follows:

[0060]

[0061] Where N represents the maximum value of n in the n-gram, W n This represents the weights corresponding to different n-grams. In general, equal weighting is used, so Wn = 1 / n.

[0062] The following is an introduction to Self-BLEU.

[0063] Self-BLEU is a method for calculating the similarity between translation models. The calculation method of Self-BLEU is the same as that of BLEU. Self-BLEU selects a first model translation and a second model translation, uses the first model translation as the "reference translation", and uses the above BLEU to calculate the similarity between the two model translations to obtain the Self-BLEU value of the second model translation.

[0064] Figure 3 This is a flowchart of a text translation method provided in an exemplary embodiment of this application. The execution subject of this method can be... Figure 1 Computer equipment 10. For example... Figure 3 As shown, the method may include the following steps (310-330):

[0065] Step 310: Obtain the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1.

[0066] A translation model is a machine learning model, such as a neural network model, capable of translating source language text into target language text. The source and target languages ​​are two different languages, such as English and Chinese, or French and Russian. In some embodiments, a translation model includes an encoder and a decoder. The encoder encodes the source language text to obtain a latent feature code, and the decoder decodes the latent feature code to obtain the target language text. In some embodiments, a single translation model translates the text word by word. The model calculates the probability of the corresponding translated word appearing at different positions in the model's translation based on the source language vocabulary in the text, and generates a probability distribution the size of a vocabulary list. Based on this probability distribution, the model uses a search algorithm to find the word with the highest probability at each position in the model's translation, ultimately generating the model's translation. The target domain refers to the application scenario of n translation models. In some embodiments, the probabilities of specific words in the text of the target domain corresponding to translated words are the same or approximately the same. The target domain can be categorized into research, work, and daily life domains based on usage scenarios. These domains can be further subdivided according to the usage scenario and translation accuracy requirements. For example, in the research domain, the target domain includes, but is not limited to, any one of the disciplines such as engineering, biology, medicine, and mathematics, as well as any combination thereof. Disciplines can be further subdivided; for example, in mathematics, the target domain includes, but is not limited to, any one of the categories such as basic mathematics, applied mathematics, discrete mathematics, and pure mathematics, as well as any combination thereof. The granularity of the target domain division depends on the actual application scenario and is not limited here.

[0067] Step 320: Based on the model translations corresponding to each of the a translation models, obtain the accuracy parameters and the discriminability parameters corresponding to each of the a translation models; wherein, for the target translation model among the a translation models, the accuracy parameters of the target translation model are used to characterize the translation accuracy of the target translation model, and the discriminability parameters of the target translation model are used to characterize the discriminability between the target translation model and other translation models.

[0068] The target translation model is any one of the a translation models. In this embodiment, for ease of explanation, only the accuracy and discriminancy parameters of the target translation model are used as examples. The accuracy and discriminancy parameters of the other translation models have the same meaning and will not be elaborated here.

[0069] The accuracy parameter of the target translation model is used to characterize the accuracy of the target translation model in translating certain types or categories of text. Optionally, the accuracy parameter is called the BLEU value.

[0070] In some embodiments, the accuracy parameter and translation accuracy are positively correlated; the larger the accuracy parameter of the target translation model, the higher the translation accuracy of the target translation model; the smaller the accuracy parameter of the target translation model, the lower the translation accuracy of the target translation model.

[0071] In other embodiments, the accuracy parameter and translation accuracy are negatively correlated; the larger the accuracy parameter of the target translation model, the lower the translation accuracy of the target translation model; and the smaller the accuracy parameter of the target translation model, the higher the translation accuracy of the target translation model.

[0072] In some embodiments, the accuracy parameter of the target translation model is obtained through a text similarity evaluation method. This method assesses the similarity between the target model's translation and the reference translation, and determines the accuracy parameter based on this similarity. Text similarity evaluation methods include BLEU, ROUGE (Recall-Oriented Understudy for Gisting Evaluation), etc., and this application does not limit the specific methods used.

[0073] The discriminability parameter is used to characterize the discriminability between the target translation model and other translation models. If the discriminability parameter of a certain translation model is large, then the translation model and other translation models are used to translate the same text to be translated, and the model translation corresponding to the translation model and the translations of other models are obtained with a large difference.

[0074] In some embodiments, when the discriminability parameter and the similarity between translation models are negatively correlated, a larger discriminability parameter of the target model indicates that the target translation model is relatively similar to other translation models; conversely, a smaller discriminability parameter indicates that the target translation model differs significantly from other translation models. Optionally, the discriminability parameter can be referred to as the Self-BLEU value.

[0075] In other embodiments, when there is a positive correlation between the discriminability parameter and the similarity between translation models, if the discriminability parameter of the target model is small, it indicates that the target translation model is relatively similar to other translation models; conversely, if the discriminability parameter of the target model is large, it indicates that the target translation model is significantly different from other translation models.

[0076] Step 330: Based on the accuracy parameters and discriminability parameters corresponding to each of the a translation models, select b translation models from the a translation models. The b translation models are used for text translation in the target domain, where b is a positive integer less than or equal to a.

[0077] Based on accuracy and discriminability parameters, a translation model is searched among a to select b translation models, which are then used online as a composite translation model. In some embodiments, the b translation models translate text in the target domain, generating highly accurate translations. In some embodiments, model ensemble is performed using all or some of the b translation models to translate text in the target domain, obtaining translated results. In some embodiments, the selected b translation models are used not only for translating text in the target domain but also for translating text in other domains outside the target domain.

[0078] In some embodiments, when the target domain is applied mathematics, text from this domain is used as the text to be translated. b translation models are selected from a translation models, and these b translation models are used to translate other texts in the applied mathematics domain. The resulting translations have high accuracy.

[0079] In summary, the technical solution provided in this application involves obtaining model translations generated by *a* candidate translation models for the text to be translated in the target domain, calculating the discriminability and accuracy parameters of each candidate translation model based on the model translations, and then selecting *b* translation models for translating the text in the target domain based on these parameters. The accuracy of the translation result obtained by integrating the translation models is related to the accuracy and diversity of the integrated models. This method considers not only the accuracy of the translation models but also the discriminability between them during the model selection process, resulting in a high degree of discriminability among the selected *b* translation models. This increases the probability of correct prediction and improves the accuracy of the translation result generated after model integration.

[0080] The following examples illustrate the process of selecting a translation model.

[0081] refer to Figure 4 This illustrates a schematic diagram of the translation model selection process provided in another embodiment of this application.

[0082] Step 410: Obtain the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1.

[0083] Step 420: Based on the model translations corresponding to each of the a translation models, obtain the accuracy parameters and the discriminancy parameters corresponding to each of the a translation models.

[0084] Step 430: Based on the accuracy parameters and discriminability parameters corresponding to each of the a translation models, determine the evaluation scores corresponding to each of the a translation models.

[0085] Step 430 includes the following steps: Step 431, for the target translation model among the a translation models, calculate the difference between the accuracy parameter and the minimum accuracy parameter corresponding to the target translation model to obtain the first difference; Step 432, calculate the difference between the discriminability parameter and the maximum discriminability parameter corresponding to the target translation model to obtain the second difference; Step 433, determine the evaluation score corresponding to the target translation model based on the first difference, the second difference, and the proportional coefficient.

[0086] Taking a target translation model as an example, the evaluation score of the target translation model is used to comprehensively reflect its accuracy and its distinguishability from other translation models. In some embodiments, the evaluation score and the overall performance of the model are positively correlated. A higher evaluation score for a translation model indicates better overall performance in terms of both accuracy and distinguishability; conversely, a lower evaluation score indicates poorer overall performance. In some embodiments, the evaluation score and the overall performance of the model are negatively correlated. A higher evaluation score for a translation model indicates poorer overall performance in terms of both accuracy and distinguishability; conversely, a lower evaluation score indicates better overall performance. Choosing a translation model with better overall performance in terms of accuracy and distinguishability is beneficial for improving the accuracy of the final translation.

[0087] Optionally, the formula for calculating the evaluation score is as follows:

[0088] Evaluation score = (b i –min(B))·weight+(max(S)–s i )

[0089] Among them, b i Let represent the accuracy parameter of a translation model, B represent the set of accuracy parameters corresponding to 'a' translation models, and min(B) represent the minimum accuracy parameter. i Let S represent the discriminant parameter of a translation model, where S represents the set of discriminant parameters corresponding to a translation models, max(S) represents the maximum discriminant parameter, and weight represents the scaling factor. The weight factor ensures that the units of the accuracy parameter and the discriminant parameter are consistent and can be summed. In some embodiments, the expression for weight is weight = (max(S) – min(S)) / (max(B) - min(B)).

[0090] For the target translation model among the a translation models, the accuracy and discriminability parameters of the target translation model are calculated using the above evaluation score calculation formula to obtain the evaluation score of the target translation model.

[0091] In some embodiments, selecting b translation models from a translation models based on their respective evaluation scores includes: selecting at least one translation model from the candidate model set whose evaluation score meets a first condition based on the evaluation scores of the a translation models, and adding it to the integrated model set; wherein the initialized candidate model set includes a translation models; for each remaining translation model in the candidate model set, calculating the comprehensive similarity parameter corresponding to the translation model, the comprehensive similarity parameter being used to characterize the similarity between the translation model and the translation models in the integrated model set; selecting at least one translation model from the candidate model set whose comprehensive similarity parameter meets a second condition, and adding it to the integrated model set; if the number of translation models in the integrated model set is less than b, resuming the step of calculating the comprehensive similarity parameter corresponding to each remaining translation model in the candidate model set; if the number of translation models in the integrated model set is equal to b, determining the translation models in the integrated model set as the selected b translation models.

[0092] The process involves selecting at least one translation model from the candidate model set whose evaluation score meets the first condition, including selecting one translation model from the candidate model set whose evaluation score meets the first condition and adding it to the integrated model set, or selecting multiple translation models from the candidate model set whose evaluation scores meet the first condition and adding them to the integrated model set.

[0093] Step 440: Select b translation models from the a translation models based on their respective evaluation scores.

[0094] Optionally, step 440 includes: step 441, based on the evaluation scores corresponding to each of the a translation models, selecting at least one translation model from the candidate model set whose evaluation score meets the first condition and adding it to the integrated model set; wherein, the initialized candidate model set includes a translation models; step 442, for each remaining translation model in the candidate model set, calculating the comprehensive similarity parameter corresponding to the remaining translation model, the comprehensive similarity parameter being used to characterize the similarity between the remaining translation model and the translation models in the integrated model set; step 443, selecting at least one translation model from the candidate model set whose comprehensive similarity parameter meets the second condition and adding it to the integrated model set; step 444, if the number of translation models contained in the integrated model set is less than b, re-execute step 442 above; step 445, if the number of translation models contained in the integrated model set is equal to b, determining the translation models contained in the integrated model set as the selected b translation models.

[0095] In some embodiments, calculating the comprehensive similarity parameter corresponding to the translation model includes: calculating the comprehensive similarity parameter corresponding to the remaining translation model, including: calculating the similarity parameter between the remaining translation model and each translation model in the ensemble model set, wherein the similarity parameter is used to characterize the similarity between the two translation models; and calculating the comprehensive similarity parameter corresponding to the remaining translation model based on the similarity parameter between the remaining translation model and each translation model in the ensemble model set.

[0096] In some embodiments, the first condition includes: the evaluation score is the highest.

[0097] Given that the evaluation score is positively correlated with the overall performance of the translation model, the translation model with the highest evaluation score indicates that, considering both translation accuracy and similarity between models, the translation model with the highest evaluation score has the best performance.

[0098] In some embodiments, the first condition includes: the evaluation score meets a first threshold. In some embodiments, when the evaluation score and the overall performance (accuracy parameter and discriminancy parameter) of the translation model are positively correlated—that is, the higher the evaluation score, the better the overall performance of the model, and the lower the evaluation score, the worse the overall performance of the model—the evaluation score meeting the first threshold includes: the evaluation score is greater than or equal to the first threshold. In some embodiments, when the evaluation score and the overall performance (accuracy parameter and discriminancy parameter) of the translation model are negatively correlated—that is, the higher the evaluation score, the worse the overall performance of the model, and the lower the evaluation score, the better the overall performance of the model—the evaluation score meeting the first threshold includes: the evaluation score is less than or equal to the first threshold.

[0099] In some embodiments, after calculating the corresponding evaluation scores using the accuracy and discriminability parameters of a translation models, a translation model whose evaluation score meets the first threshold is selected from the candidate model set and added to the integrated model set; or, multiple translation models whose evaluation scores meet the first threshold are selected from the candidate model set and added to the integrated model set.

[0100] In some embodiments, the second condition includes: the overall similarity parameter is the smallest.

[0101] For any translation model in the candidate translation model set, the comprehensive similarity parameter of the translation model represents the sum of the similarity parameters between the translation model and all translation models in the ensemble model set, or, the comprehensive similarity parameter of the translation model represents the average of the sums of the similarity parameters between the translation model and all translation models in the ensemble model set. When the comprehensive similarity parameter represents the average of the sums of the similarity parameters between the translation model and all translation models in the ensemble model set, the comprehensive similarity parameter of the translation model can be calculated using the following formula:

[0102]

[0103] Where M is the set of candidate models, C is the set of ensemble models, and BLEU(i,j) represents the similarity parameter between translation model i using BLUE and translation model j in the ensemble model set.

[0104] In some embodiments, a smaller similarity parameter between translation models indicates a lower similarity between them. Therefore, a smaller overall similarity parameter for a translation model indicates a lower overall similarity between that model and the translation models in the ensemble, meaning a greater difference between that model and the models in the ensemble. Conversely, a larger overall similarity parameter for a translation model indicates a greater overall similarity between that model and the models in the ensemble, meaning a smaller difference between that model and the models in the ensemble. Selecting the translation model with the lowest overall similarity helps increase the diversity of translation models in the ensemble and improves the accuracy of the generated translations for the text to be translated.

[0105] In some embodiments, based on the accuracy parameters and discriminability parameters corresponding to the a translation models respectively, b translation models are selected from the a translation models, including: selecting b translation models from the a translation models whose accuracy parameters meet the accuracy threshold and / or whose discriminability parameters meet the discriminability threshold, and forming the b translation models into an integrated model set.

[0106] In some embodiments, the computer device determines the evaluation scores corresponding to 'a' translation models based on their accuracy and discriminability parameters. A higher evaluation score indicates better performance in balancing accuracy and discriminability. Based on the evaluation scores of the 'a' translation models, the device selects the translation model with the highest evaluation score from the candidate translation model set and adds it to the integrated model set. The device calculates the comprehensive similarity parameter of each translation model in the candidate model set, where the comprehensive similarity is the sum of the similarity parameters between the translation model and all translation models in the integrated model set. The device searches for the first translation model with the smallest comprehensive similarity parameter in the candidate model set and moves it from the candidate model set to the integrated model set. If the number of translation models in the integrated model set is less than 'b', the device updates the comprehensive similarity parameters of the remaining translation models in the candidate model set. After the update, the comprehensive similarity parameter of a translation model is equal to its current comprehensive similarity parameter plus the similarity parameter between the translation model and the first translation model. The translation model with the lowest comprehensive similarity parameter is then removed from the candidate translation model set and added to the integrated model set. If the number of translation models in the ensemble model set is equal to b, then the translation models in the ensemble model set are selected as the b translation models.

[0107] Please refer to Table 1 below. Following the method provided in this embodiment, select b translation models, obtain the translation results corresponding to the text to be translated through model ensemble, and use BLUE to calculate the similarity between the translation results and the reference translation. The results are shown in Table 1 below.

[0108] Table 1

[0109] Model English-German Chinese-English English-Chinese Translation network + single model 29.40 24.97 49.80 Translation network + general integration 30.00(+0.60) 25.6(+0.68) 50.30(+0.50) Translation network + this method 30.58(+1.18) 26.1(+1.22) 50.83(+1.03)

[0110] It can be seen that by using the method provided in this embodiment to select b translation models, the translation result obtained by integrating the b translation models has a high BLUE value, that is, the accuracy of the translation result is high.

[0111] The method provided in the above embodiments can quickly search for the translation models with the lowest similarity among the obtained integrated model set, that is, the selected translation models have good diversity, which is beneficial to improving the accuracy of the translation results generated after model integration.

[0112] In some embodiments, the computer device arbitrarily removes a translation model from the candidate translation model set and adds it to the integrated model set. If the number of translation models in the integrated model set is less than b, the translation model with the smallest comprehensive similarity parameter is selected from the candidate model set and added to the integrated model set. The process of selecting the translation model with the smallest comprehensive similarity parameter is described in the previous embodiment and will not be repeated here. If the number of translation models in the integrated model set is equal to b, the translation models in the integrated model set are determined as the b selected translation models.

[0113] Different initial translation models result in different final ensemble model sets. By selecting 'a' translation models from the candidate model set in turn and performing the translation model selection process described in the above embodiment for any translation set, 'a' ensemble model sets can be obtained. The translation results of the text to be translated are generated using the 'a' ensemble model sets respectively. The accuracy of the translation results is calculated based on a text similarity test method (e.g., BLEU). The ensemble model set with the highest accuracy in generating the translation results is found among the 'a' ensemble model sets. Compared with determining the ensemble model set with the highest accuracy through enumeration, this reduces the computational load on the machine and improves the search speed.

[0114] In summary, by using the accuracy and discriminancy parameters corresponding to each of the a translation models, selecting b translation models from the a translation models can avoid the selected b translation models being too similar.

[0115] The following section explains how to obtain the accuracy and discriminative parameters of the translation model.

[0116] In some embodiments, based on the model translations corresponding to each of the a translation models, the accuracy parameters corresponding to each of the a translation models are obtained, including: obtaining the reference translation corresponding to the text to be translated; for the target translation model among the a translation models, the accuracy parameters corresponding to the target translation model are obtained based on the similarity between the target model translation generated by the target translation model for the text to be translated and the reference translation.

[0117] The reference translation is the result of a professional translator translating the text to be translated. In some embodiments, the text to be translated has multiple reference translations with different expressions but the same meaning. The target model translation refers to the translation obtained by the target translation model of the text to be translated. In some embodiments, the target translation model translates the text to be translated, generates a probability distribution of the vocabulary size, and searches the probability distribution of the vocabulary size using search algorithms such as Beam Search and Greedy Search, continuously selecting the best translation word at the current position, and finally generating the target model translation. The accuracy parameter of the target translation model is obtained by calculating the text similarity between the target model translation and the reference translations.

[0118] In some embodiments, the accuracy parameter corresponding to the target translation model is obtained based on the similarity between the target model translation and the reference translation generated by the target translation model for the text to be translated. This includes: calculating the first precision of the target model translation and the reference translation for multiple different n-gram texts, where n-gram text refers to a character sequence of length n, and n is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the reference translation; wherein the values ​​of n are different for multiple different n-gram texts; determining a first translation evaluation value based on the first precision corresponding to the multiple different n-gram texts, the first translation evaluation value being used to evaluate the translation accuracy of the target translation model; and determining the accuracy parameter corresponding to the target translation model based on the first translation evaluation value, the length of the target model translation, and the length of the reference translation.

[0119] Taking a Chinese text to be translated, an English translation with c words as the target model, and an English translation with r words as the reference, an n-gram text is used to divide the English translation and the reference translation. In the target model translation, (c-n+1) character sequences consisting of n consecutive words are divided, and in the reference translation, (r-n+1) character sequences consisting of n consecutive words are divided. The degree of overlap between the (c-n+1) character sequences and the (r-n+1) character sequences is compared to determine the first precision of the n-gram text of the target model translation.

[0120] When the target model's translated text is shorter than the reference translation, the first translation evaluation value needs to be reduced to decrease the evaluation error. When the target model's translated text is shorter than the reference translation, the first translation evaluation value becomes the accuracy parameter corresponding to the target translation model.

[0121] Calculate the accuracy parameters corresponding to the target model using the following formula:

[0122]

[0123] Please refer to the above introduction for the meaning of each component of the formula; it will not be repeated here.

[0124] In some embodiments, based on the model translations corresponding to each of the a translation models, the discriminability parameters corresponding to each of the a translation models are obtained, including: for the target translation model among the a translation models, determining the similarity parameters between the target translation model and each of the other translation models based on the target model translation generated by the target translation model for the text to be translated and the model translations generated by the other translation models for the text to be translated; and determining the discriminability parameters corresponding to the target translation model based on the similarity parameters between the target translation model and each of the other translation models.

[0125] In some embodiments, determining the similarity parameter between the target translation model and each of the other translation models based on the target model translation generated by the target translation model for the text to be translated and the model translations generated by other translation models for the text to be translated, includes: for any other translation model, calculating the second precision of the target model translation and the other model translations for multiple different m-gram texts, where m-gram text refers to a character sequence of length m, and m is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the other model translations; wherein, other model translations refer to the model translations generated by other translation models for the text to be translated, and the values ​​of m for multiple different m-gram texts are different; determining a second translation evaluation value based on the second precision corresponding to the multiple different m-gram texts, the second translation evaluation value being used to evaluate the similarity between the target translation model and the other translation models; and determining the similarity parameter between the target translation model and the other translation models based on the second translation evaluation value, the length of the target model translation, and the length of the other model translations.

[0126] Please refer to Figure 6 It shows the similarity parameters between translation models. Figure 6 The larger the color of a cell, the higher the similarity between the two translation models corresponding to that cell. The process of determining the similarity parameter of the target model is similar to the process of determining the accuracy parameter of the target translation model. Please refer to the above for details, which will not be repeated here.

[0127] In some embodiments, determining the discriminant parameter corresponding to the target translation model based on the similarity parameters between the target translation model and each other translation model includes summing the similarity parameters between the target translation model and each other translation model and calculating the average value, which is the discriminant parameter of the target translation model.

[0128] In summary, by determining the accuracy and discriminability parameters for each of the a translation models, multiple selection parameters are provided for the translation model selection process, thus enriching the selection methods for translation models.

[0129] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0130] Please refer to Figure 6 This diagram illustrates a block diagram of a text translation apparatus according to an embodiment of this application. The apparatus has the function of implementing the aforementioned text translation method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus can be a computer device or can be installed within a computer device. The apparatus 600 may include: a translation acquisition module 610, a parameter acquisition module 620, and a model selection module 630.

[0131] The translation acquisition module 610 is used to acquire the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1.

[0132] The parameter acquisition module 620 acquires the accuracy parameters and the discriminability parameters corresponding to the a translation models based on the model translations corresponding to the a translation models respectively. Specifically, for the target translation model among the a translation models, the accuracy parameters of the target translation model characterize the translation accuracy of the target translation model, and the discriminability parameters of the target translation model characterize the discriminability between the target translation model and other translation models.

[0133] The model selection module 630 selects b translation models from the a translation models based on the accuracy parameters and discriminability parameters corresponding to the a translation models respectively. The b translation models are used for text translation in the target domain, where b is a positive integer less than or equal to a.

[0134] In some embodiments, such as Figure 7 As shown, the model selection module 630 includes:

[0135] The determination submodule 710 is used to determine the evaluation score corresponding to each of the a translation models based on the accuracy parameter and discriminability parameter corresponding to each of the a translation models.

[0136] Submodule 720 is selected to select b translation models from the a translation models based on the evaluation scores corresponding to the a translation models respectively.

[0137] In some embodiments, the determining submodule 710 is configured to: for the target translation model among the a translation models, calculate the difference between the accuracy parameter and the minimum accuracy parameter corresponding to the target translation model to obtain a first difference; wherein the minimum accuracy parameter refers to the minimum value among the accuracy parameters corresponding to the a translation models respectively; calculate the difference between the discriminability parameter and the maximum discriminability parameter corresponding to the target translation model to obtain a second difference; wherein the maximum discriminability parameter refers to the maximum value among the discriminability parameters corresponding to the a translation models respectively; determine the evaluation score corresponding to the target translation model based on the first difference, the second difference, and a proportionality coefficient, wherein the proportionality coefficient is used to balance the weight of the first difference and the second difference in the evaluation score.

[0138] In some embodiments, such as Figure 7 As shown, the selection submodule 720 includes:

[0139] The transfer unit 721 is used to extract at least one translation model whose evaluation score meets the first condition from the candidate model set according to the evaluation scores corresponding to the a translation models respectively, and add it to the integrated model set; wherein, the initialized candidate model set includes the a translation models; the calculation unit 722 is used to calculate the comprehensive similarity parameter corresponding to each remaining translation model in the candidate model set, the comprehensive similarity parameter being used to characterize the similarity between the remaining translation model and the translation models in the integrated model set; the execution unit 723 is used to extract at least one translation model whose comprehensive similarity parameter meets the second condition from the candidate model set and add it to the integrated model set; the loop unit 724 is used to start executing again from the step of calculating the comprehensive similarity parameter corresponding to each remaining translation model in the candidate model set when the number of translation models contained in the integrated model set is less than b; the determination unit 725 is used to determine the translation models contained in the integrated model set as the selected b translation models when the number of translation models contained in the integrated model set is equal to b.

[0140] In some embodiments, the calculation unit 722 is configured to: calculate the similarity parameter between the remaining translation model and each translation model in the integrated model set, wherein the similarity parameter is used to characterize the similarity between the two translation models; and calculate the comprehensive similarity parameter corresponding to the remaining translation model based on the similarity parameter between the remaining translation model and each translation model in the integrated model set.

[0141] In some embodiments, the first condition includes: the evaluation score is the maximum.

[0142] In some embodiments, the second condition includes: the comprehensive similarity parameter is the minimum.

[0143] In some embodiments, such as Figure 7 As shown, the parameter acquisition module 620 includes:

[0144] The acquisition submodule 730 is used to acquire the reference translation corresponding to the text to be translated; the first generation submodule 740 is used for the target translation model among the a translation models; the first determination submodule 750 is used to obtain the accuracy parameter corresponding to the target translation model based on the similarity between the target model translation generated by the target translation model for the text to be translated and the reference translation.

[0145] In some embodiments, the first determining submodule 750 includes:

[0146] Calculate the first precision of the target model translation and the reference translation for multiple different n-gram texts, where n is a character sequence of length n, and n is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the reference translation; wherein the values ​​of n are different for the multiple different n-gram texts; determine a first translation evaluation value based on the first precision of the multiple different n-gram texts, and the first translation evaluation value is used to evaluate the translation accuracy of the target translation model; determine the accuracy parameter corresponding to the target translation model based on the first translation evaluation value, the length of the target model translation, and the length of the reference translation.

[0147] In some embodiments, such as Figure 7 As shown, the parameter acquisition module 620 further includes:

[0148] The second generation submodule 760 is used to determine the similarity parameter between the target translation model and each of the other translation models based on the target model translation generated by the target translation model for the text to be translated and the model translations generated by the other translation models for the text to be translated.

[0149] The second determining submodule 770 is used to determine the discriminability parameter corresponding to the target translation model based on the similarity parameter between the target translation model and each of the other translation models.

[0150] In some embodiments, the second determining submodule 720 is configured to:

[0151] For any of the other translation models, calculate the second precision of the target model translation and the other model translations for multiple different m-gram texts, where m-gram text refers to a character sequence of length m, and m is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the other model translations; wherein, the other model translations refer to the model translations generated by the other translation models for the text to be translated, and the values ​​of m for the multiple different m-gram texts are different; determine a second translation evaluation value based on the second precision corresponding to the multiple different m-gram texts, and the second translation evaluation value is used to evaluate the similarity between the target translation model and the other translation models; determine the similarity parameter between the target translation model and the other translation models based on the second translation evaluation value, the length of the target model translation, and the length of the other model translations.

[0152] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0153] Please refer to Figure 8 This illustration shows a schematic diagram of a computer device provided in one embodiment of this application. The computer device can be any electronic device with data computing, processing, and storage functions, such as a mobile phone, tablet computer, PC (Personal Computer), or server. This computer device is used to implement the text translation method provided in the above embodiments. Specifically:

[0154] The computer device 800 includes a processing unit (such as a CPU, GPU, and FPGA) 801, a system memory 804 including RAM (Random-Access Memory) 802 and ROM (Read-Only Memory) 803, and a system bus 805 connecting the system memory 804 and the CPU 801. The computer device 800 also includes a basic input / output system 809 to facilitate information transfer between various devices within the server, and a large-capacity storage device 807 for storing the operating system 813, application programs 814, and other program modules 815.

[0155] The basic input / output system 809 includes a display 809 for displaying information and an input device 809 for user input, such as a mouse or keyboard. Both the display 809 and the input device 809 are connected to the central processing unit 801 via an input / output controller 810 connected to the system bus 805. The basic input / output system 809 may also include the input / output controller 810 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 810 also provides output to a display screen, printer, or other types of output devices.

[0156] The mass storage device 807 is connected to the central processing unit 801 via a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer-readable media provide non-volatile storage for the computer device 800. That is, the mass storage device 807 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0157] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the above-mentioned types. The system memory 804 and mass storage device 807 described above can be collectively referred to as memory.

[0158] According to an embodiment of this application, the computer device 800 can also be connected to a remote computer on a network, such as the Internet, for operation. That is, the computer device 800 can be connected to a network 812 via a network interface unit 811 connected to the system bus 805, or it can also use the network interface unit 811 to connect to other types of networks or remote computer systems (not shown).

[0159] The memory also includes at least one instruction, at least one program, code set, or instruction set, which is stored in the memory and configured to be executed by one or more processors to implement the above-described text translation method.

[0160] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, which is loaded and executed by a processor to implement the above-described text translation method.

[0161] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the above-described text translation method.

[0162] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0163] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method of translating text, characterized by, The method includes: Obtain the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1; For the target translation model among the a translation models, the accuracy parameter corresponding to the target translation model is obtained based on the similarity between the target model translation generated by the target translation model for the text to be translated and the reference translation. The accuracy parameter of the target translation model is used to characterize the translation accuracy of the target translation model. For the target translation model among the a translation models, based on the target model translation generated by the target translation model for the text to be translated and the model translations generated by the other translation models for the text to be translated, a similarity parameter between the target translation model and each of the other translation models is determined; based on the similarity parameter between the target translation model and each of the other translation models, a discriminative parameter corresponding to the target translation model is determined, and the discriminative parameter of the target translation model is used to characterize the diversity between the target translation model and the other translation models; Based on the accuracy and discriminability parameters corresponding to the a translation models, the evaluation scores corresponding to the a translation models are determined. The evaluation score of the target translation model among the a translation models is used to comprehensively reflect the translation accuracy of the target translation model and the diversity between the target translation model and the other translation models. Based on the evaluation scores corresponding to the a translation models, b translation models are selected from the a translation models. The b translation models are used for text translation in the target domain, where b is a positive integer less than or equal to a.

2. The method of claim 1, wherein, The process of determining the evaluation scores for each of the a translation models based on their accuracy and discriminability parameters includes: For the target translation model among the a translation models, the difference between the accuracy parameter and the minimum accuracy parameter corresponding to the target translation model is calculated to obtain the first difference; wherein, the minimum accuracy parameter refers to the minimum value among the accuracy parameters corresponding to the a translation models respectively; The difference between the discriminant parameter and the maximum discriminant parameter corresponding to the target translation model is calculated to obtain the second difference; wherein, the maximum discriminant parameter refers to the maximum value among the discriminant parameters corresponding to the a translation models respectively; The evaluation score corresponding to the target translation model is determined based on the first difference, the second difference, and the proportional coefficient. The proportional coefficient is used to balance the weight of the first difference and the second difference in the evaluation score.

3. The method of claim 1, wherein, The step of selecting b translation models from the a translation models based on their respective evaluation scores includes: Based on the evaluation scores corresponding to the a translation models, at least one translation model whose evaluation score meets the first condition is selected from the candidate model set and added to the integrated model set; wherein, the initialized candidate model set includes the a translation models; For each remaining translation model in the candidate model set, a comprehensive similarity parameter is calculated for the remaining translation model. The comprehensive similarity parameter is used to characterize the similarity between the remaining translation model and the translation models in the ensemble model set. From the candidate model set, at least one translation model whose comprehensive similarity parameter meets the second condition is selected and added to the integrated model set; If the number of translation models in the integrated model set is less than b, the step of calculating the comprehensive similarity parameter corresponding to each remaining translation model in the candidate model set is executed again. If the number of translation models contained in the integrated model set is equal to b, then the translation models contained in the integrated model set are determined as the selected b translation models.

4. The method of claim 3, wherein, The calculation of the comprehensive similarity parameters corresponding to the remaining translation models includes: Calculate the similarity parameter between the remaining translation models and each translation model in the ensemble model set, whereby the similarity parameter is used to characterize the similarity between the two translation models; Based on the similarity parameters between the remaining translation models and each translation model in the ensemble model set, the comprehensive similarity parameters corresponding to the remaining translation models are calculated.

5. The method of claim 3, wherein, The first condition includes: the evaluation score is the largest.

6. The method of claim 3, wherein, The second condition includes: the comprehensive similarity parameter is minimized.

7. The method of claim 1, wherein, The step of obtaining the accuracy parameter corresponding to the target translation model based on the similarity between the target model's translation generated for the text to be translated and the reference translation includes: Calculate the first precision of the target model translation and the reference translation for multiple different n-gram texts, where n is a character sequence of length n, and n is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the reference translation; wherein the values ​​of n are different for the multiple different n-gram texts; A first translation evaluation value is determined based on the first precision corresponding to the multiple different n-gram texts, and the first translation evaluation value is used to evaluate the translation accuracy of the target translation model; Based on the first translation evaluation value, the length of the target model translation, and the length of the reference translation, the accuracy parameter corresponding to the target translation model is determined.

8. The method of claim 1, wherein, The step of determining the similarity parameters between the target translation model and each of the other translation models based on the target model's translation of the text to be translated and the model translations generated by other translation models for the text to be translated includes: For any of the other translation models, calculate the second precision of the target model translation and the other model translations for multiple different m-gram texts, where m-gram text refers to a character sequence of length m, and m is a positive integer less than or equal to the length of the target model translation and less than or equal to the length of the other model translations; wherein, the other model translations refer to the model translations generated by the other translation models for the text to be translated, and the values ​​of m for the multiple different m-gram texts are different; A second translation evaluation value is determined based on the second precision corresponding to the multiple different m-gram texts. The second translation evaluation value is used to evaluate the similarity between the target translation model and the other translation models. Based on the second translation evaluation value, the length of the target model translation, and the lengths of the other model translations, a similarity parameter is determined between the target translation model and the other translation models.

9. A text translation apparatus characterized by comprising: The device includes: The translation acquisition module is used to acquire the model translations generated by the candidate translation models for the text to be translated in the target domain, where a is an integer greater than 1. The parameter acquisition module is used to obtain the accuracy parameter corresponding to the target translation model for the target translation model among the a translation models, based on the similarity between the target model translation generated by the target translation model for the text to be translated and the reference translation. The accuracy parameter of the target translation model is used to characterize the translation accuracy of the target translation model. The parameter acquisition module is further configured to, for the target translation model among the a translation models, determine the similarity parameter between the target translation model and each of the other translation models based on the target model translation generated by the target translation model for the text to be translated and the model translations generated by the other translation models for the text to be translated; and determine the discriminability parameter corresponding to the target translation model based on the similarity parameter between the target translation model and each of the other translation models, wherein the discriminability parameter of the target translation model is used to characterize the diversity between the target translation model and the other translation models; The model selection module is used to determine the evaluation score corresponding to each of the a translation models based on the accuracy parameters and discriminability parameters respectively. The evaluation score of the target translation model among the a translation models is used to comprehensively reflect the translation accuracy of the target translation model and the diversity between the target translation model and the other translation models. The model selection module is further configured to select b translation models from the a translation models based on the evaluation scores corresponding to the a translation models respectively, wherein the b translation models are used for text translation in the target domain, and b is a positive integer less than or equal to a.

10. The apparatus according to claim 9, characterized in that, The model selection module is also used for: For the target translation model among the a translation models, the difference between the accuracy parameter and the minimum accuracy parameter corresponding to the target translation model is calculated to obtain the first difference; wherein, the minimum accuracy parameter refers to the minimum value among the accuracy parameters corresponding to the a translation models respectively; The difference between the discriminant parameter and the maximum discriminant parameter corresponding to the target translation model is calculated to obtain the second difference; wherein, the maximum discriminant parameter refers to the maximum value among the discriminant parameters corresponding to the a translation models respectively; The evaluation score corresponding to the target translation model is determined based on the first difference, the second difference, and the proportional coefficient. The proportional coefficient is used to balance the weight of the first difference and the second difference in the evaluation score.

11. The apparatus of claim 9, wherein, The model selection module is also used for: Based on the evaluation scores corresponding to the a translation models, at least one translation model whose evaluation score meets the first condition is selected from the candidate model set and added to the integrated model set; wherein, the initialized candidate model set includes the a translation models; For each remaining translation model in the candidate model set, a comprehensive similarity parameter is calculated for the remaining translation model. The comprehensive similarity parameter is used to characterize the similarity between the remaining translation model and the translation models in the ensemble model set. From the candidate model set, at least one translation model whose comprehensive similarity parameter meets the second condition is selected and added to the integrated model set; If the number of translation models in the integrated model set is less than b, the step of calculating the comprehensive similarity parameter corresponding to each remaining translation model in the candidate model set is executed again. If the number of translation models contained in the integrated model set is equal to b, then the translation models contained in the integrated model set are determined as the selected b translation models.

12. The apparatus of claim 11, wherein, The model selection module is also used for: Calculate the similarity parameter between the remaining translation models and each translation model in the ensemble model set, whereby the similarity parameter is used to characterize the similarity between the two translation models; Based on the similarity parameters between the remaining translation models and each translation model in the ensemble model set, the comprehensive similarity parameters corresponding to the remaining translation models are calculated.

13. A computer device, comprising: The computer device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the text translation method as described in any one of claims 1 to 8.

14. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is loaded and executed by a processor to implement the text translation method as described in any one of claims 1 to 8.

15. A computer program product, characterised in that, The computer program product includes computer instructions that are loaded and executed by a processor to implement the text translation method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Translation detection method and device and electronic device

    CN109344408A

  • Machine translation method and device, electronic equipment and readable storage medium

    CN112329482A