Text translation method and apparatus, electronic device, and medium
By combining target language features and a large model to perform multi-dimensional semantic similarity quantification calculations, and incorporating manual adjustments, the problems of semantic bias and inefficiency in existing text translation are solved, achieving efficient and accurate translation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN STARCAM TECH
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-23
AI Technical Summary
Existing text translation methods cannot accurately identify core semantic biases, are inefficient, cannot perform semantic consistency analysis from multiple dimensions, and are subject to endless iterations or incomplete adjustments.
By combining the expression norms, common cultural characteristics, and language habits of the target language group for adaptation translation, a single pre-set large model is used to perform multi-dimensional semantic similarity quantification calculation, and a manual adjustment step is introduced when the automatic adjustment of the model is ineffective, and a threshold for the number of iterations is set.
It improves the accuracy and efficiency of text translation, ensures that the translation results meet user needs, avoids semantic deviations, and optimizes the user experience.
Smart Images

Figure CN122263907A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, specifically to a text translation method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of natural language processing technology, machine translation technology has been widely applied to various cross-language text dissemination scenarios. By converting the text to be translated from the source language to the target language, it enables the cross-regional and cross-language transmission of text information.
[0003] Existing text translation methods typically perform a single-dimensional language conversion. However, judging translation effectiveness solely through literal textual comparison cannot quantitatively analyze the semantic consistency between the source and translated texts from multiple dimensions. This makes it difficult to accurately identify core semantic deviations, logical inconsistencies, and other issues. Furthermore, some methods do not set reasonable thresholds for the number of iterations, which can easily lead to infinite iterations or incomplete adjustments, significantly reducing translation efficiency. Therefore, current text translation solutions are neither accurate nor efficient. Summary of the Invention
[0004] This application provides a text translation method, electronic device, apparatus, and storage medium to improve the accuracy and efficiency of text translation.
[0005] In a first aspect, embodiments of this application provide a text translation method, including: The system obtains the text to be translated and the target language input by the user, and performs translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text. The translated text is back-translated into its original language to obtain a reference text in the same language as the text to be translated. The semantic similarity between the text to be translated and the reference text is determined by a pre-set large model. If the semantic similarity is lower than a preset value, the translated text is adjusted according to the semantic similarity and the large model, and the process returns to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; In response to the user's confirmation of the translated text, the translated text is output.
[0006] Optionally, in some embodiments of this application, the step of translating the text to be translated based on the target language and common cultural characteristics to obtain the translated text includes: Obtain the expression norms, common regional cultural characteristics, and basic language habits of the target language's user group; Based on the aforementioned expression norms, common regional cultural characteristics, and the basic language habits of the target user group, the text to be translated is processed to obtain the translated text.
[0007] Optionally, in some embodiments of this application, determining the semantic similarity between the text to be translated and the reference text using a preset large model includes: The preset semantic analysis dimensions are determined through the large model; Based on the semantic analysis dimensions, the large model performs dimensional similarity quantification on the text to be translated and the reference text to obtain similarity quantification values for each dimension; Based on the preset weights of each dimension, the large model performs a weighted calculation of the similarity quantification values of each dimension to obtain the semantic similarity between the text to be translated and the reference text.
[0008] Optionally, in some embodiments of this application, adjusting the translated text based on the semantic similarity and the large model includes: Based on the large model, the numerical value of the semantic similarity, and the distribution of low similarity dimensions, the content corresponding to the low similarity dimensions in the translated text is adjusted. During the adjustment process, the core semantics of the text to be translated and the expression habits of the source language are preserved, and the cultural characteristics and expression norms of the target language are adapted.
[0009] Optionally, in some embodiments of this application, it further includes: When the semantic similarity is lower than a preset value, the translated text is adjusted and the relevant steps are repeated. If the number of iterations reaches the threshold but the semantic similarity is still lower than the preset value, the large model outputs translation text adjustment and optimization suggestions. Based on the adjustment and optimization suggestions, the translated text is manually adjusted, and the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model is executed again until the semantic similarity is higher than the preset value.
[0010] Optionally, in some embodiments of this application, after obtaining the user-inputted text to be translated and the target language, and before performing translation processing on the text to be translated based on the target language and common cultural characteristics, the method further includes: Redundant information, garbled characters, invalid symbols, and non-textual information in the text to be translated are removed to obtain a standardized text to be translated. The translation processing of the text to be translated based on the target language and common cultural characteristics includes: translating the standardized text to be translated based on the target language and common cultural characteristics.
[0011] Optionally, in some embodiments of this application, it further includes: Identify the core language of the standardized text to be translated; The core expression language is determined as the benchmark language for the back-translation of the translated text.
[0012] Optionally, in some embodiments of this application, it further includes: In the interactive translation mode, the text to be translated and the selected target language information are displayed. After completing the translation and back-translation of the text to be translated, the translated text, the reference text, and the semantic similarity between the text to be translated and the reference text are displayed. During the iterative adjustment of the translated text, the translated text after each round of adjustment and the corresponding semantic similarity change information are displayed in real time. After the semantic compliance verification is completed using the large model, the translated text, the large model verification report, and the semantic similarity data are displayed simultaneously. In response to the user's confirmation of the translated text, the translated text is displayed.
[0013] Optionally, in some embodiments of this application, displaying the translated text, the reference text, and the semantic similarity between the text to be translated and the reference text includes: The display interface is divided into areas for displaying the text to be translated, the text to be translated, the reference text, and the similarity display. In the reference text display area, parts that are semantically inconsistent with the text to be translated are marked and displayed; The similarity display area displays the quantitative values of semantic similarity and the distribution information of low similarity dimensions.
[0014] Secondly, embodiments of this application provide a text translation device, including: The acquisition module is used to acquire the text to be translated and the target language input by the user, and to translate the text to be translated based on the target language and common cultural characteristics to obtain the translated text; The processing module is used to perform source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated. The determination module is used to determine the semantic similarity between the text to be translated and the reference text using a preset large model; An adjustment module is used to adjust the translated text based on the semantic similarity and the large model if the semantic similarity is lower than a preset value, and then return to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; The output module is used to output the translated text in response to the user's confirmation operation on the translated text.
[0015] Accordingly, this application also provides an electronic device, including a memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as described in any of the methods above.
[0016] This application also provides a storage medium storing a processor program that, when executed by a processor, implements any of the methods described above.
[0017] This application provides a text translation method, apparatus, electronic device, and storage medium. It acquires user-inputted text to be translated and a target language, and performs translation processing on the text to be translated based on the target language and common cultural characteristics. After obtaining the translated text, it performs source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated. A preset large-scale model is used to determine the semantic similarity between the text to be translated and the reference text. If the semantic similarity is lower than a preset value, the translated text is adjusted according to the semantic similarity and the large-scale model, and the process returns to the step of determining the semantic similarity between the text to be translated and the reference text using the preset large-scale model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value. Finally, in response to user input regarding the translated text... The process involves confirming the translation and outputting the translated text. The solution provided in this application addresses the problem of poor cultural adaptability in existing methods by combining the target language's expression norms, common cultural characteristics, and the language habits of the user group for adaptation translation. A single, pre-defined large model is used to achieve multi-dimensional quantitative calculation of semantic similarity and targeted adjustments to the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation. An iteration adjustment threshold is set, introducing manual adjustment when automatic model adjustment is ineffective, thus avoiding infinite iteration while ensuring adjustment effectiveness. A user confirmation interaction step is added to ensure that the translation results meet the user's actual needs. Simultaneously, the translation process is visualized, allowing users to intuitively grasp the entire process of translation, verification, and adjustment. Therefore, the accuracy and efficiency of general text translation are improved, and the user's translation experience is optimized. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the text translation method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the text translation device provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0021] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0022] It should be noted that by combining the target language's expression norms, common cultural characteristics, and the language habits of the user group for adaptation translation, the problem of poor cultural adaptability in existing methods is solved. A single pre-set large model is used to achieve multi-dimensional quantitative calculation of semantic similarity and targeted adjustments to the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation. An iteration adjustment threshold is set, introducing a manual adjustment step when automatic model adjustment is ineffective, thus avoiding infinite iteration while ensuring adjustment effectiveness. A user confirmation interaction step is added to ensure that the translation results meet the actual needs of users. Simultaneously, the translation process is visualized, allowing users to intuitively grasp the entire process of translation, verification, and adjustment. Therefore, the accuracy and efficiency of general text translation are improved, and the user's translation experience is optimized.
[0023] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0024] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0025] The following describes in detail the embodiments involved in this application. It should be noted that the order of description of the embodiments in this application is not intended to limit the priority of the embodiments.
[0026] This application provides a text translation method, apparatus, storage medium, and smart terminal. Specifically, the text translation method of this application can be executed by a smart terminal or a server, wherein the smart terminal can be a terminal. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other smart terminal. The terminal may also include a client, which can be a media playback client or an instant text translation client, etc.
[0027] This application provides a text translation method, which can be executed by an electronic device or a server. This application example illustrates the text translation method executed by an electronic device. The electronic device includes a touchscreen display and a processor. The touchscreen display is used to present a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. When the user operates the GUI through the touchscreen display, the GUI can control the local content of the electronic device in response to the received operation commands, or it can control the content on the server side in response to the received operation commands.
[0028] The text translation solution provided in this application addresses the problem of poor cultural adaptability in existing methods by adapting the translation to the target language's expression norms, common cultural characteristics, and the language habits of the user group. It employs a single, pre-defined large model to achieve multi-dimensional quantitative calculation of semantic similarity and targeted adjustments to the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation. A threshold for the number of iterations is set, introducing manual adjustments when automatic model adjustments are ineffective, thus avoiding infinite iterations while ensuring adjustment effectiveness. A user confirmation interaction step is added to ensure that the translation results meet the actual needs of users. Simultaneously, the translation process is visualized, allowing users to intuitively grasp the entire process of translation, verification, and adjustment. Therefore, the accuracy and efficiency of general text translation are improved, and the user's translation experience is optimized.
[0029] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0030] A text translation method includes: acquiring a text to be translated and a target language input by a user; translating the text to be translated based on the target language and common cultural features to obtain a translated text; performing a source language back-translation on the translated text to obtain a reference text in the same language as the text to be translated; determining the semantic similarity between the text to be translated and the reference text using a preset large model; if the semantic similarity is lower than a preset value, adjusting the translated text according to the semantic similarity and the large model, and returning to the step of determining the semantic similarity between the text to be translated and the reference text using a preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; and outputting the translated text in response to a user's confirmation operation on the translated text.
[0031] Please see Figure 1 , Figure 1 This application provides a flowchart illustrating the text translation method. The specific flow of this text translation method is as follows: 101. Obtain the text to be translated and the target language input by the user, and perform translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text.
[0032] Users input the text to be translated through the input interface of the electronic device and select the target language to be converted through the target language selection control. The processor of the electronic device receives and stores the user's input text to be translated and the selected target language information.
[0033] Before translating the text to be translated, the processor performs text preprocessing to remove redundant information, garbled characters, invalid symbols, and non-textual information. Redundant information includes meaningless repetitions and irrelevant spaces; garbled characters include text errors caused by input or transmission; invalid symbols include special symbols without actual meaning; and non-textual information includes emoticons, irrelevant web links, and system identifiers. This preprocessing eliminates interference from non-textual information, resulting in a standardized text with a clean format and pure information, which serves as the input text for subsequent translation processing.
[0034] If the standardized text to be translated is multilingual, the processor uses a pre-set large model to identify the core language of the text, analyzes the language corresponding to the core semantics of the text, and determines the core language as the base language for subsequent back-translation. If the standardized text to be translated is a single language, the language is directly determined as the base language for back-translation, thus solving the problem of confusion in the base language for back-translation of multilingual text and ensuring the accuracy of the back-translation results.
[0035] 102. Perform source language back-translation on the translated text to obtain a reference text in the same language as the text to be translated.
[0036] Acquire the expression norms, common regional cultural characteristics, and basic language habits of the target language's user groups. The expression norms of the target language include the official grammar rules and vocabulary usage norms of the language. The common regional cultural characteristics include the common cultural traditions and language taboos of the main regions where the language is used. The basic language habits of the target user groups are the daily language expression characteristics of the regular users of the language.
[0037] The processor combines the above information and uses a pre-set large model to perform adaptation translation processing on the standardized text to be translated, generating translated text that meets the requirements of the target language. Subsequently, the large model performs source language back-translation processing on the translated text according to the determined back-translation benchmark language, converting the translated text into text in the same language as the text to be translated, obtaining a reference text. This reference text serves as a verification medium between the original text to be translated and the translated text, and is used for subsequent semantic similarity quantification analysis.
[0038] 103. Determine the semantic similarity between the text to be translated and the reference text using a pre-set large model.
[0039] Using a pre-defined large model, multi-dimensional quantitative analysis and weighted calculation are employed to determine the semantic similarity between the text to be translated and the reference text. The specific execution process is as follows: Determine semantic analysis dimensions: The large model retrieves the semantic analysis dimensions that are pre-set based on general text features. These semantic analysis dimensions include, but are not limited to, semantic completeness, expression logic, lexical matching degree, and sentence fluency. Each dimension is a key dimension that affects the translation effect of general text. Dimensional similarity quantification: Based on the above semantic analysis dimensions, the large model performs a dimensional comparison analysis between the original text to be translated and the reference text, determines the degree of semantic matching between the two in each dimension, and converts the degree of matching into a quantitative value between 0 and 1 (the larger the value, the higher the similarity), thus obtaining the similarity quantification value for each dimension. Weighted calculation of overall semantic similarity: The large model retrieves preset weights for each dimension and performs a weighted calculation on the similarity quantification values of each dimension to obtain the overall semantic similarity between the text to be translated and the reference text. The weights for each dimension are preset according to the translation requirements of general texts, and the sum of the weights for each dimension is 1. These weights can be configured by system default or user-defined.
[0040] 104. If the semantic similarity is lower than a preset value, the translated text is adjusted according to the semantic similarity and the large model, and the process returns to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value.
[0041] The calculated overall semantic similarity is compared with a preset value, and different processing logics are executed based on the comparison results: If the semantic similarity is higher than the preset value, it means that the core semantics of the translated text are consistent with the original text to be translated, the translation effect meets the standard, and it will proceed to the subsequent visualization display and user confirmation stage. If the semantic similarity is lower than the preset value, it indicates that the semantic deviation between the translated text and the original text to be translated is large, and the translated text needs to be iteratively adjusted.
[0042] When the semantic similarity is lower than a preset value, the processor makes targeted adjustments to the content in the corresponding low-similarity dimension of the translated text based on the preset large model, the magnitude of the semantic similarity, and the distribution of low-similarity dimensions. For example, if the similarity quantification value of the semantic integrity dimension is the lowest, the semantic content of the translated text is adjusted to ensure that it is completely consistent with the core semantics of the original text to be translated. If the similarity of the expression logic dimension is low, the sentence logic of the translated text is optimized to conform to the expression habits of the target language. During the adjustment process, the large model always retains the core semantics of the text to be translated and the expression habits of the source language, while ensuring that the adjusted translated text is adapted to the cultural characteristics and expression norms of the target language.
[0043] For the adjusted translated text, the processor re-executes the back-translation and semantic similarity calculation steps, and compares it with the preset value again. At the same time, the processor counts the number of times the model automatically adjusts. If the number of iterations reaches the preset threshold, but the semantic similarity is still lower than the preset value, it means that the automatic adjustment of the model cannot solve the current semantic deviation problem. At this time, the large model outputs translation text adjustment and optimization suggestions, which are displayed on the electronic device's screen. The user manually adjusts the translated text according to the suggestions. After the manual adjustment is completed, the processor re-executes the back-translation and semantic similarity calculation steps on the modified translated text until the semantic similarity is higher than the preset value.
[0044] 105. In response to the user's confirmation operation on the translated text, output the translated text.
[0045] The interactive mode for translating the text to be translated is enabled in the graphical user interface of the touch screen, realizing a visual display of the entire translation process and providing a user confirmation interaction entry. The specific display and interaction logic is as follows: In interactive mode, the display screen first shows the text to be translated entered by the user and the selected target language information, allowing the user to intuitively view the basic information of the input; After the translation and back-translation processes are completed, the display screen simultaneously shows the translated text, the reference text, and the semantic similarity measurement values between the text to be translated and the reference text. During the iterative process of automatically adjusting or manually adjusting the translated text, the display screen shows the translated text after each round of adjustment and the corresponding semantic similarity change information in real time, allowing users to intuitively grasp the adjustment process and the adjustment effect; After the large model completes the semantic compliance verification of the translated text, the display screen simultaneously shows the translated text, the large model verification report, and semantic similarity data. The large model verification report includes similarity details for each semantic analysis dimension, compliance evaluation of the translated text, and other content. While displaying the above information, the screen provides a translation confirmation control. Users can trigger the control by clicking, touching, or other operations to complete the confirmation operation for the translation text. The processor responds to the confirmation operation, determines the translation text as the final translation text, and outputs it. The output format includes text display, copying, saving, sharing, etc.
[0046] When displaying translated text, reference text, and semantic similarity, the electronic device's screen divides the interactive interface into independent display areas for the text to be translated, the translated text, the reference text, and the similarity. These areas do not overlap and are laid out to fit the screen size, ensuring comfortable viewing. Simultaneously, in the reference text display area, parts of the reference text that semantically differ from the text to be translated are highlighted using methods such as red, bold, and underlined, allowing users to clearly locate the semantic discrepancies. In the similarity display area, the quantitative values of semantic similarity and the distribution information of low-similarity dimensions are displayed simultaneously, including the names of low-similarity dimensions and the corresponding similarity quantification values, allowing users to fully understand the detailed semantic similarity situation.
[0047] This application provides a text translation method. The method involves acquiring user-inputted text to be translated and the target language, translating the text based on the target language and common cultural characteristics to obtain a translated text, then performing a back-translation process in the source language to obtain a reference text in the same language as the text to be translated. A preset large-scale model is used to determine the semantic similarity between the text to be translated and the reference text. If the semantic similarity is lower than a preset value, the translated text is adjusted based on the semantic similarity and the large-scale model, and the process returns to the step of determining the semantic similarity between the text to be translated and the reference text using the preset large-scale model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value. Finally, in response to the user's confirmation operation on the translated text, the method proceeds. The output translated text, in the solution provided in this application, addresses the problem of poor cultural adaptability in existing methods by combining the expression norms, common cultural characteristics, and language habits of the target language group for adaptation translation; it adopts a single preset large model to realize multi-dimensional quantitative calculation of semantic similarity and targeted adjustment of the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation; it sets a threshold for the number of iterations for adjustment, and introduces a manual adjustment step when the automatic adjustment of the model is ineffective, which avoids infinite iteration and ensures the adjustment effect; it adds a user confirmation interaction step to ensure that the translation result matches the actual needs of users; at the same time, it realizes the visualization of the translation process, allowing users to intuitively grasp the information of the entire process of translation, verification, and adjustment, thereby improving the accuracy and efficiency of general text translation and optimizing the user's translation operation experience.
[0048] To facilitate better implementation of the text translation method of this application embodiment, this application embodiment also provides a text translation device, wherein the meaning of the nouns is the same as that in the text translation system described above, and specific implementation details can be found in the description of the system embodiment.
[0049] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a text translation device provided in an embodiment of this application. The text translation device may specifically include an acquisition module 201, a processing module 202, a determination module 203, an adjustment module 204, and an output module 205, as follows: The acquisition module 201 is used to acquire the text to be translated and the target language input by the user, and to perform translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text; Processing module 202 is used to perform source language back-translation processing on the translated text to obtain reference text in the same language as the text to be translated; The determination module 203 is used to determine the semantic similarity between the text to be translated and the reference text through a preset large model; The adjustment module 204 is used to adjust the translated text according to the semantic similarity and the large model if the semantic similarity is lower than the preset value, and return to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; The output module 205 is used to output the translated text in response to the user's confirmation operation on the translated text.
[0050] This application provides a text translation device. An acquisition module 201 acquires the text to be translated and the target language input by the user, and performs translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text. After obtaining the translated text, a processing module 202 performs source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated. A determination module 203 determines the semantic similarity between the text to be translated and the reference text using a preset large model. An adjustment module 204 adjusts the translated text according to the semantic similarity and the large model if the semantic similarity is lower than a preset value, and returns to the step of determining the semantic similarity between the text to be translated and the reference text using the preset large model until the semantic similarity between the text to be translated and the reference text is higher than the preset value. Finally, an output module 205 responds. Upon user confirmation of the translated text, the translated text is output. The solution provided in this application addresses the problem of poor cultural adaptability in existing methods by combining the target language's expression norms, common cultural characteristics, and the language habits of the user group for adaptation translation. A single pre-set large model is used to achieve multi-dimensional quantitative calculation of semantic similarity and targeted adjustment of the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation. An iteration adjustment threshold is set, introducing manual adjustment when automatic model adjustment is ineffective, avoiding infinite iteration while ensuring adjustment effectiveness. A user confirmation interaction step is added to ensure that the translation result meets the user's actual needs. Simultaneously, the translation process is visualized, allowing users to intuitively grasp the entire process of translation, verification, and adjustment. Therefore, the accuracy and efficiency of general text translation are improved, and the user's translation experience is optimized. Furthermore, embodiments of this application also provide an electronic device, such as... Figure 3 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more processor-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: Processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in memory 302, and by calling data stored in memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, processor 301 may include one or more processing cores; preferably, processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless text translation. It is understood that the modem processor may not be integrated into processor 301.
[0051] The memory 302 can be used to store software programs and modules. The process 301 executes various functional applications and text translation methods by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the process 301 with access to the memory 302.
[0052] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0053] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0054] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiments of this application, the processing 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processing 301 runs the applications stored in the memory 302 to realize various functions, as follows: The system acquires the user-inputted text to be translated and the target language, and performs translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text; it then performs source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated; it determines the semantic similarity between the text to be translated and the reference text using a preset large model; if the semantic similarity is lower than a preset value, it adjusts the translated text according to the semantic similarity and the large model, and returns to the step of determining the semantic similarity between the text to be translated and the reference text using the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; in response to the user's confirmation operation on the translated text, it outputs the translated text.
[0055] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0056] This application's embodiments address the issue of poor cultural adaptability in existing methods by combining the target language's expression norms, common cultural characteristics, and the language habits of the user group for adaptive translation. It employs a single, pre-defined large model to achieve multi-dimensional quantitative calculation of semantic similarity and targeted adjustments to the translated text, ensuring that the core semantics of the translated text are consistent with the original text and avoiding semantic deviation. A threshold for the number of iterations is set, introducing manual adjustments when automatic model adjustments are ineffective, thus avoiding infinite iterations while ensuring adjustment effectiveness. A user confirmation interaction step is added to ensure that the translation results meet the user's actual needs. Simultaneously, the translation process is visualized, allowing users to intuitively grasp the entire process of translation, verification, and adjustment. Therefore, the accuracy and efficiency of general text translation are improved, and the user's translation experience is optimized.
[0057] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a processor-readable storage medium and loaded and executed by a processor.
[0058] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the text translation methods provided in embodiments of this application. For example, the instructions can execute the following steps: The system acquires the user-inputted text to be translated and the target language, and performs translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text; it then performs source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated; it determines the semantic similarity between the text to be translated and the reference text using a preset large model; if the semantic similarity is lower than a preset value, it adjusts the translated text according to the semantic similarity and the large model, and returns to the step of determining the semantic similarity between the text to be translated and the reference text using the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; in response to the user's confirmation operation on the translated text, it outputs the translated text.
[0059] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0060] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0061] Since the instructions stored in the storage medium can execute the steps of any of the text translation methods provided in the embodiments of this application, the beneficial effects that any of the text translation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0062] The foregoing has provided a detailed description of a text translation method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A text translation method, characterized in that, include: The system obtains the text to be translated and the target language input by the user, and performs translation processing on the text to be translated based on the target language and common cultural characteristics to obtain the translated text. The translated text is back-translated into its original language to obtain a reference text in the same language as the text to be translated. The semantic similarity between the text to be translated and the reference text is determined by a pre-set large model. If the semantic similarity is lower than a preset value, the translated text is adjusted according to the semantic similarity and the large model, and the process returns to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; In response to the user's confirmation of the translated text, the translated text is output.
2. The text translation method according to claim 1, characterized in that, The process of translating the text to be translated based on the target language and common cultural characteristics to obtain the translated text includes: Obtain the expression norms, common regional cultural characteristics, and basic language habits of the target language's user group; Based on the aforementioned expression norms, common regional cultural characteristics, and the basic language habits of the target user group, the text to be translated is processed to obtain the translated text.
3. The text translation method according to claim 1, characterized in that, The step of determining the semantic similarity between the text to be translated and the reference text using a pre-set large model includes: The preset semantic analysis dimensions are determined through the large model; Based on the semantic analysis dimensions, the large model performs dimensional similarity quantification on the text to be translated and the reference text to obtain similarity quantification values for each dimension; Based on the preset weights of each dimension, the large model performs a weighted calculation of the similarity quantification values of each dimension to obtain the semantic similarity between the text to be translated and the reference text.
4. The text translation method according to claim 1, characterized in that, The adjustment of the translated text based on the semantic similarity and the large model includes: Based on the large model, the numerical value of the semantic similarity, and the distribution of low similarity dimensions, the content corresponding to the low similarity dimensions in the translated text is adjusted. During the adjustment process, the core semantics of the text to be translated and the expression habits of the source language are preserved, and the cultural characteristics and expression norms of the target language are adapted.
5. The text translation method according to claim 1, characterized in that, Also includes: When the semantic similarity is lower than a preset value, the translated text is adjusted and the relevant steps are repeated. If the number of iterations reaches the threshold but the semantic similarity is still lower than the preset value, the large model outputs translation text adjustment and optimization suggestions. Based on the adjustment and optimization suggestions, the translated text is manually adjusted, and the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model is executed again until the semantic similarity is higher than the preset value.
6. The text translation method according to claim 1, characterized in that, After obtaining the user-inputted text to be translated and the target language, and before translating the text based on the target language and common cultural characteristics, the method further includes: Redundant information, garbled characters, invalid symbols, and non-textual information in the text to be translated are removed to obtain a standardized text to be translated. The translation processing of the text to be translated based on the target language and common cultural characteristics includes: translating the standardized text to be translated based on the target language and common cultural characteristics.
7. The text translation method according to claim 6, characterized in that, Also includes: Identify the core language of the standardized text to be translated; The core expression language is determined as the benchmark language for the back-translation of the translated text.
8. The text translation method according to any one of claims 1 to 7, characterized in that, Also includes: In the interactive translation mode, the text to be translated and the selected target language information are displayed. After completing the translation and back-translation of the text to be translated, the translated text, the reference text, and the semantic similarity between the text to be translated and the reference text are displayed. During the iterative adjustment of the translated text, the translated text after each round of adjustment and the corresponding semantic similarity change information are displayed in real time. After the semantic compliance verification is completed using the large model, the translated text, the large model verification report, and the semantic similarity data are displayed simultaneously. In response to the user's confirmation of the translated text, the translated text is displayed.
9. The text translation method according to claim 8, characterized in that, The display of the translated text, the reference text, and the semantic similarity between the text to be translated and the reference text includes: The display interface is divided into areas for displaying the text to be translated, the text to be translated, the reference text, and the similarity display. In the reference text display area, parts that are semantically inconsistent with the text to be translated are marked and displayed; The similarity display area displays the quantitative values of semantic similarity and the distribution information of low similarity dimensions.
10. A text translation device, characterized in that, The device includes: The acquisition module is used to acquire the text to be translated and the target language input by the user, and to translate the text to be translated based on the target language and common cultural characteristics to obtain the translated text; The processing module is used to perform source language back-translation processing on the translated text to obtain a reference text in the same language as the text to be translated. The determination module is used to determine the semantic similarity between the text to be translated and the reference text using a preset large model; An adjustment module is used to adjust the translated text based on the semantic similarity and the large model if the semantic similarity is lower than a preset value, and then return to the step of determining the semantic similarity between the text to be translated and the reference text through the preset large model, until the semantic similarity between the text to be translated and the reference text is higher than the preset value; The output module is used to output the translated text in response to the user's confirmation operation on the translated text.
11. An electronic device, characterized in that, include: A memory, a processor, and a processor program stored in the memory and executable on the processor, wherein the processor executes the program as steps of the text translation method as described in any one of claims 1 to 9.
12. A storage medium, characterized in that, The computer processing program is stored and can be loaded by a processor to execute the text translation method as described in any one of claims 1 to 9.