Message Processing Method, Apparatus, Device, and Medium
The message processing method and apparatus address the challenge of translation errors in instant messaging by enabling users to easily switch between original and translated text, thereby enhancing user experience and communication efficiency in cross-lingual communication.
Patent Information
- Application Number
- JP2024565269
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-05
- Filing Date
- 2023-05-17
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2043-05-17
AI Technical Summary
Current instant messaging systems face challenges in cross-lingual communication, particularly in efficiently handling translation errors, as users often need to manually edit or re-enter text after making mistakes.
A message processing method and apparatus that allows users to input original text, display corresponding translations, and easily switch between original and translated text within the input frame, with specific operations for using and canceling the translated text.
This solution enhances user experience by allowing seamless cancellation of translated text, reducing the need for re-entry after errors, and improving communication efficiency in cross-lingual scenarios.
Smart Images

Figure 2025518475000001_ABST
Abstract
Description
Technical Field
[0001] [Cross - reference to Related Applications] This application claims priority to a Chinese patent application filed with the Chinese Patent Office on May 24, 2022, with application number 202210571461.9 and application title "Method, Apparatus, Electronic Device, and Storage Medium for Implementing Conversation Translation", and this application also claims priority to a Chinese patent application filed with the Chinese Patent Office on July 5, 2022, with application number 202210784607.8 and application title "Message Processing Method, Apparatus, Device, and Medium", and all of their contents are incorporated herein by reference. This application relates to the field of computer technology, specifically to message processing methods, apparatuses, devices, and media.
Background Art
[0002] Currently, in order to improve communication efficiency, users communicate information via instant messengers. In a global collaboration scenario, cross - lingual communication is a pain point for many users. Based on this, some instant messengers support the function of "translating while inputting".
Summary of the Invention
[0003] Therefore, embodiments of this application provide a message processing method, apparatus, device, and medium that enable the cancellation of the translated text used when the user makes a misoperation, thereby improving the user experience.
[0004] To achieve the above object, the technical solution according to this application is as follows.
[0005] According to a first aspect of this application, in response to the input of the original message text in the input box, displaying the message translation corresponding to the original message text in the translation text area; In response to a first predetermined operation of using the translated text, displaying the translated text of the message in the input frame; In response to a second predetermined operation of canceling the use of the translated text, displaying the original text of the message in the input frame, and providing a message processing method.
[0006] According to a second aspect of the present application, a first display unit for displaying a translated text of the message corresponding to the original text of the message in a translation text area in response to the original text of the message being input into an input frame; a second display unit for displaying the translated text of the message in the input frame in response to a first predetermined operation of using the translated text; a third display unit for displaying the original text of the message in the input frame in response to a second predetermined operation of canceling the use of the translated text, and providing a message processing device.
[0007] According to a third aspect of the present application, a memory for storing instructions or a computer program; a processor for executing the instructions or the computer program in the memory to cause the electronic device to implement the method described in the first aspect, and providing an electronic device.
[0008] According to a fourth aspect of the present application, there is provided a computer-readable storage medium storing instructions that, when executed on a device, cause the device to implement the method described in the first aspect.
[0009] According to a fifth aspect of the present application, there is provided a computer program product including a computer program / instructions that, when executed by a processor, cause the method described in the first aspect to be implemented.
[0010] Therefore, the embodiments of the present application have the following beneficial effects.
[0011] In an embodiment of the present application, when a user uses the "translate while inputting" function via an instant messenger, in response to the message original text being input into the input box, a message translation corresponding to the message original text is displayed in the translation text area. When the user triggers a first predetermined operation to use the translation text, the message translation text is displayed in the input box. When the user triggers a second predetermined operation to cancel the use of the translation text, the message original text is displayed in the input box. That is, the present application provides a cancellation function, and through the second predetermined operation, it is possible to return to the previous step, avoiding the need for the user to re-enter after a misoperation and improving the user experience.
[0012] According to a sixth aspect of the present application, in response to an input operation in the user's conversation interface, corresponding input text is displayed in the input area of the conversation interface, wherein the input text has a first text format, obtaining a translation text of the input text, wherein the translation text has a second text format, and the second text format of the translation text is the same as the first text format of the input text, displaying the translation text in the translation text display area of the conversation interface, and a method for realizing conversation translation is provided.
[0013] According to a seventh aspect of the present application, a first display unit for displaying corresponding input text in the input area of the conversation interface in response to an input operation in the user's conversation interface, wherein the input text has a first text format, a text acquisition unit for acquiring a translation text of the input text, wherein the translation text has a second text format, and the second text format of the translation text is the same as the first text format of the input text, A device for realizing conversation translation, comprising a second display unit for displaying the translation text in the translation text display area of the conversation interface.
[0014] According to an eighth aspect of the present application, An electronic device is provided, including a processor and a memory configured to store computer-executable instructions that, when executed, cause the processor to perform the steps of the method according to the sixth aspect above.
[0015] According to a ninth aspect of the present application, a computer-readable storage medium is provided for storing computer-executable instructions that, when executed by a processor, cause the processor to perform the steps of the method according to the sixth aspect above.
[0016] According to a tenth aspect of the present application, a computer program product is provided, including a computer program / instruction that, when executed by a processor, causes the processor to perform the method according to the sixth aspect.
[0017] In the embodiments of this specification, in response to an input operation in the user's conversation interface, the corresponding input text is displayed in the input area of the conversation interface. The input text has a first text format, the translation text of the input text is obtained, and the translation text has a second text format. The second text format of the translation text is consistent with the first text format of the input text, and the translation text is displayed in the translation text display area of the conversation interface. Therefore, in this embodiment, the input text in the user's conversation can be translated in real time to obtain the translation text, and the consistency of the text formats of the translation text and the input text can be maintained. Due to the format synchronization ability between the translation text and the input text, the user's expression intention can be better retained in the translation text, the communication efficiency between users in a cross-lingual communication scenario can be improved, and the efficiency of the user's collaborative work can be improved.
Brief Description of the Drawings
[0018] To more clearly explain the technical solutions in the embodiments of the present application or the prior art, the drawings necessary for describing the embodiments or the prior art will be briefly described below. Obviously, the drawings in the following description are only some embodiments described in the present application, and those skilled in the art can obtain other drawings based on these drawings without paying creative efforts.
Figure 1a
Figure 1b
Figure 2
Figure 3a
Figure 3b
Figure 3c
Figure 3d
Figure 4
Figure 5
Figure 6
Figure 7a
Figure 7b
Figure 7c
Figure 7d
Figure 7e
Figure 8
Figure 9
Figure 10
Embodiments for Carrying Out the Invention
[0019] To enable those skilled in the art to better understand the aspects of this application, the following clearly and completely describes the technical solutions in the embodiments of this application while combining the drawings in the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of this application.
[0020] In some application scenarios, to meet the needs of users' cross-lingual communication, the instant messenger supports the "translate while inputting" function, that is, when the user inputs the original message text in the input box, a translation text area is displayed above the input box, and based on the original message text input by the user, the message translation text is displayed in the translation text area. For example, as shown in Figure 1a, the client automatically turns on the "translate while inputting" function of the instant messenger for the user. The conversation input interface includes an input box 101 and a translation text area 102. When the user inputs the original text in the input box 101, the corresponding translation text is displayed in the translation text area 102. When the user inputs a message in the input box 101, as shown in the upper figure of Figure 1b, a usage control 103 may be displayed in the translation text area, and at the same time, a shortcut key corresponding to the usage control 103 may be further displayed. When the user triggers the usage control 103 in the translation text area, as shown in the lower figure of Figure 1b, the translation text is displayed in the input box. In response to the send operation triggered by the user, the translation text is sent.
[0021] If it is found that the user needs to modify the message before sending the translated text, the user needs to manually modify it in the translated text or delete all the content and re-enter the original message text for translation, which will affect the user's operation. Here, "translate simultaneously with input" means that when the user enters the original text in the input box, the translated text corresponding to the original text is simultaneously displayed in the translated text area. Here, the language corresponding to the translated text is set by the user according to their own needs.
[0022] Based on this, in the message processing method according to the present application, when the user enters the original message text through the input box, the message translated text corresponding to the original message text is displayed in the translated text area. In response to a first predetermined operation of using the translated text, the message translated text is displayed in the input box. When the user needs to go back, in response to a second predetermined operation of canceling the use of the translated text, the original message text is displayed in the input box. That is, when there is an input error by the user, it can be returned by the second predetermined operation, and the user does not need to manually edit or re-enter, improving the user experience.
[0023] To facilitate the understanding of the technical solution according to the embodiment of the present application, the following will be described with reference to the drawings.
[0024] Referring to FIG. 2, the figure shows a message processing method according to an embodiment of the present application, which may be executed by a message processing client, and the message processing client may be installed on an electronic device. Here, the electronic device may include devices having a communication function such as a mobile phone, a tablet, a notebook computer, a desktop computer, an in-vehicle terminal, a wearable electronic device, a multifunctional printer, a smart home device, etc., or may be a device simulated by a virtual machine or a simulator. As shown in FIG. 2, the method may include the following steps.
[0025] S201: In response to the message original text being input into the input frame, display the message translation corresponding to the message original text in the translation text area.
[0026] In this embodiment, when the user turns on the "translate simultaneously with input" function and inputs the message original text into the input frame, the message translation corresponding to the message original text is displayed in the translation text area. Here, to facilitate user viewing, as shown in FIG. 1a, the translation text area may be located above the input frame and adjacent to the input frame.
[0027] In an embodiment of the present disclosure, when the message translation corresponding to the message original text is displayed in the translation text area, a first control may be further displayed on the input interface. Here, the first control is for triggering the use of the message translation. The input interface may include the translation text area and the input frame area, and the position where the first control is displayed may be the translation text area, the input frame area, or other positions other than the translation text area and the input frame area in the input interface. For example, the first control is the use control 103 located in the translation text area shown in FIG. 1b. Thereby, the user can intuitively understand the function of the first control.
[0028] Specifically, when the "translate simultaneously with input" function is activated, as shown in the schematic diagram of FIG. 1a, the translation text area may be displayed above the input frame. Alternatively, when the user activates the "translate simultaneously with input" function and the user has not input a message into the input frame, the translation text area may be displayed above the input frame, and a third control may be displayed in the translation text area. The third control is for closing the translation text area. As shown in the display schematic diagram of the translation text area in FIG. 3a, the third control 104 is displayed in the translation text area. When the user inputs the message original text into the input frame, for example, as shown in the schematic diagram of FIG. 1b, the third control may not be displayed in the translation text area, and the message translation and the first control 103 may be displayed.
[0029] Here, activating the "Translate while inputting" function may be manually activated by the user or automatically activated by the client. For example, when the main languages of both parties in the conversation do not match and the main language of the current user is not English, when entering the conversation, input translation is automatically turned on for the current user. Here, the "Translate while inputting" function can support translating different types of messages, such as text, rich text, and messages including @ marks.
[0030] S202: In response to a first predetermined operation of using the translated text, display the message translated text in the input frame.
[0031] In this embodiment, when the user triggers a first predetermined operation of using the translated text, to indicate using the message translated text in the translated text area, the message translated text is displayed in the input frame, thereby realizing the use of the message translated text. Here, the first predetermined operation may be a trigger operation on the first control, or a trigger operation on the shortcut key for using the translated text, or an operation of right-clicking to call up the menu item and clicking on the item for using the translated text in the menu item.
[0032] In an embodiment of the present disclosure, when the message translated text is displayed in the input frame, a second control may be further displayed on the input interface. Here, the second control is for canceling the use of the message translated text, and the position where the second control is displayed may be the translated text area, the input frame area, or other positions other than the translated text area and the input frame area in the input interface. For example, in the scenario application shown in Figure 3b, when the user triggers the use control 103, the message translated text appears in the input frame, and the cancel control 105 is displayed in the translated text area, and the use control 103 is no longer displayed.
[0033] S203: In response to a second predetermined operation to cancel the use of the translated text, display the original message text in the input box.
[0034] If the user wants to cancel the current use, a second predetermined operation to cancel the use of the translated text may be triggered. In response to receiving the second predetermined operation triggered by the user, control is performed so that the original message text appears in the input box again. That is, by the second predetermined operation, the use of the message translated text can be canceled, facilitating the user to quickly return to the previous step, facilitating the user to re-edit the original message text, and improving the user experience. For example, in the scenario application shown in Figure 3c, when the user triggers the cancel control 105, the message translated text appears in the translation text area, the original message text appears in the input box, and after the use control 103 is displayed in the translation text area, the cancel control 105 disappears.
[0035] Also, after the original message text is displayed in the input box, the message translated text may be further displayed in the translation text area. Thereby, the user can easily view the translated text corresponding to the original message text.
[0036] Here, when a first control is displayed on the input interface, a shortcut key corresponding to the first control may be further displayed. Thereby, the user can easily trigger the use of the translated text by the shortcut key. In addition, when a second control or a third control is displayed on the input interface, the corresponding shortcut keys may be displayed respectively. This embodiment is not limited here.
[0037] Here, when a second control is displayed on the input interface, the second predetermined operation for canceling the use of the translated text is a trigger operation on the second control. Alternatively, the second predetermined operation may be a trigger operation on a shortcut key for canceling the use of the translated text, or an operation of right-clicking to call up a menu item and clicking on an item for canceling the use of the translated text in the menu item.
[0038] In one embodiment of the present disclosure, after canceling the use of the translated text, when the original message text is displayed in the input frame, the first control may be redisplayed on the input interface. Thereby, the user can reuse the translated text by triggering the first control, facilitating user operations.
[0039] In one embodiment of the present disclosure, the display duration of the second control may be set. Within the display duration, the user can return to the previous step by the second control. When the display duration is exceeded, a third control is displayed on the input interface and the second control is no longer displayed. Specifically, when the translated message text is displayed in the input frame, the second control is displayed on the input interface, and there is no input within a predetermined time duration, the third control is displayed on the input interface and the second control is not displayed. For example, if the display duration is 30 seconds, the translated message text appears in the input frame, and the user has not entered anything in the input frame even after exceeding 30 seconds, the display of the second control stops and the third control is displayed. Here, the position where the third control is displayed may be the translated text area, the input frame area, or other positions other than the translated text area and the input frame area on the input interface. For example, as shown in FIG. 3d, when the display duration of the cancel control 105 is equal to the predetermined time duration and there is no input operation in the input frame, the translated text area is changed from the cancel control 105 to the close control 104 (the third control).
[0040] In one embodiment of the present disclosure, when a message translation text is displayed in an input frame and a second control is displayed on an input interface, in response to triggering the transmission of the message translation text, a third control is displayed on the input interface and the second control is not displayed. That is, when triggered to transmit the message translation text used by the user, the control displayed on the input interface is changed from the second control to the third control. The third control is for closing the translation text area. For example, as shown in the display configuration diagram of the translation text area in FIG. 3a, a closing control 104 is displayed in the translation text area.
[0041] In one embodiment of the present disclosure, in response to the user continuously triggering an input operation in the input frame, a first control is displayed on the input interface. When the user continuously inputs in the input frame, if the input frame contains an existing message translation text, the existing message translation text and the message translation text corresponding to the message original text continuously input by the user are displayed in the translation text area. Here, before the user continuously triggers an input operation in the input frame, the control displayed on the input interface may be the second control or the third control. That is, when the user continuously triggers an input operation in the input frame, the control of the input interface may be changed from the cancel control to the use control, or may be changed from the closing control to the use control. Thereby, the user can continuously input the message original text in the input frame at any time without the need for manual switching, improving the user experience.
[0042] Specifically, when a message translation text is displayed in the input frame and a second control is displayed on the input interface, in response to the user continuously inputting in the input frame, a first control is displayed on the input interface and the second control is not displayed. That is, based on the message original text continuously input by the user in the input frame, it is triggered to automatically change the control displayed on the input interface from the second control to the first control.
[0043] Here, the translated message text may include multimedia resources, and the multimedia resources include one or more of images, videos, or links (non-naked links). Here, a naked link is in the form of an external link that a user cannot directly click to enter the target page.
[0044] In one embodiment of the present disclosure, the method further includes sending the translated message text to the conversation in response to an operation of sending the translated message text, and displaying all the contents in the translated message text in the input frame in response to a re-editing triggered for the sent translated message text. That is, when the user re-edits, all formatted contents in the translated message text, such as text, images, or links, can all appear in the input frame again, which facilitates user editing and improves the user experience compared to the case where only the text in the existing translated message text appears in the input frame again. Here, the re-editing operation triggered by the user for the sent translated message text may include first triggering an undo operation for the sent translated message text, and then triggering a re-editing operation for the undone translated message text.
[0045] Therefore, when the user uses the "translate while inputting" function via the instant messenger, in response to the message original text being input into the input frame, a translated message text corresponding to the message original text is displayed in the translated text area. When the user triggers a first predetermined operation to use the translated text, the translated message text is displayed in the input frame. When the user triggers a second predetermined operation to cancel the use of the translated text, the message original text is displayed in the input frame. That is, by the second predetermined operation, it is possible to return to the previous step, avoiding the need for the user to re-enter after a misoperation, and improving the user experience.
[0046] Based on the above method embodiments, embodiments of the present application provide a message processing apparatus and a device. The following will be described with reference to the drawings.
[0047] Referring to FIG. 4, which is a schematic configuration diagram of a message processing apparatus according to an embodiment of the present application. As shown in FIG. 4, the apparatus 400 may include a first display unit 401, a second display unit 402, and a third display unit 403.
[0048] The first display unit 401 is used to display a message translation corresponding to the message original text in a translation text area in response to the message original text being input into an input frame. The second display unit 402 is used to display the message translation in the input frame in response to a first predetermined operation of using the translation text. The third display unit 403 is used to display the message original text in the input frame in response to a second predetermined operation of canceling the use of the translation text.
[0049] In an embodiment of the present disclosure, the third display unit 403 is further used to display the message translation in the translation text area.
[0050] In an embodiment of the present disclosure, when a message translation corresponding to the message original text is displayed in the translation text area, the first display unit 401 is further used to further display a first control on an input interface. The first predetermined operation of using the translation text described above is a trigger operation on the first control. When the message translation is displayed in the input frame, the second display unit 402 is further used to further display a second control on an input interface. The second predetermined operation of canceling the use of the translation text is a trigger operation on the second control. When the message original text is displayed in the input frame in response to a second predetermined operation of canceling the use of the translation text, the third display unit 403 is further used to further display the first control on an input interface.
[0051] In one embodiment of the present disclosure, the apparatus further includes a control unit, When the translated message text is displayed in the input frame and a second control is displayed on the input interface, the control unit is used to subsequently display the first control on the input interface and not display the second control in response to an input made in the input frame.
[0052] In one embodiment of the present disclosure, the apparatus further includes a fourth display unit, When the translated message text is displayed in the input frame and a second control is displayed on the input interface, the fourth display unit is used to display a third control for closing the translated text area on the input interface and not display the second control in response to the triggering of sending the translated message text.
[0053] In one embodiment of the present disclosure, the apparatus further includes a fourth display unit, When the translated message text is displayed in the input frame, a second control is displayed on the input interface, and there is no input within a predetermined time period, the fourth display unit is used to display a third control for closing the translated text area on the input interface and not display the second control.
[0054] In one embodiment of the present disclosure, the fourth display unit is further used to display the first control on the input interface when an input operation is subsequently triggered in the input frame.
[0055] In one embodiment of the present disclosure, it includes one or more of displaying the first control in the translated text area, displaying the second control in the translated text area, and displaying the second control in the translated text area.
[0056] In one embodiment of the present disclosure, the translated message text includes multimedia resources, and the multimedia resources include one or more of images, videos, or links.
[0057] In one embodiment of the present disclosure, the apparatus further includes a transmitting unit and a fifth display unit. The transmitting unit is used to transmit the translated message text to a conversation in response to an operation of transmitting the translated message text. The fifth display unit is used to display all the content in the translated message text in the input frame in response to a re - editing triggered for the transmitted translated message text.
[0058] It should be noted that for the specific implementation of each means in this embodiment, reference may be made to the relevant descriptions in the above - mentioned method embodiment.
[0059] In the embodiments of the present application, the division of means is exemplary and is only a logical function division. When actually implemented, there may be other division methods. Each functional means in the embodiments of the present application may be integrated into one processing means, or each means may physically exist separately, or two or more means may be integrated into one means. For example, in the above - mentioned embodiment, the processing unit and the transmitting unit may be the same means or different means. The integrated means may be implemented in the form of hardware or in the form of software functional means.
[0060] Referring to FIG. 5, a schematic configuration diagram of an electronic device 500 adapted to implement an embodiment of the present disclosure is shown. The terminal device in the embodiment of the present disclosure may include, for example, portable terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (tablets), PMPs (Portable Multimedia Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., but is not limited thereto. The electronic device shown in FIG. 5 is merely an example and does not impose any limitations on the functions and usage ranges of the embodiments of the present disclosure.
[0061] As shown in FIG. 5, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 501, which can execute various appropriate operations and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data necessary for the operation of the electronic device 500 are further stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0062] Generally, an input device 506 including, for example, a touch screen, a touch panel, a keyboard, a mouse, a camera head, a microphone, an accelerometer, a gyro, etc., an output device 507 including, for example, a liquid crystal display (LCD), a speaker, an oscillator, etc., a storage device 508 including, for example, a magnetic tape, a hard disk, etc., and a communication device 509 may be connected to the I / O interface 505. The communication device 509 enables the electronic device 500 to communicate with other devices wirelessly or wiredly to exchange data. Although FIG. 5 shows an electronic device 500 having various devices, it should be understood that there is no intention to require the implementation or provision of all the shown devices. Alternatively, it is possible to implement or provide more or fewer devices.
[0063] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program containing program code for implementing the method shown in the flowchart and is mounted on a non-transitory computer-readable medium. In such an embodiment, this computer program may be downloaded and installed from a network by the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When this computer program is executed by the processing device 501, the above functions defined by the method of the embodiment of the present disclosure are executed.
[0064] The electronic device according to an embodiment of the present disclosure belongs to the same inventive concept as the method according to the above embodiment. Technical details not described in detail in this embodiment can refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0065] According to an embodiment of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the above embodiment is implemented.
[0066] Note that the computer-readable medium in the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specifically, the computer-readable storage medium may include, but is not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or a data signal propagated as part of a carrier wave, in which computer-readable program code is carried. The data signal propagated in this way may adopt various forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium may further be any computer-readable medium other than the computer-readable storage medium, and this computer-readable signal medium can transmit, propagate, or transmit a program used by or in combination with an instruction execution system, apparatus, or device. The program code included in the computer-readable medium can be transmitted via any suitable medium, including, but not limited to, electric wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0067] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can interconnect with digital data communication of any form or medium (e.g., communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the World Wide Web (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), and any network currently known or future-developed.
[0068] The above computer-readable medium may be included in the above electronic device or may be a separate one not implemented in the electronic device.
[0069] One or more programs are installed on the above computer-readable medium. When the one or more programs are executed by the electronic device, the electronic device is caused to implement the above method.
[0070] Computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof, and the programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and further include general procedural programming languages such as the "C" language or similar programming languages, but are not limited thereto. The program code can be executed entirely on a user computer, partially on a user computer, executed as an independent software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer by any network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, connected via the Internet using an Internet service provider).
[0071] Among the drawings, flowcharts and block diagrams show the possible system architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a portion of code, and this module, program segment, or portion of code includes one or more executable instructions for implementing the specified logic function. Note that in some alternative implementations, the functions represented by the blocks may be implemented in a different order than that shown in the drawings. For example, two consecutively shown blocks may be executed substantially simultaneously, or depending on the function, they may sometimes be executed in the reverse order. Also, each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated system based on hardware for executing the specified function or operation, or may be implemented by a combination of dedicated hardware and computer instructions.
[0072] The means according to the embodiments of the present disclosure may be implemented in software or in hardware. Here, the name of the means / module may not limit the means itself.
[0073] The functions described above in this specification may be executed at least in part by one or more hardware logic portions. For example, exemplary hardware logic portions that can be used include, but are not limited to, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), etc.
[0074] In the context of the present disclosure, a machine-readable medium may be a tangible medium that includes or can store a program used by or in combination with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination thereof. More specific examples of the machine-readable storage medium include electrical connections based on one or more wirings, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0075] It should be noted that each embodiment in this specification is described progressively. In each embodiment, the differences from other embodiments are emphasized, and the same or similar parts between the embodiments may be referred to each other. For the systems or apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simplified, and the relevant parts may refer to the descriptions of the method parts.
[0076] In this application, it should be understood that "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the relationship of related objects, indicating that three relationships may exist. For example, "A and / or B" may represent three cases: only A exists, only B exists, and both A and B exist simultaneously. A and B may be one or a plurality. The character " / " generally represents that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of a single item or multiple items. For example, at least one (item) of a, b, or c may represent a, b, c, "a and b", "a and c", "b and c", or "a, b, and c", where a, b, and c may be single or a plurality.
[0077] In addition, in this specification, relational terms such as "first" and "second" are used only for the purpose of distinguishing one entity or operation from another entity or operation, and do not require or imply the existence of such an actual relationship or order between these entities or operations. Furthermore, the term "comprising", "including" or any other variant thereof is intended to indicate non-exclusive inclusion. A process, method, article or device comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements specific to such a process, method, article or device. Further, when there are no more restrictions, an element limited by "comprising one..." does not exclude the inclusion of other same elements in the process, method, article or device comprising the said element.
[0078] The steps of the methods or algorithms described in connection with the embodiments disclosed in this specification may be implemented directly in hardware, in software modules executed by a processor, or in combinations thereof. The software modules may be disposed in a random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0079] The foregoing description of the disclosed embodiments enables those skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Thus, the present application is not intended to be limited to the embodiments set forth herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0080] In addition, with the rapid development of global collaboration work scenarios, employees in many large multinational companies have come to conduct collaborative work through collaboration software. These employees are generally distributed in different countries and regions and use different languages. Most collaboration software integrates many work applications such as instant messaging, cloud documents, audio / video conferencing, etc., greatly improving the efficiency of collaborative work among employees in different countries and regions of multinational companies.
[0081] In a cross-lingual collaboration scenario, when employees from different countries and regions conduct collaborative work via collaborative work software, they may be restricted by the problem of language barrier, which may reduce communication efficiency and work efficiency. For example, when employee A who speaks language X communicates with employee B who speaks language Y via collaborative work software, since A and B are not familiar with each other's language, A first needs to translate the content to be communicated from language X to language Y via translation software and then send it to B. Such additional translation processing operations reduce the communication efficiency between A and B and further reduce work efficiency.
[0082] Based on this, it is necessary to provide a technical solution to improve the communication efficiency between users in a cross-lingual communication scenario and improve the efficiency of users' collaborative work.
[0083] FIG. 6 is a schematic diagram showing the flow of a method for realizing conversation translation according to an embodiment of the present specification. As shown in FIG. 6, the flow includes the following steps.
[0084] Step S102: In response to an input operation on the user's conversation interface, display the corresponding input text in the input area of the conversation interface, and the input text has a first text format.
[0085] Step S104: Obtain the translated text of the input text, the translated text has a second text format, and the second text format of the translated text is the same as the first text format of the input text.
[0086] Step S106: Display the translated text in the translated text display area of the conversation interface.
[0087] In the embodiments of this specification, in response to an input operation in the user's conversation interface, the corresponding input text is displayed in the input area of the conversation interface. The input text has a first text format, and the translated text of the input text is obtained. The translated text has a second text format, and the second text format of the translated text is consistent with the first text format of the input text. The translated text is then displayed in the translated text display area of the conversation interface.
[0088] Therefore, in this embodiment, the input text in the user's conversation is translated in real time to obtain the translated text, and the text format of the translated text is maintained to be consistent with that of the input text. By virtue of the format synchronization ability between the translated text and the input text, the user's expression intention is better retained in the translated text, the communication efficiency between users in a cross-lingual communication scenario is improved, and the efficiency of the user's collaborative work can be enhanced.
[0089] In one embodiment of the present disclosure, the conversation is a conversation in an instant messaging application integrated with collaborative work software. In step S102 above, in response to an input operation in the conversation interface of the instant messaging application integrated with collaborative work software by the user, the corresponding input text is displayed in the input area of the conversation interface.
[0090] In other embodiments, the conversation may be a conversation in other scenarios, such as a conversation in an independent instant messaging application, a conversation in a video or audio conference, a conversation for communication between different users in various platform applications (e.g., e-commerce platform, video platform, social platform). Here, in the case of an e-commerce platform, communication can be carried out between different sellers, between different buyers, between a seller and a buyer, between a buyer and platform customer support, and between a seller and platform customer support, all through conversations. In the case of a video platform, communication can be carried out between each video contributor blogger and between a video contributor blogger and platform customer support, all through conversations. In the case of a social platform, communication can be carried out between each platform user and between a platform user and platform customer support, all through conversations. Furthermore, the conversation may be a conversation that occurs when a user sends a short message or a multimedia message via a mobile phone base station. Therefore, in step S102, in response to an input operation in the conversation interface of any one of the user's conversations, the corresponding input text may be displayed in the input area of the conversation interface. Here, the input text has a first text format.
[0091] In one embodiment, in step S102 above, displaying the corresponding input text in the input area of the conversation interface in response to an input operation in the user's conversation interface specifically includes (a1) obtaining the user's input text in response to a text input operation in the user's conversation interface and displaying it in the input area of the conversation interface Or, (a2) in response to an audio input operation in the user's conversation interface, obtain the audio data input by the user, convert the audio data into text to obtain input text, and display the input text in the input area of the conversation interface.
[0092] In one case, the user may input text in the conversation interface. In response to the text input operation in the user's conversation interface, obtain the text input by the user, and display the input text in the input area of the conversation interface. In such a case, the first text format is a text format customized and arranged for the input text when the user edits the input text. The user can perform an input operation through the rich text input box or the plain text input box provided by the conversation to input text.
[0093] In another case, the user may input audio data in the conversation interface. Obtain the audio data input by the user, convert the audio data into text to obtain input text, and display the input text in the input area of the conversation interface. In such a case, the user may perform an input operation through the voice input control provided by the conversation to input audio data.
[0094] When the user inputs audio data, considering that the audio data does not have a text format, in one embodiment, after converting the audio data into text to obtain input text, set the first text format of the obtained input text after conversion to the default format of the conversation, or set it to the format previously arranged by the user for the conversation. Or, after converting to obtain the input text, the user adjusts the format of the input text through the format setting tool in the conversation interface.
[0095] Here, when the first text format is a format previously arranged by the user for the conversation, an interface for the user to customize the format is provided. Through this interface, the format customized by the user is obtained, and the format customized by the user may be set to the first text format corresponding to the case of voice input.
[0096] Therefore, in this embodiment, considering that the audio data does not have a text format, after the audio data input by the user is text-converted to obtain input text, the first text format of the obtained input text after conversion is set to the default format provided by the conversation, or may be set to the format previously arranged by the user for the conversation. Thereby, when the user inputs audio data, a corresponding first text format is set for the input text corresponding to the audio data.
[0097] FIG. 7a is a schematic diagram of a conversation translation scenario according to an embodiment of the present specification. As shown in FIG. 7a, in one scenario, taking the collaboration software on the mobile phone side as an example, the user may input a text-based conversation message through the plain text input box in the instant messaging application integrated with the collaboration software. When the user inputs a text-based conversation message, the instant messaging application translates the text-based conversation message input by the user in real time into the language used by the conversation partner to obtain a translated text, sets the second text format of the translated text to be the same as the first text format of the user's input text, and may display the translated text in the translated text display area. In the figure, the case where the language used by the conversation partner is English is taken as an example for explanation.
[0098] Figure 7b is a schematic diagram of a conversation translation scenario according to another embodiment of the present specification. As shown in Figure 7b, in one scenario, taking the collaboration software on the mobile phone as an example, the user may input a text conversation message through the rich text input box in the instant messaging application integrated with the collaboration software. When the user inputs a text conversation message, the instant messaging application translates the text conversation message input by the user into the language used by the conversation partner in real time, obtains the translated text, sets the second text format of the translated text to be the same as the first text format of the user's input text, and may display the translated text in the translated text display area. In the figure, the case where the language used by the conversation partner is English is taken as an example for explanation.
[0099] Figure 7c is a schematic diagram of a conversation translation scenario according to another embodiment of the present specification. As shown in Figure 7c, in one scenario, taking the collaboration software on the personal computer as an example, the user may input a text conversation message through the plain text input box in the instant messaging application integrated with the collaboration software. When the user inputs a text conversation message, the instant messaging application translates the text conversation message input by the user into the language used by the conversation partner in real time, obtains the translated text, sets the second text format of the translated text to be the same as the first text format of the user's input text, and may display the translated text in the translated text display area. In the figure, the case where the language used by the conversation partner is English is taken as an example for explanation.
[0100] Figure 7d is a schematic diagram of a conversation translation scenario according to another embodiment of the present specification. As shown in Figure 7d, in one scenario, taking the collaboration software on the computer side as an example, the user may input a text-based conversation message through a rich text input box in an instant messaging application integrated with the collaboration software. When the user inputs a text-based conversation message, the instant messaging application translates the text-based conversation message input by the user into the language used by the conversation partner in real time to obtain a translated text, sets the second text format of the translated text to be the same as the first text format of the user's input text, and may display the translated text in the translated text display area. In the figure, the case where the language used by the conversation partner is English is taken as an example for explanation.
[0101] Briefly explained here, the difference between a plain text input box and a rich text data box is that an image cannot be input into the plain text input box, and more complex format processing for text, such as numbering, cannot be performed. An image can be inserted into the rich text data box, more complex format processing can be performed on the text, and format requirements such as numbering and line breaks can be satisfied. The rich text input box corresponds to a small word pad program.
[0102] Of course, the user can perform simple format processing on the input conversation message in the plain text input box and the rich text input box, such as setting bold, italic, font, size, etc.
[0103] FIG. 7e is a schematic diagram of a conversation translation scenario according to another embodiment of the present specification. As shown in FIG. 7e, in one scenario, taking the collaboration software on the mobile phone side as an example, the user may input a conversation message in voice form through the voice input control in the instant messaging application integrated with the collaboration software. When the user inputs a conversation message in voice form, the instant messaging application may translate the conversation message in voice form input by the user into the language used by the conversation partner in real time and display the translated text in the translated text display area. In the figure, the case where the language used by the conversation partner is English will be described as an example. In FIG. 7e, when the conversation message input by the user is a voice message, the voice message may first be converted into the corresponding input text for display, and the translated text obtained by translating the input text may be synchronously displayed. As described above, in FIG. 7e, the text formats corresponding to the translated text and the input text are the same, and may be the default format of the conversation or the format previously arranged by the user for the conversation.
[0104] In this embodiment, it can be seen that when the user inputs a conversation message through routes such as a plain text box, a rich text box, and a voice input control, the conversation message can be translated in real time, thereby meeting the conversation translation needs in different scenarios.
[0105] In one embodiment, the text formats of the text contents at each location in the input text are all the same. As shown in FIG. 7a, the text formats of the text contents at each location in the input text are all the same, and they are all the Song typeface in size 4. In another embodiment, the text formats of the text contents at each location in the input text may be different. As shown in FIG. 7c, the text format of the text on the first line of the input text is the Song typeface in size 4, the text format of the text on the second line of the input text is the bold Song typeface in size 4, the text format of the text on the third line of the input text is the italic Song typeface in size 4, and the text format of the text on the fourth line of the input text is the underlined Song typeface in size 4. In these two cases, as shown in FIGS. 7a and 7c, according to the method in this embodiment, it can be ensured that the second text format of the translated text is the same as the first text format of the input text.
[0106] In one embodiment, the conversation interface has an input area and a translated text display area. The input area has a text display sub-area for displaying the input text, and the translated text display area is for displaying the translated text. The input area and the translated text display area are arranged side by side vertically.
[0107] Taking FIG. 7a as an example, FIG. 7a schematically shows the translated text display area and the input area. The translated text display area and the input area are arranged side by side vertically. The input area further has a text display sub-area. In the scenario where the user inputs text, the text display sub-area is for displaying the text input by the user in real time, and the translated text display area is for displaying the translated text in real time.
[0108] Taking FIG. 7e as an example, FIG. 7e schematically shows a translation text display area and an input area. The translation text display area and the input area are arranged side by side vertically. The input area further has a text display sub-area. In a scenario where the user inputs audio data, the text display sub-area is for displaying the input text corresponding to the audio data input by the user in real time, and the translation text display area is for displaying the translation text in real time.
[0109] In one embodiment, after displaying the translation text in the translation text display area of the conversation interface, further in response to a confirmation operation by the user on the translation text, the translation text or the audio data corresponding to the translation text may be transmitted to the conversation. As shown in FIGS. 7a to 7e, the user may click the confirmation key to confirm the translation text, and thereby transmit the translation text confirmed by the user or the audio data corresponding to the confirmed translation text to the conversation.
[0110] In another embodiment, after displaying the translation text in the translation text display area of the conversation interface, further in response to a processing operation by the user on the input text, the translation text may be synchronously processed. Here, the processing operation includes at least one of a scroll browsing operation, a text editing operation, a format correction operation, a text selection operation, and a cursor movement operation.
[0111] Specifically, the user may perform a scroll view operation on the input text and, synchronously, scroll view the translated text. The user may perform a text editing operation on the input text and, synchronously, edit the translated text, and reflect the translation of the input text edited by the user in the edited translated text. The user may perform a format correction operation on the input text and, synchronously, correct the format of the translated text, and maintain the text format of the input text to be the same as the text format of the translated text. The user may perform a text selection operation on the input text and, synchronously, select the corresponding translated text. The user may perform a cursor movement operation on the input text and, synchronously, move the cursor in the translated text.
[0112] According to this embodiment, when the user processes the input text, the translated text can be processed synchronously, from which it can be seen that the user can achieve the effect of correcting the translation by correcting the original text.
[0113] In this embodiment, in response to the confirmation operation on the translated text after the synchronous processing by the user, the translated text after the synchronous processing or the audio data corresponding to the translated text after the synchronous processing may be transmitted to the conversation. Based on this, FIG. 8 is a schematic diagram showing the flow of a method for realizing conversation translation according to another embodiment of this specification. As shown in FIG. 8, the flow includes the following steps.
[0114] Step S302: In response to the input operation in the user's conversation interface, display the corresponding input text in the input area of the conversation interface, and the input text has a first text format.
[0115] Step S304: Obtain the translated text of the input text, the translated text has a second text format, and the second text format of the translated text is consistent with the first text format of the input text.
[0116] Step S306: Display the translated text in the translation text display area of the conversation interface.
[0117] Step S308: In response to a confirmation operation on the translated text by the user, send the translated text or the voice data corresponding to the translated text to the conversation.
[0118] Step S310: In response to a processing operation on the input text by the user, synchronize the translated text.
[0119] Step S312: In response to a confirmation operation on the processed translated text by the user, send the processed translated text or the voice data corresponding to the processed translated text to the conversation.
[0120] Specifically, after displaying the translated text, in one case, if the user does not modify the input text, execute Step S308, accept the confirmation operation on the translated text by the user, and send the translated text or the voice data corresponding to the translated text to the conversation. In another case, if the user modifies the input text, execute Steps S310 and S312, accept the processing operation on the input text by the user, perform corresponding processing on the translated text, and further, accept the confirmation operation on the processed translated text by the user, and send the translated text confirmed by the user or the voice data corresponding to the translated text after the confirmation to the conversation.
[0121] In one embodiment, in the above Step S104, obtaining the translated text of the input text specifically includes: (b1) Determining the conversation target in the user's conversation; (b2) Obtaining the language type information of the conversation target; (b3) Obtaining the translated text obtained by performing translation and formatting processing on the input text according to the language type information of the conversation target.
[0122] In one embodiment, in operation (b1), determining the conversation target in the user's conversation specifically includes: (b11) When the conversation is an individual chat conversation, setting the conversation target in the user's individual chat conversation as the user's conversation target; and (b12) When the conversation is a group chat conversation, determining the target message for which the user has performed a predetermined message response operation in the group chat conversation, and setting the sender of the target message as the user's conversation target.
[0123] In operation (b11), for an individual chat conversation, set the conversation target in the user's individual chat conversation as the user's conversation target. In operation (b12), for a group chat conversation, determine the target message for which the user has performed a predetermined message response operation in the group chat conversation, and set the sender of the target message as the user's conversation target.
[0124] In one embodiment, the predetermined message response operation includes a message reading operation and a message notation operation for denoting a message as a reply-waiting message. Determining the target message for which the user has performed a predetermined message response operation in the group chat conversation specifically includes: When there is a reply-waiting message of the user denoted by the message notation operation in the group chat conversation, determining the reply-waiting message as the target message; and when there is no reply-waiting message of the user denoted by the message notation operation in the group chat conversation, determining, by the message reading operation, the read message of the user in the group chat conversation as the target message.
[0125] Specifically, after the user executes a predetermined message response operation on a group chat message in a group chat conversation, it is determined whether there is a user's reply-pending message expressed by a message expression operation in the group chat conversation. If it exists, the reply-pending message is determined as the target message. If it does not exist, the read message of the user in the conversation is determined as the target message by a message reading operation.
[0126] In one embodiment, the predetermined message response operation includes a message reading operation. Determining the target message when the user executes a predetermined message response operation in a group chat conversation specifically means determining the read message of the user in the group chat conversation as the target message by a message reading operation. That is, when the predetermined message response operation includes a message reading operation, the read message of the user in the group chat conversation is determined as the target message.
[0127] In one embodiment, the predetermined message response operation includes a message expression operation for expressing a message as a reply-pending message. Determining the target message when the user executes a predetermined message response operation in a group chat conversation specifically means determining the user's reply-pending message expressed in the group chat conversation as the target message by a message expression operation. That is, when the predetermined message response operation includes a message expression operation, the reply-pending message expressed by the user in the group chat conversation is determined as the target message.
[0128] Considering that the user may have read multiple messages in a group chat conversation, in the above flow, determining the user's read messages in the group chat conversation as target messages by the message reading operation may, when the number of read messages is plural, also be determining the message that the user last read as the target message by the message reading operation. Thereby, when the user is not indicating a reply-waiting message and has read multiple messages, determining the last-read message as the target message, and further using the sender of the target message as the conversation partner in the user's group chat conversation may be appropriate.
[0129] In this embodiment, it can be seen that in the case of an individual chat conversation, the conversation partner of the user can be determined. In the case of a group chat conversation, the conversation partner is determined by a user operation, and the sender corresponding to the reply-waiting message indicated by the user is most likely the conversation partner to whom the user will reply. When the user is not indicating a reply-waiting message, the sender corresponding to the message read by the user is most likely the conversation partner to whom the user will reply. It can be seen that the conversation partner with the highest likelihood of the user replying can be accurately determined as the conversation partner in the user's group chat conversation in the group chat scenario.
[0130] In the above operation (b2), language type information of the conversation partner is obtained. In one embodiment, specifically, this operation (b21) When the conversation is an individual chat conversation, obtaining the main language type information of the conversation partner as the language type information of the conversation partner, or using the language type information of a message that meets a predetermined condition sent by the conversation partner in the individual chat conversation as the language type information corresponding to the conversation. When the conversation is a group chat conversation, obtain the main language type information of the conversation target as the language type information of the conversation target, or determine a target message that the conversation target sent in the group chat conversation and for which a predetermined message response operation has been executed by the user, and use the language type information of the target message as the language type information of the conversation target.
[0131] In an individual chat conversation, in one case, after determining the user's conversation target, the main language type information of the conversation target may be obtained as the language type information of the conversation target. Use a machine learning model to identify the language type of the message sent by the conversation target. For example, input a conversation message uttered by the conversation target in a conversation of an instant messaging application into a pre-trained machine learning model, and the machine learning model outputs the language type information of the conversation message, and use the language type information output by the machine learning model as the language type label of the conversation message. In this way, the language type labels of the conversation messages sent by the conversation target within a recent period (for example, three months) can be statistically analyzed to determine the main language type information of the conversation target. Of course, when the conversation target sets the label of the main language type information by itself, the label may be directly obtained to determine the main language type information of the conversation target. Furthermore, use the main language type information of the conversation target as the language type information of the conversation target.
[0132] In the case of an individual chat conversation, or in other cases, the language type information of a message that meets a predetermined condition sent by the conversation partner in the individual chat conversation is used as the language type information of the conversation partner. Here, the message that meets the predetermined condition includes one or more of the messages that the above user last read and the reply-waiting messages written by the above user. Specifically, in the individual chat conversation between the above user and the conversation partner, if the conversation partner sends a conversation message, among the sent conversation messages, the language type information of the message that the above user last read is used as the language type information of the conversation partner, or the language type information of the reply-waiting message written by the above user among the sent conversation messages is used as the language type information of the conversation partner. If both the message read by the above user and the reply-waiting message written by the above user exist in the sent conversation message, the language type information of the message that the above user last read is obtained, and the language type information of the reply-waiting message written by the above user is obtained. If these two language type information are the same, the same language type information is used as the language type information of the conversation partner. If the two language type information are different, the language type information of the reply-waiting message written by the above user may be obtained as the language type information of the conversation partner.
[0133] In the case of a group chat conversation, the main language type information of the conversation partner may be obtained as the language type information of the conversation partner in the same manner as the method described above. Alternatively, a target message is determined that is sent by the conversation partner in the group chat conversation and for which a predetermined message response operation is performed by the user. The process of determining the target message is the same as the process of determining the target message in the operation (b12) described above. As can be seen from the process of determining the target message described above, the target message is sent by the conversation partner. The language type information of the target message is used as the language type information of the conversation partner. The language type information of the target message may be identified by a machine learning model.
[0134] It can be understood that through operations (b21) and (b22), language type information of a conversation partner can be obtained in different conversation scenarios. In one embodiment, in operation (b3), translation and formatting processing are performed on the input text according to the language type information of the conversation partner to obtain a translated text, which may be completed by a machine learning model trained in advance. When training the machine learning model, text data with a format and a translated text with the same format as the text data may be used as training data, and the parameters in the model may be trained with the training data. The trained model has the ability of text translation and the ability to keep the formats of the original text and the translated text the same. In another embodiment, in operation (b3), translation and formatting processing are performed on the input text according to the language type information of the conversation partner to obtain a translated text. Specifically, the input text may be translated by a machine learning model trained in advance, and formatting settings may be performed on the text output by the machine learning model based on the formatting information of the first text format of the input text to obtain the translated text. Since formatting settings are performed on the text output by the machine learning model according to the formatting information of the first text format to obtain the translated text, the second text format of the translated text is the same as the first text format of the input text.
[0135] As described above, according to the method for realizing the above conversation translation, the input text in the user's conversation can be translated in real time to obtain a translated text, and the consistency of the text formats of the translated text and the input text can be maintained. Due to the format synchronization ability between the translated text and the input text, the user's expression intention can be better retained in the translated text, the communication efficiency between users in a cross-lingual communication scenario can be improved, and the efficiency of the user's collaborative work can be improved.
[0136] FIG. 9 is a schematic configuration diagram of an apparatus for realizing conversation translation according to an embodiment of the present specification. As shown in FIG. 9, the apparatus includes A first display unit for displaying corresponding input text in an input area of the conversation interface in response to an input operation in the user's conversation interface, wherein the input text has a first text format, and the first display unit 41 having the first text format; A text acquisition unit for acquiring a translated text of the input text, wherein the translated text has a second text format, and the second text format of the translated text matches the first text format of the input text, and the text acquisition unit 42; And a second display unit 43 for displaying the translated text in a translated text display area of the conversation interface.
[0137] Optionally, the text acquisition unit 42 is specifically used for: Determining a conversation target in the user's conversation; Obtaining language type information of the conversation target; And obtaining a translated text obtained by performing translation and formatting processing on the input text according to the language type information of the conversation target.
[0138] Optionally, After displaying the translated text in the translated text display area of the conversation interface, the apparatus further includes a processing unit for synchronizing the translated text in response to a processing operation on the input text by the user.
[0139] Optionally, After displaying the translated text in the translated text display area of the conversation interface, the apparatus further includes a transmission unit for transmitting the translated text or audio data corresponding to the translated text to the conversation in response to a confirmation operation on the translated text by the user.
[0140] Optionally, the first display unit 41 is specifically: In response to a text input operation in the user's conversation interface, obtaining the input text of the user and displaying it in the input area of the conversation interface. Or In response to an audio input operation in the user's conversation interface, obtaining the audio data input by the user, converting the audio data into text to obtain input text, and using it to display the input text in the input area of the conversation interface.
[0141] Optionally After converting the audio data into text to obtain input text, further including a format setting unit for setting the first text format of the input text to the default format of the conversation or the format previously arranged by the user in the conversation.
[0142] Optionally, the text acquisition unit 42 is further specifically When the conversation is an individual chat conversation, using the conversation partner in the individual chat conversation of the user as the user's conversation partner; When the conversation is a group chat conversation, determining the target message for which the user has performed a predetermined message response operation in the group chat conversation, and using the sender of the target message as the user's conversation partner.
[0143] Optionally, the predetermined message response operation includes a message reading operation and a message notation operation for notating a message as a reply-waiting message. The text acquisition unit 42 is further specifically used to determine the reply-waiting message of the user notated by the message notation operation in the group chat conversation as the target message when the reply-waiting message exists; when the reply-waiting message of the user notated by the message notation operation in the group chat conversation does not exist, it is used to determine the read message of the user in the group chat conversation as the target message by the message reading operation. Or, The predetermined message response operation includes a message reading operation. The text acquisition unit 42 is further specifically used to determine the read message of the user in the group chat conversation as the target message by the message reading operation. Or, The predetermined message response operation includes a message notation operation for notating a message as a reply-waiting message. The text acquisition unit 42 is further specifically used to determine the reply-waiting message of the user notated in the group chat conversation by the message notation operation as the target message.
[0144] Optionally, the text acquisition unit 42 is further specifically used to determine the message that the user last read determined by the message reading operation as the target message when the number of the read messages is plural.
[0145] Optionally, the text acquisition unit 42 is further specifically When the conversation is an individual chat conversation, obtain the main language type information of the conversation target as the language type information of the conversation target, or use the language type information of a message that meets a predetermined condition sent by the conversation target in the individual chat conversation as the language type information of the conversation target; When the conversation is a group chat conversation, it is used to obtain the main language type information of the conversation target as the language type information of the conversation target, or to determine a target message that is sent by the conversation target in the group chat conversation and for which a predetermined message response operation is executed by the user, and use the language type information of the target message as the language type information of the conversation target.
[0146] Optionally, the message that meets the predetermined condition includes one or more of the message that the user last read and the reply-waiting message written by the user.
[0147] It should be noted that the device for realizing conversation translation in this embodiment can realize each process of the embodiment of the method for realizing conversation translation described above and can achieve the same effects and functions. Therefore, no repeated description will be given here.
[0148] One embodiment of this specification further provides an electronic device. FIG. 5 is a schematic configuration diagram of an electronic device according to an embodiment of this specification. As shown in FIG. 10, the electronic device may have relatively large differences in configuration or performance, and may include one or more processors 801 and a memory 802. One or more application programs or data may be stored in the memory 802. Here, the memory 802 may be for temporary storage or permanent storage. The application program stored in the memory 802 may include one or more modules (not shown), and each module may include a series of computer-executable instructions in the electronic device. Further, the processor 801 may be provided to communicate with the memory 802 and execute a series of computer-executable instructions in the memory 802 in the electronic device. The electronic device may further include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input or output interfaces 805, one or more keyboards 806, etc.
[0149] In one specific embodiment, the electronic device includes a processor and, when executed, cause the processor to, in response to an input operation in the user's conversation interface, display corresponding input text in the input area of the conversation interface, where the input text has a first text format, and obtain a translation text of the input text, where the translation text has a second text format, and the second text format of the translation text is the same as the first text format of the input text, and display the translation text in the translation text display area of the conversation interface, and includes a memory configured to store computer-executable instructions for realizing the above.
[0150] Note that the electronic device in this embodiment can implement each process of the method embodiment for realizing the above-described conversation translation and achieve the same effects and functions. Therefore, it will not be repeatedly described herein.
[0151] Another embodiment of this specification, when executed by a processor, displays corresponding input text in the input area of the conversation interface according to an input operation in the user's conversation interface, where the input text has a first text format, obtains a translation text of the input text, where the translation text has a second text format, and the second text format of the translation text is the same as the first text format of the input text, and further provides a computer-readable storage medium for storing computer-executable instructions for realizing displaying the translation text in the translation text display area of the conversation interface.
[0152] Note that the storage medium in this embodiment can implement each process of the method embodiment for realizing the above-described conversation translation and achieve the same effects and functions. Therefore, it will not be repeatedly described herein.
[0153] Among them, the computer-readable storage medium includes read-only memory (abbreviated as ROM), random access memory (abbreviated as RAM), magnetic disk, optical disk, and the like.
[0154] In the 1990s, it was possible to clearly distinguish whether an improvement to a technology was an improvement in hardware (e.g., an improvement to the circuit structure such as diodes, transistors, switches, etc.) or an improvement in software (an improvement to the method flow). However, with the development of technology, many current improvements to method flows may be regarded as direct improvements to the hardware circuit configuration. Designers generally obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be realized by a hardware entity module. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is such an integrated circuit, and its logic function is determined by programming the device by the user. Without requiring the chip manufacturer to design and fabricate a dedicated integrated circuit chip, a designer can "integrate" a digital system into a PLD by programming it themselves.Also, currently, instead of fabricating integrated circuit chips manually, such programming is often realized by "logic compiler" software similar to the software compilers used during program development and creation. Also, the source code before compilation needs to be written in a specific programming language called a Hardware Description Language (HDL). There are not just one type of HDL, but many types. For example, there are ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It is obvious to those skilled in the art that if a little logic programming is done using some of the above-mentioned hardware description languages for the flow of the method and then programmed into an integrated circuit, a hardware circuit that realizes the flow of the logic method can be easily obtained.
[0155] The controller may be implemented in any suitable manner. For example, the controller may be, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code executable by the (micro)processor (such as software or firmware), a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, or an embedded microcontroller. Examples of the controller include, but are not limited to, the microcontroller ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller may be implemented as part of the control logic of the memory. As will be understood by those skilled in the art, in addition to implementing the controller in the form of pure computer-readable program code, by performing logic programming on the method steps, the controller may be made to realize the same functions in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Therefore, such a controller can be regarded as a kind of hardware component, and the devices for realizing various functions included therein can also be regarded as the structure within the hardware component. Or ultimately, the devices for realizing various functions may be regarded as software modules for implementing the method, or as the structure within the hardware component.
[0156] The systems, apparatuses, modules, or means described in the above embodiments may specifically be implemented by a computer chip or entity, or may be implemented by a product having some functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a mobile phone, a mobile phone with a camera, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0157] For ease of description, when describing the above apparatus, each means is described separately based on its function. Of course, when implementing the embodiments of this specification, the functions of each means may be implemented by the same or multiple software and / or hardware.
[0158] As will be understood by those skilled in the art, one or more embodiments of this specification may be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. In addition, one or more embodiments of this specification may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0159] This specification has been described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), computer program products according to the embodiments herein. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, may be implemented by computer program instructions. By providing these computer program instructions to the processor of a general purpose computer, a special purpose computer, an embedded processor, or other programmable data processing device, one device can be generated, whereby the instructions executed by the computer or the processor of other programmable data processing devices cause the generation of an apparatus for realizing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.
[0160] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner. Thereby, a manufactured product including an instruction apparatus for realizing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram is generated by the instructions stored in this computer-readable memory.
[0161] These computer program instructions may also be loaded onto a computer or other programmable data processing device. Thereby, a computer or other programmable device is caused to execute a series of operation steps to generate a process implemented by the computer, whereby the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in one flow or more flows of the flowchart and / or one block or more blocks of the block diagram.
[0162] Note that the term "comprise", "comprising" or any other variant thereof is intended to mean non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus. Further, unless expressly stated to the contrary, the elements defined by the phrase "comprising one …" do not exclude the presence of other like elements in the process, method, article, or apparatus comprising such element.
[0163] One or more embodiments described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments described herein may be practiced in a distributed computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory devices.
[0164] Each embodiment described herein is described in a progressive manner, and the same or similar parts between each embodiment may be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simplified, and the relevant parts may refer to the description of the method embodiments.
[0165] What has been described above are only embodiments of the present specification and do not limit the present specification. Those skilled in the art can make various modifications and changes to the present specification. Any modifications, equivalents, improvements, etc. made within the spirit and principle of the present specification should be included within the scope of the claims of the present specification.
Claims
1. In response to the message original text being input into the input frame, displaying a message translation corresponding to the message original text in the translation text area; In response to a first predetermined operation using the translation text, displaying the message translation text in the input frame; In response to a second predetermined operation canceling the use of the translation text, displaying the message original text in the input frame, characterized in that the message processing method includes these steps.
2. The method according to claim 1, further comprising, in response to a second predetermined operation canceling the use of the translation text, displaying the message translation text in the translation text area.
3. When the message translation corresponding to the message original text is displayed in the translation text area, further displaying a first control on the input interface, wherein the first predetermined operation of using the translation text described above is a trigger operation on the first control; When the message translation text is displayed in the input frame, further displaying a second control on the input interface, wherein the second predetermined operation of canceling the use of the translation text is a trigger operation on the second control; The method according to claim 1 or 2, characterized by including one or more of the following: in response to a second predetermined operation canceling the use of the translation text, when the message original text is displayed in the input frame, further displaying the first control on the input interface.
4. The method according to claim 3, further comprising, when the message translation text is displayed in the input frame and a second control is displayed on the input interface, in response to subsequent input in the input frame, displaying the first control on the input interface and not displaying the second control.
5. When the translated message text is displayed in the input frame and a second control is displayed in the input interface, in response to the triggering of sending the translated message text, a third control for closing the translated text area is displayed in the input interface, and the method according to claim 4 further includes not displaying the second control.
6. When the translated message text is displayed in the input frame, a second control is displayed in the input interface, and there is no input within a predetermined time period, a third control for closing the translated text area is displayed in the input interface, and the method according to claim 4 further includes not displaying the second control.
7. When an input operation is triggered in the input frame subsequently, the method according to claim 5 or 6 further includes displaying the first control in the input interface.
8. displaying the first control in the translated text area; displaying the second control in the translated text area; displaying the second control in the translated text area; The method according to any one of claims 3 to 7 includes one or more of the above.
9. The translated message text includes a multimedia resource, and the multimedia resource includes one or more of an image, a video, or a link. The method according to claim 1 or 2 is characterized in that.
10. In response to an operation of sending the translated message text, sending the translated message text to a conversation; In response to a re - editing triggered for the sent translated message text, displaying all the content in the translated message text in the input frame. The method according to claim 9 further includes the above.
11. Displaying a corresponding input text in an input area of the conversation interface in response to an input operation in the user's conversation interface, where the input text has a first text format, Obtaining a translated text of the input text, where the translated text has a second text format, and the second text format of the translated text is the same as the first text format of the input text, Displaying the translated text in a translated text display area of the conversation interface, and a method for realizing conversation translation, characterized by including the above.
12. The obtaining of the translated text of the input text as described above includes: Determining a conversation object in the user's conversation, Obtaining language type information of the conversation object, Obtaining a translated text obtained by performing translation and formatting processing on the input text according to the language type information of the conversation object, and the method according to claim 11, characterized by including the above.
13. After displaying the translated text in the translated text display area of the conversation interface, the method further includes: Synchronously processing the translated text in response to a processing operation on the input text by the user, and the method according to claim 11, characterized by including the above.
14. After displaying the translated text in the translated text display area of the conversation interface, the method further includes: In response to a confirmation operation on the translated text by the user, further including transmitting the translated text or audio data corresponding to the translated text to the conversation, and the method according to claim 11, characterized by including the above.
15. The displaying of a corresponding input text in an input area of the conversation interface in response to an input operation in the user's conversation interface as described above is: Obtaining the input text of the user according to a text input operation in the user's conversation interface and displaying the input text in the input area of the conversation interface; or Obtaining the audio data input by the user according to an audio input operation in the user's conversation interface, converting the audio data into text to obtain input text, and displaying the input text in the input area of the conversation interface, the method according to claim 11.
16. After converting the audio data into text to obtain input text, the method further includes setting the first text format of the input text to the default format of the conversation or a format previously arranged by the user in the conversation, the method according to claim 15.
17. Determining the conversation target in the conversation of the user as described above includes when the conversation is an individual chat conversation, setting the conversation target in the individual chat conversation of the user as the user's conversation target; when the conversation is a group chat conversation, determining a target message for which the user has performed a predetermined message response operation in the group chat conversation, and setting the sender of the target message as the user's conversation target, the method according to claim 12.
18. The predetermined message response operation includes a message reading operation and a message notation operation for notating a message as a reply-waiting message. Determining the target message for which the user has executed the predetermined message response operation in the group chat conversation as described above includes: when there is a reply-waiting message of the user notated by the message notation operation in the group chat conversation, determining the reply-waiting message as the target message; and when there is no reply-waiting message of the user notated by the message notation operation in the group chat conversation, determining, by the message reading operation, a read message of the user in the group chat conversation as the target message. Or, The predetermined message response operation includes a message reading operation. Determining the target message for which the user has executed the predetermined message response operation in the group chat conversation as described above includes determining, by the message reading operation, a read message of the user in the group chat conversation as the target message. Or, The predetermined message response operation includes a message notation operation for notating a message as a reply-waiting message. Determining the target message for which the user has executed the predetermined message response operation in the group chat conversation as described above includes determining, by the message notation operation, a reply-waiting message of the user notated in the group chat conversation as the target message. The method according to claim 17, characterized in that it includes the above.
19. Determining, by the message reading operation as described above, a read message of the user in the group chat conversation as the target message includes: When the number of the read messages is plural, determining, as the target message, the message that the user read last, which is determined by the message reading operation. The method according to claim 18, characterized in that it includes the above.
20. The obtaining of the language type information of the conversation target described above is when the conversation is an individual chat conversation, obtaining the main language type information of the conversation target as the language type information of the conversation target, or using the language type information of a message that satisfies a predetermined condition and is sent by the conversation target in the individual chat conversation as the language type information of the conversation target; when the conversation is a group chat conversation, obtaining the main language type information of the conversation target as the language type information of the conversation target, or determining a target message that is sent by the conversation target in the group chat conversation and for which a predetermined message response operation is executed by the user, and using the language type information of the target message as the language type information of the conversation target, the method according to claim 12, characterized by including this.
21. The message that satisfies the predetermined condition is including one or more of the message that the user last read and the reply-waiting message written by the user, the method according to claim 20, characterized by this.
22. a first display unit for displaying a message translation corresponding to the message original text in a translation text area in response to the message original text being input into an input frame; a second display unit for displaying the message translation in the input frame in response to a first predetermined operation of using the translation text; a third display unit for displaying the message original text in the input frame in response to a second predetermined operation of canceling the use of the translation text, a message processing device characterized by including this.
23. a first display unit for displaying corresponding input text in an input area of the conversation interface in response to an input operation in the user's conversation interface, the input text having a first text format; A text acquisition unit for acquiring a translated text of the input text, wherein the translated text has a second text format, and the second text format of the translated text matches the first text format of the input text. A second display unit for displaying the translated text in a translated text display area of the conversation interface, characterized by comprising: an apparatus for realizing conversation translation.
24. A memory for storing instructions or computer programs. A processor for executing the instructions or computer programs in the memory to cause the electronic device to implement the method according to any one of claims 1 to 21, characterized by comprising: an electronic device.
25. A computer-readable storage medium, characterized in that when executed by a device, instructions for causing the device to implement the method according to any one of claims 1 to 21 are stored.
26. A computer program product, characterized in that when executed by a device, the device is caused to execute the steps of the method according to any one of claims 1 to 21.
Citation Information
Patent Citations
Method and system for translation tool for conference assistance
JP2021190052A
Viewer device, viewing system, viewer program, and recording medium
WO2012086359A1