Training Optimization Method for Intelligent Translation Models Based on Transfer Learning
By dynamically calculating activation weights and selective activation adapters, the intelligent translation model is optimized, solving the problems of misjudgment and catastrophic forgetting in cross-domain text translation, and improving the accuracy and stability of translation, especially in professional fields.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- EC INNOVATIONS (SHENYANG) INC
- Filing Date
- 2026-04-27
- Publication Date
- 2026-05-26
AI Technical Summary
Existing intelligent translation models suffer from domain misjudgment, adapter selection bias, and catastrophic forgetting when processing cross-domain texts, resulting in inaccurate and inconsistent translation results, especially in professional fields with high precision requirements.
By dynamically calculating activation weights, multiple adapters are selectively activated to adjust the multilingual backbone model. Domain classifiers are used to analyze the domain features of the target text, thereby optimizing the adapter activation strategy of the translation model and improving translation accuracy.
This approach reduces misjudgments and adapter selection bias in cross-domain text translation, improving translation accuracy and stability, and enhancing the model's translation performance in specialized fields.
Smart Images

Figure CN122087463A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing, and more specifically to a method for training and optimizing an intelligent translation model based on transfer learning. Background Technology
[0002] Transfer learning, an important method in machine learning, improves learning efficiency by transferring learned knowledge to related tasks. In natural language processing, this technique can effectively address the scarcity of bilingual parallel corpora in less commonly spoken languages or domain-specific languages, and significantly improve translation quality by utilizing large-scale general corpora for training.
[0003] Current intelligent translation models typically employ a multilingual backbone model combined with a domain classifier and vertical domain adapters. The classifier determines the text's domain, and then activates the corresponding adapter for model fine-tuning. However, static domain determination mechanisms fail to fully capture the contextual semantic relationships of the target text. When cross-domain concept references or technical terms appear in the text, the classifier is prone to misclassifying domain affiliation. Secondly, for words or sentences with ambiguous domain boundaries, the similar probability distributions output by the classifier lead to adapter selection bias, directly affecting the accurate translation of technical terms. Furthermore, as the number of vertical domains increases, parallel activation of multiple adapters can easily cause model parameter conflicts, resulting in catastrophic forgetting of learned knowledge. Consequently, translation results frequently exhibit defects such as inaccurate terminology, semantic breaks, and stylistic inconsistencies in specialized domain text processing, severely limiting the application effectiveness of intelligent translation systems in high-precision scenarios such as medicine, law, and finance. Summary of the Invention
[0004] To address the aforementioned issues, this invention provides a method for training and optimizing an intelligent translation model based on transfer learning. By dynamically calculating activation weights and activating the target adapter to optimize model adjustment, misjudgments and adapter selection bias are reduced, thereby improving translation accuracy.
[0005] To achieve the above objectives, firstly, this application proposes a method for optimizing the training of intelligent translation models based on transfer learning, comprising: Obtain a pre-trained translation model; wherein the translation model includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier, each adapter being in a different vertical domain; The target text to be translated is obtained and input into the translation model. The domain features of the target text are analyzed by a domain classifier, and activation weights are calculated based on the domain features. Based on the activation weights, the target adapter among multiple adapters is activated to adjust the multilingual backbone model, and the target text is translated using a translation model that includes the adjusted multilingual backbone model to obtain the target translated text.
[0006] In one embodiment, the step of obtaining a pre-trained translation model includes: Based on multilingual monolingual texts, the initial multilingual backbone model is pre-trained, and bilingual parallel sentence pairs in a general domain are obtained. The multilingual backbone model is then adjusted to obtain the multilingual backbone model. The initial domain classifier is trained using training texts with domain labels to obtain a domain classifier; the domain classifier is used to output the probability distribution of text belonging to different domain labels. Obtain bilingual training data in different vertical domains, and train the adapters in different vertical domains to obtain multiple adapters.
[0007] In one embodiment, the steps of acquiring the target text to be translated, inputting the target text into a translation model, analyzing the domain features of the target text using a domain classifier, and calculating activation weights based on the domain features include: Based on the domain classifier, the distribution probability of each word in the target text to different vertical domains is calculated, and the degree of tendency of each word to different vertical domains is calculated based on the distribution probability. The target text is divided into multiple sub-paragraphs, and the tendency weight of each sub-paragraph in each vertical domain is calculated based on the tendency of each word in each sub-paragraph to different vertical domains. Based on the tendency weight of the sub-paragraphs, the degree of prominence of the distribution in different vertical domains of the target text is determined, and the gain coefficient of the target text in each vertical domain is obtained. The activation weights are calculated based on the gain coefficients for each vertical domain and the average tendency weights in each sub-segment.
[0008] In one embodiment, the steps of calculating the distribution probability of each word in the target text to different vertical domains based on a domain classifier, and calculating the degree of preference of each word to different vertical domains based on the distribution probability, include: Calculate the distribution probability of target words in target text within target vertical domains; where target words are any words from multiple words in target text, and target vertical domains are any vertical domains from multiple different vertical domains. Calculate the difference between the distribution probability of the target vocabulary in the target vertical domain and the average distribution probability in other vertical domains; Based on the distribution probability and the difference in distribution probability of the target vertical domain, the degree of inclination of the target words towards the target vertical domain is calculated; whereby the distribution probability of the target vertical domain is directly proportional to the degree of inclination of the target words towards the target vertical domain.
[0009] In one embodiment, after calculating the distribution probability of each word in the target text belonging to different vertical domains based on a domain classifier, and calculating the degree of preference of each word for different vertical domains based on the distribution probability, the method further includes: Set a preset tendency threshold; If the degree of inclination is greater than the inclination threshold, the vocabulary is determined to be effective vocabulary in the target vertical domain.
[0010] In one embodiment, the step of dividing the target text into multiple sub-paragraphs and calculating the tendency weight of each sub-paragraph in each vertical domain based on the tendency of each word in each sub-paragraph to different vertical domains includes: Divide the target text into multiple sub-paragraphs; The number of effective words in the target sub-paragraph that show a tendency toward the target vertical domain exceeding a preset threshold is counted, and the percentage of effective words in the sub-paragraph is calculated; where the target sub-paragraph is any sub-paragraph among multiple sub-paragraphs. Calculate the average degree of bias of each word in the target sub-paragraph towards the target vertical domain; Based on the proportion of effective vocabulary and the average degree of tendency, the tendency weight of the target sub-paragraph in the target vertical domain is calculated.
[0011] In one embodiment, the step of calculating the tendency weight of the target sub-paragraph in the target vertical domain based on the effective vocabulary ratio and the average tendency degree includes: The product of the effective vocabulary percentage and the average tendency is normalized, and the normalized result is used as the tendency weight.
[0012] In one embodiment, the step of determining the degree of prominence of the target text in different vertical domains based on the tendency weight of sub-paragraphs, and obtaining the gain coefficient of the target text in each vertical domain, includes: Based on the tendency weight of each sub-paragraph in the target text in different vertical domains, determine the overall representative domain of the target text and the local representative domain of each sub-paragraph; Determine the number of sub-segments that use the target vertical domain as a local representative domain; Obtain the tendency weight of sub-segments that do not take the target vertical domain as a local representative domain in the target vertical domain; Based on the number of sub-paragraphs and the tendency weight of each sub-paragraph in the target vertical domain, the distribution prominence of the target vertical domain in the target text is calculated and used as the gain coefficient of the target vertical domain.
[0013] In one implementation, the step of activating a target adapter among multiple adapters based on activation weights to adjust the multilingual backbone model includes: Select the adapters corresponding to the vertical domains whose activation weights are greater than the preset activation threshold as the target adapters; The multilingual backbone model is tuned using a target adapter to obtain a translation model optimized for the target text domain features.
[0014] In one embodiment, the step of translating the target text using a translation model including an adjusted multilingual backbone model to obtain the target translated text includes: Input the source language text sequence of the target text into the adjusted translation model; The source language text sequence is encoded by the encoder of the translation model to obtain encoded features; The target language text sequence is generated by the decoder of the translation model based on the domain adaptation information provided by the encoded features and the activated target adapter. The target language text sequence is decoded to obtain the target translation text.
[0015] Secondly, this application proposes an intelligent translation model training optimization system based on transfer learning, comprising: The acquisition module is used to acquire a pre-trained translation model; the translation model includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier, each adapter being in a different vertical domain; The weight calculation module is used to obtain the target text to be translated, input the target text into the translation model, analyze the domain features of the target text through the domain classifier, and calculate the activation weights based on the domain features; Based on the activation weights, the target adapter among multiple adapters is activated to adjust the multilingual backbone model, and the target text is translated using a translation model that includes the adjusted multilingual backbone model to obtain the target translated text.
[0016] One or more technical solutions proposed in this application have, but are not limited to, the following technical effects: This application provides a method for training and optimizing an intelligent translation model based on transfer learning. The method involves acquiring a pre-trained translation model, which includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier. Each adapter resides in a different vertical domain. The method involves acquiring the target text to be translated and inputting it into the translation model. The domain classifier analyzes the domain features of the target text, and activation weights are calculated based on these features. Based on these activation weights, the target adapters among the multiple adapters are activated to adjust the multilingual backbone model. The translation model, including the adjusted multilingual backbone model, is then used to translate the target text, resulting in the target translated text. By acquiring a pre-trained translation model, analyzing the domain features of the target text, calculating activation weights, activating target adapters to adjust the model, and performing translation, the method achieves dynamic optimization of the model adjustment. This solves the problems of domain misjudgment and adapter selection bias in existing technologies, thereby improving translation accuracy. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the first embodiment of the intelligent translation model training and optimization method based on transfer learning in this application; Figure 2 This is a flowchart illustrating the second embodiment of the intelligent translation model training and optimization method based on transfer learning in this application; Figure 3 This is a flowchart illustrating the third embodiment of the intelligent translation model training and optimization method based on transfer learning in this application; Figure 4 This is a schematic diagram of a structure of the intelligent translation model training and optimization system 40 based on transfer learning provided in this application. Detailed Implementation
[0018] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0019] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0020] To make the technical solutions and advantages of the embodiments of this application clearer, the exemplary embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not an exhaustive list of all embodiments.
[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0022] In traditional transfer learning-based intelligent translation model training and optimization methods, domain classifiers typically statically activate adapters based on the overall domain label of the target text. However, this method fails to adequately consider the contextual relationships within the target text. When the target text contains domain-ambiguous words, the domain probability distributions output by the domain classifier may exhibit similar values, leading to incorrect adapter selection. Furthermore, when the target text involves multiple professional domains, the static activation mechanism may cause catastrophic forgetting of model parameters, thus affecting the accuracy of the translation results and the stability of the model. In particular, the contextual dependencies of domain-ambiguous words are not effectively modeled, making it impossible for the domain classifier to distinguish the professional meaning of the same word in different contexts, further causing a mismatch between the adapter activation strategy and local domain features.
[0023] For example, when translating a mixed document containing both medical diagnostic reports and legal contract clauses, the word "case" in the target text refers to "medical records" in the medical context and "case" in the legal context. After analyzing the entire document, the domain classifier may output similar probability distributions for the medical and legal domains. However, because it does not dynamically adjust based on the contextual distribution of words, it incorrectly activates only the medical domain adapter, leading to the mistranslation of legal terms. Furthermore, when medical and legal paragraphs alternate in the target text, the static activation mechanism cannot recognize the domain switching at the paragraph level. This causes the backbone model to gradually forget its general translation capabilities during frequent adapter switching, resulting in fluctuations in translation quality.
[0024] If the aforementioned problems are not addressed, translation models will be unable to accurately identify local domain variations when processing cross-domain texts, leading to translation errors in specialized terminology. Simultaneously, the risk of catastrophic forgetting will accumulate over time, degrading the overall performance of the model and reducing the reliability and applicability of the multilingual translation system. Furthermore, the static mapping relationship between the domain classifier and the adapter cannot adapt to the dynamic domain distribution of the target text, further exacerbating inconsistencies in translation results and impacting the practical value of the multilingual translation system.
[0025] Based on this, embodiments of this application provide a method for training and optimizing an intelligent translation model based on transfer learning. This method is applied to a system for training and optimizing an intelligent translation model based on transfer learning. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the intelligent translation model training and optimization method based on transfer learning in this application.
[0026] For ease of understanding, the following explains some key terms in this embodiment: Transfer learning is a machine learning paradigm that applies knowledge gained from one task to another related task to improve learning efficiency and model performance. In the field of natural language processing, transfer learning is particularly suitable for scenarios with scarce data. By utilizing models trained on large-scale general corpora, it can effectively improve the translation quality of specific languages or domains.
[0027] A translation model can be a computational model used to achieve automatic language conversion. This model typically consists of an encoder and a decoder, capable of converting a sequence of source language text into a sequence of target language text. In this embodiment, the translation model is designed to adapt to the needs of different professional fields.
[0028] The multilingual backbone model is a core component of translation models. It is pre-trained on large-scale multilingual corpora and possesses the ability to handle general translation across multiple languages. This backbone model typically employs deep learning architectures such as Transformer to capture semantic and syntactic information across languages.
[0029] A domain classifier is a machine learning model that analyzes the linguistic features of input text and categorizes it into a predefined vertical domain. This classifier can identify the specialized attributes of text, such as medicine, law, and finance, providing a basis for subsequent domain adaptation.
[0030] Adapters are lightweight modules in the translation model, designed to fine-tune the multilingual backbone model for specific vertical domains. Each adapter is trained for a particular domain, and when translating text belonging to that domain, the corresponding adapter is activated to enhance the model's translation accuracy within that domain.
[0031] Vertical domains refer to specialized fields with specific terminology, expression habits, and knowledge systems, such as medicine, law, finance, and technology. Different vertical domains have high requirements for the accuracy and professionalism of translation, requiring models to possess corresponding domain knowledge.
[0032] Activation weights are numerical values used to quantify the contribution of different domain adapters to the adjustment of the multilingual backbone model. These weights are dynamically calculated based on the domain characteristics of the target text and can be used to reflect the tendency of the target text in different professional fields, thereby guiding the model to selectively activate and adjust the adapters.
[0033] In this embodiment, the above-mentioned intelligent translation model training optimization method based on transfer learning includes steps S10 to S30: Step S10: Obtain the pre-trained translation model.
[0034] The translation model includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier, each of which is located in a different vertical domain.
[0035] The translation model is constructed as a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier. Each adapter is configured to handle a different vertical domain. For example, a general multilingual backbone model can be pre-trained to handle common text in multiple languages. Simultaneously, a domain classifier can be trained to identify the domain attributes of the text.
[0036] Furthermore, adapters can be trained separately for different professional fields, such as law, medicine, and finance. In one implementation, the translation model can be a unified end-to-end model that integrates all these components, but the functions of these components are fixed and cannot be dynamically adjusted according to the domain characteristics of the input text.
[0037] In another implementation, the translation model can consist of independently trained components that are simply chained together during translation. For example, a single domain label can be determined first by a domain classifier, and then only the adapter corresponding to that label can be activated, without considering the multiple domain features that the text may contain.
[0038] Step S20: Obtain the target text to be translated and input the target text into the translation model. Analyze the domain features of the target text through the domain classifier and calculate the activation weights based on the domain features.
[0039] When a text to be translated is received, the target text can be fed into the translation model. The translation model then analyzes the text using a domain classifier to identify its potential domain attributes.
[0040] In one implementation, the domain classifier can classify the entire target text, output a domain label, and assign a fixed activation weight based on this label.
[0041] In another implementation, the domain classifier can perform simple statistics based on keywords in the text, then roughly estimate the domain tendency of the text based on the frequency of keyword occurrences, and calculate activation weights accordingly. However, this method of calculating activation weights based on simple statistics or single labels may not be able to fully capture the complex domain distribution and contextual relationships in the text.
[0042] Step S30: Based on the activation weight, activate the target adapter among the multiple adapters to adjust the multilingual backbone model, and use the translation model including the adjusted multilingual backbone model to translate the target text to obtain the target translated text.
[0043] The activation weights are used to activate the target adapter among the multiple adapters to adjust the multilingual backbone model, and the target text is translated using a translation model that includes the adjusted multilingual backbone model to obtain the target translated text.
[0044] For example, after calculating the activation weights, the target adapter can be selectively activated based on these weights. The target adapter may include one or more adapters.
[0045] In one implementation, a fixed threshold can be set, and an adapter is activated only when its activation weight exceeds the threshold. All activated adapters have an equal impact on the adjustment of the backbone model.
[0046] In another implementation, the backbone model can be adjusted using a simple linear weighting based on the activation weights; that is, adapters with larger weights contribute more to the adjustment of the backbone model. Subsequently, the adjusted multilingual backbone model is used to translate the target text, generating the target translated text.
[0047] In one specific implementation, the step of activating a target adapter among multiple adapters based on activation weights to adjust the multilingual backbone model includes: (1) Select the adapters corresponding to the vertical domains whose activation weight is greater than the preset activation threshold as the target adapters.
[0048] Here, activation weight is a metric used to measure the relevance of the target text to a specific vertical domain, while a preset activation threshold serves as the criterion for this judgment. By comparing the activation weight and activation threshold for each vertical domain, the most relevant domain can be identified, thereby determining the adapters that need to be activated.
[0049] For example, a fixed value can be set as the activation threshold. When the activation weight exceeds this value, the vertical domain is considered sufficiently relevant. Alternatively, a dynamic threshold can be used, such as selecting the adapters corresponding to the N vertical domains with the highest activation weights based on the distribution of activation weights across all vertical domains, or dynamically determining the threshold using statistical methods.
[0050] (2) Use the target adapter to adjust the multilingual backbone model to obtain a translation model optimized for the target text domain features.
[0051] By integrating lightweight modules trained for specific vertical domains into a multilingual backbone model, the target adapter can capture domain-specific knowledge and language patterns. In this way, the multilingual backbone model can acquire domain-specific expertise while maintaining general capabilities, thereby improving translation performance on target domain texts. Furthermore, the adapter is typically combined with the backbone model in the form of parameter increments or parameter shifts.
[0052] For example, an adapter can be a set of small neural network layers whose outputs are added to or multiplied by the outputs of intermediate layers in the backbone model, thereby fine-tuning the behavior of the backbone model. Alternatively, the adapter can also achieve adjustment by modifying some weights of the backbone model; for example, using Low-Rank Adaptation (LoRA), the behavior of the backbone model can be adjusted using a low-rank matrix without modifying most of its parameters.
[0053] In one embodiment, the step of translating the target text using a translation model including an adjusted multilingual backbone model to obtain the target translated text includes: (1) Input the source language text sequence of the target text into the adjusted translation model.
[0054] (2) The source language text sequence is encoded by the encoder of the translation model to obtain the encoded features.
[0055] (3) The target language text sequence is generated by the decoder of the translation model based on the domain adaptation information provided by the encoding features and the activated target adapter.
[0056] (4) Decode the target language text sequence to obtain the target translation text.
[0057] For example, the input to the model is a text sequence, specifically a Token ID sequence obtained after the source language text is processed by a word segmenter. For instance, for the Chinese source text "Based on transfer learning intelligent translation model training optimization method", after word segmentation, the sequence ["based on", "transfer", "learning", "of", "intelligent", "translation", "model", "training", "optimization", "method"] can be obtained, which is further mapped to a Token ID sequence that the model can process, such as [101, 2023, 3216, ...].
[0058] The model's output is also a text sequence, specifically a sequence of token IDs for the target language text. This sequence is then decoded back into natural language text, for example, outputting an English translation: "Training optimization method for intelligent translation model based on transfer learning".
[0059] The backbone model uses a large-scale multilingual monolingual corpus during the pre-training phase. The corpus sources include: existing publicly available multilingual encyclopedia corpora, publicly available multilingual translated texts, multilingual news, books, and web page text data. By pre-training on this large-scale corpus, the model learns universal semantic representations across languages.
[0060] In the translation task, the backbone model adopts an encoder-decoder structure, where the encoder is responsible for encoding the input source language token ID sequence and extracting semantic features; the decoder generates the target language token ID sequence based on these features, thus achieving cross-language text generation.
[0061] In the dynamic optimization phase, the activation weights of the target text in each vertical domain are obtained. These weights are calculated through the aforementioned lexical, paragraph, and full-text analyses. Next, an activation threshold of 0.6 is set, and adapters corresponding to all domains with activation weights greater than this threshold are selected. The backbone model is then fine-tuned accordingly. Ultimately, an intelligent translation model that adapts to the domain characteristics of the target text is obtained, thereby significantly improving the accuracy and adaptability of translations of specialized domain texts while maintaining general translation capabilities.
[0062] In the example above, a domain classifier is used to perform a detailed analysis of the domain features of the target text, and dynamic activation weights are calculated based on these features, rather than simply classifying the text into a single domain. This approach enables the translation model to identify legal and medical domain features present simultaneously in a contract document and assign different activation weights to the corresponding adapters. Compared to existing techniques that may activate a single adapter based only on the overall tendency of the text, this method can capture the domain distribution of the text more precisely.
[0063] In some of the embodiments described above in this application, a method for training and optimizing an intelligent translation model based on transfer learning is proposed. This method translates target text using a pre-trained translation model. However, in practical applications, how to efficiently and accurately construct and obtain such a pre-trained translation model, which includes a multilingual backbone model, a domain classifier, and multiple vertical domain adapters, to ensure its translation performance and generalization ability in different domains, is a technical problem that needs to be solved.
[0064] Based on this, this application provides a method for optimizing the training of an intelligent translation model based on transfer learning. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the intelligent translation model training and optimization method based on transfer learning in this application, including steps S101 to S103: Step S101: Based on multilingual monolingual text, pre-train the initial multilingual backbone model, obtain bilingual parallel sentence pairs in the general domain, adjust the multilingual backbone model, and obtain the multilingual backbone model.
[0065] Here, by training on a large number of multilingual monolingual texts, the initial multilingual backbone model can master the grammatical structure, semantic information and lexical features of different languages, thus laying a solid foundation for subsequent translation tasks.
[0066] As one implementation method, pre-training can employ a masked language model (MLM) task, where the model is asked to predict words that are randomly masked in a text; or it can employ a causal language model (CLM) task, where the model is asked to predict the next word in a sequence.
[0067] It should be noted that while the pre-trained multilingual backbone model possesses general language understanding capabilities, it has not yet been specifically optimized for translation tasks. By acquiring bilingual parallel sentence pairs from a general domain, the multilingual backbone model can be further tuned to learn the mapping relationship between the source and target languages, thereby acquiring basic translation capabilities.
[0068] In specific implementations, fine-tuning can be achieved by performing a sequence-to-sequence (Seq2Seq) task on parallel sentence pairs. For example, the source language sentence can be encoded and then decoded to generate the target language sentence. Alternatively, a small number of general domain parallel sentence pairs can be introduced during the pre-training stage for multi-task learning. Training the initial domain classifier with domain-labeled training text is used because the domain classifier is a core component for identifying the vertical domain to which the text belongs.
[0069] Step S102: Obtain training text with domain labels to train the initial domain classifier and obtain the domain classifier.
[0070] Among them, the domain classifier is used to output the probability distribution of text belonging to different domain labels.
[0071] By acquiring training texts with domain labels—that is, text data whose domain is known—an initial domain classifier can be trained to learn and recognize the feature patterns of texts from different domains.
[0072] As one implementation, the training process can input the feature representation of the text (e.g., word embeddings or sentence embeddings) into a multilayer perceptron or convolutional neural network for classification; alternatively, a pre-trained language model can be used as a feature extractor, with a classification head added on top of the output layer for fine-tuning.
[0073] Domain classifiers output a probability distribution of text belonging to different domain labels, enabling them to not only determine the most likely domain to which the text belongs, but also quantify the probability of the text belonging to each domain. This probability distribution is crucial for subsequent calculation of activation weights, thereby accurately activating the adapter.
[0074] Here, the last layer of the classifier can use the Softmax activation function to convert the output into a vector representing the probability of each class, and the sum of these probabilities is 1; or, in multi-label classification scenarios, the Sigmoid activation function can be used, and each output represents an independent probability of a domain.
[0075] Step S103: Obtain bilingual training data in different vertical domains, and train the adapters in different vertical domains to obtain multiple adapters.
[0076] Since adapters are small network modules fine-tuned for specific vertical domains, they allow the multilingual backbone model to adapt to the language style, terminology, and knowledge of that domain. Therefore, by acquiring bilingual training data from different vertical domains, each adapter can be trained separately to capture the unique translation patterns and expertise of that domain.
[0077] In specific implementations, the adapter can be trained using parameter-efficient fine-tuning techniques, including LoRA (Low-Rank Adaptation) or Adapter-tuning, which inserts a small number of trainable parameters into specific layers of the backbone model (e.g., attention layers or feedforward layers); or the adapter can be designed as an independent small translation module, trained on domain-specific data, and then integrated with the backbone model.
[0078] For example, a multilingual backbone model can be pre-trained. Specifically, massive amounts of multilingual monolingual texts can be collected and cleaned using publicly available online text resources, books, etc., to construct a general language knowledge foundation data. Based on this data, the initial multilingual backbone model is pre-trained to enable it to possess cross-language general semantic representation capabilities. In this embodiment, the multilingual backbone model is preferably based on a Transformer architecture encoder-decoder model, such as the mBART model.
[0079] After obtaining the multilingual backbone model, its translation capabilities can be initially activated. A general translation capability fine-tuning dataset is constructed by integrating and aligning existing bilingual parallel sentence pairs across common domains. This dataset is then used to further fine-tune the pre-trained multilingual backbone model to initially activate its basic translation capabilities and establish a stable translation performance benchmark, providing a basis for the subsequent training and evaluation of adapters in various professional domains.
[0080] Furthermore, a domain classifier can be trained. Monolingual or bilingual texts with explicit domain labels are mined and labeled, from which domain awareness and classification training data are extracted. Based on this data, a domain classifier is trained, enabling it to output the probability distribution of any input text belonging to each preset domain label, thus determining the relevance of the text content to various professional fields.
[0081] Finally, lightweight adapters can be trained for each vertical domain. High-quality bilingual data, such as patent documents, academic papers, and contract translations, are collected for different vertical domains, including medicine, law, and finance. With the parameters of the pre-trained multilingual backbone model frozen, lightweight adapters are trained using only the domain-specific data. Each adapter is activated when translating text within its corresponding domain, performing domain-specific fine-tuning of the backbone model to achieve knowledge transfer and ensure the accuracy of translating specialized terminology into domain-specific text.
[0082] This application provides a method for training and optimizing an intelligent translation model based on transfer learning. Please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the intelligent translation model training and optimization method based on transfer learning in this application, including steps S201 to S204: Step S201: Based on the domain classifier, calculate the distribution probability of each word in the target text belonging to different vertical domains, and calculate the degree of tendency of each word to different vertical domains based on the distribution probability.
[0083] Among them, the degree of tendency can be used to quantify the relevance or representativeness of vocabulary to a specific vertical field.
[0084] One calculation method is to compare the distribution probability of a word in the target vertical domain with the average distribution probability in other vertical domains. The greater the difference, the higher the word's tendency towards the target vertical domain. For example, information theory indicators such as relative entropy or KL divergence can be used to measure the "purity" or "deviation" of a word's distribution in a specific domain, thereby obtaining its tendency.
[0085] In one embodiment, the steps of calculating the distribution probability of each word in the target text to different vertical domains based on a domain classifier, and calculating the degree of preference of each word to different vertical domains based on the distribution probability, include: (1) Calculate the distribution probability of target words in the target text in the target vertical domain.
[0086] Among them, the target vocabulary is any one of the multiple words in the target text, and the target vertical domain is any one of the multiple different vertical domains.
[0087] Specifically, a pre-trained domain classifier can be used, taking the target word as input, and the classifier directly outputs the probability distribution of the word belonging to each vertical domain. The probability corresponding to the target vertical domain is the probability distribution. Alternatively, a domain dictionary can be constructed, the word frequency of the target word in the corpora of each vertical domain can be statistically analyzed, and the frequency can be normalized to obtain the probability distribution.
[0088] (2) Calculate the difference between the distribution probability of the target words in the target vertical domain and the average distribution probability in other vertical domains.
[0089] Among them, the probability distribution difference value can be used to measure the uniqueness of the target vocabulary in the target vertical field.
[0090] One approach is to calculate the arithmetic mean of the distribution probabilities of the target word in all other vertical domains besides the target vertical domain, and then subtract this arithmetic mean from the distribution probability of the target word in the target vertical domain to obtain the distribution probability difference value.
[0091] Another approach is to use a weighted average of the distribution probabilities of other vertical domains. For example, different weights can be assigned based on the similarity between domains, and then the difference between the distribution probabilities of the target vertical domain and the distribution probabilities of the target vertical domain can be calculated.
[0092] (3) Based on the distribution probability and the difference in distribution probability of the target vertical domain, calculate the degree of tendency of the target words to the target vertical domain.
[0093] Among them, the distribution probability of the target vertical domain is directly proportional to the degree of inclination of the target vocabulary towards the target vertical domain.
[0094] When calculating the degree of preference of target words for the target vertical domain based on the distribution probability and the difference in distribution probability of the target vertical domain, it is necessary to ensure that the distribution probability of the target vertical domain is proportional to the degree of preference of the target words for the target vertical domain.
[0095] One approach is to linearly combine the probability distribution and the difference in probability distribution. For example, the degree of preference can be expressed as A × probability distribution + B × difference in probability distribution, where A and B are positive weighting coefficients.
[0096] As another implementation method, multiplicative combination is used. For example, the degree of tendency can be expressed as probability distribution × (1 + probability distribution difference value). This ensures both the proportional relationship and highlights the role of the difference value.
[0097] In one embodiment, after calculating the distribution probability of each word in the target text belonging to different vertical domains based on a domain classifier, and calculating the degree of preference of each word for different vertical domains based on the distribution probability, the method further includes: (1) Set a preset tendency threshold.
[0098] The preset tendency threshold is a numerical limit used to distinguish the strength of a word domain tendency. It can be used to filter the calculated word tendency degree in order to identify words that are sufficiently representative of a specific vertical domain.
[0099] This tendency threshold can be set empirically, for example, by determining a suitable fixed value through expert knowledge or historical data analysis. Alternatively, it can be dynamically set using statistical methods, such as by performing statistical analysis based on the distribution of word tendency in the training data, and using the tendency value corresponding to words with a tendency value above a specific percentile as the threshold.
[0100] (2) Compare the degree of vocabulary preference for the target vertical field with the preference threshold.
[0101] It should be noted that by comparing the degree of this tendency with a preset tendency threshold, it can be determined whether the domain tendency of the word reaches a preset significance level. For example, a simple numerical comparison can be used to determine whether the degree of tendency is greater than, greater than or equal to, less than, or less than or equal to the tendency threshold.
[0102] (3) If the degree of inclination is greater than the inclination threshold, the vocabulary is determined to be a valid vocabulary in the target vertical field.
[0103] If the degree of bias exceeds a bias threshold, the word is considered a valid word within the target vertical domain. When the degree of bias of a word exceeds a preset bias threshold, it indicates that the word has strong indicative or representative significance for the target vertical domain, and is therefore recognized as a valid word within that domain. Valid words can more accurately reflect the domain attributes of the target text, thereby guiding the translation model to perform more precise domain adaptation.
[0104] Step S202: Divide the target text into multiple sub-paragraphs, and calculate the tendency weight of each sub-paragraph in each vertical domain based on the tendency of each word in each sub-paragraph to different vertical domains.
[0105] Among them, the bias weight can be used to reflect the overall domain preference of the sub-paragraph.
[0106] One calculation method is to take a weighted average or sum of the tendency of all words in a sub-paragraph to a specific vertical domain, where the weights can be adjusted according to the importance of the words. Another method is to identify effective words in the sub-paragraph whose tendency to a specific vertical domain exceeds a preset threshold, and then calculate the tendency weight of the sub-paragraph based on the number of these effective words and the strength of their tendency.
[0107] In one specific implementation, the steps of dividing the target text into multiple sub-paragraphs and calculating the tendency weight of each sub-paragraph in each vertical domain based on the tendency of each word in each sub-paragraph to different vertical domains include: (1) Divide the target text into multiple sub-paragraphs.
[0108] In this context, sub-paragraphs are longer text contents broken down into smaller, more easily analyzed units.
[0109] The text can be divided based on its natural language structure, such as sentence boundaries and paragraph markers; or it can be divided using a fixed-length method, such as dividing each paragraph into N words or N characters; or it can be divided into a paragraph by semantic analysis of consecutive text segments with similar themes or semantics.
[0110] (2) Count the number of effective words in the target sub-paragraph that have a tendency to the target vertical field that exceeds the preset threshold, and calculate the proportion of effective words in the sub-paragraph.
[0111] The target sub-paragraph can be any one of multiple sub-paragraphs.
[0112] Effective vocabulary refers to words whose tendency towards a specific vertical domain reaches or exceeds a preset standard, thus being considered to effectively represent the characteristics of that domain. The percentage of effective vocabulary reflects the density or prevalence of these strong domain-indicative words in a sub-paragraph, and is an important indicator for measuring the strength of the domain characteristics of a sub-paragraph.
[0113] (3) Calculate the average degree of tendency of each word in the target sub-paragraph to the target vertical domain.
[0114] The average degree of bias can be used to represent the overall average level of bias of all words in a sub-paragraph toward a specific vertical domain.
[0115] This can be achieved by arithmetically averaging the tendencies of all words within a sub-paragraph, or by using a weighted average, to reflect the central tendency of words in a sub-paragraph to a specific domain.
[0116] (4) Calculate the tendency weight of the target sub-paragraph in the target vertical field based on the proportion of effective words and the average tendency degree; where the tendency weight is used to characterize the overall vertical field tendency of the target sub-paragraph. The higher the proportion of effective words and the greater the average tendency degree, the greater the calculated tendency weight.
[0117] After determining the proportion of effective words and the average degree of bias, the two dimensions mentioned above can be considered together to obtain a more comprehensive and accurate measure of the domain bias of a sub-paragraph. The bias weight is used to characterize the overall vertical domain bias of the sub-paragraph. Here, the higher the proportion of effective words and the greater the average degree of bias, the greater the calculated bias weight. This ensures that a sub-paragraph can be assigned a high domain bias weight only when it contains a sufficient number of strong domain-indicating words and the domain bias of these words is also strong enough.
[0118] Step S203: Based on the tendency weight of the sub-paragraphs, determine the degree of prominence of the target text in different vertical domains, and obtain the gain coefficient of the target text in each vertical domain.
[0119] Gain coefficients are used to quantify the “domain strength” or “representativeness” of the entire target text in a specific vertical domain.
[0120] One approach is to count the number of sub-paragraphs with higher bias weights in a specific vertical domain, aggregate these sub-paragraphs based on their bias weights, and then normalize the data to obtain the gain coefficient for that vertical domain. Another approach is to analyze the distribution of sub-paragraph bias weights to identify the dominant domains in the text and assign higher gain coefficients to these domains.
[0121] In one embodiment, the step of determining the degree of prominence of the target text in different vertical domains based on the tendency weight of sub-paragraphs, and obtaining the gain coefficient of the target text in each vertical domain, includes: (1) Based on the tendency weight of each sub-paragraph in the target text in different vertical fields, determine the overall representative field of the target text and the local representative field of each sub-paragraph.
[0122] Here, the overall domain and the local domain can be used to identify the domain affiliation of the target text from both local and overall levels.
[0123] Specifically, for each sub-paragraph, the region with the highest tendency weight in different vertical domains can be selected as the local representative region for that sub-paragraph. For example, by comparing the tendency weights of each domain, the region corresponding to the maximum value can be marked as the local representative region. For the entire target text, the local representative regions of all sub-paragraphs can be counted, and the region with the highest frequency or the largest cumulative tendency weight can be selected as the overall representative region of the target text.
[0124] Another approach is to use clustering algorithms to analyze the tendency weight vectors of all sub-segments, classify each sub-segment into the most matching domain cluster, thereby determining the local representative domain, and then obtain the overall representative domain by weighted averaging or voting on these local representative domains.
[0125] (2) Determine the number of sub-segments that represent the target vertical domain as a local representative domain.
[0126] Here, the number of sub-paragraphs can be used to reflect the explicit distribution of the target vertical domain in the text. For example, one can iterate through all sub-paragraphs that have identified local representative domains and count the number of sub-paragraphs whose local representative domains match the currently evaluated "target vertical domain". Alternatively, one can pre-maintain a data structure that records a list of sub-paragraphs for each vertical domain as a local representative domain, and then directly obtain the length of that list.
[0127] (3) Obtain the tendency weight of sub-segments that do not take the target vertical domain as a local representative domain in the target vertical domain.
[0128] To capture the "implicit" or "secondary" distribution of the target vertical domain in the text, even if the dominant domain of a sub-paragraph is not the target vertical domain, it may still have a certain bias towards the target vertical domain. For example, all sub-paragraphs whose local representative domain is not the "target vertical domain" can be filtered out, and then their respective bias weight values in the "target vertical domain" can be extracted from these filtered sub-paragraphs.
[0129] (4) Based on the number of sub-paragraphs and the tendency weight of each sub-paragraph in the target vertical domain, calculate the distribution prominence of the target vertical domain in the target text, and use it as the gain coefficient of the target vertical domain.
[0130] In a specific implementation, a weighted summation formula can be designed to assign a higher weight to the number of sub-segments that take the target vertical domain as a local representative domain, and combine it with the sum of the tendency weights of sub-segments that do not take the target vertical domain as a local representative domain in the target vertical domain to obtain the gain coefficient.
[0131] Step S204: Calculate the activation weight based on the gain coefficient of each vertical domain and the average tendency weight in each sub-segment.
[0132] The activation weights can be used to activate the adapter to update the translation model.
[0133] One approach is to product or sum the gain coefficients with the average tendency weights of all sub-segments to obtain the final activation weights. For example, the activation weights can be expressed as the product of the gain coefficients and the average tendency weights of all sub-segments in that vertical domain. Another approach is to design a non-linear function that takes the gain coefficients and average tendency weights as inputs to obtain the activation weights, thus better reflecting the domain complexity.
[0134] For example, a lexical-level domain preference analysis is performed on the target text. Using a trained domain classifier, the domain label probability is predicted for each word in the target text, yielding the probability distribution of each word in different vertical domains. Building upon this, to avoid adapter misselection due to lexical domain polysemy, the degree of preference of each word for each domain is further calculated. .
[0135] Specifically, for a given word, its tendency in a particular domain is determined by its probability value in that domain and its average advantage relative to other domains. Here, the higher the probability value and the more significant the advantage relative to other domains, the greater the calculated tendency.
[0136] For example, the degree of preference of the m-th word in the k-th domain. The calculation formula is as follows: in, Indicates the total number of fields. This represents the label probability of the m-th word in the k-th domain. This represents the label probability of the m-th word in the i-th domain.
[0137] by This value represents the degree to which the m-th word's label probability is greater in the k-th domain compared to other domains. The higher the m-th word's label probability in the k-th domain, and the greater the difference between different domains, the larger this value becomes. This value is used as a weight to adjust the label probabilities of words, thus obtaining the word's tendency.
[0138] After calculating the tendency of all words, a tendency threshold (e.g., 0.5) is set. Words with a tendency greater than this threshold are judged as "effective words" in the corresponding field, thereby filtering out keywords with obvious tendency in a specific field and providing clearer signals for subsequent analysis.
[0139] Next, domain preference weights are calculated at the paragraph level. The target text is divided into several paragraphs, with each paragraph serving as the unit of analysis, taking into account contextual relationships. For each paragraph, the number of effective words in each domain is counted, and the proportion of these effective words in the paragraph and the average preference of all words in the paragraph to a particular domain are calculated. Based on the proportion of effective words and the average preference, the preference weight of the paragraph in each domain is calculated using a normalization function. .
[0140] This weight can be used to reflect the overall domain tendency on a paragraph-by-paragraph basis. The higher the proportion of effective words and the greater the average degree of tendency, the higher the tendency weight. Based on the tendency weight of each paragraph, the "local representative domain" of each paragraph and the "overall representative domain" of the entire target text can be further determined.
[0141] Specifically, the tendency weight The formula for calculating can be as follows: Where t is the number of paragraphs in the target text, and k is the domain index. This represents the number of effective words in the k-th domain of the t-th paragraph in the target text. This represents the total number of words contained in the t-th paragraph of the target text. This indicates the degree of tendency of the t-th paragraph in the k-th domain of the target text. This represents the preset tendency threshold, here. , This represents the Sigmoid function, used to normalize the tendency weights.
[0142] also, The numerator represents the percentage of effective words in the t-th paragraph of the target text. A higher percentage indicates a greater number of words in that paragraph that clearly favor the k-th domain. To avoid this value being 0 and causing other parts of the formula to become invalid, This represents the difference between the mean of the tendency of all words in a paragraph and the tendency threshold, indicating the overall tendency of the paragraph.
[0143] Then, the gain coefficients for each domain can be calculated to assess their prominence across the entire text. Since cross-domain concept references may exist in actual texts, relying solely on the overall representative domain may lead to the neglect of important domains or overactivation of adapters. Therefore, for each domain, the number of paragraphs that use it as a local representative domain is counted, and the domain's tendency weight in non-representative paragraphs is comprehensively considered to calculate the domain's gain coefficient across the entire text. A higher gain coefficient indicates a wider and more important distribution of the domain in the text, and a correspondingly stronger necessity for its corresponding adapter to be activated.
[0144] Specifically, the gain coefficient in the k-th domain The formula for calculating can be as follows: in, This represents the total number of all paragraphs. Let k represent the local representative area of the t-th paragraph. Select 1 if the value is 1, otherwise select 0. This represents the tendency weight of the t-th paragraph in the k-th domain.
[0145] in When the value is 1, then The value is 1. When the value is 0, the value of this expression is So only for The summation of all paragraphs represents the number of paragraphs whose local representative domain is the k-th domain. Then, add to this the summation. To demonstrate the paragraph's tendency towards the k-th domain when the local representative domain is not the k-th domain, thus collectively constituting... This represents the total number of paragraphs that use the k-th domain as their local representative domain.
[0146] Finally, based on the above analysis, the final activation weights of the adapters for each domain are synthesized. The final activation weight is calculated by combining the gain coefficient of each domain with its average propensity weight across all paragraphs. A larger gain coefficient and a higher average propensity weight indicate a greater activation weight for that domain, signifying a stronger necessity to activate its corresponding adapter. In practical applications, an activation threshold (e.g., 0.6) can be set to activate adapters for domains with activation weights greater than this threshold. This allows for combined fine-tuning of the multilingual backbone model, thereby achieving dynamic adaptation and optimized translation based on the domain features of the target text.
[0147] Specifically, the above steps yielded the tendency weights for each domain in each paragraph and the gain weights for each domain. The tendency weights were then adjusted based on the gain weights to obtain the final activation weights for each domain. The activation weight for the k-th domain is then calculated. The calculation formula is as follows: in, This represents the gain coefficient of the k-th neighborhood. This represents the average of the tendency weights of all paragraphs in the k-th domain.
[0148] This completes the training and optimization process of the intelligent translation model based on transfer learning, which can significantly improve the accuracy and adaptability of translation for specialized texts while ensuring the universality of translation.
[0149] In this embodiment, multi-level, fine-grained domain feature analysis is performed on the target text. Domain tendencies are identified at the lexical level, then aggregated to the sub-paragraph level, and finally, activation weights are calculated based on the overall domain salience. This point-to-surface, local-to-global analysis method effectively captures possible mixed domain features or domain shifts in the target text, avoiding the inaccurate domain identification problems that may arise from single coarse-grained analysis. In this way, the calculated activation weights more accurately reflect the true domain attributes of the target text, enabling the translation model to more accurately activate the corresponding adapters and make targeted adjustments to the multilingual backbone model. This allows the translation model to better adapt to the specific domain context of the target text, thereby significantly improving the accuracy and fluency of the translation.
[0150] Please see Figure 4 , Figure 4 A schematic diagram of a structure of the intelligent translation model training and optimization system 40 based on transfer learning provided in this application, the intelligent translation model training and optimization system 40 based on transfer learning includes: The acquisition module 41 is used to acquire a pre-trained translation model; wherein the translation model includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier, each adapter being located in a different vertical domain; The weight calculation module 42 is used to acquire the target text to be translated, input the target text into the translation model, analyze the domain features of the target text through the domain classifier, and calculate the activation weights based on the domain features; Translation module 43 is used to activate the target adapter among the plurality of adapters according to the activation weights, so as to adjust the multilingual backbone model, and use the translation model including the adjusted multilingual backbone model to translate the target text to obtain the target translated text.
[0151] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for training and optimizing an intelligent translation model based on transfer learning, characterized in that, The method includes: Obtain a pre-trained translation model; wherein the translation model includes a multilingual backbone model, a domain classifier, and multiple adapters corresponding to the classification results of the domain classifier, each adapter being located in a different vertical domain; The target text to be translated is obtained and input into the translation model. The domain features of the target text are analyzed by the domain classifier, and activation weights are calculated based on the domain features. Based on the activation weights, the target adapter among the plurality of adapters is activated to adjust the multilingual backbone model, and the target text is translated using a translation model that includes the adjusted multilingual backbone model to obtain the target translated text.
2. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 1, characterized in that, The steps for obtaining the pre-trained translation model include: Based on multilingual monolingual text, the initial multilingual backbone model is pre-trained, and bilingual parallel sentence pairs in a general domain are obtained. The multilingual backbone model is then adjusted to obtain the multilingual backbone model. Training texts with domain labels are obtained to train an initial domain classifier, resulting in the domain classifier; wherein, the domain classifier is used to output the probability distribution of text belonging to different domain labels; Bilingual training data is acquired in different vertical domains, and adapters in different vertical domains are trained to obtain multiple adapters.
3. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 1, characterized in that, The steps of obtaining the target text to be translated, inputting the target text into the translation model, analyzing the domain features of the target text through the domain classifier, and calculating activation weights based on the domain features include: Based on the domain classifier, the distribution probability of each word in the target text belonging to different vertical domains is calculated, and the degree of tendency of each word to different vertical domains is calculated based on the distribution probability. The target text is divided into multiple sub-segments, and the tendency weight of each sub-segment in each vertical domain is calculated based on the tendency of each word in each sub-segment to different vertical domains. Based on the tendency weight of the sub-paragraphs, the degree of prominence of the distribution of the target text in different vertical domains is determined, and the gain coefficient of the target text in each vertical domain is obtained; The activation weight is calculated based on the gain coefficient of each vertical domain and the average tendency weight in each sub-segment.
4. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 3, characterized in that, The step of calculating the distribution probability of each word in the target text belonging to different vertical domains based on the domain classifier, and calculating the degree of tendency of each word to different vertical domains based on the distribution probability, includes: Calculate the distribution probability of the target words in the target text in the target vertical domain; wherein, the target word is any word among multiple words in the target text, and the target vertical domain is any vertical domain among multiple different vertical domains; Calculate the difference between the distribution probability of the target word in the target vertical domain and the average distribution probability in other vertical domains; Based on the distribution probability of the target vertical domain and the difference value of the distribution probability, the degree of inclination of the target vocabulary towards the target vertical domain is calculated; wherein, the distribution probability of the target vertical domain is directly proportional to the degree of inclination of the target vocabulary towards the target vertical domain.
5. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 4, characterized in that, After the steps of calculating the distribution probability of each word in the target text to different vertical domains based on the domain classifier, and calculating the degree of tendency of each word to different vertical domains based on the distribution probability, the method further includes: Set a preset tendency threshold; If the degree of inclination is greater than the inclination threshold, then the vocabulary is determined to be a valid vocabulary in the target vertical domain.
6. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 3, characterized in that, The step of dividing the target text into multiple sub-paragraphs and calculating the tendency weight of each sub-paragraph in each vertical domain based on the tendency of each word in each sub-paragraph to different vertical domains includes: The target text is divided into multiple sub-paragraphs; The number of effective words in the target sub-paragraph that have a tendency toward the target vertical domain exceeding a preset threshold is counted, and the percentage of effective words in the sub-paragraph is calculated; wherein, the target sub-paragraph is any one of the plurality of sub-paragraphs; Calculate the average degree of bias of each word in the target sub-paragraph towards the target vertical domain; Based on the effective vocabulary ratio and the average tendency, the tendency weight of the target sub-paragraph in the target vertical domain is calculated.
7. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 6, characterized in that, The step of calculating the tendency weight of the target sub-paragraph in the target vertical domain based on the effective vocabulary ratio and the average tendency degree includes: The product of the effective vocabulary percentage and the average tendency is normalized, and the normalized result is used as the tendency weight.
8. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 3, characterized in that, The step of determining the distribution prominence of the target text in different vertical domains based on the tendency weight of the sub-paragraphs, and obtaining the gain coefficient of the target text in each vertical domain, includes: Based on the tendency weight of each sub-paragraph in the target text in different vertical domains, the overall representative domain of the target text and the local representative domain of each sub-paragraph are determined. Determine the number of sub-segments that use the target vertical domain as a local representative domain; Obtain the tendency weight of sub-segments that do not take the target vertical domain as a local representative domain in the target vertical domain; Based on the number of sub-paragraphs and the tendency weight of each sub-paragraph in the target vertical domain, the distribution prominence of the target vertical domain in the target text is calculated as the gain coefficient of the target vertical domain.
9. The method for training and optimizing an intelligent translation model based on transfer learning according to claim 1, characterized in that, The step of activating the target adapter among the plurality of adapters according to the activation weights to adjust the multilingual backbone model includes: Select the adapters corresponding to the vertical domains whose activation weights are greater than the preset activation threshold as the target adapters; The target adapter is used to adjust the multilingual backbone model to obtain a translation model optimized for the domain features of the target text.
10. The method for training and optimizing an intelligent translation model based on transfer learning according to any one of claims 1 to 9, characterized in that, The step of translating the target text using a translation model including an adjusted multilingual backbone model to obtain the target translated text includes: The source language text sequence of the target text is input into the adjusted translation model; The source language text sequence is encoded using the encoder of the translation model to obtain encoded features; The target language text sequence is generated by the decoder of the translation model based on the encoded features and the domain adaptation information provided by the activated target adapter. The target language text sequence is decoded to obtain the target translated text.