A text translation method, device, equipment and storage medium

By identifying the text containing the data to be translated in the text translation device, and determining candidate translation results based on the translated text of that text, the problems of translation results being out of context and copyright disputes are solved, achieving more accurate translation and copyright protection.

CN116306702BActive Publication Date: 2026-07-03HEFEI IFLYTEK TOYCLOUD TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI IFLYTEK TOYCLOUD TECH
Filing Date
2023-03-20
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing text translation devices struggle to translate extended meanings by considering the specific context of the data being translated, resulting in translations that deviate from the original context and pose a risk of copyright disputes.

Method used

By identifying the text containing the data to be translated, candidate translation results are determined based on the translation text of that text, and the text is translated by combining the candidate translation results to obtain the final text translation result.

Benefits of technology

It improves translation quality, ensures that the translation results match the textual context of the data to be translated, and effectively avoids copyright disputes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116306702B_ABST
    Figure CN116306702B_ABST
Patent Text Reader

Abstract

This application discloses a text translation method and related products. The method includes: responding to a user's translation request for data to be translated; determining the text containing the data to be translated; determining candidate translation results for the data to be translated from the corresponding translation text; and translating the data to be translated based on the candidate translation results to obtain a text translation result. Since the candidate translation results contain contextual information about the text containing the data to be translated, the subsequent text translation obtained by combining the candidate translation results can match the context of the text containing the data to be translated, thereby effectively improving the translation effect. Furthermore, since the text translation result is obtained by further translating based on the candidate translation results, rather than directly using the candidate translation results, copyright disputes can be effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine translation technology, and in particular to a text translation method and related products. Background Technology

[0002] With the continuous advancement of globalization, cross-national and cross-language communication is increasing, and the use of machine translation is becoming increasingly important. Besides translating everyday spoken language, a range of electronic devices for text translation, such as dictionary pens and electronic dictionaries, have been launched on the market to facilitate language learning. Dictionary pens, in particular, allow users to simply scan the text to be translated to obtain the translation result.

[0003] However, most existing electronic devices for text translation rely on simple, direct machine translation. Depending on the context, the data to be translated may have multiple possible translations, and existing electronic devices struggle to incorporate the specific context and extended meanings of the data, resulting in translations that deviate from the original text and produce poor quality. Furthermore, copyright disputes frequently arise during text translation. Therefore, how to ensure translation quality while avoiding copyright issues is a pressing challenge in current text translation scenarios. Summary of the Invention

[0004] This application provides a text translation method and related products, aiming to ensure translation quality while avoiding copyright disputes.

[0005] In a first aspect, embodiments of this application can provide a text translation method, the method comprising:

[0006] In response to a user's translation request for data to be translated, the text containing the data to be translated is determined;

[0007] Determine candidate translation results for the data to be translated from the translation text corresponding to the text containing the data to be translated;

[0008] Based on the candidate translation results, the data to be translated is translated to obtain the text translation result of the data to be translated.

[0009] Optionally, determining the text containing the data to be translated includes:

[0010] Multiple different candidate texts are obtained; the text containing the data to be translated is one of the multiple different candidate texts.

[0011] The data to be translated is matched with the multiple different candidate texts, and the candidate text with the highest matching degree is used as the text containing the data to be translated.

[0012] Optionally, the step of matching the data to be translated with the plurality of different candidate texts to obtain the candidate text with the highest matching degree includes:

[0013] Determine the semantic similarity between the data to be translated and the multiple different candidate texts;

[0014] Based on the determined semantic similarity, the candidate text with the highest semantic similarity to the data to be translated is selected from the plurality of different candidate texts as the candidate text with the highest matching degree.

[0015] Optionally, among the multiple different candidate texts, there are multiple candidate texts with the highest matching degree; the text containing the data to be translated is determined through the following steps:

[0016] Determine the historical translation data of the multiple candidate texts with the highest matching degree respectively;

[0017] For a candidate text with the highest matching degree, if the historical translation data includes the user's identification information and / or the historical translation records of the data to be translated, then the candidate text with the highest matching degree will be used as the text containing the data to be translated.

[0018] Optionally, the translation request includes the target language type of the data to be translated; the translation text corresponding to the text containing the data to be translated is determined through the following steps:

[0019] Obtain candidate translation texts in multiple different language types corresponding to the text containing the data to be translated;

[0020] Based on the target language type, candidate translation texts corresponding to the target language type are selected from the candidate translation texts of the various different language types as the translation texts.

[0021] Optionally, the step of translating the data to be translated based on the candidate translation results to obtain the text translation result of the data to be translated includes:

[0022] Extract text features from the candidate translation results; the text features include at least one of the following: word choice, grammatical components, grammatical structure, and semantics of the candidate translation results;

[0023] The text to be translated is performed based on the text features to obtain the text translation result.

[0024] Optionally, determining the candidate translation result of the data to be translated from the translation text corresponding to the text containing the data to be translated includes:

[0025] Determine the position of the data to be translated within the text containing the data to be translated;

[0026] Based on the location, the translation content that matches the location is determined from the translated text as the candidate translation result.

[0027] Optionally, the method further includes:

[0028] If the text containing the data to be translated cannot be determined, then machine translation is performed on the data to be translated in response to the translation request.

[0029] Secondly, embodiments of this application may provide a text translation device, the device comprising:

[0030] The text determination module is used to determine the text containing the data to be translated in response to a user's translation request for the data to be translated.

[0031] The candidate translation result determination module is used to determine the candidate translation result of the data to be translated from the translation text corresponding to the text containing the data to be translated.

[0032] The text translation module is used to translate the data to be translated based on the candidate translation results, and obtain the text translation result of the data to be translated.

[0033] Thirdly, embodiments of this application may provide a text translation device, the device comprising: a processor, a memory, and a system bus;

[0034] The processor and the memory are connected via the system bus;

[0035] The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform any of the above-described implementations of the text translation method.

[0036] Fourthly, embodiments of this application may provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described implementations of the text translation method.

[0037] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0038] In this embodiment, in response to a user's translation request for data to be translated, after determining the text containing the data to be translated, candidate translation results can be further determined from the corresponding translation text. Then, the data to be translated can be translated based on these candidate translation results to obtain the translated text. Since the candidate translation results are obtained from the corresponding translation text, they can specifically include contextual information about the text containing the data to be translated. Thus, subsequent text translation based on these candidate translation results ensures that the final translated text matches the context of the text containing the data to be translated, effectively improving the translation quality. Furthermore, since the final translated text is obtained by further translating based on the candidate translation results, rather than directly using the candidate translation results, copyright disputes can be effectively avoided. Attached Figure Description

[0039] Figure 1 This is a schematic diagram illustrating an application scenario of the text translation method for terminal devices provided in the embodiments of this application;

[0040] Figure 2 A schematic diagram illustrating an application scenario of the text translation method applied to a server provided in this application embodiment;

[0041] Figure 3 A flowchart illustrating a text translation method provided in this application embodiment;

[0042] Figure 4 A flowchart illustrating another text translation method provided in this application embodiment;

[0043] Figure 5 This is a schematic diagram of the structure of a text translation device provided in an embodiment of this application. Detailed Implementation

[0044] As mentioned earlier, most existing electronic devices for text translation rely on simple, direct machine translation. Depending on the context, the data to be translated may have multiple possible translations, and existing electronic devices struggle to incorporate the specific context and extended meanings of the data, resulting in translations that deviate from the original text and produce poor quality. Furthermore, copyright disputes frequently arise during text translation. Therefore, how to ensure translation quality while avoiding copyright issues is a pressing challenge in current text translation scenarios.

[0045] To address the aforementioned issues, embodiments of this application provide a text translation method. This method may include: in response to a user's translation request for data to be translated, after determining the text containing the data to be translated, further determining candidate translation results for the data to be translated from the corresponding translation text. Then, based on the candidate translation results, text translation of the data to be translated can be performed to obtain the text translation result of the data to be translated.

[0046] Since the candidate translations of the data to be translated are derived from the corresponding translated text, they can specifically contain contextual information about the text containing the data. Therefore, subsequent text translations combining these candidate translations ensure that the final translated text matches the context of the text containing the data, effectively improving the translation quality. Furthermore, because the final translated text is derived from further translations of the candidate translations, rather than directly using them, copyright disputes can be effectively avoided.

[0047] It should be noted that the embodiments of this application do not limit the executing entity of the text translation method. For example, the text translation method of this application embodiment can be applied to data processing devices such as terminal devices or servers. The terminal device can be a smartphone, computer, personal digital assistant (PDA), tablet computer, or text translation device such as an electronic dictionary or dictionary pen. The server can be a standalone server, a cluster server, or a cloud server.

[0048] To facilitate understanding of the technical solutions provided in the embodiments of this application, the following descriptions are provided in conjunction with... Figure 1 and Figure 2 The application scenarios of the text translation method provided in the embodiments of this application are described exemplarily. Among them, Figure 1 This is a schematic diagram illustrating an application scenario of the text translation method for terminal devices provided in the embodiments of this application; Figure 2 This is a schematic diagram illustrating an application scenario of the text translation method for a server provided in this embodiment of the application.

[0049] exist Figure 1In the illustrated application scenario, when user 101 uses terminal device 102, for example, by using a dictionary pen to input data to be translated through text scanning, this can be considered as submitting a translation request to terminal device 102 for the data to be translated. Accordingly, terminal device 102 can respond to this translation request by first determining the text containing the data to be translated, and then determining candidate translation results from the corresponding translation text. Further, terminal device 102 can perform text translation on the data to be translated based on the candidate translation results, obtaining the text translation result of the data to be translated. Then, terminal device 102 can output the text translation result, enabling user 101 to quickly obtain the text translation result of the data to be translated.

[0050] exist Figure 2 In the illustrated application scenario, when user 201 inputs data to be translated using terminal device 202, such as by scanning text with a dictionary pen, it can be considered as submitting a translation request to terminal device 202 for the data to be translated. Accordingly, terminal device 202 can respond to this translation request by forwarding the data to be translated to server 203, so that server 203 can determine the text containing the data to be translated and then determine candidate translation results from the corresponding translation text. Further, server 203 can perform text translation on the data to be translated based on the candidate translation results to obtain the text translation result. Then, server 203 sends the text translation result back to terminal device 202, which outputs it to user 201, enabling user 201 to quickly obtain the text translation result of the data to be translated.

[0051] It should be noted that the text translation and transmission method provided in this application embodiment can be applied not only to... Figure 1 or Figure 2 The application scenarios shown can also be applied to other application scenarios that require text translation, but this application embodiment does not specifically limit them.

[0052] To enable those skilled in the art to better understand the present invention, 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, and 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.

[0053] Figure 3 This is a flowchart illustrating a text translation method provided in an embodiment of this application. (In conjunction with...) Figure 3 As shown, the text translation method provided in this application embodiment may include:

[0054] S301: In response to a user's translation request for data to be translated, determine the text containing the data to be translated.

[0055] The data to be translated can refer to text data that requires translation. In this application embodiment, the specific method for acquiring the data to be translated is not limited. For example, the data to be translated can be acquired through text scanning or manual input. Furthermore, when the terminal device acquires the data to be translated, it can correspondingly obtain the user's translation request for that data.

[0056] Specifically, when acquiring data to be translated via text scanning, since devices potentially related to user privacy, such as camera devices, are involved, user permission or consent is required when applying this embodiment to specific products or technologies. Furthermore, the collection, use, and processing of related data must comply with relevant laws, regulations, and standards of the relevant countries and regions. For example, before acquiring data to be translated via text scanning, user permission or consent must be obtained to authorize the text scanning.

[0057] For cases where the data to be translated is obtained through manual input, the user can actively input the information to obtain the data. Specifically, if the terminal device is equipped with an information input module, this module can be a keyboard, allowing the user to manually input the data to be translated for the terminal device to collect. Alternatively, the information input module can be a voice acquisition module, allowing the user to input the data to be translated via voice, which the terminal device will then recognize. The specific implementation of the information input module in this application is not limited.

[0058] In addition, in this embodiment of the application, the method for determining the text containing the data to be translated, that is, the implementation method of S301, is not specifically limited. For ease of understanding, the following description is based on a possible implementation method.

[0059] In one possible implementation, S301 may specifically include steps 11-12:

[0060] Step 11: Obtain multiple different candidate texts.

[0061] The text containing the data to be translated is one of several different candidate texts.

[0062] In this embodiment, the method for obtaining multiple different candidate texts is not specifically limited. For example, multiple different candidate texts can be stored in a text information database. Correspondingly, this text information database can be directly stored in the execution entity of this embodiment, or stored in a server associated with the execution entity of this embodiment. In this way, when it is necessary to determine the text containing the data to be translated, the execution entity can obtain multiple different candidate texts through local reading to further determine the text containing the data to be translated. Alternatively, the text information database can be stored in other data storage servers. The execution entity of this embodiment can obtain multiple different candidate texts by accessing the data storage server when needed to further determine the text containing the data to be translated.

[0063] Step 12: Match the data to be translated with multiple different candidate texts to obtain the candidate text with the highest matching degree, which will be used as the text containing the data to be translated.

[0064] Here, the text matching process can refer to determining whether two texts, namely the data to be translated and any candidate text, express the same or similar semantics by calculating semantic similarity, thereby determining the degree of matching between the two.

[0065] Correspondingly, in this embodiment, the process of matching the data to be translated with multiple different candidate texts may specifically include: determining the semantic similarity between the data to be translated and multiple different candidate texts; and selecting the candidate text with the highest semantic similarity to the data to be translated from among the multiple different candidate texts as the candidate text with the highest matching degree based on the determined semantic similarity. In this way, by calculating the similarity, the text containing the data to be translated can be selected more accurately and quickly, facilitating subsequent text translation based on that text. This ensures that the final text translation result matches the context of the text containing the data to be translated, thereby effectively improving the translation effect.

[0066] Furthermore, in practical applications, if the data to be translated is common content, there may be multiple candidate texts with the same semantic similarity to the data to be translated, and all of them may have the highest value. Taking the Chinese-to-English translation scenario as an example, when the data to be translated is "The process will be explained below in combination with different situations," this text content may exist in multiple candidate texts. Therefore, it may be difficult to accurately determine the text to be translated, resulting in poor translation results.

[0067] Given this situation, in order to accurately determine the text containing the data to be translated, and to ensure that the final translation result matches the context of the text containing the data to be translated, we can further determine this by combining the historical translation data of the candidate text.

[0068] Specifically, among the aforementioned multiple candidate texts, there may be multiple candidate texts with the highest degree of matching. Correspondingly, the text containing the data to be translated can be determined through the following steps: First, determine the historical translation data of each of the multiple candidate texts with the highest degree of matching. Second, for a candidate text with the highest degree of matching, if the historical translation data includes the user's identification information and / or the historical translation records of the data to be translated, then the candidate text with the highest degree of matching is taken as the text containing the data to be translated. Here, the user's identification information can be provided by the user when using the candidate text with the highest degree of matching, indicating the user's use of this text. The historical translation records of the data to be translated can be recorded when the data to be translated in this text is translated, indicating the historical translation status of the data to be translated in the candidate text with the highest degree of matching. Since the historical translation data of the candidate text with the highest degree of matching contains the user's identification information and / or the historical translation records of the data to be translated, this text can be considered a frequently used text for the user, potentially requiring multiple translations and readings, and thus can be identified as the text containing the data to be translated.

[0069] Based on the relevant content of steps 11-12 above, it can be seen that in this embodiment of the application, by determining the text containing the data to be translated, the candidate translation results subsequently determined from the corresponding translation text can contain the contextual information of that text. Thus, by further combining the candidate translation results with the text translation, the final text translation result can be made to match the context of the text containing the data to be translated, thereby effectively improving the translation effect.

[0070] Furthermore, in this embodiment, if no text matching the data to be translated is selected from multiple different candidate texts, i.e., the text containing the data to be translated is not determined, then in response to the aforementioned translation request, machine translation of the data to be translated can be performed directly. This avoids excessively long translation response times that could negatively impact user experience. It should be noted that this embodiment does not limit the method of machine translation of the data to be translated; any existing or future method capable of machine translation of text content can be used.

[0071] S302: Determine candidate translation results for the data to be translated from the translation text corresponding to the text containing the data to be translated.

[0072] In this embodiment, the method for determining the translation text corresponding to the text containing the data to be translated is not specifically limited. For example, a mapping relationship between the text containing the data to be translated and its corresponding translation text can be established in advance. In this way, after determining the text containing the data to be translated, the translation text corresponding to the text containing the data to be translated can be determined according to the mapping relationship.

[0073] Furthermore, in practical applications, the translated text can be in different languages. For example, when the language of the data to be translated is Chinese, there may be multiple scenarios such as Chinese to English, Chinese to French, and Chinese to Japanese. Therefore, in this embodiment, the translated text can be further determined based on the language type required by the user. Specifically, the user's translation request for the data to be translated includes the target language type of the data. Accordingly, the translated text corresponding to the text containing the data to be translated can be determined through the following steps: obtaining candidate translated texts in multiple different language types corresponding to the text containing the data to be translated; selecting the candidate translated text corresponding to the target language type from the candidate translated texts in multiple different language types as the translated text. Here, the target language type of the data to be translated is the language type required by the user when translating the data. In this way, determining the translated text from candidate translated texts in multiple different language types based on the target language type can meet the user's actual needs and effectively improve the translation effect and user experience.

[0074] Furthermore, after determining the translation text corresponding to the text containing the data to be translated, candidate translation results can be determined from the translation text. Correspondingly, in this embodiment, the process of determining candidate translation results from the aforementioned translation text, namely S302, can specifically include: determining the position of the data to be translated within the text containing the data; and, based on the position, determining translation content matching the position as a candidate translation result from the translation text. Here, the position of the data to be translated within its text can specifically be represented by its page number, paragraph, or line of text, thus indicating the context of the data to be translated within its text. In this way, translation content matching the position can be accurately determined as a candidate translation result. Since the candidate translation result can specifically contain contextual information of the text containing the data to be translated, the final text translation result obtained based on the candidate translation result can match the context of the text containing the data to be translated, thereby effectively improving the translation effect.

[0075] S303: Based on the candidate translation results, perform text translation on the data to be translated to obtain the text translation result of the data to be translated.

[0076] The process of text translation for the data to be translated based on the candidate translation results, that is, S303, is not specifically limited in the embodiments of this application. For ease of understanding, a possible implementation manner will be described below.

[0077] As a possible implementation manner, S303 may specifically include: extracting the text features of the candidate translation results; performing text translation on the data to be translated based on the text features to obtain a text translation result. Among them, the text features may include at least one of the word usage, grammatical components, grammatical structure, and semantics of the candidate translation results. In this way, by extracting the text features from the candidate translation text and performing text translation on the data to be translated based on the translation reference features, the context information of the text where the data to be translated is located can be included in the finally obtained text translation result, thereby improving the translation effect. And since the final text translation result is obtained by further performing text translation based on the candidate translation results rather than directly adopting the candidate translation results, the issue of copyright disputes can be effectively avoided.

[0078] Among them, the word usage of the candidate translation results may refer to the vocabulary involved in the candidate translation results. In order to represent the same semantics, the specific vocabulary used may not be the same. Therefore, extracting the word usage of the candidate translation results can make the final text translation result more consistent with the translation text corresponding to the text where the data to be translated is located, thereby obtaining a relatively accurate text translation result and improving the translation effect. As an example, "Wish you prosperity in business" and "With best regards for your business" use different vocabularies under the same semantics.

[0079] The grammatical components of the candidate translation results may refer to the subject, predicate, object, attributive, adverbial, complement, etc. involved in the candidate translation results. The grammatical structure of the candidate translation results may refer to the sentence pattern structure formed by the grammatical components of the candidate translation results. By extracting the grammatical components and grammatical structure of the candidate translation results, the sentence composition of the candidate translation results can be judged, which helps to translate a relatively accurate text translation result based on the grammatical components and grammatical structure and improve the translation effect. As an example, taking the candidate translation result "I just turned on the computer" as an example, the overall sentence pattern is a subject-predicate structure. Among them, "I" is the subject, "just" is the adverbial, "turned on" is the predicate, and "the computer" is the object.

[0080] The semantics of the candidate translation results may refer to the meaning of the candidate translation results in the translation text. By extracting the semantics of the candidate translation results, it helps to ensure that the semantics of the text translation result of the data to be translated obtained based on the candidate translation results is the same as the semantics of the candidate translation results, both reflecting the context information of the text where the data to be translated is located, making the text translation result fit the context of the text where the data to be translated is located, and thus effectively improving the translation effect.

[0081] Based on the characteristics of the aforementioned text features, the method for extracting text features can also be described in this embodiment. Specifically, the language type of the candidate translation result can be obtained first, and then text features can be extracted according to the language preference corresponding to the language type of the candidate translation result. For example, in English, the grammatical structure and components are mostly: subject + verb + object; while in Korean, the grammatical structure and components are mostly: subject + particle + object + particle + verb. It is evident that since different language types have different language preferences, extracting text features through these language preferences can avoid errors in subsequent text translation due to extraction failures or mistakes, thus affecting the translation effect.

[0082] Additionally, it should be noted that in this embodiment, the text features of the candidate translation result may also include the original text of the candidate translation result. Correspondingly, if the original text of the candidate translation result is extracted, it can be directly used as the text translation result of the data to be translated, thereby improving the efficiency of text translation. Of course, to avoid copyright disputes, the extraction of the original text of the candidate translation result is only permitted after obtaining the copyright of the candidate translation result.

[0083] Based on the above S301-S303, it is clear that in this embodiment, in response to a user's translation request for data to be translated, after determining the text containing the data to be translated, candidate translation results can be further determined from the corresponding translation text. Then, the data to be translated can be translated based on these candidate translation results to obtain the final translation result. Since the candidate translation results are obtained from the corresponding translation text, they can specifically include contextual information about the text containing the data to be translated. Therefore, further text translation based on these candidate translation results ensures that the final translation matches the context of the text containing the data to be translated, effectively improving the translation quality. Furthermore, since the final translation result is obtained by further translating based on the candidate translation results, rather than directly using the candidate translation results, copyright disputes can be effectively avoided.

[0084] Furthermore, after obtaining the text translation result of the data to be translated, the text translation result can be provided to the user to improve the user's language translation experience. Based on this, embodiments of this application can provide another text translation method, which will be described below with reference to embodiments and accompanying drawings.

[0085] Figure 4 A flowchart illustrating another text translation method provided in an embodiment of this application. (In conjunction with...) Figure 4As shown, the text translation method provided in this application embodiment may include:

[0086] S401: In response to a user's translation request for data to be translated, determine the text containing the data to be translated.

[0087] In this embodiment, the technical details of S401 can be found in the relevant description of S301 in the above embodiments, and will not be repeated here.

[0088] S402: Determine candidate translation results for the data to be translated from the translation text corresponding to the text containing the data to be translated.

[0089] In this embodiment, the technical details of S402 can be found in the relevant description of S302 in the above embodiments, and will not be repeated here.

[0090] S403: Based on the candidate translation results, perform text translation on the data to be translated to obtain the text translation result of the data to be translated.

[0091] In this embodiment, the technical details of S403 can be found in the relevant description of S303 in the above embodiments, and will not be repeated here.

[0092] S404: Output the text translation results according to the preset output format.

[0093] In this embodiment, the preset output format may include at least one of text, image, audio, and video. This preset output format may be pre-set by the user or configured by the system at the factory; this embodiment does not limit this.

[0094] Specifically, after determining the text translation result of the data to be translated, an information display interface can be provided, which includes the text translation result in the preset output format. Correspondingly, if multiple preset output formats are used to display the text translation result, the information display interface can simultaneously display the text translation results in all of these preset output formats. Alternatively, the information display interface can provide a first switching control, allowing the user to switch between multiple preset output formats of the text translation result when operating the first switching control.

[0095] Additionally, it should be noted that if the copyright of the candidate translation results is obtained, and the candidate translation results differ from the final text translation, the final text translation and candidate translation results can be displayed simultaneously in different areas of the information display interface. Alternatively, the information display interface can provide a second switching control, allowing the user to switch between the text translation results and the candidate translation results when using this second switching control.

[0096] Based on the text translation method provided in the above embodiments, this application also provides a text translation device. The text translation device will now be described in conjunction with the embodiments and accompanying drawings.

[0097] Figure 5 This is a schematic diagram of the structure of a text translation device provided in an embodiment of this application. (In conjunction with...) Figure 5 As shown, the text translation device 500 provided in this application embodiment may include:

[0098] The text determination module 501 is used to determine the text containing the data to be translated in response to a user's translation request for the data to be translated.

[0099] The candidate translation result determination module 502 is used to determine the candidate translation results of the data to be translated from the translation text corresponding to the text containing the data to be translated.

[0100] The text translation module 503 is used to translate the data to be translated based on the candidate translation results, and obtain the text translation result of the data to be translated.

[0101] In one possible implementation, the text determination module 501 may specifically include:

[0102] The first acquisition module is used to acquire multiple different candidate texts; the text containing the data to be translated is one of these multiple different candidate texts.

[0103] The text matching module is used to match the data to be translated with multiple different candidate texts, and obtain the candidate text with the highest matching degree as the text containing the data to be translated.

[0104] In one possible implementation, the text matching module may specifically include:

[0105] The semantic similarity determination module is used to determine the semantic similarity between the data to be translated and multiple different candidate texts.

[0106] The text selection module is used to select the candidate text with the highest semantic similarity to the data to be translated from multiple different candidate texts based on the determined semantic similarity.

[0107] In one possible implementation, multiple candidate texts with the highest matching degree exist among multiple different candidate texts. Accordingly, the text containing the data to be translated is determined by the following module:

[0108] The historical translation data determination module is used to determine the historical translation data of multiple candidate texts with the highest matching degree.

[0109] The text determination submodule is used to select the candidate text with the highest matching degree as the text containing the data to be translated if the historical translation data includes the user's identification information and / or the historical translation records of the data to be translated.

[0110] In one possible implementation, the translation request includes the target language type of the data to be translated. Accordingly, the translation text corresponding to the text containing the data to be translated is determined by the following module:

[0111] The second acquisition module is used to acquire candidate translation texts in multiple different language types corresponding to the text containing the data to be translated;

[0112] The translation text determination module is used to select candidate translation texts corresponding to the target language type from a variety of candidate translation texts of different language types as the translation texts.

[0113] In one possible implementation, the text translation module 503 may specifically include:

[0114] The text feature extraction module is used to extract text features from candidate translation results; text features include at least one of the following: word choice, grammatical components, grammatical structure, and semantics of the candidate translation results;

[0115] The text translation submodule is used to translate the data to be translated based on text features, and obtain the text translation result.

[0116] In one possible implementation, the candidate translation result determination module 502 may specifically include:

[0117] The location determination module is used to determine the position of the data to be translated within the text containing the data to be translated;

[0118] The candidate translation result determination submodule is used to determine the translation content that matches the location from the translated text as a candidate translation result.

[0119] In one possible implementation, the text translation device 500 may further include:

[0120] The machine translation module is used to perform machine translation of the data to be translated in response to a translation request if the text containing the data to be translated cannot be determined.

[0121] Furthermore, embodiments of this application also provide a text translation device, including: a processor, a memory, and a system bus;

[0122] The processor and the memory are connected via the system bus;

[0123] The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform any of the above-described implementations of the text translation method.

[0124] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described implementations of the text translation method.

[0125] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0126] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0127] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.

[0128] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A text translation method, characterized in that, The method includes: In response to a user's translation request for data to be translated, the text containing the data to be translated is determined; Based on the target language type of the data to be translated contained in the translation request, determine the translation text corresponding to the text containing the data to be translated; specifically, this includes: obtaining multiple candidate translation texts in different language types corresponding to the text containing the data to be translated, wherein the candidate translation texts and the text containing the data to be translated are pre-established with a mapping relationship; and selecting the candidate translation text corresponding to the target language type from the multiple candidate translation texts in different language types as the translation text based on the target language type. Determining candidate translation results from the translation text corresponding to the text containing the data to be translated specifically includes: determining the position of the data to be translated in the text containing the data to be translated; and determining the translation content matching the position from the translation text as the candidate translation result based on the position. Based on the candidate translation results, the text to be translated is performed to obtain the text translation result of the data to be translated. Specifically, this includes: extracting text features from the candidate translation results; the text features include at least one of the word choice, grammatical components, grammatical structure, and semantics of the candidate translation results; performing text translation on the data to be translated based on the text features to obtain the text translation result; the word choice is used to indicate that the text translation result and the candidate translation result use different vocabulary under the same semantics; The step of determining the text containing the data to be translated includes: Multiple different candidate texts are obtained; the text containing the data to be translated is one of the multiple different candidate texts. The data to be translated is matched with the multiple different candidate texts to obtain the candidate text with the highest matching degree, which is then used as the text containing the data to be translated. Among the multiple different candidate texts, there are multiple candidate texts with the highest matching degree; the text containing the data to be translated is determined through the following steps: Determine the historical translation data of the multiple candidate texts with the highest matching degree respectively; For a candidate text with the highest matching degree, if the historical translation data includes the user's identification information and / or the historical translation records of the data to be translated, then the candidate text with the highest matching degree is used as the text containing the data to be translated; the user's identification information is used to indicate the user's use of the candidate text with the highest matching degree; the historical translation records are used to indicate the historical translation of the data to be translated that exists in the candidate text with the highest matching degree.

2. The method according to claim 1, characterized in that, The step of matching the data to be translated with the plurality of different candidate texts to obtain the candidate text with the highest matching degree includes: Determine the semantic similarity between the data to be translated and the multiple different candidate texts; Based on the determined semantic similarity, the candidate text with the highest semantic similarity to the data to be translated is selected from the plurality of different candidate texts as the candidate text with the highest matching degree.

3. The method according to claim 1 or 2, characterized in that, The method further includes: If the text containing the data to be translated cannot be determined, then machine translation is performed on the data to be translated in response to the translation request.

4. A text translation device, characterized in that, The device includes: The text determination module is used to determine the text containing the data to be translated in response to a user's translation request for the data to be translated. The second acquisition module is used to determine the translation text corresponding to the text containing the data to be translated based on the target language type of the data to be translated contained in the translation request; specifically, it is used to: acquire multiple candidate translation texts in different language types corresponding to the text containing the data to be translated, wherein the candidate translation texts and the text containing the data to be translated are pre-established with a mapping relationship; and select the candidate translation text corresponding to the target language type from the multiple candidate translation texts in different language types as the translation text according to the target language type. The candidate translation result determination module is used to determine candidate translation results of the data to be translated from the translation text corresponding to the text containing the data to be translated. Specifically, it is used to: determine the position of the data to be translated in the text containing the data to be translated; and determine the translation content that matches the position from the translation text as the candidate translation result based on the position. A text translation module is used to translate the data to be translated based on the candidate translation results to obtain a text translation result of the data to be translated; specifically, it is used to: extract text features from the candidate translation results; the text features include at least one of the word usage, grammatical components, grammatical structure, and semantics of the candidate translation results; and translate the data to be translated based on the text features to obtain the text translation result. The text determination module specifically includes: The first acquisition module is used to acquire multiple different candidate texts; the text containing the data to be translated is one of these multiple different candidate texts. The text matching module is used to match the data to be translated with multiple different candidate texts, and obtain the candidate text with the highest matching degree as the text containing the data to be translated; Among the multiple different candidate texts, there are multiple candidate texts with the highest matching degree; the text containing the data to be translated is determined by the following module: The historical translation data determination module is used to determine the historical translation data of multiple candidate texts with the highest matching degree. The text determination submodule is used to determine the text containing the data to be translated if the historical translation data includes the user's identification information and / or the historical translation records of the data to be translated. The user's identification information is used to indicate the user's use of the candidate text with the highest degree of matching. The historical translation records are used to indicate the historical translation of the data to be translated that exists in the candidate text with the highest degree of matching.

5. A text translation device, characterized in that, The device includes: a processor, a memory, and a system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the text translation method according to any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the text translation method according to any one of claims 1 to 3.