一种基于动态学习的机器翻译方法及系统

By quantifying translation difficulty and errors, identifying lexical attention biases, and adjusting the incremental learning model, the problem of traditional neural machine translation being unable to adapt to language changes in real time is solved, achieving higher translation accuracy and adaptability.

CN121303159BActive Publication Date: 2026-05-19CHUANGSI LIXIN DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHUANGSI LIXIN DIGITAL TECHNOLOGY CO LTD
Filing Date
2025-10-15
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Traditional neural machine translation models cannot adapt to language changes in real time, resulting in a decrease in translation accuracy. Furthermore, online learning methods have high computational resource requirements and it is difficult to balance response speed and stability.

Method used

By acquiring translation content and correction records, the translation difficulty and error are quantified, attentional biases in vocabulary are identified, correction amounts are calculated, and constraint functions are constructed to adjust the incremental learning model, balancing the model's response speed and stability.

Benefits of technology

It improves the accuracy and adaptability of machine translation, enabling it to adapt to language changes and user feedback in real time, thereby improving translation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303159B_ABST
    Figure CN121303159B_ABST
Patent Text Reader

Abstract

本发明涉及机器实时翻译技术领域,具体涉及一种基于动态学习的机器翻译方法及系统。本发明首先获取当前的翻译相关数据;进一步根据翻译长度和检索难度量化翻译难度,再结合翻译校对情况获取翻译误差系数;进一步基于翻译误差系数和词汇分类,结合词汇的注意力得分和校正记录,获取强度偏差值;进一步根据每个翻译词汇在注意力机制的查询矩阵中的元素值结合强度偏差值,获取每个翻译词汇的修正量;最后根据每个翻译词汇的修正量与历史翻译中的翻译正确率的差异,获取约束函数调整增量学习模型,使模型更新更具方向性,平衡响应速度与稳定性,提高翻译系统对语境变化和用户反馈的响应能力。
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of real-time machine translation technology, specifically to a machine translation method and system based on dynamic learning. Background Technology

[0002] Dynamic learning methods enable machine translation systems to automatically adjust their translation strategies based on emerging language usages, user feedback, and contextual information by continuously learning and updating the model. Simultaneously, dynamic learning systems can analyze users' translation history and preferences in real time, gradually optimizing translation results through machine learning algorithms.

[0003] In existing technologies, traditional neural machine translation (such as the Transformer architecture) freezes its parameters after deployment, making it unable to absorb real-time language changes (such as emerging internet slang and technical terms), resulting in a continuous decline in translation accuracy as the language evolves. Furthermore, traditional domain adaptation relies on retraining with full datasets, while online learning methods, although optimizing models through user feedback data (such as post-editing), have extremely high requirements for real-time computing resources, making it difficult to balance response speed and stability. Summary of the Invention

[0004] To address the technical challenge of balancing response speed and stability in traditional dynamic learning-based machine translation, this invention aims to provide a machine translation method and system based on dynamic learning. The specific technical solution adopted is as follows:

[0005] A machine translation method based on dynamic learning, the method comprising:

[0006] Obtain the current translation content and the translation and correction records for each translated term;

[0007] The translation difficulty is obtained based on the length and retrieval difficulty of the translated content; the translation error coefficient is obtained based on the translation proofreading information in the correction record and the translation difficulty; the intensity deviation value of each translated word is obtained based on the translation error coefficient and vocabulary classification, combined with the attention score of the word and the correction record; the correction amount of each translated word is obtained based on the element value of each translated word in the query matrix of the attention mechanism and the intensity deviation value.

[0008] Based on the difference between the correction amount for each translated word and the translation accuracy in historical translations, a constraint function is obtained to adjust the incremental learning model.

[0009] Furthermore, the method for obtaining the translation difficulty includes:

[0010] The translation record includes the number of translated words and the number of search texts; the translation difficulty is obtained based on the number of translated words and the number of search texts in the current translation content.

[0011] Furthermore, the correction record includes the number of modifications for each of the translated terms.

[0012] Furthermore, the method for obtaining the translation error coefficient includes:

[0013] Based on the total number of revisions to all words in the current translation content and the translation difficulty, combined with the highest number of revisions for a single word and the average number of revisions for all words, a translation error coefficient is obtained.

[0014] Furthermore, the method for obtaining the intensity deviation value includes:

[0015] The update coefficient for each translated term is obtained based on the translation error coefficient and the vocabulary classification.

[0016] The intensity deviation value of each translated word is obtained by combining the total number of modifications, the update coefficient, and the attention score.

[0017] Furthermore, the method for obtaining the update coefficients includes:

[0018] The vocabulary classification includes general vocabulary, domain terminology, and high-frequency error correction vocabulary; each category of vocabulary corresponds to its own preset update weight, and the update coefficient is obtained by integrating the preset update weight corresponding to each translated vocabulary and the translation error coefficient.

[0019] Furthermore, the preset update weight of the general vocabulary is less than the preset update weight of the domain terminology, and the preset update weight of the domain terminology is less than the preset update weight of the high-frequency error correction vocabulary.

[0020] Furthermore, the method for obtaining the correction amount includes:

[0021] The correction amount for each translated word is obtained by combining the ratio of the element value of each translated word to the sum of all element values ​​in the query matrix with the intensity deviation value.

[0022] Furthermore, the method for obtaining the constraint function includes:

[0023] The present invention also proposes a machine translation system based on dynamic learning, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the steps of the machine translation method based on dynamic learning described above.

[0024] The present invention has the following beneficial effects:

[0025] This invention first acquires the current translation content and related data to facilitate dynamic learning using historical translation data. Next, based on the length and retrieval difficulty of the translation content, it quantifies the translation difficulty from the perspectives of structural and semantic complexity and retrieval difficulty. Then, it combines this with the translation proofreading information in the correction records to demonstrate the translation error, obtaining a translation error coefficient to characterize the degree of translation error and providing a basis for adjusting attention in subsequent machine translation. Further, based on the translation error coefficient and vocabulary classification, it fully considers the impact of different words on sentence translation and the model's need for updated vocabulary. Combining the attention scores of the words and the correction records, it identifies the abnormal dependencies between frequently corrected words and their contexts, obtaining the intensity deviation value for each translated word. This reflects the degree of deviation of the model's attention allocation to the current word, providing a key basis for calculating the correction amount. Further, based on the element values ​​of each translated word in the query matrix of the attention mechanism and the intensity deviation value, it comprehensively considers the attention allocation deviation in the current attention mechanism and historical translation usage to obtain the correction amount for each translated word, preparing for the final adjustment of the learning model. Finally, based on the difference between the correction amount of each translated word and the translation accuracy in historical translations, it obtains a constraint function to adjust the incremental learning model. This invention acquires translation content and correction records, quantifies translation difficulty and error, identifies attention allocation bias, calculates vocabulary correction, and constructs a constraint function-adjusted incremental learning model to solve the problem of balancing response speed and stability in dynamic learning, thereby improving translation accuracy and adaptability. Attached Figure Description

[0026] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating a machine translation method based on dynamic learning, provided as an embodiment of the present invention;

[0028] Figure 2 This is a flowchart illustrating a method for obtaining intensity deviation values ​​according to an embodiment of the present invention. Detailed Implementation

[0029] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a machine translation method and system based on dynamic learning proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0031] The following description, in conjunction with the accompanying drawings, details a specific scheme for a machine translation method and system based on dynamic learning provided by this invention.

[0032] The main objective of this invention is to learn and update machine translation through machine learning models, thereby making the translation results more accurate; therefore, it is first necessary to obtain translation data and a large model network:

[0033] Data sets are obtained through web crawling techniques.

[0034] I. Authoritative open-source corpus:

[0035] 1. OPUS: Includes parallel corpora from multiple fields (such as news, law, and medicine), supporting 100+ language pairs.

[0036] 2. WMT (Workshop on Machine Translation): Releases high-quality news corpora (such as English-German and Chinese-English) annually, including human evaluation results.

[0037] 3. TED Talks: Bilingual aligned data for TED Talk video subtitles, suitable for conversational translation.

[0038] II. Domain-Specific Data:

[0039] 1. Medicine: PubMed parallel abstract (English-Chinese).

[0040] 2. Law: Multilingual versions of EU legal texts.

[0041] Then obtain the large model network.

[0042] I. Open-source pre-trained models:

[0043] Multilingual large model:

[0044] 1. mT5 (Google): Supports text generation and translation in 101 languages.

[0045] 2. NLLB (Meta): Covers 200+ languages, with excellent performance in low-resource languages.

[0046] II. Dedicated Translation Model:

[0047] MarianMT: A lightweight neural translation model that supports rapid fine-tuning.

[0048] It should be noted that data acquisition through web crawling technology and various models are existing technologies and will not be elaborated upon further.

[0049] Machine translation is the process of automatically converting text or speech in one natural language (source language) into another natural language (target language) using computer technology. It is based on artificial intelligence, deep learning, and linguistic rules, using algorithmic models to analyze language structure, semantics, and context, thereby achieving cross-language information conversion.

[0050] Machine translation can translate large amounts of text in seconds, significantly improving the efficiency of cross-language communication. It is suitable for scenarios such as real-time dialogue and document processing. Compared with human translation, machine translation greatly reduces time and economic costs, making it particularly suitable for the needs of global enterprise operations and multilingual content distribution.

[0051] Incremental learning models can continuously learn from new data and update their parameters without forgetting previously learned knowledge. Unlike traditional batch training, incremental learning dynamically adjusts the model by gradually incorporating new samples (such as user feedback and data from new domains) without retraining the entire system. Its core principle lies in balancing "stability" (retaining old knowledge) and "plasticity" (adapting to new knowledge), typically employing techniques such as elastic weight solidification, knowledge distillation, and memory replay to suppress catastrophic forgetting.

[0052] In machine translation, the integration of incremental learning significantly enhances the adaptability and practicality of the system. Traditional machine translation models remain fixed once trained, making it difficult to adapt to new terminology, user preferences, or changes in the field. When users modify the translation results, the system automatically identifies the differences and fine-tunes the model to make subsequent translations better meet user expectations; when encountering texts in specialized fields (such as medical and legal), it can quickly adjust the terminology database and language style through online learning.

[0053] This method proposes a dynamic learning mechanism that enables machine translation models to adapt to new data, user feedback, and domain changes in real time, thereby continuously improving translation quality.

[0054] Please see Figure 1 The diagram illustrates a flowchart of a machine translation method based on dynamic learning according to an embodiment of the present invention, specifically including:

[0055] Step S1: Obtain the current translation content and the translation and correction records for each translated word.

[0056] In one embodiment of the present invention, the current translation content is first obtained, and the translation record and correction record of each translated word are obtained, so as to facilitate dynamic learning with the help of historical translation data.

[0057] It should be noted that the translated content and the translation and correction records for each translated term are stored in the memory. The method of retrieving and accessing the memory is a well-known technique to those skilled in the art and will not be described in detail here.

[0058] Step S2: Obtain the translation difficulty based on the length of the translated content and the retrieval difficulty; obtain the translation error coefficient based on the translation proofreading information in the correction record and the translation difficulty; obtain the intensity deviation value of each translated word based on the translation error coefficient and word classification, combined with the attention score of the word and the correction record; obtain the correction amount of each translated word based on the element value of each translated word in the query matrix of the attention mechanism and the intensity deviation value.

[0059] Considering that different translation content has different translation difficulties, and that translation difficulty affects the accuracy of the translation results, the length of the translation content reflects the structural complexity and semantic richness of the translated sentences, while retrieval difficulty reflects the difficulty of matching the translation in the memory bank or database. Therefore, the translation difficulty is obtained based on the length of the translation content and the retrieval difficulty, in order to prepare for the subsequent accurate assessment of translation errors.

[0060] Preferably, in one embodiment of the present invention, the translation record includes the number of translated words and the number of search text libraries; considering that the more translated words there are, the more core words need to be processed in the current translation content, the more complex the semantic combination, the more attention paths and contextual dependencies the system needs to process, and thus the higher the translation difficulty; the more search text libraries there are, the more content needs to be searched in the translation process, the higher the search difficulty, and the higher the translation difficulty, so the translation difficulty is obtained based on the number of translated words and the number of search text libraries in the current translation content.

[0061] As an example, the translation difficulty is calculated by multiplying the number of words in the current translation content by the number of texts retrieved from the database.

[0062] Translation difficulty is represented by a specific data value; the higher the value, the more difficult the translation. Retrieval difficulty is represented by the number of texts retrieved. The length of the translated content is represented by the number of words translated.

[0063] In another embodiment of the present invention, it is also considered that the longer the translation time consumed, the higher the translation difficulty. Therefore, the translation time consumed, the number of translation words, and the number of retrieved text libraries can be fused in a positively correlated manner by addition or multiplication to obtain the translation difficulty. The translation time consumed, the number of translation words, and the retrieved text libraries can also be preprocessed by linear normalization in their respective data dimensions, and then the translation difficulty is calculated.

[0064] The core of incremental learning is to enable the machine learning model to continuously learn from new data through selective and progressive parameter updates, while minimizing the interference to the knowledge already mastered. Its essence is to balance "plasticity" (adapting to new knowledge) and "stability" (retaining old knowledge); therefore, the attention mechanism is used to update the parameters of incremental learning, so that in the process of machine translation, more attention is paid to the balance of translation.

[0065] Specifically, according to the obtained difficulty level of vocabulary translation, the degree of modification after translation is further analyzed; because after machine translation, manual proofreading will be carried out, and the translation proofreading situation during proofreading reflects the error situation during translation. At the same time, combined with the translation difficulty, the interference of different translation difficulties is avoided, and the accuracy of the translation error coefficient is improved. Therefore, according to the translation proofreading situation in the correction record combined with the translation difficulty, the translation error coefficient is obtained to represent the degree of translation error, providing a basis for adjusting the attention of subsequent machine translation.

[0066] Preferably, in one embodiment of the present invention, the correction record includes the number of modifications of each translation word.

[0067] Considering that if more words are modified during proofreading and the number of modifications to certain specific words is more, it means that there is an error between the meaning understood by the current machine translation and the actual usage scenario of the user; for example: when the user frequently modifies the translation of "bank" (from "银行" to "河岸"), the system will adjust the dependence intensity of the relevant attention heads on the context words;

[0068] Also considering that when the total number of modifications of all words in the current translation content is more and the translation difficulty is lower, it means that the degree of translation error is higher. Therefore, according to the total number of modifications of all words in the current translation content and the translation difficulty, combined with the highest number of modifications of a single word and the average number of modifications of all words, the translation error coefficient is obtained.

[0069] As an example, the ratio of the total number of modifications of all words in the current translation content (the sum of the number of modifications of all words only in the current translation content) to the translation difficulty during the current translation is used as the first error factor to represent the number of word modifications per unit translation difficulty; [[ID=第十九]]

[0070] The ratio of the maximum number of modifications of a single word (in the historical record) to the average number of modifications of all words is used as the second error factor. The larger the second error factor, the less sensitive the model may be to this type of word. For example, if a certain user is in the financial field and often needs to translate manuscripts, but there are multiple meanings for a specific domain word, and machine translation often translates this word into other meanings, and manual correction is required every time during correction, it means that machine translation is insensitive to this word, resulting in a higher error rate.

[0071] Finally, after linearly normalizing the product of the first error factor and the second error factor in the corresponding data dimension, the result is used as the translation error coefficient. Among them, the total number of modifications of all words in the current translation content, the maximum number of modifications of a single word, and the average number of modifications of all words together show the translation proofreading situation.

[0072] When optimizing the attention mechanism, the main purpose is to make incremental learning more in line with the translation habits of users and be able to accurately obtain the meaning that the user wants to express. Therefore, the dependence intensity in the attention mechanism needs to be dynamically adjusted;

[0073] The logic of dynamically adjusting the dependence intensity is to quantify the importance of the association between words and adaptively correct the attention weights, so that the model can accurately control the word (vocabulary) dependence relationship during translation in different context environments.

[0074] For example: when the user corrects a translation error (such as changing "bank→银行" to "bank→河岸"), the system first analyzes the original attention distribution, locates the abnormal dependence relationship (such as the attention scores of "bank" and "银行" being too high), and then calculates the intensity deviation value based on the results of multiple corrections.

[0075] Considering that different words have different impacts on sentence translation, it is necessary to analyze the influence of word classification; the translation error coefficient characterizes the degree of translation error and reflects the degree of the model's need for updated words; by combining the attention scores of each word and the actual correction records, the system can identify the abnormal dependence relationship between the frequently corrected words and their contexts. Therefore, based on the translation error coefficient and word classification, combined with the attention scores and correction records of words, the intensity deviation value of each translated word is obtained, reflecting the deviation degree of the model's attention allocation for the current word, providing a key basis for calculating the correction amount, adjusting the attention weights, and updating the model parameters in the follow-up.

[0076] Preferably, in an embodiment of the present invention, please refer to Figure 2 , which shows a flowchart of a method for obtaining an intensity deviation value provided by an embodiment of the present invention, specifically including:

[0077] Step S201: Obtain the update coefficient of each translation word based on the translation error coefficient and the vocabulary classification.

[0078] Considering that words of different categories have different semantic roles and error impact degrees in the translation task, when performing dynamic learning and model fine-tuning, not all words can be treated equally. Therefore, the update coefficient of each translation word is obtained based on the translation error coefficient and the vocabulary classification.

[0079] In an embodiment of the present invention, the vocabulary classification includes general vocabulary, domain term vocabulary, and high-frequency error correction vocabulary; each type of vocabulary corresponds to its own preset update weight, and the update coefficient is obtained by fusing the preset update weight corresponding to each translation word and the translation error coefficient.

[0080] Considering that changes in general vocabulary have less impact on the overall translation, domain term errors often affect the professionalism of the whole sentence, and high-frequency error correction vocabulary are the words that are most likely to be misused by users in actual use and need to be optimized. Therefore, the preset update weight of general vocabulary is less than the preset update weight of domain term vocabulary, and the preset update weight of domain term vocabulary is less than the preset update weight of high-frequency error correction vocabulary.

[0081] As an example, the classification method of vocabulary is as follows: General vocabulary: Words with a word frequency ranking in the top 20% (based on a large-scale general corpus, such as Wikipedia, news corpus);

[0082] Domain term vocabulary: Marked by a professional dictionary (such as the medical terminology SNOMED CT, financial glossary);

[0083] High-frequency error correction vocabulary: The number of occurrences of a certain word (such as "bank→bank") in the correction records in the recent period (such as within the last 7 days) exceeds the threshold (such as 10 times).

[0084] The preset update weights of general vocabulary, domain term vocabulary, and high-frequency error correction vocabulary are 0.1, 0.5, and 2 respectively. The product of the translation error coefficient and the preset update weight of the vocabulary is used as the update coefficient of the corresponding word. And to ensure the value range of the update coefficient of high-frequency error correction vocabulary, the maximum value of the update coefficient of high-frequency error correction vocabulary is set to 1.

[0085] It should be noted that when a certain word meets multiple classification criteria (for example, a domain term word that has appeared with errors many times recently and can also belong to high-frequency error correction vocabulary), the vocabulary classification with the highest preset update weight is taken as the classification result; the classification methods of various types of vocabulary are already well-known technical means in the art and will not be elaborated here.

[0086] Step S202: Fuse the total number of modification times, update coefficient, and attention score of each translation word to obtain the intensity deviation value of each translation word.

[0087] Considering that a higher attention score for a word indicates a higher semantic attention given to the current word by the model in the sentence, a higher update coefficient, and a higher intensity of being updated in dynamic learning; the more total modifications, the more unstable the model is on that word, the lower the credibility of the current attention, and the more careful the bias correction of its weights needs to be. Based on this logic, the intensity bias value is obtained by fusion.

[0088] As an example, the product of the original attention score and the update coefficient of the translated word is used as the numerator, the total number of modifications is used as the denominator, and the ratio of the fractions is used as the intensity deviation value of the translated word. The higher the ratio, the further the current model's attention on that word deviates from normal semantic understanding, and the more the attention mechanism needs to be adjusted; conversely, the adjustment can be less.

[0089] The total number of modifications here is the sum of the number of modifications in all historical records, and all parameters and calculation results involved in the calculation of the intensity deviation value are dimensionless values.

[0090] Considering that the query matrix is ​​one of the core parameters in the attention mechanism, its core function is to dynamically locate the source language information that needs attention during the translation process by mapping the input vector to the query. The specific method for obtaining the query matrix in the attention mechanism is a well-known technology and will not be elaborated here.

[0091] Considering that the element values ​​in the query matrix represent the intensity basis of the attention calculation that the word participates in in the current context, since the attention mechanism itself cannot identify historical translation errors, it may lead to some words being over- or under-attended in specific contexts. Therefore, an intensity bias value is introduced to reflect the attention allocation deviation of the word in historical translation usage. Thus, based on the element values ​​of each translated word in the query matrix of the attention mechanism and the intensity bias value, the correction amount of each translated word is obtained, which prepares for the final adjustment of the learning model, guides the model to allocate attention more reasonably in context understanding, and enhances the accuracy and stability of the model's incremental learning.

[0092] Preferably, in one embodiment of the present invention, considering that the element value of each word in the query matrix reflects its attention participation in the current semantic environment, the semantic weight of the word in the current context can be measured by the proportion of the element value in the total query matrix; combined with the intensity deviation value calculated based on historical correction behavior, it can effectively reflect whether the model's attention intensity to the word deviates from the actual semantic requirements.

[0093] Based on this, the correction amount for each translated word is obtained by combining the ratio of the element value of each translated word to the sum of all element values ​​in the query matrix with the intensity deviation value.

[0094] As an example, the product of the proportion of each translated word's element value to the sum of all element values ​​in the query matrix and the corresponding intensity deviation value is used as the correction amount for each translated word, preparing for the final calculation of the constraint function to adjust the incremental learning model.

[0095] Here, the element value is a specific numerical value, and the ratio is the ratio of a single element value to the sum of all element values.

[0096] Step S3: Based on the difference between the correction amount of each translated word and the translation accuracy in historical translations, obtain the constraint function to adjust the incremental learning model.

[0097] Considering that translation correction reflects the model's comprehension bias in the current context, and that historical translation accuracy represents the model's degree of matching with the user's semantic intent, comparing the difference between the current word correction amount and the historical translation accuracy can quantify the deviation between the model's learning results and the user's expectations, thus constructing a feedback constraint mechanism. Therefore, based on the difference between the correction amount of each translated word and the translation accuracy in historical translations, a constraint function is obtained to adjust the incremental learning model, making model updates more directional, balancing response speed and stability, and improving the translation system's responsiveness to contextual changes and user feedback.

[0098] Preferably, in one embodiment of the present invention, considering that the error fluctuations of individual words may have an occasional impact on the incremental learning process, the sum of squared global deviations of all words can more stably measure the deviation of the overall system. Therefore, the constraint function is obtained based on the squared difference between the correction amount of all translated words and the translation accuracy.

[0099] As an example, the sum of the squares of the differences between the correction values ​​of all translated words and the translation accuracy is used as a constraint function. This guides the model to balance the degree of learning new knowledge and retaining old knowledge during the optimization process, improving the stability and effectiveness of incremental learning in practical applications, and balancing response speed and stability.

[0100] The method uses the difference and then the square to show the difference between the correction amount of a single translated word and the translation accuracy in historical translations. Then, the summation method is used to show the square of the global deviation, which represents the overall difference characteristics.

[0101] By obtaining constraint functions, the incremental learning model can be adjusted, mainly by constraining the attention mechanism module, so that it can balance the accuracy of translated text at different times. This makes the model approximate human translation, which can quickly adapt to new usages (such as "apple" referring to the brand rather than the fruit in a technological context) while maintaining the stability of the basic language structure.

[0102] Through an incremental learning model, gradually refine the division of attention. As an example, it is expressed in the form of [training stage, attention head type, incremental update strategy]:

[0103] [Initial stage, general grammar head, fixed base parameters (high value, such as ), in the initial model training stage, mainly used to capture the general word order and subject-predicate structure, adopt a relatively high regularization coefficient (λ value) to keep the parameters stable and avoid early overfitting;

[0104] [Stage 1, new financial term head, loose update ( ), after introducing financial text corpus, add an attention head for identifying specific terms and context-dependent relationships in the financial field, and achieve a larger parameter adjustment by lowering the regularization coefficient, so as to quickly adapt to professional expressions;

[0105] [Stage 2, expand medical term head, adapter fine-tuning (only train the adapter)], for the medical field, use a lightweight adapter module to insert into a specific attention path, and only fine-tune the inserted module to avoid disturbing the main model and achieve fast and efficient domain migration.

[0106] Among them, when the model starts to introduce a completely new corpus type (such as switching from general corpus to professional corpora like finance and medicine), it is considered that the original model does not have the ability to process the new corpus, and it needs to enter a new stage for structural or parameter adaptation, thus dividing the stages; it can also be set to trigger the division of the next stage when the translation accuracy continuously drops or is lower than a preset threshold.

[0107] In practical applications, the strategy of incrementally refining the attention mechanism is reflected in the following scenarios:

[0108] 1. User feedback integration:

[0109] When the user manually modifies the translation result (such as changing "bank" from "银行" to "河岸"), the system locates the error source through attention analysis (such as mis-associated word pairs), and only backpropagates the gradient of the relevant attention parameters, and finely updates the deviation path instead of globally readjusting.

[0110] 2. Cross-language transfer:

[0111] When incrementally learning a low-resource language (such as Urdu), reuse the shared attention pattern of a high-resource language (such as English) (such as subject-verb dependency structure), and only add language-specific word alignment parameters to achieve fast transfer.

[0112] 3. Domain adaptation:

[0113] For legal texts, the attention intensity of clause numbers (such as "Article 3" (a clause number commonly used in formal laws, treaties, contracts, regulations, etc. in English, meaning "Article 3" or "Third Article")) and corresponding content is dynamically increased without the need for full model fine-tuning, achieving lightweight and precise adaptation.

[0114] An embodiment of the present invention also provides a machine translation system based on dynamic learning. The system includes a memory, a processor, and a computer program. The memory is used to store the corresponding computer program, and the processor is used to run the corresponding computer program. When the computer program runs in the processor, it can implement the machine translation method based on dynamic learning described in steps S1-S3.

[0115] In summary, to address the technical problem of traditional dynamic learning-based machine translation struggling to balance response speed and stability, this invention proposes a machine translation method and system based on dynamic learning. This invention first acquires current translation-related data; then, it quantifies the translation difficulty based on translation length and retrieval difficulty, and obtains translation error coefficients by combining these with translation proofreading data; further, based on the translation error coefficients and vocabulary classification, combined with vocabulary attention scores and correction records, it obtains intensity deviation values; further, it obtains the correction amount for each translated vocabulary by combining the element value of each translated vocabulary in the query matrix of the attention mechanism with the intensity deviation value; finally, based on the difference between the correction amount of each translated vocabulary and the translation accuracy in historical translations, it obtains a constraint function to adjust the incremental learning model, making model updates more directional, balancing response speed and stability, and improving the translation system's responsiveness to contextual changes and user feedback.

[0116] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0117] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A machine translation method based on dynamic learning, characterized in that, The method includes: Obtain the current translation content and the translation and correction records for each translated term; the correction records include the number of modifications for each translated term; The translation difficulty is obtained based on the length and retrieval difficulty of the translated content; the translation error coefficient is obtained based on the translation proofreading information in the correction record and the translation difficulty, including: obtaining the translation error coefficient based on the total number of modifications to all words in the current translated content and the translation difficulty, combined with the highest number of modifications for a single word and the average number of modifications for all words; Based on the translation error coefficient and vocabulary classification, and combining the attention score of the vocabulary with the correction record, the intensity deviation value of each translated vocabulary is obtained, including: The update coefficient for each translated term is obtained based on the translation error coefficient and the vocabulary classification. The intensity deviation value of each translated word is obtained by combining the total number of modifications, the update coefficient, and the attention score; the correction amount of each translated word is obtained by combining the element value of each translated word in the query matrix of the attention mechanism with the intensity deviation value. Based on the difference between the correction amount for each translated word and the translation accuracy in historical translations, a constraint function is obtained to adjust the incremental learning model.

2. The machine translation method based on dynamic learning according to claim 1, characterized in that, The methods for obtaining the translation difficulty include: The translation record includes the number of translated words and the number of search texts; the translation difficulty is obtained based on the number of translated words and the number of search texts in the current translation content.

3. The machine translation method based on dynamic learning according to claim 1, characterized in that, The method for obtaining the update coefficients includes: The vocabulary classification includes general vocabulary, domain terminology, and high-frequency error correction vocabulary; each category of vocabulary corresponds to its own preset update weight, and the update coefficient is obtained by integrating the preset update weight corresponding to each translated vocabulary and the translation error coefficient.

4. The machine translation method based on dynamic learning according to claim 3, characterized in that, The preset update weight of the general vocabulary is less than the preset update weight of the domain terminology, and the preset update weight of the domain terminology is less than the preset update weight of the high-frequency error correction vocabulary.

5. The machine translation method based on dynamic learning according to claim 1, characterized in that, The method for obtaining the correction amount includes: The correction amount for each translated word is obtained by combining the ratio of the element value of each translated word to the sum of all element values ​​in the query matrix with the intensity deviation value.

6. The machine translation method based on dynamic learning according to claim 1, characterized in that, The method for obtaining the constraint function includes: The constraint function is obtained by squared the difference between the correction amount of all the translated words and the translation accuracy.

7. A machine translation system based on dynamic learning, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the machine translation method based on dynamic learning as described in any one of claims 1 to 6.