Content translation, content publishing and interaction method, device, equipment and storage medium

By providing content translation methods in short video applications, multilingual text publishing is enabled, solving the problem of limited content formats for users and improving cross-language communication and application resource utilization.

CN122197913APending Publication Date: 2026-06-12XIAOHONGSHU TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAOHONGSHU TECH CO LTD
Filing Date
2026-03-11
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing short video applications suffer from limited content formats, supporting only single-language text, which hinders cross-language communication among global users and the global promotion of these applications.

Method used

This paper provides a content translation method that displays input content, responds to user translation operations, determines the content to be translated, uses a translation model to translate it into the target language, displays the target content, including the translated and original content, and supports multilingual text publishing.

Benefits of technology

It increases the flexibility of content processing and the targeting of translation, enriches the ways to generate target content, facilitates cross-language communication between users in different regions, and improves the utilization rate of application resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122197913A_ABST
    Figure CN122197913A_ABST
Patent Text Reader

Abstract

The application discloses a content translation, content publishing and interaction method and device, equipment and a storage medium. It belongs to the technical field of Internet. The method can specifically include: displaying input content. In response to a translation operation on the input content, determining the content to be translated in the input content. The content to be translated is translated to obtain the translated content in the target language, and then the target content is displayed; wherein the target content includes the translated content and the original content in the input content, and the original content is the content in the input content except the content to be translated. Based on the application, the flexibility of input content processing and the pertinence of translation are increased, the richness of the target content and the flexibility of the generation mode are increased, the user can obtain target content in different languages, cross-language communication between users in different regions is facilitated, and the application resource utilization rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, specifically to a method, apparatus, device, and storage medium for content translation, content publishing, and interaction. Background Technology

[0002] With the rapid development of short video technology, short video applications are offering increasingly richer functions, such as private messaging and comments.

[0003] However, most users, when posting content through private chat or comment functions, are only allowed to post text content in a single language; for example, they can only edit and post text corresponding to their native language. This situation results in a relatively limited range of content formats posted by users, which not only affects cross-language communication among users worldwide but also, to some extent, restricts the global promotion of the application and the effective utilization of application resources. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, device, and storage medium for content translation, content publishing, and interaction that can improve the utilization of application resources, in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a content translation method, which includes:

[0006] Display the input content;

[0007] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0008] The content to be translated is translated to obtain the translated content in the target language;

[0009] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0010] In one embodiment, the input content is displayed, including:

[0011] The input content is displayed in the content input area of ​​the content translation interface; the content translation interface also includes a function display area, which contains translation controls;

[0012] In response to a translation operation on the input content, determine the content to be translated in the input content, including any of the following:

[0013] In response to a trigger action on the translation control, determine the content to be translated in the input content;

[0014] In response to a trigger operation on the translation control, the function display area is switched to the language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

[0015] In one embodiment, in response to a translation operation on the input content, determining the content to be translated in the input content includes:

[0016] In response to a translation operation on the input content, determine whether there is valid text in the target content;

[0017] If valid text exists, determine the content to be translated from the input.

[0018] In one embodiment, the content to be translated is translated to obtain translated content in the target language, including:

[0019] Based on the target language, the content to be translated is translated, and the translation progress is displayed;

[0020] When the translation progress indicates that the translation is complete, the translated content in the target language will be displayed.

[0021] In one embodiment, after obtaining the translated content, the method further includes:

[0022] Switch the translation control to the undo control;

[0023] In response to a trigger action on the undo control, replace the translated content with the content to be translated.

[0024] In one embodiment, the content to be translated is translated to obtain translated content in the target language, including:

[0025] Generate target translation instructions based on the target language;

[0026] The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model can translate the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

[0027] In one embodiment, the target translation instruction, the content to be translated, and the original content are input into the translation model, including:

[0028] Get the length of the original content;

[0029] If the content length exceeds a preset threshold, obtain the representation vector of the original content;

[0030] The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

[0031] In one embodiment, displaying the target content includes:

[0032] Replace the content to be translated with the content to be translated, while keeping the original content unchanged.

[0033] In one embodiment, the target content further includes content to be translated. Displaying the target content includes:

[0034] The content to be translated must remain unchanged from the original content;

[0035] The translated content is displayed in the associated area of ​​the content to be translated.

[0036] In one embodiment, determining the content to be translated in the input content includes any of the following:

[0037] The text content other than the target language in the input content is taken as the content to be translated;

[0038] Based on the location information of the target language and its corresponding text content within the input content, the content to be translated in the input content is determined.

[0039] Secondly, this application provides a content publishing method, which includes:

[0040] Displays the content publishing interface containing the input content;

[0041] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0042] The content to be translated is translated to obtain the translated content in the target language;

[0043] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0044] In response to a content publishing operation, publish media content containing the target content.

[0045] Thirdly, this application provides an interaction method, which includes:

[0046] Displays a conversation interface containing the input content;

[0047] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0048] The content to be translated is translated to obtain the translated content in the target language;

[0049] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0050] In response to a content sending operation, the session content containing the target content is displayed in the session content display area of ​​the session interface.

[0051] Fourthly, this application also provides a content translation device. The device includes:

[0052] The first display module is used to display the input content;

[0053] The first determining module is used to determine the content to be translated in the input content in response to a translation operation on the input content;

[0054] The translation module is used to translate the content to be translated into the target language.

[0055] The second display module is used to display the target content; wherein, the target content includes the translation content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated.

[0056] Fifthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0057] Display the input content;

[0058] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0059] The content to be translated is translated to obtain the translated content in the target language;

[0060] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0061] Sixthly, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the following steps:

[0062] Display the input content;

[0063] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0064] The content to be translated is translated to obtain the translated content in the target language;

[0065] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0066] Seventhly, this application also provides a computer program product comprising a computer program that, when executed by a processor, performs the following steps:

[0067] Display the input content;

[0068] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0069] The content to be translated is translated to obtain the translated content in the target language;

[0070] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0071] The aforementioned methods, apparatus, devices, and storage media for translating, publishing, and interacting with the input content display the input content. In response to a translation operation on the input content, the content to be translated within the input content is determined. The content to be translated is then translated to obtain translated content in the target language, and the target content is then displayed. The target content includes the translated content and the original content within the input content, where the original content is the content within the input content excluding the content to be translated. In this embodiment, when there is a content translation requirement, in response to a translation operation on the input content, the content to be translated within the input content is determined, and the content to be translated is translated to obtain translated content in the target language. This not only increases the flexibility and targeting of input content processing but also increases the richness of the target content and the flexibility of its generation method. It also facilitates users obtaining target content in different languages, enabling cross-language communication between users in different regions, thereby improving application resource utilization. Attached Figure Description

[0072] Figure 1 This is an application environment diagram of a content translation method provided in this embodiment;

[0073] Figure 2 This is a flowchart illustrating the first content translation method provided in this embodiment;

[0074] Figure 3 This is a schematic diagram of the first content translation interface provided in this embodiment;

[0075] Figure 4 This is a flowchart illustrating the display of input content provided in this embodiment;

[0076] Figure 5This is a schematic diagram of the interface for the display content input area provided in this embodiment;

[0077] Figure 6 This is a flowchart illustrating the first method for determining the content to be translated in the input content, as provided in this embodiment.

[0078] Figure 7 This is a schematic diagram of the second content translation interface provided in this embodiment;

[0079] Figure 8 This is a schematic diagram of the interface transformation of the content translation interface provided in this embodiment;

[0080] Figure 9 This is a flowchart illustrating the second method for determining the content to be translated in the input content, as provided in this embodiment.

[0081] Figure 10 This is a flowchart illustrating the third method for determining the content to be translated in the input content provided in this embodiment;

[0082] Figure 11 This is a flowchart illustrating the fourth method for determining the content to be translated in the input content provided in this embodiment;

[0083] Figure 12 This is a flowchart illustrating the process of displaying translated content provided in this embodiment;

[0084] Figure 13 This is a schematic diagram illustrating the interface transformation for displaying translation progress provided in this embodiment;

[0085] Figure 14 This is a schematic diagram illustrating the interface transformation when the translation control is switched to the undo control in this embodiment.

[0086] Figure 15 This is a schematic diagram of the interface transformation for canceling translation content provided in this embodiment;

[0087] Figure 16 This is a flowchart illustrating a content publishing method provided in this embodiment;

[0088] Figure 17 This is a flowchart illustrating an interaction method provided in this embodiment;

[0089] Figure 18 A structural block diagram of a content translation device provided in an embodiment;

[0090] Figure 19 An internal structural diagram of a computer device provided for an embodiment. Detailed Implementation

[0091] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0092] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.

[0093] The content translation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, that is, in the process of content translation by the terminal or by the terminal through the server, it should be noted that the content translation method can be executed on the terminal, on the server, or by interaction between the terminal and the server.

[0094] The content translation method of this application can be applied in the following scenarios, where a terminal displays input content. The terminal receives a translation operation initiated by a user, and in response to the translation operation on the input content, determines the content to be translated within the input content. The terminal translates the content to be translated to obtain translated content in the target language. The terminal sends a display request to a server, and the server controls the terminal to display the target content; wherein the target content includes the translated content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated.

[0095] The terminal can be a mobile phone, computer, tablet, or other device, or a smart wearable device such as a smart bracelet or smartwatch. The server refers to the application's server, which has terminal control and content translation functions. The server can be a standalone server or a server cluster.

[0096] In one embodiment, Figure 2 This is a flowchart illustrating a content translation method provided in an embodiment of this application, applied to... Figure 1 Taking the terminal in the example, the method includes the following steps:

[0097] S201, Display input content.

[0098] Input content refers to the initial content entered or selected by the user. Input content can also be content generated in response to user actions; for example, in response to a rating action on media content, input content can be generated based on the media content (e.g., initial rating content can be generated based on the user's rating style and the media content, with the output rating content used as input). Input content can be media content, notes, or conversation content.

[0099] Optionally, in this embodiment, the input content is displayed in the content input area of ​​the content translation interface; that is, the content translation interface displays the input content. Alternatively, in this embodiment, the user can input content in the content translation interface using an input control. As an optional implementation of this application, the content translation interface is displayed in response to a content translation operation performed on the target application; and in response to a content input operation in the content translation interface, a content translation interface containing the input content is displayed. As another optional implementation of this application, the content translation interface is displayed in response to an editing operation on the conversation content. The editing operation on the conversation content can be a selection operation or an input operation on the input content in the conversation content, which displays the content translation interface. That is, in a chat scenario, a selection operation on the input content in the conversation content can display the content translation interface containing the input content. Alternatively, an input operation on the input content in the conversation interface can display the content translation interface containing the input content.

[0100] Optionally, in this embodiment, one possible implementation of the content translation method is to display a prompt message upon first triggering the content translation interface. The prompt message guides the user to translate the input content into other languages ​​to facilitate communication with users from different countries. The prompt message can be displayed as a bubble or a pop-up window.

[0101] Optionally, another possible implementation of displaying input content in this embodiment is to display a content publishing interface in response to a comment operation on the target media, wherein the input content is displayed in the content publishing interface.

[0102] Optionally, another possible implementation of displaying input content in this embodiment is to display a conversation interface in response to a trigger operation for the interactive application, and to display input content in the conversation interface in response to a trigger operation or content selection operation for the input control in the conversation interface; wherein, the input content can be obtained based on the input control or can be selected conversation content.

[0103] S202, in response to a translation operation on the input content, determines the content to be translated in the input content.

[0104] Translation operation refers to the operation performed when there is a need to translate the input content.

[0105] As an optional implementation of this application, in response to the selection operation for a candidate language, the content to be translated in the input content is determined based on the target language pointed to by the selection operation.

[0106] Another optional implementation of this application involves determining the content to be translated within the input content upon receiving a control instruction for the input content. The control instruction can be a trigger operation on a target control (e.g., a translation control), or a text instruction derived from a voice message (e.g., "convert content to English").

[0107] As another optional implementation of this application, in response to a translation operation on the input content (e.g., in response to a trigger operation on the translation control), terminal location information is obtained, the current region is determined based on the terminal location information, a target language is selected from candidate languages ​​based on the current region, and the content to be translated in the input content is determined based on the target language.

[0108] As another optional implementation of this application, in response to a translation operation on the input content, the historical translation records of the current account are obtained, the historical translation language is determined based on the historical translation records, and the content to be translated in the input content is determined based on the historical translation language.

[0109] As another optional implementation of this application, in response to a translation operation on the input content, the presence of sensitive words in the input content is determined. If the presence of sensitive words is not found, the content to be translated in the input content is determined. If the presence of sensitive words is found, a second prompt message is displayed; wherein the second prompt message is used to indicate translation failure and the reason for failure; the reason for failure may be "Contains sensitive words, please modify".

[0110] S203, translate the content to be translated to obtain the translated content in the target language.

[0111] The target content refers to the content obtained after translating the input content. The target language refers to the language type required by the user.

[0112] Optionally, in this embodiment, to achieve batch translation of the input content, an optional implementation method for translating the content to be translated to obtain the translated content in the target language is as follows: In response to a trigger operation on the translation control, the content to be translated in the first content of the input content is determined, the content to be translated in the first content is translated to obtain the translated content in the target language, and this translated content is used as the original content so that this part of the content remains unchanged in the next translation operation. In response to a trigger operation on the translation control, the content to be translated in the second content of the input content is determined, the content to be translated in the second content is translated to obtain the translated content in the target language, and this translated content is used as the original content. The first content and the second content can be divided by paragraphs; for example, the first paragraph of the input content is the first content, and the second paragraph is the second content. Alternatively, the second content can be determined based on the first content according to a preset paragraph or step size; for example, the first paragraph of the input content is the first content, and the first and second paragraphs are the second content. Based on this embodiment, the input content can be translated in batches, while ensuring that the original content and the translated content remain unchanged. Only the content to be translated needs to be translated each time, which increases the flexibility of the translation method and reduces the pressure of a single translation.

[0113] Optionally, in this embodiment, the target language can be determined based on historical translation records, or it can be a language type selected by the user through a language selection control.

[0114] As an optional implementation of this application, the content to be translated is subjected to text conversion processing to obtain the text content corresponding to the content to be translated. Based on the target language, the text content is translated to obtain the translated content in the target language.

[0115] Another optional implementation method of this application is to segment the content to be translated into words / sentences based on a pre-built word and sentence mapping dictionary of the source language and the target language, and then perform matching dictionary and replacement splicing in sequence based on the target language to obtain the translated content in the target language.

[0116] Another optional implementation of this application involves using a pre-trained deep neural network translation model (such as Transformer) to encode the content to be translated into a semantic vector, and then decoding the semantic vector according to the target language to generate a translation result. The translation result contains the translated content in the target language.

[0117] As another optional implementation of this application, in the prior art, when translating content to be translated, a translation model is generally used to translate the content according to the required language type, resulting in poor accuracy of the translated content and failing to meet user needs. In this embodiment, to improve the accuracy of the translated content, an optional implementation method for translating the content to be translated to obtain the target language translation content is to generate a target translation instruction based on the target language. The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model translates the content to be translated based on the target translation instruction and the original content to obtain the target language translation content. Specifically, the target translation instruction is used to instruct the translation model to translate the content to be translated according to the context information of the target language and the content to be translated, thereby obtaining the target language translation content. In this embodiment, translation tags can be added to the content to be translated in advance, and sequence identifiers can be added to the content to be translated and the original content based on their position or sorting information in the input content. This allows the translation model to determine the content to be translated based on the translation tags, determine the context information of the content to be translated based on the sequence identifiers of the content to be translated, the sequence identifiers of the original content, and the original content, and determine the target language based on the target translation instruction, thereby translating the content to be translated to obtain the translated content in the target language. In this embodiment, the translation model considers the context information of the content to be translated when translating, improving the accuracy of the obtained translation and user satisfaction. Based on the above embodiment, in order to reduce the processing pressure of the translation model per cycle, an optional implementation method for inputting the target translation instruction, the content to be translated, and the original content into the translation model includes: obtaining the content length of the original content, wherein the content length can be represented by the number of bytes. If the content length is greater than a preset threshold, the original content is encoded to obtain a representation vector of the original content, and the target translation instruction, the content to be translated, and the representation vector are input into the translation model to reduce the processing pressure of the translation model per cycle.

[0118] S204, Display target content.

[0119] The target content includes the translation content and the original content in the input content. The original content is the content in the input content excluding the content to be translated.

[0120] Optionally, in this embodiment, the target content can be displayed in the content translation interface, content publishing interface, or conversation interface.

[0121] As an optional implementation of this application, the order of the content to be translated and the original content in the input content is obtained. Based on the arrangement order, the translation content and the original content corresponding to the content to be translated are arranged to obtain the target content, and the target content is displayed.

[0122] Another optional implementation of this application is to obtain the relative position of the content to be translated and the original content, sort the translated content and the original content according to the relative position to obtain the target content, and display the target content.

[0123] As another optional implementation of this application, the content to be translated is replaced with the translated content, while keeping the original content unchanged. Specifically, after obtaining the translated content, the content to be translated in the input content is replaced with the translated content, and the translated content and the original content are displayed, while the content to be translated is not displayed. The content of the original content and its relative position in the input content remain unchanged.

[0124] Another optional implementation of this application involves keeping the content to be translated and the original content unchanged. The translated content is displayed in the associated area of ​​the content to be translated. That is, after the translated content is obtained, the input content is still displayed normally, but the translated content is displayed in the associated area of ​​the content to be translated; for example, the corresponding translated content is displayed above or below the content to be translated. In this embodiment, the target content includes not only the content to be translated and the original content, but also the translated content.

[0125] Optionally, in this embodiment, one possible implementation of displaying the target content is to display a content publishing interface containing the target content. Based on this, in response to a content publishing operation, media content containing the target content is published. Another possible implementation of this embodiment is that the content translation interface includes a publishing control (e.g., a "Publish" control or...). Figure 3The "Post" control in the content translation interface, in response to a trigger operation on the post control, publishes media content containing the target content. The media content may also include image content, which is generated or added based on the image generation entry in the content translation interface. Another optional implementation of this embodiment is to generate image content based on the target content in response to the content posting operation, and then publish media content containing the image content and / or the target content. In this embodiment, an optional implementation of generating image content based on the target content is to input the target content into an AI generation tool, which then generates the image content based on the target content. Yet another optional implementation of this embodiment is to optimize the target content in response to the content posting operation to obtain optimized content, and then publish media content containing the optimized content. In this embodiment, an optional implementation of optimizing the target content to obtain optimized content is to input the target content into an AI tool and send an optimization command to the AI ​​tool, which then optimizes the target content based on the optimization command and outputs the optimized content. Optionally, in this embodiment, the content posting operation can be a trigger operation on the post control, or it can be a voice control message indicating content posting.

[0126] Based on this embodiment, when translating input content, batch translation of the input content can be achieved. Specifically, in response to the translation operation on the input content, the content to be translated in the current input content is determined, and the content to be translated is translated to obtain the translated content in the target language, thus obtaining the target content. Because the translated content is the content required by the user, it does not need to be translated again. In the next batch of translation, this translated content will not be used as the content to be translated. The target content as a whole is equivalent to the original content. After the user inputs new content again, the new content and the target content are used as new input content. In response to the translation operation on the new input content, the content to be translated in the new input content is determined. Since the target content in the previous batch already meets the requirements, the content to be translated only needs to be determined from the new content, and only the newly determined content to be translated needs to be translated. This realizes the phased (i.e., segment-by-segment) translation of the input content.

[0127] The above-described content translation method, in response to a translation operation on the input content, determines the target content within the input content. The target content is then translated to obtain target content in the target language, which is then displayed. The input content includes the target content and the original content within the input content, where the original content is all content in the input content except for the target content. In this embodiment, when there is a content translation requirement, in response to a translation operation on the input content, the target content within the input content is determined, and the target content is translated to obtain target content in the target language. This not only increases the flexibility and specificity of input content processing but also enhances the richness of the input content and the flexibility of its generation method. Furthermore, it facilitates users obtaining input content in different languages, enabling cross-language communication between users in different regions, thereby improving application resource utilization.

[0128] Based on the above embodiments, in order to facilitate the acquisition and intuitive display of input content, the content translation interface includes a content input area, such as... Figure 4 As shown, the input content is displayed in the content input area of ​​the content translation interface, including any of the following methods:

[0129] S401, Display the content translation interface, and in response to an input operation on the content input area of ​​the content translation interface, display the input content in the content translation interface.

[0130] Optionally, in this embodiment, as follows Figure 5 As shown, the content translation interface includes a content input area 501. In response to an input operation on the content input area of ​​the content translation interface, the input content is displayed in the content translation interface. Optionally, the input operation in this embodiment includes, but is not limited to, triggering operations on input controls (e.g., "keyboard" controls) associated with the content input area, triggering operations on voice input controls associated with the content input area, and selection operations on content selection areas (e.g., prop selection areas, expression selection areas, etc.) associated with the content input area.

[0131] Optionally, in this embodiment, in response to an input operation in the content input area of ​​the content translation interface, the content pointed to by the input operation is used as the input content, and the input content is displayed in the content translation interface. That is, in this embodiment, all input content can be used as the input content.

[0132] S402, display a content translation interface containing the initial content, and in response to a selection operation on the initial content, display the selected input content in the content translation interface.

[0133] Optionally, in this embodiment, the content pointed to by the input operation in the content input area in the above embodiments is used as the initial content. That is, all the content entered by the user through the content input area is used as the initial content.

[0134] Optionally, in this embodiment, in response to a selection operation on the initial content, an alternative implementation of displaying the selected input content in the content translation interface is to use the initial content pointed to by the selection operation as the input content and display the selected input content in the content translation interface.

[0135] Based on this embodiment, the flexibility of obtaining input content is improved, making it easier for users to flexibly determine the input content and display the input content more intuitively. In other words, all the input content can be used as the input content, or the content selected by the user can be used as the input content.

[0136] Based on the above embodiments, to increase the flexibility of determining the content to be translated, the content translation interface includes a function display area containing translation controls. In this context, one optional implementation for determining the content to be translated in the input content is to determine the content to be translated in the input content in response to a trigger operation on the translation controls. That is, after the user triggers the translation controls, the content to be translated is directly determined. In this case, the content to be translated can be the text content corresponding to the input content, for example, the text content within the input content, or the text content obtained after text conversion of the input content. Another optional implementation for determining the content to be translated in the input content is as follows... Figure 6 As shown, it includes the following steps:

[0137] S601, in response to a trigger operation on the translation control, displays the language selection area and shows candidate languages ​​in the language selection area.

[0138] Candidate languages ​​refer to language types that are considered as alternatives.

[0139] Optionally, in this embodiment, as follows Figure 7 As shown, the content translation interface displays a function display area 701, and the function display area 701 displays a translation control 702 (i.e., Figure 7 The "Translate" control in the text (e.g.) Figure 7 As shown, in addition to the translation control 702, other function controls are also displayed in the function display area 701.

[0140] Optionally, in this embodiment, the triggering operation for the translation control can be a click operation on the translation control, or a voice control operation on the translation control.

[0141] In this embodiment, one optional implementation of displaying the language selection area is to display a language selection interface in response to a trigger operation on the translation control; wherein the language selection interface displays a language selection area.

[0142] Another optional implementation of the language selection area in this embodiment is, in order to make reasonable use of the interface space of the content translation interface and reduce the development difficulty of translation operations, such as... Figure 8 As shown, in response to a triggered action on the translation control, the function display area is switched to the language selection area. For example, as... Figure 8 As shown, in response to a trigger operation on the "Translate" control, the function display area is switched to the language selection area. "English," "Japanese," "Korean," and "Spanish" are all candidate languages ​​in the language selection area. Optionally, in this embodiment, the language selection area also includes a return control (such as...). Figure 8 The “×” control shown in the middle right figure, in response to the trigger operation of the return control, switches the language selection area to the function display area. Based on this embodiment, the interface space of the content translation interface is reasonably utilized, and the language selection area can be displayed without making major changes to the original interface, thus reducing the development difficulty.

[0143] S602, in response to the selection operation for candidate languages, determines the content to be translated in the input content based on the selected target language.

[0144] As an optional implementation of this application, in response to a selection operation for a candidate language, the selected target language is obtained. Based on the target language and the instruction template, a content translation instruction is determined. Based on the content translation instruction, the content to be translated in the input content is determined. In this embodiment, assuming the instruction template is "translate the text to {target_language}" and the selected target language is "French", the content translation instruction generated based on the instruction template and the target language can be "translate the text to French". Based on the content translation instruction, the content to be translated in the input content is determined.

[0145] Another optional implementation of this application involves obtaining the selected target language in response to a selection operation for a candidate language. Based on the target language and the instruction list, content translation instructions are determined. The instruction list records various candidate languages ​​and the translation instructions associated with each candidate language.

[0146] As another optional implementation of this application, in response to the selection operation for a candidate language, the content to be translated in the input content is determined based on the selected target language and the user's translation style. The user's translation style can be pre-configured by the user or determined based on the user's historical translation records.

[0147] In this embodiment, in response to a trigger operation on the translation control, a language selection area is displayed, and candidate languages ​​are shown in the language selection area; in response to a selection operation on a candidate language, the content to be translated in the input content is determined based on the selected target language. This embodiment increases the flexibility and specificity of determining the content to be translated.

[0148] Based on the above embodiments, in order to avoid wasting terminal computing resources, such as Figure 9 As shown, an optional implementation of determining the content to be translated in the input content in response to a translation operation on the input content includes:

[0149] S901, in response to a trigger operation on the translation control, determines whether there is valid text in the input content.

[0150] As an optional implementation of this application, in response to a trigger operation on the translation control, it is determined whether there is text content in the input content; if so, it is determined whether there is valid text in the input content; otherwise, it is determined that there is no valid text in the input content.

[0151] As an optional implementation of this application, in response to a trigger operation on the translation control, it is determined whether there is text content other than the target language in the input content. If so, it is determined whether there is valid text in the input content; otherwise, it is determined that there is no valid text in the input content.

[0152] S902, if valid text exists, determine the content to be translated in the input content.

[0153] Optionally, in this embodiment, if the third prompt message is not present, a third prompt message is displayed; wherein, the third prompt message is used to prompt the user that valid text needs to be entered before translation can be used.

[0154] In this embodiment, in response to a trigger operation on the translation control, it is determined whether there is valid text in the input content. If so, the content to be translated in the input content is determined. Based on this embodiment, after triggering the translation control, it is first determined whether there is valid text. Only when valid text exists is the subsequent operation performed, namely, the operation of displaying the language selection area, which avoids the waste of terminal resources.

[0155] Based on the above embodiments, in order to further avoid wasting terminal computing resources and generate invalid content translation instructions, such as... Figure 10 As shown, one optional implementation method for determining the content to be translated in the input content based on the selected target language includes:

[0156] S1001, Get the language type of the text content in the input content.

[0157] Among them, language type must be at least one. Text content refers to the text content contained in the input content.

[0158] As an optional implementation of this application, characters of different candidate languages ​​have fixed encoding ranges (Unicode encoding ranges). By detecting the encoding distribution of characters in the text content, the language type of the text content can be quickly determined.

[0159] Another optional implementation of this application is to utilize the fact that "different candidate languages ​​have unique word / character combination rules" to construct a high-frequency word / character combination (NGram, i.e., n consecutive characters) dictionary for various candidate languages ​​in advance. By calculating the matching degree between the text content and each language dictionary, the language type contained in the text content can be determined.

[0160] Another optional implementation of this application involves pre-training a deep learning model (e.g., BERT, XLM-R) on massive amounts of multilingual text to obtain a language analysis model. The text content is then input into the language analysis model to obtain the language types contained within the text content.

[0161] S1002, if the language type includes other languages, determine the content to be translated in the input content based on the selected target language.

[0162] Other languages ​​are those other than the target language.

[0163] As an optional implementation of this application, when there are at least two language types, it is determined that the language types include other languages. In this case, the content to be translated in the input content is determined based on the selected target language.

[0164] As another optional implementation of this application, when the language type is one and is not the target language, the content to be translated in the input content is determined based on the selected target language.

[0165] Optionally, in this embodiment, one possible implementation of the content translation method is to display a first prompt message when the language type only includes the target language; wherein the first prompt message is used to indicate that the language type of the input content is the target language. For example, the first prompt message could be "The current text does not need to be translated".

[0166] In this embodiment, the language type of the text content in the input is obtained. Only if the language type includes other languages ​​is the content to be translated in the input determined based on the selected target language; where other languages ​​are languages ​​other than the target language. This avoids blindly determining the content to be translated in the input and saves terminal resources.

[0167] Based on the above embodiments, to make the obtained translation content more targeted and better meet user needs, an optional implementation method for determining the translation content in the input content is to use the text content other than the target language in the input content as the translation content. Specifically, the text content in the input content is obtained, and the language type of the text content is obtained. The text content other than the target language is used as the translation content. Another optional implementation method for determining the translation content in the input content is as follows: Figure 11 As shown, it includes the following steps:

[0168] S1101, Based on the position information of the target language and the corresponding text content in the input content, determine the content to be translated in the input content.

[0169] As an optional implementation of this application, the input content is converted into initial text, and the portion of text following the target language text is used as the content to be translated from the input content. It should be noted that if the input content contains images, the images also need to be converted into text content.

[0170] Another optional implementation of this application is to obtain the text content in the input content. All text content following the text content corresponding to the target source is taken as the text to be translated in the input content.

[0171] In this embodiment, the text content in the input content other than the target language can be used as the content to be translated. Furthermore, the content to be translated in the input content can be determined based on the target language and the position information of the corresponding text content within the input content. This embodiment improves the flexibility and specificity of determining the content to be translated, while also making the determined content more aligned with user needs.

[0172] Based on the above embodiments, in order to facilitate users to understand the translation progress in a timely manner, such as Figure 12As shown, optional implementation methods for translating content to obtain translated content in the target language include:

[0173] S1201, based on the target language, translates the content to be translated and displays the translation progress.

[0174] Translation progress refers to the progress of the translation of the content to be translated.

[0175] As an optional implementation of this application, the content to be translated is translated based on the target language, and the translation progress is displayed in the content translation interface.

[0176] Another optional implementation of this application is to translate the content to be translated based on the target language and display the translation progress on the translation control. Specifically, as shown below... Figure 13 As shown, in response to the selection operation for candidate languages, the selected target language is obtained, and the language selection area is switched to the function display area. Based on the selected target language ("English" in this embodiment), a content translation instruction is generated. Based on the content translation instruction, the input content is translated, and the translation control in the function display area is displayed. Figure 13 The translation progress is displayed on the "Translate" control in the middle. Figure 13 The translation progress is indicated by a flashing or still ellipsis (...).

[0177] Optionally, in this embodiment, the content to be translated is translated based on the target language, and the translated content is obtained. Based on the translated content, the translation progress is determined. The translated content is displayed in the content input area, along with the translation progress. In this embodiment, the translated content can be dynamically displayed, and the translation progress can be displayed and updated in real time.

[0178] Optionally, in this embodiment, the translation progress can be a percentage completed, a progress bar, translation prompts (e.g., "translating in progress"), or a "being executed" indicator (e.g., ...). Figure 13 The blinking or still ellipsis (...) in the text.

[0179] Optionally, in this embodiment, the content to be translated is translated based on the target language, and a sweeping light effect and translation progress are displayed on the input content.

[0180] S1202, when the translation progress is "translation complete", displays the translated content in the target language.

[0181] Optionally, in some embodiments, after obtaining the translated content, one possible implementation of the content translation method is that, after the user triggers the translation operation, if it is necessary to restore to the original content to be translated, the translation result must be manually deleted and the content to be translated must be re-entered / pasted. This operation path is long and the interaction efficiency is low. At the same time, the interface control only displays the "translate" function and cannot dynamically switch to a back function control according to the user's operation status, resulting in a mismatch between the interface interaction logic and the user's actual operation needs, affecting the user experience. To facilitate returning to the content to be translated, after completing the translation operation for the content to be translated, the translation control is switched to an undo control. In response to the triggering operation of the undo control, the translated content is replaced with the content to be translated. For example, as shown... Figure 14 As shown, when the translation progress indicates that the translation is complete, the translation control (i.e., the "Translate" control) in the function display area is switched to the undo control (i.e., ...). Figure 14 (e.g., the "Undo" control in the text). Figure 15 As shown, in response to a trigger operation on the undo control, the translated content is replaced with the content to be translated. In this embodiment, by dynamically switching the translation control to the undo control, the user can replace the translated content with the content to be translated with a single click after triggering the undo operation, without the need for manual deletion and re-entry, significantly shortening the path of the rollback operation and reducing operational costs.

[0182] Based on the above embodiments, after the translation control is switched to the undo control, one possible implementation of the content translation method is to switch the undo control to the translation control in response to an update operation on the target content. The update operation includes, but is not limited to, adding or deleting operations. That is, after obtaining the target content, if the target content is updated, the undo control will be switched to the translation control.

[0183] Optionally, in this embodiment, after displaying the target content, new content can be entered in the content input area, and a translation operation can be performed on the new content.

[0184] In this embodiment, the content to be translated is translated based on the target language, and the translation progress is displayed. When the translation progress indicates completion, the target content is displayed. This embodiment allows users to easily monitor the translation progress in real time, improving user satisfaction.

[0185] In one embodiment, Figure 16 This is a flowchart illustrating a content publishing method provided in an embodiment of this application, applied to... Figure 1 Taking the terminal in the example, the method includes the following steps:

[0186] S1601, Displays the content publishing interface containing the input content.

[0187] The content publishing interface refers to the interface used to publish media content. This interface can be a note-taking interface, a media publishing interface, a review content publishing interface, etc., for example... Figure 5 As shown, this could be the evaluation and publishing interface.

[0188] As an optional implementation of this application, in response to an evaluation operation on media content (e.g., a trigger operation on the "evaluation" control), a content publishing interface containing input content is displayed; wherein, the input content can be content entered by the user or content generated based on the media content.

[0189] Another optional implementation of this application is to display a content publishing interface in response to a content publishing operation. Input content is displayed in response to a triggering operation on an input control in the content publishing interface or a selection operation on initial content. For example, a note publishing interface is displayed in response to a note publishing operation.

[0190] S1602, in response to a translation operation on the input content, determines the content to be translated in the input content.

[0191] It should be noted that the specific operation of determining the content to be translated in the input content in response to the translation operation on the input content is described in detail in the above embodiments and will not be repeated here.

[0192] S1603, translate the content to be translated to obtain the translated content in the target language.

[0193] It should be noted that the specific steps for translating the content to be translated into the target language are described in detail in the above embodiments, and will not be repeated here.

[0194] S1604, Display target content.

[0195] The target content includes the translation content and the original content in the input content. The original content is the content in the input content excluding the content to be translated.

[0196] It should be noted that the specific operations for displaying the target content are described in detail in the above embodiments, and will not be repeated here.

[0197] S1605, in response to a content publishing operation, publishes media content containing the target content.

[0198] An optional implementation of this embodiment is that the content publishing interface includes a publishing control (e.g., a "Publish" control or...). Figure 13The "Post" control in the content publishing interface responds to a trigger action on the post control and publishes media content containing the target content. This media content may also include image content, which is generated or added based on the image generation entry in the content publishing interface.

[0199] Another optional implementation of this embodiment is to generate image content based on the target content in response to the content publishing operation, and then publish media content containing the image content and / or the target content. In this embodiment, an optional implementation of generating image content based on the target content is to input the target content into an AI generation tool, which then generates the image content based on the target content.

[0200] Another optional implementation of this embodiment is to optimize the target content in response to a content publishing operation, obtain optimized content, and publish media content containing the optimized content. An optional implementation of optimizing the target content in this embodiment is to input the target content into an AI tool and send optimization instructions to the AI ​​tool. The AI ​​tool then optimizes the target content based on the optimization instructions and outputs the optimized content. Optionally, the content publishing operation in this embodiment can be a trigger operation for a publishing control, or it can be a voice control message representing content publishing.

[0201] In this embodiment, a content publishing interface containing input content is displayed. In response to a translation operation on the input content, the content to be translated is determined. The content to be translated is translated to obtain translated content in the target language. The target content is displayed; wherein, the target content includes the translated content and the original content in the input content, the original content being the content in the input content excluding the content to be translated. In response to a content publishing operation, media content containing the target content is published. In this embodiment, in a content publishing scenario, a translation operation can be performed on the content to be published, facilitating users to publish media content in their desired language type, while also allowing readers to quickly understand the media content, thus improving the utilization rate of the configured content publishing resources.

[0202] In one embodiment, Figure 17 This is a flowchart illustrating an interaction method provided in an embodiment of this application, in which the method is applied... Figure 1 Taking the terminal in the example, the method includes the following steps:

[0203] S1701, Displays a conversational interface containing input content.

[0204] In this context, the chat interface refers to the private or group chat interface used for online interaction between users. A private chat interface is used when two users are interacting online. A group chat interface is used when three or more users are interacting online.

[0205] Optionally, in this embodiment, the target content can be the content entered in the input box in the conversation interface, or it can be the selected historical conversation content.

[0206] S1702, in response to a translation operation on the input content, determine the content to be translated in the input content.

[0207] Optionally, in this embodiment, the conversation interface includes a translation control. In response to a trigger operation on the translation control in the conversation interface, a language selection area is displayed; candidate languages ​​are displayed in the language selection area. In response to a selection operation on a candidate language, the content to be translated in the input content is determined based on the selected target language.

[0208] It should be noted that, in response to the translation operation on the input content, the method for determining the content to be translated in the input content can also refer to the method for determining the content to be translated in the input content in the above embodiments, and will not be repeated here.

[0209] S1703, translate the content to be translated to obtain the translated content in the target language.

[0210] It should be noted that the specific steps for translating the content to be translated into the target language are described in detail in the above embodiments, and will not be repeated here.

[0211] S1704, Display target content.

[0212] The target content includes the translation content and the original content in the input content. The original content is the content in the input content excluding the content to be translated.

[0213] It should be noted that the specific operations for displaying the target content are described in detail in the above embodiments, and will not be repeated here.

[0214] S1705, in response to the content sending operation, display the target session content containing the target content in the session content display area of ​​the session interface.

[0215] Optionally, in this embodiment, a send control is displayed in the conversation interface. In response to the triggering operation of the send control, the target conversation content containing the target content is displayed in the conversation content display area of ​​the conversation interface.

[0216] It should be noted that the specific implementation schemes for each step in this embodiment are described in detail in the various embodiments of the above-mentioned translation method, and will not be repeated here.

[0217] In this embodiment, a conversation interface containing input content is displayed. In response to a translation operation on the input content, the content to be translated is determined. The content to be translated is translated to obtain the translated content in the target language. The target content is displayed; wherein, the target content includes the translated content and the original content in the input content, the original content being the content in the input content excluding the content to be translated. In response to a content sending operation, conversation content containing the target content is displayed in the conversation content display area of ​​the conversation interface. This embodiment improves the online interaction efficiency for users in different regions, quickly enabling cross-language interaction between users in different regions, not only improving the utilization rate of interactive resources but also facilitating the promotion of interactive applications.

[0218] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0219] Based on the same inventive concept, this application also provides a content translation apparatus for implementing the content translation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more content translation apparatus embodiments provided below can be found in the limitations of the content translation method described above, and will not be repeated here.

[0220] In one embodiment, by Figure 18 A structural block diagram of a content translation device in one embodiment is shown. Figure 17 As shown, a content translation device 1 is provided, which includes: a first display module 10, a first determining module 20, a translation module 30, and a second display module 40, wherein:

[0221] The first display module 10 is used to display the input content;

[0222] The first determining module 20 is used to determine the content to be translated in the input content in response to a translation operation on the input content;

[0223] Translation module 30 is used to translate the content to be translated and obtain the translated content in the target language;

[0224] The second display module 40 is used to display the target content; wherein, the target content includes the translation content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated.

[0225] In one embodiment, the first display module is further specifically used for:

[0226] The input content is displayed in the content input area of ​​the content translation interface; the content translation interface also includes a function display area, which contains translation controls;

[0227] In response to a translation operation on the input content, determine the content to be translated in the input content, including any of the following:

[0228] In response to a trigger action on the translation control, determine the content to be translated in the input content;

[0229] In response to a trigger operation on the translation control, the function display area is switched to the language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

[0230] In one embodiment, the first determining module is further specifically used for:

[0231] In response to a translation operation on the input content, determine whether there is valid text in the target content;

[0232] If valid text exists, determine the content to be translated from the input.

[0233] In one embodiment, the translation module is further specifically used for:

[0234] Based on the target language, the content to be translated is translated, and the translation progress is displayed;

[0235] When the translation progress indicates that the translation is complete, the translated content in the target language will be displayed.

[0236] In one embodiment, after obtaining the translated content, a content translation device 1 further includes:

[0237] The switching module is used to switch the translation control to an undo control;

[0238] The Replace module is used to replace the translated content with the content to be translated in response to a trigger action on the undo control.

[0239] In one embodiment, the translation module is further specifically used for:

[0240] Generate target translation instructions based on the target language;

[0241] The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model can translate the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

[0242] In one embodiment, the translation module is further specifically used for:

[0243] Get the length of the original content;

[0244] If the content length exceeds a preset threshold, obtain the representation vector of the original content;

[0245] The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

[0246] In one embodiment, the second display module is further specifically used for:

[0247] Replace the content to be translated with the content to be translated, while keeping the original content unchanged.

[0248] In one embodiment, the target content further includes content to be translated, and the second display module is specifically used for:

[0249] The content to be translated must remain unchanged from the original content;

[0250] The translated content is displayed in the associated area of ​​the content to be translated.

[0251] In one embodiment, the determining module is further specifically used for:

[0252] The text content other than the target language in the input content is taken as the content to be translated;

[0253] Based on the location information of the target language and its corresponding text content within the input content, the content to be translated in the input content is determined.

[0254] In one embodiment, a computer device is provided, which may be a platform-side device, and its internal structure diagram may be as follows: Figure 19As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores published content information. The network interface communicates with an external user via a network connection. When executed by the processor, the computer program implements a content translation method.

[0255] Those skilled in the art will understand that Figure 19 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specifically, the computer device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0256] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0257] Display the input content;

[0258] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0259] The content to be translated is translated to obtain the translated content in the target language;

[0260] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0261] In one embodiment, when the processor executes a computer program, it further performs the following steps: displaying input content, including:

[0262] The input content is displayed in the content input area of ​​the content translation interface; the content translation interface also includes a function display area, which contains translation controls;

[0263] In response to a translation operation on the input content, determine the content to be translated in the input content, including any of the following:

[0264] In response to a trigger action on the translation control, determine the content to be translated in the input content;

[0265] In response to a trigger operation on the translation control, the function display area is switched to the language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

[0266] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to a translation operation on the input content, determining the content to be translated in the input content, including:

[0267] In response to a translation operation on the input content, determine whether there is valid text in the target content;

[0268] If valid text exists, determine the content to be translated from the input.

[0269] In one embodiment, when the processor executes the computer program, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0270] Based on the target language, the content to be translated is translated, and the translation progress is displayed;

[0271] When the translation progress indicates that the translation is complete, the translated content in the target language will be displayed.

[0272] In one embodiment, when the processor executes the computer program, it further performs the following steps: after obtaining the translated content, the method further includes:

[0273] Switch the translation control to the undo control;

[0274] In response to a trigger action on the undo control, replace the translated content with the content to be translated.

[0275] In one embodiment, when the processor executes the computer program, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0276] Generate target translation instructions based on the target language;

[0277] The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model can translate the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

[0278] In one embodiment, when the processor executes the computer program, it further performs the following steps: inputting the target translation instructions, the content to be translated, and the original content into the translation model, including:

[0279] Get the length of the original content;

[0280] If the content length exceeds a preset threshold, obtain the representation vector of the original content;

[0281] The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

[0282] In one embodiment, when the processor executes the computer program, it further performs the following steps: displaying target content, including:

[0283] Replace the content to be translated with the content to be translated, while keeping the original content unchanged.

[0284] In one embodiment, when the processor executes the computer program, it further performs the following steps: the target content also includes content to be translated, and the target content is displayed, including:

[0285] The content to be translated must remain unchanged from the original content;

[0286] The translated content is displayed in the associated area of ​​the content to be translated.

[0287] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the content to be translated in the input content, including any of the following:

[0288] The text content other than the target language in the input content is taken as the content to be translated;

[0289] Based on the location information of the target language and its corresponding text content within the input content, the content to be translated in the input content is determined.

[0290] In one embodiment, another computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0291] Displays the content publishing interface containing the input content;

[0292] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0293] The content to be translated is translated to obtain the translated content in the target language;

[0294] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0295] In response to a content publishing operation, publish media content containing the target content.

[0296] In one embodiment, yet another computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to perform the following steps:

[0297] Displays a conversation interface containing the input content;

[0298] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0299] The content to be translated is translated to obtain the translated content in the target language;

[0300] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0301] In response to a content sending operation, the session content containing the target content is displayed in the session content display area of ​​the session interface.

[0302] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0303] Display the input content;

[0304] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0305] The content to be translated is translated to obtain the translated content in the target language;

[0306] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0307] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: displaying input content, including:

[0308] The input content is displayed in the content input area of ​​the content translation interface; the content translation interface also includes a function display area, which contains translation controls;

[0309] In response to a translation operation on the input content, determine the content to be translated in the input content, including any of the following:

[0310] In response to a trigger action on the translation control, determine the content to be translated in the input content;

[0311] In response to a trigger operation on the translation control, the function display area is switched to the language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

[0312] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: in response to a translation operation on the input content, determining the content to be translated in the input content, including:

[0313] In response to a translation operation on the input content, determine whether there is valid text in the target content;

[0314] If valid text exists, determine the content to be translated from the input.

[0315] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0316] Based on the target language, the content to be translated is translated, and the translation progress is displayed;

[0317] When the translation progress indicates that the translation is complete, the translated content in the target language will be displayed.

[0318] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: After obtaining the translated content, the method further includes:

[0319] Switch the translation control to the undo control;

[0320] In response to a trigger action on the undo control, replace the translated content with the content to be translated.

[0321] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0322] Generate target translation instructions based on the target language;

[0323] The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model can translate the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

[0324] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: inputting the target translation instructions, the content to be translated, and the original content into the translation model, including:

[0325] Get the length of the original content;

[0326] If the content length exceeds a preset threshold, obtain the representation vector of the original content;

[0327] The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

[0328] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: displaying target content, including:

[0329] Replace the content to be translated with the content to be translated, while keeping the original content unchanged.

[0330] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: the target content also includes content to be translated, and the target content is displayed, including:

[0331] The content to be translated must remain unchanged from the original content;

[0332] The translated content is displayed in the associated area of ​​the content to be translated.

[0333] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the content to be translated in the input content, including any of the following:

[0334] The text content other than the target language in the input content is taken as the content to be translated;

[0335] Based on the location information of the target language and its corresponding text content within the input content, the content to be translated in the input content is determined.

[0336] In one embodiment, another computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, performs the following steps:

[0337] Displays the content publishing interface containing the input content;

[0338] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0339] The content to be translated is translated to obtain the translated content in the target language;

[0340] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0341] In response to a content publishing operation, publish media content containing the target content.

[0342] In one embodiment, yet another computer-readable storage medium is provided, having a computer program stored thereon that, when executed by a processor, performs the following steps:

[0343] Displays a conversation interface containing the input content;

[0344] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0345] The content to be translated is translated to obtain the translated content in the target language;

[0346] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0347] In response to a content sending operation, the session content containing the target content is displayed in the session content display area of ​​the session interface.

[0348] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0349] Display the input content;

[0350] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0351] The content to be translated is translated to obtain the translated content in the target language;

[0352] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated.

[0353] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: displaying input content, including:

[0354] The input content is displayed in the content input area of ​​the content translation interface; the content translation interface also includes a function display area, which contains translation controls;

[0355] In response to a translation operation on the input content, determine the content to be translated in the input content, including any of the following:

[0356] In response to a trigger action on the translation control, determine the content to be translated in the input content;

[0357] In response to a trigger operation on the translation control, the function display area is switched to the language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

[0358] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: in response to a translation operation on the input content, determining the content to be translated in the input content, including:

[0359] In response to a translation operation on the input content, determine whether there is valid text in the target content;

[0360] If valid text exists, determine the content to be translated from the input.

[0361] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0362] Based on the target language, the content to be translated is translated, and the translation progress is displayed;

[0363] When the translation progress indicates that the translation is complete, the translated content in the target language will be displayed.

[0364] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: After obtaining the translated content, the method further includes:

[0365] Switch the translation control to the undo control;

[0366] In response to a trigger action on the undo control, replace the translated content with the content to be translated.

[0367] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: translating the content to be translated to obtain translated content in the target language, including:

[0368] Generate target translation instructions based on the target language;

[0369] The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model can translate the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

[0370] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: inputting the target translation instructions, the content to be translated, and the original content into the translation model, including:

[0371] Get the length of the original content;

[0372] If the content length exceeds a preset threshold, obtain the representation vector of the original content;

[0373] The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

[0374] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: displaying target content, including:

[0375] Replace the content to be translated with the content to be translated, while keeping the original content unchanged.

[0376] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: the target content also includes content to be translated, and the target content is displayed, including:

[0377] The content to be translated must remain unchanged from the original content;

[0378] The translated content is displayed in the associated area of ​​the content to be translated.

[0379] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: determining the content to be translated in the input content, including any of the following:

[0380] The text content other than the target language in the input content is taken as the content to be translated;

[0381] Based on the location information of the target language and its corresponding text content within the input content, the content to be translated in the input content is determined.

[0382] In one embodiment, another computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0383] Displays the content publishing interface containing the input content;

[0384] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0385] The content to be translated is translated to obtain the translated content in the target language;

[0386] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0387] In response to a content publishing operation, publish media content containing the target content.

[0388] In one embodiment, yet another computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0389] Displays a conversation interface containing the input content;

[0390] In response to a translation operation on the input content, determine the content to be translated in the input content;

[0391] The content to be translated is translated to obtain the translated content in the target language;

[0392] Display the target content; the target content includes the translation content and the original content in the input content, where the original content is the content in the input content excluding the content to be translated;

[0393] In response to a content sending operation, the session content containing the target content is displayed in the session content display area of ​​the session interface.

[0394] It should be noted that the data involved in this application (including but not limited to messages and information during the interaction process) are all data that have been fully authorized by all parties, and the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0395] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0396] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0397] The above embodiments merely illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application's patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A content translation method, characterized in that, The method includes: Display the input content; In response to a translation operation on the input content, determine the content to be translated in the input content; The content to be translated is translated to obtain the translated content in the target language; Display target content; wherein, the target content includes the translated content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated.

2. The method according to claim 1, characterized in that, Display the input content, including: The input content is displayed in the content input area of ​​the content translation interface; wherein, the content translation interface also includes a function display area, which contains translation controls; The determination of the content to be translated in the input content in response to a translation operation on the input content includes any one of the following: In response to a trigger operation on the translation control, the content to be translated in the input content is determined; In response to a trigger operation on the translation control, the function display area is switched to a language selection area, and candidate languages ​​are displayed in the language selection area; in response to a selection operation on the candidate languages, the content to be translated in the input content is determined based on the selected target language.

3. The method according to claim 1, characterized in that, In response to a translation operation on the input content, determining the content to be translated in the input content includes: In response to a translation operation on the input content, determine whether there is valid text in the target content; If valid text exists, determine the content to be translated from the input content.

4. The method according to claim 2, characterized in that, The process of translating the content to be translated to obtain the translated content in the target language includes: Based on the target language, the content to be translated is translated, and the translation progress is displayed; When the translation progress indicates that the translation is complete, the translated content in the target language is displayed.

5. The method according to claim 4, characterized in that, After obtaining the translated content, the method further includes: Switch the translation control to an undo control; In response to a trigger operation on the undo control, the translated content is replaced with the content to be translated.

6. The method according to claim 1, characterized in that, The process of translating the content to be translated to obtain the translated content in the target language includes: Based on the target language, generate target translation instructions; The target translation instruction, the content to be translated, and the original content are input into the translation model, so that the translation model translates the content to be translated based on the target translation instruction and the original content to obtain the translated content in the target language.

7. The method according to claim 6, characterized in that, The step of inputting the target translation instruction, the content to be translated, and the original content into the translation model includes: Obtain the length of the original content; If the length of the content is greater than a preset threshold, obtain the representation vector of the original content; The target translation instruction, the content to be translated, and the representation vector are input into the translation model.

8. The method according to claim 1, characterized in that, The target content to be displayed includes: Replace the content to be translated with the translated content, while keeping the original content unchanged.

9. The method according to claim 1, characterized in that, The target content also includes content to be translated, and the display of the target content includes: The content to be translated and the original content are kept unchanged; The translated content is displayed in the associated area of ​​the content to be translated.

10. The method according to claim 1, characterized in that, Determining the content to be translated in the input content includes any one of the following: The text content other than the target language in the input content is taken as the content to be translated; Based on the position information of the target language and the corresponding text content in the input content, the content to be translated in the input content is determined.

11. A content publishing method, characterized in that, The method includes: Displays the content publishing interface containing the input content; In response to a translation operation on the input content, determine the content to be translated in the input content; The content to be translated is translated to obtain the translated content in the target language; Display target content; wherein, the target content includes the translated content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated; In response to a content publishing operation, media content containing the target content is published.

12. An interaction method, characterized in that, The method includes: Displays a conversation interface containing the input content; In response to a translation operation on the input content, determine the content to be translated in the input content; The content to be translated is translated to obtain the translated content in the target language; Display target content; wherein, the target content includes the translated content and the original content in the input content, and the original content is the content in the input content excluding the content to be translated; In response to a content sending operation, session content containing the target content is displayed in the session content display area of ​​the session interface.

13. A content translation device, characterized in that, The device includes: The first display module is used to display the input content; The first determining module is configured to determine the content to be translated in the input content in response to a translation operation on the input content; The translation module is used to translate the content to be translated to obtain the translated content in the target language; The second display module is used to display target content; wherein, the target content includes translated content and original content in the input content, and the original content is the content in the input content excluding the content to be translated.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 12.

16. A computer program product comprising computer-executable instructions, characterized in that, The instructions are executed by the processor to implement the method of any one of claims 1 to 12.