Translation method and device based on artificial intelligence model and related equipment

By performing terminology detection and vocabulary matching on the text to be translated, combined with preset prompt word templates and pre-trained artificial intelligence models, the problem of poor translation performance of artificial intelligence models in specific fields is solved, and efficient and accurate translation results are achieved.

CN121859929APending Publication Date: 2026-04-14BOE TECHNOLOGY GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Artificial intelligence models perform poorly in translation within specific domains, which can easily lead to errors in conveying key information. Existing optimization solutions are resource-intensive and lack real-time performance.

Method used

By performing text detection on the text to be translated, identifying specialized terms, matching the corresponding specialized terminology information in a terminology database, filling it into a preset prompt word template, and inputting it into a pre-trained artificial intelligence model for translation, the translation is performed in conjunction with domain knowledge.

Benefits of technology

It improves the accuracy and effectiveness of translation, ensures that the translation results meet the professional terminology and context requirements of specific fields, and reduces resource consumption and real-time issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859929A_ABST
    Figure CN121859929A_ABST
Patent Text Reader

Abstract

The invention provides a translation method and device based on an artificial intelligence model and related equipment, and the method comprises the steps: detecting a to-be-translated text when the to-be-translated text needing to be translated is received, so as to determine at least one professional term included in the to-be-translated text, the technical term vocabulary information corresponding to the technical terms is determined in the vocabulary database, so that at least one piece of technical term vocabulary information of the to-be-translated text is filled into a preset prompt word template, translation is performed based on a pre-trained artificial intelligence model, and a translated text is obtained. The field of the to-be-translated text and the corresponding terminologies are fully combined in the translation process, the accuracy of using the artificial intelligence model to translate in the specific field is ensured, and the translation effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a translation method, apparatus, and related equipment based on an artificial intelligence model. Background Technology

[0002] In the current era of rapid development in artificial intelligence technology, large language models, represented by GPT, Qwen, and Llama, have demonstrated powerful generalization capabilities in the field of natural language processing, especially in general scenarios, where they can efficiently complete tasks such as text generation and question-answering. However, when these large models are applied to legal, medical, and financial scenarios, their translation outputs are prone to misunderstanding, leading to errors in the transmission of key information. Optimization solutions in related technologies generally involve fine-tuning the large model to improve its translation capabilities; however, this approach is resource-intensive and lacks real-time performance, resulting in poor translation results in specific domains. Summary of the Invention

[0003] This application provides a translation method, apparatus, and related equipment based on an artificial intelligence model, which solves the problem that artificial intelligence models have poor translation performance in specific fields in related technologies.

[0004] To solve the above problems, this application is implemented as follows:

[0005] Firstly, this application provides a translation method based on an artificial intelligence model, the method comprising:

[0006] The input text to be translated is subjected to text detection to determine that the text to be translated includes at least one technical term;

[0007] Based on the at least one professional term, a match is performed in a terminology database to determine at least one terminology terminology information corresponding to the at least one professional term, the terminology terminology information including the annotation content of the corresponding professional term;

[0008] The text to be translated and the at least one terminology glossary information are filled into a preset prompt word template to obtain the target prompt word;

[0009] The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, thus obtaining the translated text.

[0010] Optionally, the step of performing text detection on the input text to be translated to determine that the text to be translated includes at least one technical term, including:

[0011] The input text to be translated is preprocessed to obtain the processed text. The preprocessing includes text cleaning and standardization.

[0012] The processed text is segmented according to part-of-speech tags to obtain multiple segmented words.

[0013] The multiple word segments are detected, and at least one technical term is identified among the multiple word segments.

[0014] Optionally, the step of matching the at least one specialized term in a thesaurus database to determine at least one specialized term thesaurus information corresponding to the at least one specialized term includes:

[0015] For each of the technical terms, a frequency label is determined for each of the technical terms. The frequency label includes a first label and a second label, wherein the frequency corresponding to the first label is higher than the frequency corresponding to the second label.

[0016] Calculate the similarity value between the technical term and multiple candidate scene tags to obtain multiple first similarity values ​​corresponding to the multiple candidate scenes;

[0017] The candidate scene label corresponding to the target similarity value is determined as the scene label corresponding to the professional term. The scene label is used to represent the scene information in which the professional term is applied. The target similarity is the largest first similarity value among the plurality of first similarity values.

[0018] Weight information is generated based on the frequency label and the scene label, and weights are calculated for multiple candidate scenes to obtain multiple calculation results corresponding to the multiple candidate scenes;

[0019] The candidate scenario corresponding to the target calculation result is determined as the target scenario corresponding to the technical term, and the target calculation result is the largest calculation result among the multiple calculation results;

[0020] Based on the target scenario, matching is performed in the terminology database to determine the terminology information corresponding to each term.

[0021] Optionally, the terminology glossary information includes at least one of the following: terminology mapping relationships, terminology context rules, and terminology translation priorities.

[0022] Optionally, the step of filling the text to be translated and the at least one terminology glossary information into a preset prompt word template to obtain the target prompt word includes:

[0023] Based on the at least one terminology glossary information, determine the annotation content corresponding to the at least one terminology to obtain at least one basic annotation;

[0024] Based on the at least one basic annotation, a preset prompt word template is obtained by matching among multiple candidate prompt word templates.

[0025] The text to be translated and at least one basic annotation are filled into the preset prompt word template to obtain the target prompt word.

[0026] Optionally, the step of filling the text to be translated and the at least one basic annotation into the preset prompt word template to obtain the target prompt word includes:

[0027] In the text to be translated, at least one location information corresponding to the at least one technical term is determined, wherein the location information is used to indicate the position of the corresponding technical term in the text to be translated;

[0028] Based on the at least one location information, the at least one technical term is analyzed in context to determine at least one contextual information corresponding to the at least one technical term;

[0029] Based on the at least one contextual information, generate at least one contextual annotation corresponding to the at least one technical term;

[0030] The target prompt word is obtained by filling the text to be translated, at least one basic annotation, and at least one contextual annotation into the preset prompt word template.

[0031] Optionally, the step of inputting the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining translated text, includes:

[0032] The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, and a first translation result is obtained.

[0033] The first translation result is input into the pre-trained artificial intelligence model to perform reverse translation on the first translation result, thereby obtaining the second translation result;

[0034] Calculate the similarity between the second translation result and the text to be translated to obtain a second similarity value;

[0035] If the second similarity value is greater than or equal to a preset threshold, and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated, the first translation result will be output as the translated text.

[0036] Optionally, after detecting the translation result and determining whether the translation result, including the translated content, conforms to the scenario corresponding to the text to be translated, the method further includes:

[0037] If the second similarity value is less than the preset threshold, or if the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated, a processing log is generated based on the first translation result, and the processing log includes the reasoning process of the artificial intelligence model.

[0038] The target prompt words are updated based on the processing log to obtain enhanced prompt words;

[0039] The enhanced prompt words and the context information corresponding to the first translation result are input into the pre-trained artificial intelligence model to re-translate the text to be translated, and a third translation result is obtained. The context information is the historical question and answer record corresponding to the translation result in the pre-trained artificial intelligence model.

[0040] The third translation result is input into the pre-trained artificial intelligence model, and the third translation result is reverse-translated to obtain the fourth translation result;

[0041] Calculate the similarity between the fourth translation result and the text to be translated to obtain a third similarity value;

[0042] If the third similarity value is greater than or equal to the preset threshold, and the translation scenario corresponding to the third translation result is the same as the scenario corresponding to the text to be translated, the third translation result will be output as the translated text.

[0043] Secondly, embodiments of this application also provide a translation device based on an artificial intelligence model, the device comprising:

[0044] The detection module is used to perform text detection on the input text to be translated and determine that the text to be translated includes at least one technical term.

[0045] A matching module is used to perform matching in a thesaurus database based on the at least one technical term to determine at least one technical term thesaurus information corresponding to the at least one technical term, wherein the technical term thesaurus information includes the annotation content of the corresponding technical term.

[0046] The input module is used to input the text to be translated and the at least one terminology glossary into a preset prompt word template to obtain the target prompt word;

[0047] The translation module is used to input the target prompt words into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining the translated text.

[0048] Thirdly, this application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the method described in the first aspect above.

[0049] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0050] Fifthly, this application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the method described in the first aspect above.

[0051] This application provides a translation method, apparatus, and related equipment based on an artificial intelligence model. The method includes: performing text detection on an input text to be translated to determine at least one technical term included in the text; matching the at least one technical term in a thesaurus database to determine at least one technical term thesaurus information corresponding to the at least one technical term, the technical term thesaurus information including annotation content of the corresponding technical term; filling the text to be translated and the at least one technical term thesaurus information into a preset prompt word template to obtain a target prompt word; and inputting the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated to obtain a translated text.

[0052] The embodiments of this application have the following beneficial effects:

[0053] This application detects at least one technical term in the received text to be translated, thereby identifying it. It then retrieves the corresponding technical term glossary from a thesaurus database, fills the glossary information of at least one technical term into a preset prompt word template, and performs translation based on a pre-trained artificial intelligence model. This approach fully integrates the domain and corresponding technical terminology of the text during the translation process, ensuring accuracy and improving translation quality. Attached Figure Description

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

[0055] Figure 1This is a flowchart illustrating the translation method based on an artificial intelligence model in an embodiment of this application;

[0056] Figure 2 This is a schematic diagram illustrating the process of processing the text to be translated in an embodiment of this application;

[0057] Figure 3 This is a schematic diagram of the vocabulary detection process in an embodiment of this application;

[0058] Figure 4 This is a schematic diagram of the process of generating Prompt in the embodiments of this application;

[0059] Figure 5 This is a flowchart illustrating the verification process of the reasoning results in the embodiments of this application;

[0060] Figure 6 This is a flowchart of log processing in an embodiment of this application;

[0061] Figure 7 This is a schematic diagram of the structure of the translation device based on an artificial intelligence model in the embodiments of this application;

[0062] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0063] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0064] The terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected objects, such as A and / or B and / or C, representing seven possibilities: including A alone, B alone, C alone, and the presence of both A and B, both B and C, both A and C, and the presence of A, B, and C.

[0065] This application addresses the problem of poor translation performance of existing artificial intelligence models in specific domains by providing a translation method based on an artificial intelligence model, such as... Figure 1 As shown, the steps of this method include:

[0066] Step 101: Perform text detection on the input text to be translated to determine at least one technical term included in the text to be translated.

[0067] In this embodiment, the input text to be translated is the text requested by the user, such as medical literature or customer service inquiries. After receiving the text to be translated, it is checked to determine whether it contains professional terms already included in the thesaurus.

[0068] Specifically, technical terms refer to specialized vocabulary and expressions used in a particular field or industry. These terms are typically created to accurately convey concepts, phenomena, operational procedures, or technical details within that field. Technical terms are particularly common in industries such as science, technology, medicine, law, and finance, as they help professionals avoid ambiguity and misunderstandings during communication.

[0069] Step 102: Match the at least one professional term in the thesaurus database to determine at least one professional term thesaurus information corresponding to the at least one professional term, wherein the professional term thesaurus information includes the annotation content of the corresponding professional term.

[0070] In this embodiment, after identifying the technical terms, they need to be matched against a thesaurus database to determine the corresponding technical term information. The thesaurus database includes multiple technical term information entries, which provide explanations of the technical terms. For example, the technical term information may include entries and rules (such as term definitions, multilingual mappings, and applicable scenario constraints). These are then passed to the thesaurus matching and rule application stage. This stage combines semantics, context, and cross-language processing logic (such as distinguishing the different meanings of "bank" in financial and riverside scenarios, and matching the Chinese-English-Japanese translation of "bonded warehouse") to ensure accurate term matching and correct rule application.

[0071] Step 103: Fill the text to be translated and the at least one terminology glossary information into the preset prompt word template to obtain the target prompt word.

[0072] In this embodiment, after obtaining the terminology glossary information corresponding to each terminology, the text to be translated and the obtained terminology glossary information are filled into a preset prompt word template to obtain the target prompt word.

[0073] In this context, cue words (or prompts) for large models refer to specific texts or instructions provided to the model when interacting with large language models (such as the GPT series, BERT, etc.) to guide the model in generating the required output. These cue words can be questions, instructions, or a piece of text designed to help the model understand the context and task requirements.

[0074] Step 104: Input the target prompt word into the pre-trained artificial intelligence model to translate the text to be translated, and obtain the translated text.

[0075] In this embodiment, the optimized target prompt words are input into a pre-trained artificial intelligence model for translation to obtain the translated text. The pre-trained artificial intelligence model in this embodiment can be a pre-trained large language model, such as GPT.

[0076] Specifically, the target prompts are fed into the large model inference engine, which performs inference and generates the translated text. The translated text then undergoes a result verification process, where the accuracy of the inference results is verified based on vocabulary rules (such as consistency of terminology translation and applicability to the scenario). After passing the verification, the final translated text is output to the user.

[0077] This application detects at least one technical term in the received text to be translated, thereby identifying it. It then retrieves the corresponding technical term glossary from a thesaurus database, fills the glossary information of at least one technical term into a preset prompt word template, and performs translation based on a pre-trained artificial intelligence model. This approach fully integrates the domain and corresponding technical terminology of the text during the translation process, ensuring accuracy and improving translation quality.

[0078] In some feasible implementations, optionally, the step of performing text detection on the input text to be translated to determine that the text to be translated includes at least one technical term, including:

[0079] The input text to be translated is preprocessed to obtain the processed text. The preprocessing includes text cleaning and standardization.

[0080] The processed text is segmented according to part-of-speech tags to obtain multiple segmented words.

[0081] The multiple word segments are detected, and at least one technical term is identified among the multiple word segments.

[0082] In this embodiment, after receiving the text to be translated, preprocessing is required, including text cleaning and annotation, such as removing special characters, standardizing capitalization, etc., to obtain the processed text. Then, the processed text is segmented according to parts of speech, resulting in multiple segmented words. These segmented words are then detected to identify the specialized terms that require further processing.

[0083] For example, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating the process of processing the text to be translated in this embodiment. The flowchart in this embodiment is responsible for parsing the input text, word segmentation, and basic feature extraction, achieving terminology detection and preliminary scene recognition. Specifically, it includes: Text cleaning and standardization: removing special characters, unifying capitalization, and handling punctuation variations. Word segmentation and part-of-speech tagging: using a domain-adaptive word segmenter to identify keywords such as nouns and technical terms. Term candidate extraction: generating a term candidate set based on length thresholds and word frequency statistics. Prefix tree index matching: quickly locating term entries in the vocabulary using a Trie tree structure. Contextual keyword recognition: extracting scene-specific words such as "treatment" and "clinical". Preliminary domain scene determination: generating scene probability distributions by combining terminology type and contextual words.

[0084] Optionally, the step of matching the at least one specialized term in a thesaurus database to determine at least one specialized term thesaurus information corresponding to the at least one specialized term includes:

[0085] For each of the technical terms, a frequency label is determined for each of the technical terms. The frequency label includes a first label and a second label, wherein the frequency corresponding to the first label is higher than the frequency corresponding to the second label.

[0086] Calculate the similarity value between the technical term and multiple candidate scene tags to obtain multiple first similarity values ​​corresponding to the multiple candidate scenes;

[0087] The candidate scene label corresponding to the target similarity value is determined as the scene label corresponding to the professional term. The scene label is used to represent the scene information in which the professional term is applied. The target similarity is the largest first similarity value among the plurality of first similarity values.

[0088] Weight information is generated based on the frequency label and the scene label, and weights are calculated for multiple candidate scenes to obtain multiple calculation results corresponding to the multiple candidate scenes;

[0089] The candidate scenario corresponding to the target calculation result is determined as the target scenario corresponding to the technical term, and the target calculation result is the largest calculation result among the multiple calculation results;

[0090] Based on the target scenario, matching is performed in the terminology database to determine the terminology information corresponding to each term.

[0091] In this embodiment, after identifying the technical terms in the text to be translated, a frequency tag is determined for each technical term. The frequency tag includes a first tag and a second tag, which are used to distinguish whether the technical term belongs to a high-frequency scenario. Based on the frequency tags corresponding to the technical terms, a target scenario matching the technical term is determined. This scenario can be a medical scenario, a legal scenario, or a financial scenario, etc.

[0092] After determining the frequency label, the scene label corresponding to each technical term is determined. Specifically, the scene label needs to calculate the similarity value between the technical term and multiple candidate scene labels, so that the candidate scene with the highest similarity is taken as the scene label corresponding to the technical term.

[0093] Therefore, multiple weight information is generated based on frequency labels and scene labels. For example, the weight of the frequency label can be 0.3, and the frequency of the scene label can be 0.7. Weights are then calculated for multiple candidate scenes to determine the calculation result for each candidate scene. The target scene corresponding to the largest calculation result is determined as the scene corresponding to the technical term.

[0094] After identifying the target scenario, a matching process is performed in the terminology database to determine the terminology information corresponding to each term. Optionally, the terminology information may include at least one of the following: terminology mapping relationships, terminology context rules, and terminology translation priorities.

[0095] Specifically, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the vocabulary detection process in this embodiment, used to realize the dynamic mounting and scene adaptation of the vocabulary.

[0096] The vocabulary storage structure adopts a JSON / CSV structured format, including fields such as terminology mapping, context rules, and multilingual translation. A hierarchical loading strategy includes a core vocabulary and an extended vocabulary, corresponding to whether a term is used in a high-frequency scenario. The core vocabulary resides in memory and contains high-frequency terms. The extended vocabulary is loaded on demand and dynamically activated based on scenario tags ("activation" means that, based on the tags of the actual usage scenario, relevant words in the extended vocabulary become available when needed, allowing them to be called and used by the system, much like triggering a mechanism to make a previously inactive vocabulary database active, adapting to the current scenario requirements and achieving dynamic response of the vocabulary function). The version management mechanism includes recording the vocabulary update history, effective time, updater information, and supporting version rollback and difference comparison. Conflict resolution rules include: domain priority: medical > legal > financial; exact terminology matching takes precedence over fuzzy matching; and the latest updated version takes precedence.

[0097] Optionally, the step of filling the text to be translated and the at least one terminology glossary information into a preset prompt word template to obtain the target prompt word includes:

[0098] Based on the at least one terminology glossary information, determine the annotation content corresponding to the at least one terminology to obtain at least one basic annotation;

[0099] Based on the at least one basic annotation, a preset prompt word template is obtained by matching among multiple candidate prompt word templates.

[0100] The text to be translated and at least one basic annotation are filled into the preset prompt word template to obtain the target prompt word.

[0101] In this embodiment, after obtaining the terminology glossary, basic annotations corresponding to each term in the text to be translated are generated based on the terminology glossary. Then, the text to be translated and the basic annotations corresponding to each term are filled into a preset prompt word template to obtain target prompt words. These target prompt words are then input into a pre-trained artificial intelligence model for reasoning to generate the translated text. This embodiment integrates glossary knowledge with the original input text. Specifically, the user-input text is segmented into words, and the segmentation results are matched against corresponding keywords in the glossary. If a matching keyword is found, the keyword and its annotation are extracted as glossary knowledge and added to the prompt words. Finally, an optimized reasoning prompt is generated, guiding the model to output results according to domain specifications.

[0102] Optionally, the step of filling the text to be translated and the at least one basic annotation into the preset prompt word template to obtain the target prompt word includes:

[0103] In the text to be translated, at least one location information corresponding to the at least one technical term is determined, wherein the location information is used to indicate the position of the corresponding technical term in the text to be translated;

[0104] Based on the at least one location information, the at least one technical term is analyzed in context to determine at least one contextual information corresponding to the at least one technical term;

[0105] Based on the at least one contextual information, generate at least one contextual annotation corresponding to the at least one technical term;

[0106] The target prompt word is obtained by filling the text to be translated, at least one basic annotation, and at least one contextual annotation into the preset prompt word template.

[0107] In this embodiment, after determining the basic annotations, it is also necessary to detect whether contextual annotations are required. Basic annotations include, for example, terminology definitions and standard translations, while contextual annotations include descriptions of applicable scenarios and exclusion conditions. In some embodiments, cross-language annotations may also be included, such as multilingual equivalent term mappings.

[0108] Specifically, contextual information is obtained by analyzing the location information corresponding to professional terms, and at least one contextual annotation is obtained for each professional term based on the contextual information.

[0109] like Figure 4 As shown, Figure 4 This is a flowchart illustrating the Prompt generation process in this embodiment. The Prompt template library includes: a translation scenario: "Please translate the following text into {language}, paying attention to terminology specifications: {annotated text}". A generation scenario: "As a {domain} expert, use the following terminology specifications to generate content: {terminology list}{original text}". A question-and-answer scenario: "When answering, please prioritize using the following terminology definitions: {terminology annotation}{question}".

[0110] Annotation insertion strategies include: Direct appending after the term: suitable for short texts and single-term scenarios. Concentrated explanation before the paragraph: suitable for multi-term and complex document scenarios. Dynamic on-demand referencing: referencing annotations as needed using tags.

[0111] Optionally, the step of inputting the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining translated text, includes:

[0112] The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, and a first translation result is obtained.

[0113] The first translation result is input into the pre-trained artificial intelligence model to perform reverse translation on the first translation result, thereby obtaining the second translation result;

[0114] Calculate the similarity between the second translation result and the text to be translated to obtain a second similarity value;

[0115] If the second similarity value is greater than or equal to a preset threshold, and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated, the first translation result will be output as the translated text.

[0116] Optionally, after detecting the translation result and determining whether the translation result, including the translated content, conforms to the scenario corresponding to the text to be translated, the method further includes:

[0117] If the second similarity value is less than the preset threshold, or if the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated, a processing log is generated based on the first translation result, and the processing log includes the reasoning process of the artificial intelligence model.

[0118] The target prompt words are updated based on the processing log to obtain enhanced prompt words;

[0119] The enhanced prompt words and the context information corresponding to the first translation result are input into the pre-trained artificial intelligence model to re-translate the text to be translated, and a third translation result is obtained. The context information is the historical question and answer record corresponding to the translation result in the pre-trained artificial intelligence model.

[0120] The third translation result is input into the pre-trained artificial intelligence model, and the third translation result is reverse-translated to obtain the fourth translation result;

[0121] Calculate the similarity between the fourth translation result and the text to be translated to obtain a third similarity value;

[0122] If the third similarity value is greater than or equal to the preset threshold, and the translation scenario corresponding to the third translation result is the same as the scenario corresponding to the text to be translated, the third translation result will be output as the translated text.

[0123] In this embodiment, when the text to be translated is translated using a pre-trained artificial intelligence model, a first translation result is obtained. The accuracy of the first translation result needs to be verified. Specifically, the first translation result can be reverse-translated to obtain a second translation result. The language of the second translation result is the same as that of the text to be translated. The similarity between the second translation result and the text to be translated is then calculated to obtain a second similarity value. If the second similarity value meets a preset threshold, such as 90%, and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated, the first translation result is output as the translated text. For example, if the translation scenario corresponding to the first translation result is a medical scenario, and the scenario corresponding to the text to be translated is also a medical scenario, then the first translation result is output as the translated text.

[0124] In addition, if the second similarity value is less than the preset threshold, or if the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated, it indicates that the accuracy of the first translation result is low and needs to be translated again. At this time, the reasoning process of the artificial intelligence model will be analyzed and a processing log will be generated.

[0125] The input target prompts are then updated based on the processing logs to obtain reinforced prompts, which help the AI ​​model better translate the text. The reinforced prompts and the context information corresponding to the first translation result are then re-inputted into the AI ​​model to translate the text again, resulting in a third translation result. The context information consists of historical question-and-answer records corresponding to the translation result in the AI ​​model, such as previous question-and-answer content. Similar to the first translation result, the accuracy of the third translation result also needs to be verified.

[0126] In this embodiment, after obtaining the translated text, it is necessary to perform result verification to confirm whether the translated text conforms to the scenario corresponding to the text to be translated. If the translation result verification passes, the translation result is output as the translated text. If the translation result verification fails, the log is reprocessed, and enhanced prompt words are generated based on the processing log. The translated content is then retranslated using the enhanced prompt words to obtain the target translation result.

[0127] like Figure 5 The diagram shows the flowchart for verifying the inference results in this embodiment. The verification dimensions include: Terminology translation consistency: checking whether the output terms are consistent with the vocabulary mapping; Definition accuracy: verifying whether the term explanations conform to domain standards; Contextual applicability: confirming whether the term usage scenario is correct; Multilingual consistency: the uniformity of term translation in cross-language scenarios. When verification fails, a reinforced Prompt containing conflict markers is generated (in the re-inference mechanism, a conflict marker is a special marker used to identify contradictions, inconsistencies, or unexpected situations during the inference process. When verification fails, it indicates that the inference result conflicts with certain established rules, facts, or expectations, and a reinforced Prompt containing conflict markers needs to be generated for further analysis and problem-solving). The model is highlighted to pay attention to the correct use of specific terms. A threshold for the number of re-inference attempts can be set.

[0128] like Figure 6 The diagram shows the log processing flowchart in this embodiment. The log entries include: Term matching details: matching location, triggering rules, and annotation content; Inference process: time consumed at each stage and intermediate result summaries; Result verification: details of passed / failed items and reasons for conflicts; Visual monitoring metrics include: Thesaurus usage rate: the percentage of text matching terms from the thesaurus; Error correction rate: the percentage reduction in errors after thesaurus intervention; Scene distribution: the time distribution and percentage of requests from different domains; Inference efficiency: average response time and resource consumption.

[0129] In this patented technical solution, the core positioning of the large model is to focus on deepening two core capabilities, rather than pursuing all-round performance in various vertical fields: On the one hand, by optimizing the underlying logic of machine translation, the model's ability to accurately understand and convert multilingual contexts is strengthened, ensuring that in different scenarios such as medical care and cross-border e-commerce, it can complete standardized translation based on the professional terminology mapping provided by the vocabulary (such as the correspondence between "CAR-T cell therapy" and "Chimeric Antigen Receptor T-Cell Therapy", and the multilingual matching of "bonded warehouse" and "bonded warehouse"); On the other hand, the model focuses on improving the execution accuracy of vocabulary-attached instructions, including accurately identifying term definitions, context rules (such as "Li Bo" in the medical scenario should be translated as "Dr. Li"), and exclusion conditions (such as the distinction between "leverage" in the financial and mechanical scenarios), ensuring that the generation of results strictly follows the vocabulary constraints during the inference process.

[0130] This design achieves lightweight optimization through "capability stripping": the professional knowledge of vertical domains (such as clinical definitions of medical terms and industry standards for financial terms) is entirely carried by a dynamic vocabulary. Large models do not need to memorize the detailed knowledge of each domain during training; they only need to focus on the stability of the two fundamental capabilities of "translation and conversion" and "instruction execution." For example, in medical literature translation, the model does not need to understand the specific treatment principle of "CAR-T cell therapy," but only needs to accurately translate it into the corresponding English according to the vocabulary instructions and associate it with annotations. In cross-border e-commerce customer service scenarios, there is no need to master the policy background of customs terminology; it only needs to accurately map multilingual terms based on the vocabulary. This model reduces the capability requirements of the model itself and achieves cross-domain adaptation through dynamic vocabulary updates, avoiding the problems of high training costs and low adaptation efficiency caused by the need for models to cover multiple domains of knowledge in traditional solutions.

[0131] The following example illustrates the precise cross-language translation of medical literature:

[0132] I. Accurate cross-language translation of medical literature

[0133] Application Background:

[0134] In international medical research collaborations, it is necessary to translate Chinese medical literature into English quickly and accurately. However, traditional machine translation models often mistranslate professional terms, such as translating "CAR-T cell therapy" as "ordinary cell therapy," which affects the accuracy of academic communication.

[0135] Application steps:

[0136] enter

[0137] The Chinese text to be translated reads: "This study explored the clinical efficacy of CAR-T cell therapy in the treatment of lymphoma, with a complete remission rate of 75% in patients."

[0138] Medical Terminology (Partial):

[0139] {

[0140] "Term Mapping": {

[0141] "CAR-T cell therapy": {

[0142] "English": "Chimeric Antigen Receptor T-Cell Therapy",

[0143] Note: "A cancer immunotherapy using genetically engineered T cells"

[0144] },

[0145] "Lymphoma": {

[0146] English: "Lymphoma"

[0147] Note: "Malignant tumors originating from the lymphohematopoietic system"

[0148] },

[0149] "Complete remission rate": {

[0150] "English": "Complete Response Rate",

[0151] Note: "Percentage of patients whose tumors completely disappeared after cancer treatment"

[0152] }

[0153] },

[0154] "Contextual Rules": [

[0155] {

[0156] "Matching pattern": ["treatment", "clinical", "oncology"],

[0157] "Exclusion mode": ["Automotive", "Transportation"],

[0158] Terminology: CAR-T cell therapy

[0159] } ]

[0161] }

[0162] Processing flow:

[0163] 1. Terminology Loading and Caching: When the device starts up, the core medical terminology is loaded into memory, and the high-frequency term "CAR-T cell therapy" is cached.

[0164] 2. Text parsing and term matching:

[0165] The preprocessing module parses the input text and detects terms such as "CAR-T cell therapy" and "lymphoma".

[0166] The prefix tree index is used to quickly locate entries in the thesaurus, and contextual keywords such as "treatment" and "clinical" are used to confirm that the entry belongs to the medical scenario (excluding false matches in the automotive field).

[0167] 3. Prompt Dynamic Stitching:

[0168] Add the thesaurus note after the term: "CAR-T cell therapy (Chimeric Antigen Receptor T-Cell Therapy, a cancer immunotherapy that uses genetically engineered T cells)".

[0169] The optimized translation prompt reads: "Please translate the following text into English, paying attention to the standardization of technical terms: This study investigated the clinical efficacy of CAR-T cell therapy (Chimeric Antigen Receptor T-Cell Therapy, a cancer immunotherapy that uses genetically engineered T cells) in the treatment of lymphoma (a malignant tumor originating from the lymphohematopoietic system), and the complete response rate (the proportion of patients whose tumors completely disappeared after cancer treatment) reached 75%."

[0170] 4. Incremental reasoning and result verification:

[0171] The incremental reasoning module only performs differential calculations on the terminology annotation section, reusing the historical translation context state.

[0172] The result validator verifies translation consistency based on a medical terminology database, such as checking whether "CAR-T cell therapy" corresponds to the standard full English name.

[0173] Output:

[0174] Optimized English translation: "This study investigates the clinical efficacy ofChimeric Antigen Receptor T-Cell Therapy (a cancer immunotherapy that genetically engineers T cells) in the treatment of Lymphoma, with a completeresponse rate of 75% observed in patients."

[0175] Inference log records:

[0176] [2025-05-28 10:30:22] The term "CAR-T cell therapy" matched the medical scenario in paragraph 1, triggering English translation and annotation.

[0177] [2025-05-28 10:30:23] The translation result passed the terminology consistency check, taking 476ms.

[0178] The following example illustrates a multilingual customer service scenario in cross-border e-commerce:

[0179] Application Background:

[0180] Cross-border e-commerce platforms need to handle customer service inquiries in Chinese, English, and Japanese simultaneously. However, traditional models cannot accurately handle the mapping of multilingual terms (such as "bonded warehouse" corresponding to "bonded warehouse"). Furthermore, when adding new product terms, the model needs to be retrained, which cannot meet the real-time requirements.

[0181] Application steps:

[0182] enter:

[0183] Japanese customer service consultation: "What is the delivery time of the goods in the bonded warehouse? What is the delivery time?"

[0184] Cross-border e-commerce terminology (multilingual section):

[0185] {

[0186] Multilingual mapping: {

[0187] "Bonded Warehouse": {

[0188] "English": "bonded warehouse",

[0189] Japanese: "bonded warehouse"

[0190] "Note": "A warehouse established with customs approval specifically for storing bonded goods and other goods for which customs formalities have not been completed."

[0191] },

[0192] "Outload": {

[0193] Chinese: "Shipping",

[0194] English: "shipping"

[0195] Note: "The logistics process of goods being shipped from the warehouse."

[0196] },

[0197] "delivery time": {

[0198] Chinese: "Delivery Time",

[0199] "English": "delivery time",

[0200] Note: "The time interval from when the product is shipped to when it reaches the consumer."

[0201] }

[0202] },

[0203] "Scene Tag Rules": [

[0204] {

[0205] Language: Japanese

[0206] Keywords: ["bonded warehouse", "shipment"]

[0207] Scenario: Customs and Logistics Consulting

[0208] }

[0209] ],

[0210] "New Terminology": {

[0211] "Cross-border E-commerce Comprehensive Pilot Zone": {

[0212] "English": "Cross-border E-commerce Comprehensive Pilot Zone",

[0213] "Japanese": "Cross-border EC joint examination area",

[0214] Effective Date: 2025-05-20

[0215] }

[0216] }

[0217] }

[0218] Processing flow:

[0219] 1. Dynamic activation of multilingual vocabulary:

[0220] Detect that the input is Japanese, and automatically activate the Japanese-Chinese-English trilingual mapping vocabulary

[0221] Since the current time (May 28, 2025) exceeds the effective time of the "Cross-border E-commerce Comprehensive Pilot Zone", this term enters the active state

[0222] 2. Cross-language term matching and disambiguation:

[0223] Parse the Japanese text, identify terms such as "保税倉庫" and "出荷", and match the multilingual mapping in the vocabulary

[0224] Exclude the ambiguity of "倉庫" in other scenarios (such as factory warehouse) through the "Customs and Logistics Consultation" scenario label

[0225] 3. Multi-dimensional response generation:

[0226] Language conversion layer: Translate "保税倉庫" into Chinese "保税仓" and attach the English note "bonded warehouse"

[0227] Rule response layer: Generate explanatory content based on the note of "保税仓" in the vocabulary: "A bonded warehouse is a warehouse specially established with the approval of the customs to store bonded goods and other goods for which the customs formalities have not been completed."

[0228] Dynamic supplement layer: Detect the term "Cross-border E-commerce Comprehensive Pilot Zone" which is not mentioned in the consultation but is relevant, and actively insert an explanation ("The goods of this product are shipped from the Cross-border E-commerce Comprehensive Pilot Zone in Hangzhou (Cross-border E-commerce Comprehensive Pilot Zone, 越境 EC 総合試験区), and the customs clearance efficiency is increased by 30%")

[0229] 4. Response result verification:

[0230] The result validator checks the consistency of multilingual terms (such as whether "保税倉庫" is uniformly mapped to "保税仓" and "bonded warehouse")

[0231] Verify whether the response content complies with the customs regulations term specification

[0232] Output:

[0233] Chinese customer service response:

[0234] Hello, this product is shipped from a bonded warehouse (a warehouse established with customs approval specifically for storing bonded goods and other goods for which customs formalities have not yet been completed). Regarding delivery time, since the shipping location is in the Hangzhou Cross-border E-commerce Comprehensive Pilot Zone, customs clearance efficiency is improved by 30%, and delivery is expected within 3-5 business days.

[0235] Reasoning logs and interpretability records:

[0236] [2025-05-28 14:15:37] The Japanese term "bonded warehouse" was matched with a multilingual mapping, triggering a Chinese translation and English annotation.

[0237] [2025-05-28 14:15:38] Actively inserting explanation of the term "Cross-border E-commerce Comprehensive Pilot Zone" (detecting that users may be interested in the pilot zone policy)

[0238] Thesaurus usage statistics:

[0239] Multilingual terminology hit rate: 100% (all 3 key terms are accurately mapped)

[0240] Usage rate of the new term: 1 time ("Cross-border e-commerce comprehensive pilot zone" was used for the first time in a customer service scenario).

[0241] This application detects at least one technical term in the received text to be translated, thereby identifying it. It then retrieves the corresponding technical term glossary from a thesaurus database, fills the glossary information of at least one technical term into a preset prompt word template, and performs translation based on a pre-trained artificial intelligence model. This approach fully integrates the domain and corresponding technical terminology of the text during the translation process, ensuring accuracy and improving translation quality.

[0242] See Figure 7 , Figure 7 This is a structural diagram of the translation device based on an artificial intelligence model provided in the embodiments of this application, as shown below. Figure 7 The translation device 700 based on an artificial intelligence model shown includes:

[0243] The detection module 710 is used to perform text detection on the input text to be translated and determine that the text to be translated includes at least one technical term.

[0244] The matching module 720 is used to perform matching in a terminology database based on the at least one professional term to determine at least one terminology terminology information corresponding to the at least one professional term, wherein the terminology terminology information includes the annotation content of the corresponding professional term.

[0245] The input module 730 is used to input the text to be translated and the at least one terminology glossary into a preset prompt word template to obtain the target prompt word;

[0246] The translation module 740 is used to input the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining the translated text.

[0247] Optionally, the detection module 710 includes:

[0248] The first processing submodule is used to perform text preprocessing on the input text to be translated to obtain the processed text. The preprocessing includes text cleaning and standardization.

[0249] The second processing submodule is used to perform word segmentation on the processed text according to part-of-speech tags to obtain multiple word segments.

[0250] The first detection submodule is used to detect the multiple word segments and identify at least one technical term among the multiple word segments.

[0251] Optionally, the matching module 720 includes:

[0252] The first determining submodule is used to determine the frequency label corresponding to each of the technical terms, wherein the frequency label includes a first label and a second label, and the frequency corresponding to the first label is higher than the frequency corresponding to the second label.

[0253] The first calculation submodule is used to calculate the similarity value between the technical term and multiple candidate scene labels to obtain multiple first similarity values ​​corresponding to the multiple candidate scenes;

[0254] The second determining submodule determines the candidate scene label corresponding to the target similarity value as the scene label corresponding to the professional term. The scene label is used to represent the scene information in which the professional term is applied. The target similarity is the largest first similarity value among the plurality of first similarity values.

[0255] The second calculation submodule is used to generate weight information based on the frequency label and the scene label, and to perform weight calculation on multiple candidate scenes to obtain multiple calculation results corresponding to the multiple candidate scenes.

[0256] The third determination submodule is used to determine the candidate scene corresponding to the target calculation result as the target scene corresponding to the professional term, wherein the target calculation result is the largest calculation result among the multiple calculation results;

[0257] The fourth determination submodule is used to perform matching in the terminology database based on the target scenario to determine the terminology information corresponding to each terminology.

[0258] Optionally, the terminology glossary information includes at least one of the following: terminology mapping relationships, terminology context rules, and terminology translation priorities.

[0259] Optionally, the fill module 730 includes:

[0260] The first generation submodule is used to determine the annotation content corresponding to the at least one professional term based on the at least one professional term vocabulary information, and to obtain at least one corresponding basic annotation.

[0261] The matching submodule is used to match multiple candidate prompt word templates based on the at least one basic annotation to obtain a preset prompt word template.

[0262] The filling submodule is used to fill the text to be translated and the at least one basic annotation into the preset prompt word template to obtain the target prompt word.

[0263] Optionally, the submodules to be filled include:

[0264] The first determining unit is configured to determine at least one location information corresponding to the at least one technical term in the text to be translated, wherein the location information is used to indicate the position of the corresponding technical term in the text to be translated;

[0265] The second determining unit is used to perform context analysis on the at least one professional term based on the at least one location information, and determine at least one contextual information corresponding to the at least one professional term;

[0266] A generation unit is configured to generate at least one contextual annotation corresponding to the at least one technical term based on the at least one contextual information.

[0267] The input unit is used to input the text to be translated, the at least one basic annotation, and the at least one contextual annotation into the preset prompt word template to obtain the target prompt word.

[0268] Optionally, the translation module 740 includes:

[0269] The first translation submodule is used to input the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated and obtain a first translation result;

[0270] The second translation submodule is used to input the first translation result into the pre-trained artificial intelligence model, perform reverse translation on the first translation result, and obtain the second translation result;

[0271] The third calculation submodule is used to calculate the similarity between the second translation result and the text to be translated, and obtain a second similarity value;

[0272] The first output submodule is used to output the first translation result as translated text when the second similarity value is greater than or equal to a preset threshold and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated.

[0273] Optional, also includes:

[0274] The second generation submodule is used to generate a processing log based on the first translation result when the second similarity value is less than the preset threshold, or when the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated. The processing log includes the reasoning process of the artificial intelligence model.

[0275] The update submodule is used to update the target prompt words according to the processing log to obtain enhanced prompt words;

[0276] The third translation submodule is used to input the enhanced prompt words and the context information corresponding to the first translation result into the pre-trained artificial intelligence model to re-translate the text to be translated and obtain the third translation result. The context information is the historical question and answer record corresponding to the translation result in the pre-trained artificial intelligence model.

[0277] The fourth translation submodule is used to input the third translation result into the pre-trained artificial intelligence model, and to perform reverse translation on the third translation result to obtain the fourth translation result;

[0278] The fourth calculation submodule is used to calculate the similarity between the fourth translation result and the text to be translated, and obtain the third similarity value;

[0279] The second output submodule is used to output the third translation result as translated text when the third similarity value is greater than or equal to the preset threshold and the translation scenario corresponding to the third translation result is the same as the scenario corresponding to the text to be translated.

[0280] This application detects at least one technical term in the received text to be translated, thereby identifying it. It then retrieves the corresponding technical term glossary from a thesaurus database, fills the glossary information of at least one technical term into a preset prompt word template, and performs translation based on a pre-trained artificial intelligence model. This approach fully integrates the domain and corresponding technical terminology of the text during the translation process, ensuring accuracy and improving translation quality.

[0281] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device 800 includes a memory 810 and a processor 820. The number of processors 820 in the electronic device 800 can be one or more. Figure 8 Taking a processor 820 as an example; the memory 810 and processor 820 in the server can be connected via a bus or other means. Figure 8 Taking the example of a connection between China and Israel via a bus.

[0282] The memory 810, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the title generation method in the embodiments of this application. The processor 820 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions, and modules stored in the memory 810, thereby realizing the above-mentioned translation method based on the artificial intelligence model.

[0283] The processor 820 is used to run the computer program stored in the memory 810, and performs the following steps:

[0284] The input text to be translated is subjected to text detection to determine that the text to be translated includes at least one technical term;

[0285] Based on the at least one professional term, a match is performed in a terminology database to determine at least one terminology terminology information corresponding to the at least one professional term, the terminology terminology information including the annotation content of the corresponding professional term;

[0286] The text to be translated and the at least one terminology glossary information are filled into a preset prompt word template to obtain the target prompt word;

[0287] The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, thus obtaining the translated text.

[0288] Optionally, the step of performing text detection on the input text to be translated to determine that the text to be translated includes at least one technical term, including:

[0289] The input text to be translated is preprocessed to obtain the processed text. The preprocessing includes text cleaning and standardization.

[0290] The processed text is segmented according to part-of-speech tags to obtain multiple segmented words.

[0291] The multiple word segments are detected, and at least one technical term is identified among the multiple word segments.

[0292] Optionally, the step of matching the at least one specialized term in a thesaurus database to determine at least one specialized term thesaurus information corresponding to the at least one specialized term includes:

[0293] For each of the technical terms, a frequency label is determined for each of the technical terms. The frequency label includes a first label and a second label, wherein the frequency corresponding to the first label is higher than the frequency corresponding to the second label.

[0294] Calculate the similarity value between the technical term and multiple candidate scene tags to obtain multiple first similarity values ​​corresponding to the multiple candidate scenes;

[0295] The candidate scene label corresponding to the target similarity value is determined as the scene label corresponding to the professional term. The scene label is used to represent the scene information in which the professional term is applied. The target similarity is the largest first similarity value among the plurality of first similarity values.

[0296] Weight information is generated based on the frequency label and the scene label, and weights are calculated for multiple candidate scenes to obtain multiple calculation results corresponding to the multiple candidate scenes;

[0297] The candidate scenario corresponding to the target calculation result is determined as the target scenario corresponding to the technical term, and the target calculation result is the largest calculation result among the multiple calculation results;

[0298] Based on the target scenario, matching is performed in the terminology database to determine the terminology information corresponding to each term.

[0299] Optionally, the terminology glossary information includes at least one of the following: terminology mapping relationships, terminology context rules, and terminology translation priorities.

[0300] Optionally, the step of filling the text to be translated and the at least one terminology glossary information into a preset prompt word template to obtain the target prompt word includes:

[0301] Based on the at least one terminology glossary information, determine the annotation content corresponding to the at least one terminology to obtain at least one basic annotation;

[0302] Based on the at least one basic annotation, a preset prompt word template is obtained by matching among multiple candidate prompt word templates.

[0303] The text to be translated and at least one basic annotation are filled into the preset prompt word template to obtain the target prompt word.

[0304] Optionally, the step of filling the text to be translated and the at least one basic annotation into the preset prompt word template to obtain the target prompt word includes:

[0305] In the text to be translated, at least one location information corresponding to the at least one technical term is determined, wherein the location information is used to indicate the position of the corresponding technical term in the text to be translated;

[0306] Based on the at least one location information, the at least one technical term is analyzed in context to determine at least one contextual information corresponding to the at least one technical term;

[0307] Based on the at least one contextual information, generate at least one contextual annotation corresponding to the at least one technical term;

[0308] The target prompt word is obtained by filling the text to be translated, at least one basic annotation, and at least one contextual annotation into the preset prompt word template.

[0309] Optionally, the step of inputting the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining translated text, includes:

[0310] The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, and a first translation result is obtained.

[0311] The first translation result is input into the pre-trained artificial intelligence model to perform reverse translation on the first translation result, thereby obtaining the second translation result;

[0312] Calculate the similarity between the second translation result and the text to be translated to obtain a second similarity value;

[0313] If the second similarity value is greater than or equal to a preset threshold, and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated, the first translation result will be output as the translated text.

[0314] Optionally, after detecting the translation result and determining whether the translation result, including the translated content, conforms to the scenario corresponding to the text to be translated, the method further includes:

[0315] If the second similarity value is less than the preset threshold, or if the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated, a processing log is generated based on the first translation result, and the processing log includes the reasoning process of the artificial intelligence model.

[0316] The target prompt words are updated based on the processing log to obtain enhanced prompt words;

[0317] The enhanced prompt words and the context information corresponding to the first translation result are input into the pre-trained artificial intelligence model to re-translate the text to be translated, and a third translation result is obtained. The context information is the historical question and answer record corresponding to the translation result in the pre-trained artificial intelligence model.

[0318] The third translation result is input into the pre-trained artificial intelligence model, and the third translation result is reverse-translated to obtain the fourth translation result;

[0319] Calculate the similarity between the fourth translation result and the text to be translated to obtain a third similarity value;

[0320] If the third similarity value is greater than or equal to the preset threshold, and the translation scenario corresponding to the third translation result is the same as the scenario corresponding to the text to be translated, the third translation result will be output as the translated text.

[0321] This application detects at least one technical term in the received text to be translated, thereby identifying it. It then retrieves the corresponding technical term glossary from a thesaurus database, fills the glossary information of at least one technical term into a preset prompt word template, and performs translation based on a pre-trained artificial intelligence model. This approach fully integrates the domain and corresponding technical terminology of the text during the translation process, ensuring accuracy and improving translation quality.

[0322] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by hardware related to program instructions, and the program can be stored in a readable medium.

[0323] This disclosure also provides a readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described functions. Figure 1 Any step in the corresponding method embodiment can achieve the same technical effect, and will not be repeated here to avoid repetition.

[0324] The computer-readable storage medium of this disclosure can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0325] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0326] The program code contained on the storage medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0327] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0328] The above description represents the preferred embodiments of this disclosure. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles described herein, and these improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

1. A translation method based on an artificial intelligence model, characterized in that, The method includes: The input text to be translated is subjected to text detection to determine that the text to be translated includes at least one technical term; Based on the at least one professional term, a match is performed in a terminology database to determine at least one terminology terminology information corresponding to the at least one professional term, the terminology terminology information including the annotation content of the corresponding professional term; The text to be translated and the at least one terminology glossary information are filled into a preset prompt word template to obtain the target prompt word; The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, thus obtaining the translated text.

2. The method according to claim 1, characterized in that, The step of performing text detection on the input text to be translated, and determining that the text to be translated includes at least one technical term, includes: The input text to be translated is preprocessed to obtain the processed text. The preprocessing includes text cleaning and standardization. The processed text is segmented according to part-of-speech tags to obtain multiple segmented words. The multiple word segments are detected, and at least one technical term is identified among the multiple word segments.

3. The method according to claim 1, characterized in that, The step of matching the at least one specialized term in a thesaurus database to determine at least one specialized term thesaurus information corresponding to the at least one specialized term includes: For each of the technical terms, a frequency label is determined for each of the technical terms. The frequency label includes a first label and a second label, wherein the frequency corresponding to the first label is higher than the frequency corresponding to the second label. Calculate the similarity value between the technical term and multiple candidate scene tags to obtain multiple first similarity values ​​corresponding to the multiple candidate scenes; The candidate scene label corresponding to the target similarity value is determined as the scene label corresponding to the professional term. The scene label is used to represent the scene information in which the professional term is applied. The target similarity is the largest first similarity value among the plurality of first similarity values. Weight information is generated based on the frequency label and the scene label, and weights are calculated for multiple candidate scenes to obtain multiple calculation results corresponding to the multiple candidate scenes; The candidate scenario corresponding to the target calculation result is determined as the target scenario corresponding to the technical term, and the target calculation result is the largest calculation result among the multiple calculation results; Based on the target scenario, matching is performed in the terminology database to determine the terminology information corresponding to each term.

4. The method according to claim 3, characterized in that, The terminology glossary information includes at least one of the following: terminology mapping relationships, terminology context rules, and terminology translation priorities.

5. The method according to claim 1, characterized in that, The step of filling the text to be translated and the at least one terminology glossary information into a preset prompt word template to obtain the target prompt word includes: Based on the at least one terminology glossary information, determine the annotation content corresponding to the at least one terminology, and obtain at least one corresponding basic annotation; Based on the at least one basic annotation, a preset prompt word template is obtained by matching among multiple candidate prompt word templates. The text to be translated and at least one basic annotation are filled into the preset prompt word template to obtain the target prompt word.

6. The method according to claim 5, characterized in that, The process of filling the text to be translated and the at least one basic annotation into the preset prompt word template to obtain the target prompt word includes: In the text to be translated, at least one location information corresponding to the at least one technical term is determined, wherein the location information is used to indicate the position of the corresponding technical term in the text to be translated; Based on the at least one location information, the at least one technical term is analyzed in context to determine at least one contextual information corresponding to the at least one technical term; Based on the at least one contextual information, generate at least one contextual annotation corresponding to the at least one technical term; The target prompt word is obtained by filling the text to be translated, at least one basic annotation, and at least one contextual annotation into the preset prompt word template.

7. The method according to claim 1, characterized in that, The step of inputting the target prompt word into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining translated text, includes: The target prompt is input into a pre-trained artificial intelligence model to translate the text to be translated, and a first translation result is obtained. The first translation result is input into the pre-trained artificial intelligence model to perform reverse translation on the first translation result, thereby obtaining the second translation result; Calculate the similarity between the second translation result and the text to be translated to obtain a second similarity value; If the second similarity value is greater than or equal to a preset threshold, and the translation scenario corresponding to the first translation result is the same as the scenario corresponding to the text to be translated, the first translation result will be output as the translated text.

8. The method according to claim 7, characterized in that, After calculating the similarity between the second translation result and the text to be translated to obtain a second similarity value, the method further includes: If the second similarity value is less than the preset threshold, or if the translation scenario corresponding to the first translation result is different from the scenario corresponding to the text to be translated, a processing log is generated based on the first translation result, and the processing log includes the reasoning process of the artificial intelligence model. The target prompt words are updated based on the processing log to obtain enhanced prompt words; The enhanced prompt words and the context information corresponding to the first translation result are input into the pre-trained artificial intelligence model to re-translate the text to be translated, and a third translation result is obtained. The context information is the historical question and answer record corresponding to the translation result in the pre-trained artificial intelligence model. The third translation result is input into the pre-trained artificial intelligence model, and the third translation result is reverse-translated to obtain the fourth translation result; Calculate the similarity between the fourth translation result and the text to be translated to obtain a third similarity value; If the third similarity value is greater than or equal to the preset threshold, and the translation scenario corresponding to the third translation result is the same as the scenario corresponding to the text to be translated, the third translation result will be output as the translated text.

9. A translation device based on an artificial intelligence model, characterized in that, The device includes: The detection module is used to perform text detection on the input text to be translated and determine that the text to be translated includes at least one technical term. The matching module is used to perform matching in a thesaurus database based on the at least one professional term to determine at least one professional term thesaurus information corresponding to the at least one professional term, wherein the professional term thesaurus information includes the annotation content of the corresponding professional term. The input module is used to input the text to be translated and the at least one terminology glossary into a preset prompt word template to obtain the target prompt word; The translation module is used to input the target prompt words into a pre-trained artificial intelligence model to translate the text to be translated, thereby obtaining the translated text.

10. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 8.

12. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 8.