CN111859999A - Message translation method, device, storage medium and electronic equipment - Google Patents

Message translation method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111859999A
CN111859999A CN202010681360.8A CN202010681360A CN111859999A CN 111859999 A CN111859999 A CN 111859999A CN 202010681360 A CN202010681360 A CN 202010681360A CN 111859999 A CN111859999 A CN 111859999A
Authority
CN
China
Prior art keywords
communication message
language
message
communication
translation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010681360.8A
Other languages
Chinese (zh)
Inventor
芮涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010681360.8A priority Critical patent/CN111859999A/en
Publication of CN111859999A publication Critical patent/CN111859999A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/06Message adaptation to terminal or network requirements
    • H04L51/063Content adaptation, e.g. replacement of unsuitable content

Abstract

The embodiment of the application discloses a message translation method, a message translation device, a storage medium and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of obtaining a second language selected aiming at a first communication message in an instant communication application, displaying the first communication message in the first language, translating the first communication message into a second communication message corresponding to the second language, obtaining a third communication message displayed in the instant communication application, and translating the third communication message into a fourth communication message based on the first language and the second language. By adopting the embodiment of the application, the convenience of message translation can be increased, and the efficiency of message translation is improved.

Description

Message translation method, device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for message translation, a storage medium, and an electronic device.
Background
With the development of communication technology, Instant Messaging (IM) is now being accepted by most internet users, for example, QQ, TM (terminal Messenger), msn (microsoft servicenetwork), rtx (real Time expert), etc. have become essential software tools for users, and are widely used not only in leisure and entertainment at ordinary times, but also in the work of users.
When a user on the electronic device communicates with a friend on another electronic device through an instant messaging tool (such as an instant messaging application), when the language mastered by the user on the electronic device and the language mastered by the friend on an opposite terminal device are different, message translation needs to be performed on a communication message in the instant messaging tool;
at present, in a message translation process, a user of electronic equipment generally copies each communication message sent by an opposite party to translation software in sequence for translation, and then obtains a translation result of the communication message; alternatively, the user of the electronic device may press a long press on each communication message displayed on the instant messaging application and then select a translation option to translate.
Disclosure of Invention
The embodiment of the application provides a message translation method, a message translation device, a storage medium and electronic equipment, which can increase the convenience of message translation and improve the efficiency of message translation. The technical scheme of the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides a message translation method, where the method includes:
acquiring a second language selected aiming at a first communication message in instant communication application, wherein the first communication message is displayed by adopting the first language;
Translating the first communication message into a second communication message corresponding to the second language;
and acquiring a third communication message displayed in the instant messaging application, and translating the third communication message into a fourth communication message based on the first language and the second language.
In a second aspect, an embodiment of the present application provides a message translation apparatus, where the apparatus includes:
the second language acquisition module is used for acquiring a second language selected by aiming at a first communication message in instant messaging application, wherein the first communication message is displayed by adopting the first language;
the communication message translation module is used for translating the first communication message into a second communication message corresponding to the second language;
and the communication message acquisition module is used for acquiring a third communication message displayed in the instant communication application and translating the third communication message into a fourth communication message based on the first language and the second language.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
in one or more embodiments of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a message translation method according to an embodiment of the present application;
fig. 2 is a scene schematic diagram of an instant messaging interface related to a message translation method provided in an embodiment of the present application;
fig. 3 is a scene schematic diagram of an instant messaging interface related to a message translation method provided in an embodiment of the present application;
fig. 4 is a schematic flowchart of another message translation method provided in an embodiment of the present application;
fig. 5a is a scene schematic diagram of a multi-finger image involved in a message translation method according to an embodiment of the present application;
fig. 5b is a schematic view of a scene displayed by an interface screenshot related to the message translation method according to the embodiment of the present application;
fig. 6 is a schematic view of a language selection scenario involved in a message translation method according to an embodiment of the present application;
Fig. 7 is a schematic flowchart of another message translation method provided in an embodiment of the present application;
fig. 8 is a schematic view of a scenario of a message translation process related to a message translation method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of another message translation method provided in an embodiment of the present application;
fig. 10 is a schematic view of a scene displayed in an interface screenshot related to a message translation module according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a message translation apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a communication message obtaining module according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another message translation apparatus provided in an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 15 is a schematic structural diagram of an operating system and a user space provided in an embodiment of the present application;
FIG. 16 is an architectural diagram of the android operating system of FIG. 14;
FIG. 17 is an architectural diagram of the IOS operating system of FIG. 14.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the related art, a user of an electronic device usually copies each communication message sent by an opposite party to translation software in sequence to translate the communication message, and then obtains a translation result of the communication message; alternatively, the user of the electronic device may press a long press on each communication message displayed on the instant messaging application and then select a translation option to translate. By adopting the method, the user needs to perform corresponding message translation operation aiming at each communication message with translation, on one hand, the convenience of message translation is not high, and the message translation efficiency is reduced; on the other hand, the method is not beneficial to the quick communication between the user of the electronic equipment and friends on other electronic equipment, and the convenience in message communication is reduced.
The present application will be described in detail with reference to specific examples.
In one embodiment, as shown in fig. 1, a message translation method is specifically proposed, which can be implemented by means of a computer program and can be run on a message translation device based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Wherein, the electronic device may be an electronic device with message translation function, and the electronic device includes but is not limited to: wearable devices, handheld devices, personal computers, tablet computers, in-vehicle devices, smart phones, computing devices or other processing devices connected to a wireless modem, and the like. Electronic devices in different networks may be called different names, such as: user equipment, access terminal, subscriber unit, subscriber station, mobile station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user equipment, cellular telephone, cordless telephone, Personal Digital Assistant (PDA), device in a 5G network or future evolution network, and the like.
Specifically, the message translation method includes:
step S101: and acquiring a second language selected aiming at a first communication message in the instant communication application, wherein the first communication message is displayed by adopting the first language.
The instant messaging application is a program for realizing online chatting and exchanging of at least two electronic devices (such as electronic devices) based on an instant messaging technology, and further, in the embodiment of the present application, the instant messaging application includes, but is not limited to, applications developed by a third party and carried by an operating system of the electronic device, and also includes some applications, applets, plug-ins, application services, and the like, developed by the third party and carried by the operating system of the electronic device.
The communication message is a medium for spreading information based on instant messaging application, and is an intermediary for transmitting information and acquiring information between people. The communication message is generally multimedia data, can be regarded as multimedia, and can also be understood as a general term of various media such as characters, graphics, images, animation, sound, video and the like which directly act on human senses, namely, the expression forms and the transmission modes of various information carriers. In the embodiment of the present application, the communication message (e.g., the first communication message) may be a text, a picture, an image, an audio, a video, etc. involved in the instant communication process.
In practical application, the first communication message in the instant messaging application is displayed in a first language, and when the first communication message is a communication message sent by an opposite-end device, the first language can be a language type which is uncommon and not understood by a user of the electronic device. The second language is a language type familiar and understandable to the user; when the first communication message is input by the electronic device and needs to be sent to the opposite-end device, the first language may be a language type familiar and understandable to the user of the electronic device, and the second language may be a language type uncommon and unintelligible to the user of the electronic device.
Specifically, in the process that a user on the electronic device uses the instant messaging application, the instant messaging application can display a first messaging message sent by other electronic devices, and display the first messaging message on the current display interface in a first language, and since the first language is a language type which is uncommon and unfamiliar to the current user of the electronic device, the current user of the electronic device needs to translate the first messaging message, so as to conveniently obtain the actual semantic meaning represented by the first messaging message. The user of the electronic device may input a translation operation for the first communication message in the instant messaging application, and the electronic device responds to the translation operation input by the user for the first communication message in the instant messaging application, and the electronic device first determines a second language indicated by the translation operation, that is, a specific language type of the second language, by executing a machine executable code corresponding to the translation operation.
Wherein. The translation operation may be input on a display interface of a current instant messaging application of the electronic device, for example, an operation of sliding, clicking, double-clicking or long-pressing a first communication message dialog box or a set translation control, pressing a physical button corresponding to a preset translation control, shaking the electronic device to input in a gesture body sensing manner, and the like, or a translation operation sent by the electronic device to the electronic device through communication connection between other intelligent devices, for example, a translation operation sent to the electronic device through an infrared remote controller, and the like.
In a specific implementation scenario, as shown in fig. 2, fig. 2 is a schematic view of a scenario of an instant messaging interface, in fig. 2, a user 1 (a user on a peer device) sends an instant messaging message, that is, a first messaging message, to a user of an electronic device based on an instant messaging application, and the electronic device may have a touch screen, where the touch screen may be a touch screen capable of implementing a single touch function, for example: capacitive touch screen, electromagnetic touch screen, can also be the touch-sensitive screen that can realize capacitive sensing, electromagnetic induction and infrared induction simultaneously. In fig. 2, when a user touches a display area of a first communication message in an instant messaging application on an electronic device with a finger, a capacitance parameter of a touch position changes, and a touch frame determines the touch position of the finger on a display interface of the electronic device according to the change of the capacitance; or when the finger contacts the touch frame, the infrared receiving end is blocked from receiving the infrared signal, the touch frame determines the touch position of the finger on the display interface according to the blocked infrared signal, and the electronic device can monitor the translation operation input by the user for the first communication message in the instant messaging application by identifying the code corresponding to the logic control instruction corresponding to the touch position.
Optionally, the translation operation input by the user on the display interface of the electronic device for the first communication message in the instant messaging application may be selecting an icon of the translation control through a mouse of an external device connected to the electronic device; the method may be that a voice signal of a "first communication message" input by a user is collected through a voice collection device of the electronic device, such as a voice input "intelligent assistant helps me to translate xxx conversation", or a specific gesture control operation input by the user for the "first communication message on a current display interface" is collected through a camera of the electronic device, and the translation operation can be received by recognizing the gesture control operation, and the like.
It should be noted that there are various ways of the user's translation operation for the first communication message input on the display page, which may be one or more of the above, and this is not limited in particular here.
Specifically, the electronic device responds to the translation operation and determines a second language indicated by the translation operation; the method comprises the following specific steps:
the electronic equipment is provided with a second language familiar to the user according to the use habit or default of the user, the electronic equipment is provided with the second language to be translated, the second language can be understood as a language type familiar and understandable to the user, usually a native language of the user, and the first language for displaying the first communication message can be understood as a language type rarely used and not understood by the user; furthermore, the user can set the language understood by the user to the second language on the electronic device, so that the electronic device can convert the text information that the user does not understand into the information (such as text, audio, and video) of the second language that the user understands, that is, the second communication message, when the electronic device monitors the translation operation input by the user.
For example, if the user can only understand and understand the chinese type of text, but not the other languages, and the user often contacts the english type and japanese type of communication messages in daily life, the user may set the chinese type to the second language in advance.
A mode for determining the second language is that when a user inputs a translation operation aiming at a first communication message, the electronic equipment can correspondingly display the language type capable of supporting the translation, and the second language selected by the user aiming at the first communication message can be determined accordingly through the analysis of the translation operation. The user may input a language selection instruction for the target language, such as selecting the native language as the second language.
Step S102: and translating the first communication message into a second communication message corresponding to the second language.
Specifically, after the electronic device obtains that the language for translation of the first communication message is the second language, the electronic device translates the first communication message based on the determined second language to obtain the translated second communication message.
Further, when the electronic device translates the first communication message based on the determined second language, the installed translation software or the corresponding translation service may be called through a preset translation software interface to perform language translation on the acquired first communication message, where the corresponding translation software interface may be a set certain translation software, and the translation software may be a translation application installed locally on the electronic device, such as a jinshan dictionary, a track translation, a hundred-degree translation, and the like, or may be a translation network interface of a translation software service provided in a network, such as a google network translation, a hundred-degree network translation, and the like. The translation result may be displayed by popping up a text box or a specific display area on the current display interface of the electronic device, for example, in fig. 3, fig. 3 is a scene diagram of the display of the translation result, and the electronic device translates the text content "rockefee Center" of the first communication message into a translation content of a chinese type (i.e., the second language), and may display the translation content "troops hospital in england" in the translation box.
Optionally, when the electronic device translates the first communication message, the electronic device may translate the first communication message from the current message display form to a second communication message displayed in another message form and in the second language, for example, translate the first communication message in a text message form to a second communication message displayed in an audio message form and in the second language. Also, for example, a first communication message in the form of a text message is translated into a second communication message in the form of an image message that is displayed in a second language, and so on.
Step S103: and acquiring a third communication message displayed in the instant messaging application, and translating the third communication message into a fourth communication message based on the first language and the second language.
Specifically, after the instant messaging application on the electronic device translates the first communication message into the second communication message corresponding to the second language, if a third communication message to be displayed exists at this time, that is, the currently generated third communication message, based on the communication type (such as the message receiving type, the message input type, or the message sending type) of the third communication message, one of the first language and the second language may be determined, and the third communication message may be translated into the fourth communication message of the corresponding language. The specific explanations are as follows:
When the third communication message is of a message receiving type, that is, the electronic device receives the third communication message sent by the opposite-end device in the instant messaging application, at this time, the electronic device automatically translates the third message sent by the opposite-end device into the fourth communication message in the second language, and it can be understood that, after the user translates the first communication message in the second language on the electronic device for the first time, the electronic device for the communication message to be displayed sent by the subsequent opposite-end device can automatically convert the first communication message into the second language which is easy to understand and familiar to the current user for message display. Further, the third communication message may be a communication message in a non-first language, for example, the first communication message may be english, and the third communication message may be russian, spanish, or the like, that is, when the communication message is converted, the electronic device may first determine whether the language of the third communication message is the second language, if so, the communication message translation is not required, and if not, the third communication message in the non-second language is translated into the second language, so as to obtain the fourth communication message in the second language.
When the third communication message is a message sending type (also can be understood as a message input type), at this time, the electronic device receives the third communication message input by the current user in the instant messaging application, for example, the user of the electronic device inputs a corresponding multimedia message (text, audio, video, etc.) in a dialog box of the instant messaging application, that is, the third communication message, because the first communication message is sent by the opposite-end device and the first communication message is displayed in the first language, the electronic device can consider that the user on the opposite-end device is easy to understand and familiar with the first language, when the current user of the electronic device needs to send the third communication message to the opposite-end device on the instant messaging software, the electronic device can automatically translate the third communication message into the fourth communication message in the first language and can send the fourth communication message to the opposite-end device, the method and the device facilitate the user on the terminal equipment to quickly understand the sent communication message, and improve the communication efficiency. Further, the third communication message may be a communication message in a second language, for example, the second language may be chinese, and the third communication message may be russian, spanish, or the like, that is, when the communication message is converted, the electronic device may first determine whether the language of the third communication message currently input by the user is the first language, if so, the communication message translation is not required, and if not, the third communication message in the second language is translated into the first language, so as to obtain the fourth communication message in the first language.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating another embodiment of a message translation method according to the present application. Specifically, the method comprises the following steps:
step S201: responding to a first operation aiming at a first communication message in an instant communication application, and generating an interface screenshot containing the first communication message, wherein the first communication message is displayed in a first language.
In one embodiment, the electronic equipment responds to a translation operation input aiming at a first communication message in the instant communication application, and therefore the second language indicated by the translation operation is determined. The translation operation for the first communication message in the instant messaging application may include a plurality of sub-operations, such as a first operation, a second operation, and a third operation.
The following explanation is made in detail by taking an example in which the translation operation includes a first operation and a second operation, as follows:
the first operation may be used to perform a screen capture operation on a current display interface of the electronic device, and when a user inputs the first operation on the electronic device for a display interface of an instant messaging application including a first communication message, the electronic device performs a screen capture operation on the display interface of the instant messaging application including the first communication message in response to the first operation, and generates an interface screen capture including the first communication message. The method can display the interface screenshot on the display interface of the current electronic equipment, on one hand, the current user of the electronic equipment can browse the interface screenshot conveniently, on the other hand, corresponding operation options after screenshot can be provided for the user on the current interface for displaying the interface screenshot, such as a screenshot sharing function, a screenshot translation function, a screenshot editing function, a screenshot deleting function and the like. The user can input the second operation for triggering the screenshot translation function aiming at the interface screenshot, and it can be understood that when the user intends to translate the first communication message of the current instant communication application, the first operation for screenshot can be directly input in the instant communication application interface of the electronic equipment, and then the second operation for triggering the screenshot translation function of the electronic equipment is input aiming at the generated interface screenshot, so that the quick translation of the first communication message in the interface screenshot is realized.
The specific operation modes of the user for inputting the first operation and the second operation on the electronic device are various, such as finger touch, voice input of a corresponding instruction, input of a corresponding gesture, and the like.
In a specific implementation scenario, as shown in fig. 5a, fig. 5a is a scene schematic diagram of a multi-finger screenshot, in an instant messaging interface shown in fig. 5a, a user 1 (a user on an opposite terminal device) sends an instant messaging message, that is, a first messaging message, to a user of an electronic device based on an instant messaging application, the electronic device receives and displays the first messaging message, the user on the electronic device needs to quickly translate the first messaging message, at this time, the user can screenshot a current instant messaging interface through a multi-finger screenshot operation (that is, a first operation), the electronic device generates an interface screenshot including the first messaging message in response to the multi-finger screenshot operation input by the user, and the first messaging message is displayed in a first language.
Step S202: (Block 201) in response to a second operation on the interface screenshot, taking a preset default language as a second language.
The second operation can be a second operation for triggering the screenshot translation function of the electronic equipment aiming at the generated interface screenshot input.
Specifically, when recognizing a first operation input by a user for a display interface corresponding to an instant messaging application, the electronic device captures the display interface of the instant messaging application containing a first communication message, and generates an interface screenshot containing the first communication message. And may display the interface screenshot on the display interface of the current electronic device, and further, the electronic device provides the user with a detailed operation for the user with respect to the interface screenshot on the display interface displaying the interface screenshot, as shown in fig. 5b, fig. 5b is a scene schematic diagram of the interface screenshot display, the electronic device displays the generated interface screenshot in a reduced size on the current display interface, and displays a plurality of operation options for further refining the interface screenshot below the interface screenshot corresponding to the black box in fig. 5, as shown in fig. 5b, fig. 5b provides a screenshot sharing function option, a screenshot translation function option, a screenshot editing function option, and a screenshot deleting function option, the electronic device may input a second operation for a first communication message in the interface screenshot in the interface shown in fig. 5, for example, the user may click the "translation" icon in fig. 5 in a finger touch manner, thereby completing a second operation for inputting the interface screenshot.
Further, in the process of inputting the second operation by the user of the electronic device, one mode is that the user can select the first communication message to be translated in the interface screenshot, the electronic device can identify the area to be translated selected by the user, and then determine the translation object, namely the first communication message, in the area to be translated; one way is that, without the user selecting the first communication message to be translated, the electronic device may automatically detect the content in the interface screenshot, thereby detecting the object to be translated, i.e., the first communication message.
Furthermore, the electronic device is provided with a default second language, the second language is defined by the electronic device according to the usage habit of the user or by the user, and usually, the user can set the translated language as the second language on the electronic device, that is, the first communication message is translated from the first language to the message in the second language.
For example, if the user can only understand and understand the chinese type of text, but not the other languages, and the user often contacts the english type and japanese type of communication messages in daily life, the user may set the chinese type to the second language in advance.
When the first communication message is a message input by a user on an instant messaging interface, the first communication message is usually sent to the opposite-end device, and in practical application, the first communication message input by the user on the electronic device cannot be understood or understood by the user on the opposite-end device, and at this time, the first language can be understood as a language familiar and understandable to the user, such as a native language; the second language may be understood as a language understood, understandable and familiar to the user on the peer device, and at this time, the electronic device may translate the first communication message in the first language input by the user into the second communication message in the second language and send the second communication message.
Step S203: generating an interface screenshot containing a first communication message in an instant communication application in response to a first operation on the first communication message.
Specifically, refer to step S201, which is not described herein again.
Step S204: and responding to a second operation aiming at the interface screenshot, and displaying language options containing at least one language.
A method for determining a second language is provided, during a process that a user inputs a translation operation for a first communication message, an electronic device monitors a first operation for screen capture input by the user, generates an interface screen capture and displays the interface screen capture on a current display interface of the electronic device, the electronic device provides a user with a detailed operation for the interface screen capture on the display interface displaying the interface screen capture, such as a screen capture translation function option, as shown in FIG. 6, FIG. 6 is a scene schematic diagram for selecting a language, when the electronic device monitors a second operation input by the user for the interface screen capture, as shown in FIG. 6, the user can touch a "translation" option on the display interface by means of finger touch, further, when the user touches a region of the "translation" option on a touch screen on the electronic device by a finger, a capacitance parameter of a touch position changes, the touch frame determines the touch position of a finger on a display interface of the electronic equipment according to the change of the capacitance; or when the finger contacts the touch frame, the infrared receiving end is blocked from receiving the infrared signal, the touch frame determines the touch position of the finger on the display interface according to the blocked infrared signal, the electronic device can monitor a second operation input by the user for the interface screenshot, namely, an operation of clicking a translation option, and a translation function of multiple languages of the electronic device, and at this time, in order to accurately determine the second language expected by the current user, the electronic device responds to the second operation to display at least one translation language, as shown in fig. 6, the electronic device displays multiple translation languages, such as a language a, a language B, and a language C, in the display frame. It can be understood that the electronic device can conveniently determine the target language in a plurality of languages by correspondingly displaying a plurality of language types capable of supporting translation through the display frame, so that the interaction with the user is enhanced on one hand; on one hand, the accurate second language can be determined through a plurality of sub-operations corresponding to the translation operation, for example, the B language is selected as the second language from a plurality of translation languages in a finger touch manner. The accuracy of language translation is improved.
Step S205: and responding to a third operation aiming at the language option, and acquiring the selected second language.
Specifically, after the electronic device displays the language option including at least one language, a current user of the electronic device may touch the target language option currently displayed by the electronic device in a finger touch operation manner, it may be understood that the language corresponding to the target language option is the second language selected by the user, in a specific implementation, when the electronic device monitors a third operation for selecting the second language, which is input by the user for the language option on the current display interface, the electronic device obtains the language corresponding to the selected language option in response to the third operation for the language option, where the language is the obtained second language.
The mode of inputting the third operation by the user is various, and can be a mode of touching language options by fingers; the language option can be selected by connecting an interrupted external device such as a mouse and moving a cursor of the mouse on a display interface; the xxx language may be selected by inputting a voice command, such as voice input "small assistant"; and so on.
Step S206: and translating the first communication message into a second communication message corresponding to the second language.
Specifically, refer to step S102, which is not described herein again.
Step S207: and when the first communication message is switched to a third language, acquiring a third communication message input in the instant communication application, and translating the third communication message into a fourth communication message corresponding to the third language.
In a specific implementation scenario, when the first communication message is a communication message sent by the peer device, after the peer device sends a first communication message at time point t1, there may be a case of sending the first communication message at time point t2 twice, it should be noted that the content and the language of the first communication message at time point t1 may be different from the content and the language of the first communication message at time point t2, that is, the first communication message at time point t1 may be in the a language, and the first communication message at time point t2 may be in the second language, in practical applications, the electronic device may monitor the first communication message sent by the peer device for the subsequent 2 nd, 3 rd, or. When the current language of the first communication message changes, for example, the first communication message is switched from the first language to the third language, that is, when the first communication message is switched to the third language, assuming that a time point corresponding to "the first communication message is switched to the third language" is t2, if the electronic device obtains the third communication message input by the current user after the time point t2, the third communication message is usually a communication message to be sent by the electronic device to an opposite terminal device, and at this time, the electronic device may translate the third communication message into the fourth communication message in the third language.
In a specific implementation scenario, when the first communication message is a communication message sent by the peer device, after the peer device sends a first communication message at time point t1, there may be a case of sending the first communication message at time point t2 for a second time, it should be noted that the content and the language of the first communication message at time point t1 may be different from the content and the language of the first communication message at time point t2, that is, the first communication message at time point t1 may be in the language a, the first communication message at time point t2 may be in the language b, that is, after time point t1, the user on the peer device withdraws the first communication message, so that the first communication message is input again at time point t2 for a second time, and at this time, the electronic device may translate the third communication message into the fourth communication message in the third language.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved. And aiming at different message types (such as a received message type, a message type to be sent and the like) corresponding to the communication message of the instant communication application, the automatic translation based on one of the first language and the second language is realized, and the message translation is more intelligent.
Referring to fig. 7, fig. 2 is a flowchart illustrating another embodiment of a message translation method according to the present application. Specifically, the method comprises the following steps:
step S301: and acquiring a second language selected aiming at a first communication message received in the instant communication application, wherein the first communication message is displayed by adopting the first language.
According to some embodiments, an instant messaging application may be used to implement online chat and communication between at least two electronic devices (e.g., an electronic device and a peer device) based on an instant messaging technology, and the instant messaging scenarios of the electronic device and the peer device are explained below for convenience of explanation. As follows below, the following description will be given,
in practical application, the first communication message in the instant messaging application is displayed in a first language, and when the first communication message is a communication message sent by an opposite-end device based on the instant messaging application, the first language can be a language type which is uncommon and not understood by a user of the electronic device. And the second language is a type of language familiar and understandable to the user.
Specifically, in the process of using the instant messaging application by the user on the electronic device, the instant messaging application may receive a first messaging message sent by the peer device and display the first messaging message on the current display interface, the method comprises the steps that a first communication message is displayed on a current display interface in a first language, the first language is a language type which is rarely used and unfamiliar by a current user of the electronic equipment, the current user of the electronic equipment needs to translate the first communication message, the user of the electronic equipment can input translation operation aiming at the first communication message in instant messaging application, the electronic equipment responds to the translation operation input aiming at the first communication message in the instant messaging application by the user, and the electronic equipment firstly determines a second language indicated by the translation operation, namely a specific language type of the second language, by executing a machine executable code corresponding to the translation operation.
Step S302: and translating the first communication message into a second communication message corresponding to the second language.
Specifically, refer to step S102, which is not described herein again.
Step S303: and acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language.
Specifically, after the electronic device translates the first communication message into the second communication message corresponding to the second language based on the instant messaging application, if a third communication message to be displayed exists at this time, in practical application, the electronic device receives the third communication message input by the current user in the instant messaging application, for example, the user of the electronic device inputs a corresponding multimedia message (text, audio, video, etc.) in a dialog box of the instant messaging application, that is, the third communication message, because the first communication message is sent by the opposite-end device and the first communication message is displayed in the first language, at this time, the electronic device may consider that the user on the opposite-end device is easy to understand and familiar with the first language, when the current user of the electronic device needs to send the third communication message to the opposite-end device on the instant messaging software, the electronic device may automatically translate the third communication message into the fourth communication message in the first language, the method and the device facilitate the user on the terminal equipment to quickly understand the sent communication message, and improve the communication efficiency. Further, the third communication message may be a communication message in a second language, for example, the second language may be chinese, and the third communication message may be russian, spanish, or the like, that is, when the communication message is converted, the electronic device may first determine whether the language of the third communication message currently input by the user is the first language, if so, the communication message translation is not required, and if not, the third communication message in the second language is translated into the first language, so as to obtain the fourth communication message in the first language.
For example, as shown in fig. 8, fig. 8 is a scene schematic diagram of a message translation process, a current user 2 of an electronic device may input a third communication message in an input box of an instant messaging application, for example, the third communication message may be "I get lost" input by the user 2, a language corresponding to the third communication message is chinese (i.e., a second language), and the electronic device may automatically translate the third communication message into a fourth communication message in the first language at this time, for example, translate "I get lost" in the second language, that is, the third communication message into "I am lost" in the first language, that is, the fourth communication message.
Step S304: and simulating click to send the fourth communication message.
Specifically, after the electronic device obtains the third communication message input in the instant messaging application, and translates the third communication message into the fourth communication message corresponding to the first language, the electronic device may simulate, based on the translated fourth communication message, that the user clicks to send the fourth communication message, so as to automatically send the translated fourth communication message to the opposite device, as shown in fig. 8, where fig. 8 is a scene diagram of the sending of the simulated message, and the electronic device translates "I am lost" in the second language, that is, the third communication message, into "I am lost" in the first language, that is, the fourth communication message, and then automatically simulates, after the current user clicks to send "I am lost", that is, the fourth communication message. Therefore, the user of the opposite terminal equipment can conveniently and quickly acquire the represented semantics directly based on the fourth communication message, and the user of the opposite terminal equipment does not need to additionally translate the fourth communication message.
Step S305: and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language.
Specifically, after the electronic device translates the first communication message into the second communication message corresponding to the second language based on the instant messaging application, if a third communication message to be displayed exists at this time, in an actual application, the electronic device receives the third communication message sent by the peer device in the instant messaging application, and at this time, the electronic device automatically translates the third message sent by the peer device into the fourth communication message in the second language. Further, the third communication message may be a communication message in a non-first language, for example, the first communication message may be english, and the third communication message may be russian, spanish, or the like, that is, when the communication message is converted, the electronic device may first determine whether the language of the third communication message is the second language, if so, the communication message translation is not required, and if not, the third communication message in the non-second language is translated into the second language, so as to obtain the fourth communication message in the second language.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved. And aiming at different message types (such as a received message type, a message type to be sent and the like) corresponding to the communication message of the instant communication application, the automatic translation based on one of the first language and the second language is realized, and the message translation is more intelligent.
Referring to fig. 9, fig. 9 is a schematic flowchart of another embodiment of a message translation method according to the present application. Specifically, the method comprises the following steps:
step S401: the method comprises the steps of obtaining a second language selected aiming at a first communication message to be sent in the instant communication application, wherein the first communication message is displayed by adopting the first language.
Specifically, in the process that a user on the electronic device uses the instant messaging application, the instant messaging application improves an input box for sending a communication message to the current user, the current user of the electronic device can send a corresponding communication message to a user on an opposite-end device, as shown in fig. 10, fig. 10 is a scene schematic diagram of an interface screenshot display, the current user of the electronic device can input a first communication message to be sent in the input box of the instant messaging application interface shown in fig. 10, because the user of the opposite-end device is unfamiliar with and obscure a first language corresponding to the first communication message, that is, the semantic meaning of the first communication message cannot be accurately understood, at this time, the current user on the electronic device can input a translation operation for the first communication message in the instant messaging application, and the electronic device responds to the translation operation input by the user for the first communication message in the instant messaging application, the electronic device firstly determines the second language indicated by the translation operation, namely the specific language type of the second language, by executing the machine executable code corresponding to the translation operation. As shown in fig. 10, the electronic device may input a first operation for screen capturing for a first communication message in an instant messaging application, and then input a second operation for selecting translation for a generated interface screenshot, where the electronic device displays, in response to the second operation, translation languages, such as a language a, a language B, and a language C, a user of the electronic device may touch a target language option currently displayed by the electronic device in the translation language options, and may understand that a language corresponding to the target language option is the second language selected by the user, in a specific implementation, when the electronic device monitors that a third operation for selecting the second language is input by the user in the current display interface for the language option, the electronic device obtains a language corresponding to the selected language option in response to a third operation for the language option, the language is the second language obtained.
Step S402: and translating the first communication message into a second communication message corresponding to the second language.
Specifically, refer to step S102, which is not described herein again.
Specifically, after the electronic device translates the first communication message into a second communication message corresponding to the second language, the electronic device may simulate a user to click and send the second communication message.
Step S403: and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language.
Specifically, after the instant messaging application on the electronic device translates the first communication message into the second communication message corresponding to the second language, if a third communication message to be displayed exists, that is, under the condition that the third communication message sent by the opposite terminal device is received in the instant messaging application, at this time, the electronic device automatically translates the third message sent by the opposite terminal device into the fourth communication message in the first language, it can be understood that, when a user translates a first communication message (the first communication message is displayed in the first language) to be sent for the first time on the electronic device in the second language and then generates the second communication message, the electronic device can automatically convert the communication message to be displayed in the first language which is easy to understand and familiar to the current user. Further, the third communication message may be a communication message in a non-first language, for example, the first communication message may be english, and the third communication message may be russian, spanish, or the like, that is, when the communication message is converted, the electronic device may first determine whether the language of the third communication message is the first language, if so, the communication message translation is not required, and if not, the third communication message in the non-first language is translated into the first language, so as to obtain the fourth communication message in the first language.
Step S404: and acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language.
Specifically, when the user on the electronic device inputs the third communication message to be sent to the peer device in the input frame of the instant messaging application, the electronic device may translate the third communication message into the fourth communication message in the second language.
Step S405: and simulating click to send the fourth communication message.
Specifically, after the electronic device translates the third communication message into a fourth communication message corresponding to the first language, the electronic device may simulate a user to click and send the fourth communication message.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved. And aiming at different message types (such as a received message type, a message type to be sent and the like) corresponding to the communication message of the instant communication application, the automatic translation based on one of the first language and the second language is realized, and the message translation is more intelligent.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 11, a schematic structural diagram of a message translation apparatus according to an exemplary embodiment of the present application is shown. The message translation device may be implemented as all or part of a device in software, hardware, or a combination of both. The device 1 comprises a second language obtaining module 11, a communication message translating module 12 and a communication message obtaining module 13.
A second language obtaining module 11, configured to obtain a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language;
a communication message translation module 12, configured to translate the first communication message into a second communication message corresponding to the second language;
a communication message obtaining module 13, configured to obtain a third communication message displayed in the instant communication application, and translate the third communication message into a fourth communication message based on the first language and the second language.
Optionally, the second language obtaining module 11 is specifically configured to:
And responding to the translation operation input for the first communication message in the instant communication application, and determining the second language indicated by the translation operation.
Optionally, the second language obtaining module 11 includes:
an interface screenshot generating unit 111, configured to generate an interface screenshot including a first communication message in an instant messaging application in response to a first operation for the first communication message;
a second language setting unit 112, configured to, in response to a second operation on the interface screenshot, set a preset default language as a second language;
and the number of the first and second groups,
the interface screenshot generating unit 111 is further configured to generate an interface screenshot containing a first communication message in an instant communication application in response to a first operation on the first communication message;
a language option display unit 113, configured to display a language option including at least one language in response to a second operation on the interface screenshot;
the second language setting unit 112 is further configured to, in response to a third operation on the language option, obtain the selected second language.
Optionally, the second language obtaining module 11 is specifically configured to:
and acquiring a second language selected aiming at the first communication message received in the instant communication application.
Optionally, the second language obtaining module 11 is specifically configured to:
and acquiring a second language selected aiming at a first communication message to be sent in the instant communication application.
Optionally, as shown in fig. 12, the communication message obtaining module 13 includes:
a first language translation unit 131, configured to obtain a third communication message input in the instant messaging application, and translate the third communication message into a fourth communication message corresponding to the first language;
the second language translation unit 132 is configured to obtain a third communication message received in the instant messaging application, and translate the third communication message into a fourth communication message corresponding to the second language.
Optionally, as shown in fig. 13, the apparatus 1 further includes:
and the message simulation sending module 14 is configured to simulate clicking to send the fourth communication message.
Optionally, the communication message obtaining module 13 is specifically configured to:
acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language; or the like, or, alternatively,
and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language.
It should be noted that, when the message translation apparatus provided in the foregoing embodiment executes the message translation method, only the division of the functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the message translation apparatus and the message translation method provided by the above embodiments belong to the same concept, and details of implementation processes thereof are referred to as method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved. And aiming at different message types (such as a received message type, a message type to be sent and the like) corresponding to the communication message of the instant communication application, the automatic translation based on one of the first language and the second language is realized, and the message translation is more intelligent.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the message translation method according to the embodiments shown in fig. 1 to 10, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to 10, which is not described herein again.
The present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded by the processor and executes the message translation method according to the embodiment shown in fig. 1 to fig. 10, where a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to fig. 10, and is not described herein again.
Referring to fig. 14, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. The electronic device in the present application may comprise one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-programmable gate array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a read-only Memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like, and the operating system may be an Android (Android) system, including a system based on Android system depth development, an IOS system developed by apple, including a system based on IOS system depth development, or other systems. The data storage area may also store data created by the electronic device during use, such as phone books, audio and video data, chat log data, and the like.
Referring to fig. 15, the memory 120 may be divided into an operating system space, where an operating system is run, and a user space, where native and third-party applications are run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
Taking an operating system as an Android system as an example, programs and data stored in the memory 120 are as shown in fig. 16, and a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360, and an application layer 380 may be stored in the memory 120, where the Linux kernel layer 320, the system runtime library layer 340, and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the electronic device, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, power management, and the like. The system runtime library layer 340 provides a main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system runtime library layer 340 is an Android runtime library (Android runtime), which mainly provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building an application, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 380, and the application programs may be native application programs carried by the operating system, such as a contact program, a short message program, a clock program, a camera application, and the like; or a third-party application developed by a third-party developer, such as a game-like application, an instant messaging program, a photo beautification program, a message translation program, and the like.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are as shown in fig. 17, and the IOS system includes: a Core operating system Layer 420(Core OS Layer), a Core Services Layer 440(Core Services Layer), a Media Layer 460(Media Layer), and a touchable Layer 480(Cocoa Touch Layer). The kernel operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the core services layer 440. The core services layer 440 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, as required by the application. The media layer 460 provides audiovisual related interfaces for applications, such as graphics image related interfaces, audio technology related interfaces, video technology related interfaces, audio video transmission technology wireless playback (AirPlay) interfaces, and the like. Touchable layer 480 provides various common interface-related frameworks for application development, and touchable layer 480 is responsible for user touch interaction operations on the electronic device. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework shown in FIG. 17, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 440 and a UIKit framework in the touchable layer 480. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The Android system can be referred to as a mode and a principle for realizing data communication between the third-party application program and the operating system in the IOS system, and details are not repeated herein.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens for receiving touch operations of a user on or near the touch display screens by using any suitable object such as a finger, a touch pen, and the like, and displaying user interfaces of various applications. Touch displays are typically provided on the front panel of an electronic device. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the electronic devices illustrated in the above-described figures do not constitute limitations on the electronic devices, which may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. For example, the electronic device further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the embodiment of the present application, the main body of execution of each step may be the electronic device described above. Optionally, the execution subject of each step is an operating system of the electronic device. The operating system may be an android system, an IOS system, or another operating system, which is not limited in this embodiment of the present application.
The electronic device of the embodiment of the application can also be provided with a display device, and the display device can be various devices capable of realizing a display function, for example: a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink panel, a Liquid Crystal Display (LCD), a Plasma Display Panel (PDP), and the like. A user may utilize a display device on the electronic device 101 to view information such as displayed text, images, video, and the like. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
In the electronic device shown in fig. 14, the processor 110 may be configured to invoke a message translation application stored in the memory 120 and specifically perform the following operations:
acquiring a second language selected aiming at a first communication message in instant communication application, wherein the first communication message is displayed by adopting the first language;
translating the first communication message into a second communication message corresponding to the second language;
and acquiring a third communication message displayed in the instant messaging application, and translating the third communication message into a fourth communication message based on the first language and the second language.
In an embodiment, when the processor 110 executes the obtaining of the second language selected for the first communication message in the instant communication application, the following operations are specifically executed:
and responding to the translation operation input for the first communication message in the instant communication application, and determining the second language indicated by the translation operation.
In an embodiment, when the processor 110 determines the second language indicated by the translation operation in response to the translation operation input for the first communication message in the instant messaging application, specifically performs the following operations:
Responding to a first operation aiming at a first communication message in an instant communication application, and generating an interface screenshot containing the first communication message;
responding to a second operation aiming at the interface screenshot, and taking a preset default language as a second language;
or the like, or, alternatively,
responding to a first operation aiming at a first communication message in an instant communication application, and generating an interface screenshot containing the first communication message;
responding to a second operation aiming at the interface screenshot, and displaying a language option comprising at least one language;
and responding to a third operation aiming at the language option, and acquiring the selected second language.
In an embodiment, when the processor 110 executes the obtaining of the second language selected for the first communication message in the instant communication application, the following operations are specifically executed:
and acquiring a second language selected aiming at the first communication message received in the instant communication application.
In an embodiment, when the processor 110 executes the obtaining of the second language selected for the first communication message in the instant communication application, the following operations are specifically executed:
and acquiring a second language selected aiming at a first communication message to be sent in the instant communication application.
In an embodiment, when the processor 110 executes the obtaining of the third communication message displayed in the instant messaging application and translates the third communication message into a fourth communication message based on the first language and the second language, the following operations are specifically executed:
acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language; or the like, or, alternatively,
and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language.
In an embodiment, after the processor 110 executes the steps of obtaining the third communication message input in the instant messaging application and translating the third communication message into the fourth communication message corresponding to the first language, the steps of:
and simulating click to send the fourth communication message.
In an embodiment, when the processor 110 executes the step of acquiring the third communication message displayed in the instant messaging application, and translating the third communication message into a fourth communication message based on the first language and the second language, the following steps are specifically executed:
Acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language; or the like, or, alternatively,
and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language.
In one embodiment, after the processor 110 executes the steps of obtaining a third communication message input in the instant messaging application and translating the third communication message into a fourth communication message corresponding to the second language, the steps further include:
and simulating click to send the fourth communication message.
In an embodiment, when the processor 110 executes the step of acquiring the third communication message input in the instant messaging application and translating the third communication message into the fourth communication message corresponding to the second language, the following steps are specifically executed:
and when the first communication message is switched to a third language, acquiring a third communication message input in the instant communication application, and translating the third communication message into a fourth communication message corresponding to the third language.
In this embodiment of the present application, an electronic device obtains a second language selected for a first communication message in an instant messaging application, where the first communication message is displayed in the first language, translates the first communication message into a second communication message corresponding to the second language, obtains a third communication message displayed in the instant messaging application, and translates the third communication message into a fourth communication message based on the first language and the second language. After the second language selected during translation of the first communication message is determined, the communication message after the first communication message can be automatically translated based on the second language and the first language, and a user does not need to perform the same message translation operation on the communication message in each instant messaging application, so that the convenience of message translation is improved, the efficiency of message translation is improved, and the convenience during message communication is improved. And aiming at different message types (such as a received message type, a message type to be sent and the like) corresponding to the communication message of the instant communication application, the automatic translation based on one of the first language and the second language is realized, and the message translation is more intelligent.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE gate array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some service interfaces, devices or units, and may be an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, and the memory may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (12)

1. A message translation method, applied to an electronic device, the method comprising:
Acquiring a second language selected aiming at a first communication message in instant communication application, wherein the first communication message is displayed by adopting the first language;
translating the first communication message into a second communication message corresponding to the second language;
and acquiring a third communication message displayed in the instant messaging application, and translating the third communication message into a fourth communication message based on the first language and the second language.
2. The method of claim 1, wherein obtaining the second language selected for the first messaging message in the instant messaging application comprises:
and responding to the translation operation input for the first communication message in the instant communication application, and determining the second language indicated by the translation operation.
3. The method of claim 2, wherein determining the second language indicated by the translation operation in response to the translation operation input for the first communication message in the instant messaging application comprises:
responding to a first operation aiming at a first communication message in an instant communication application, and generating an interface screenshot containing the first communication message;
responding to a second operation aiming at the interface screenshot, and taking a preset default language as a second language;
Or the like, or, alternatively,
responding to a first operation aiming at a first communication message in an instant communication application, and generating an interface screenshot containing the first communication message;
responding to a second operation aiming at the interface screenshot, and displaying a language option comprising at least one language;
and responding to a third operation aiming at the language option, and acquiring the selected second language.
4. The method of claim 1, wherein obtaining the second language selected for the first messaging message in the instant messaging application comprises:
and acquiring a second language selected aiming at the first communication message received in the instant communication application.
5. The method of claim 1, wherein obtaining the second language selected for the first messaging message in the instant messaging application comprises:
and acquiring a second language selected aiming at a first communication message to be sent in the instant communication application.
6. The method of claim 4, wherein the obtaining a third communication message displayed in the instant messaging application and translating the third communication message into a fourth communication message based on the first language and the second language comprises:
Acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language; or the like, or, alternatively,
and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language.
7. The method of claim 6, wherein after obtaining a third communication message entered in the instant messaging application and translating the third communication message into a fourth communication message corresponding to the first language, further comprising:
and simulating click to send the fourth communication message.
8. The method of claim 5, wherein obtaining a third communication message displayed in the instant messaging application and translating the third communication message into a fourth communication message based on the first language and the second language comprises:
acquiring a third communication message input in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the second language; or the like, or, alternatively,
and acquiring a third communication message received in the instant messaging application, and translating the third communication message into a fourth communication message corresponding to the first language.
9. The method of claim 8, wherein after obtaining a third communication message entered in the instant messaging application and translating the third communication message into a fourth communication message corresponding to the second language, further comprising:
and simulating click to send the fourth communication message.
10. The method of claim 6, wherein the obtaining a third communication message entered in the instant messaging application and translating the third communication message into a fourth communication message corresponding to the second language comprises:
and when the first communication message is switched to a third language, acquiring a third communication message input in the instant communication application, and translating the third communication message into a fourth communication message corresponding to the third language.
11. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1 to 10.
12. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 10.
CN202010681360.8A 2020-07-15 2020-07-15 Message translation method, device, storage medium and electronic equipment Pending CN111859999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010681360.8A CN111859999A (en) 2020-07-15 2020-07-15 Message translation method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010681360.8A CN111859999A (en) 2020-07-15 2020-07-15 Message translation method, device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111859999A true CN111859999A (en) 2020-10-30

Family

ID=72983054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010681360.8A Pending CN111859999A (en) 2020-07-15 2020-07-15 Message translation method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111859999A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023226848A1 (en) * 2022-05-24 2023-11-30 北京字跳网络技术有限公司 Video data generation method and apparatus, and electronic device and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120209589A1 (en) * 2011-02-11 2012-08-16 Samsung Electronics Co. Ltd. Message handling method and system
CN103942212A (en) * 2013-01-21 2014-07-23 腾讯科技(深圳)有限公司 User interface character detecting method and device
CN104813318A (en) * 2012-09-26 2015-07-29 谷歌公司 Techniques for context-based grouping of messages for translation
US20160036740A1 (en) * 2014-07-31 2016-02-04 Mimecast North America Inc. Automatic translator identification
CN107562733A (en) * 2016-06-30 2018-01-09 上海擎感智能科技有限公司 A kind of instant message interpretation method and system and a kind of electronic equipment
CN108319592A (en) * 2018-02-08 2018-07-24 广东小天才科技有限公司 A kind of method, apparatus and intelligent terminal of translation
CN108959274A (en) * 2018-06-27 2018-12-07 维沃移动通信有限公司 A kind of interpretation method and server of application program
CN109598001A (en) * 2017-09-30 2019-04-09 阿里巴巴集团控股有限公司 A kind of information display method, device and equipment
CN110619126A (en) * 2018-06-20 2019-12-27 钉钉控股(开曼)有限公司 Message processing method and device and terminal equipment
CN111310482A (en) * 2020-01-20 2020-06-19 北京无限光场科技有限公司 Real-time translation method, device, terminal and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120209589A1 (en) * 2011-02-11 2012-08-16 Samsung Electronics Co. Ltd. Message handling method and system
CN104813318A (en) * 2012-09-26 2015-07-29 谷歌公司 Techniques for context-based grouping of messages for translation
CN103942212A (en) * 2013-01-21 2014-07-23 腾讯科技(深圳)有限公司 User interface character detecting method and device
US20160036740A1 (en) * 2014-07-31 2016-02-04 Mimecast North America Inc. Automatic translator identification
CN107562733A (en) * 2016-06-30 2018-01-09 上海擎感智能科技有限公司 A kind of instant message interpretation method and system and a kind of electronic equipment
CN109598001A (en) * 2017-09-30 2019-04-09 阿里巴巴集团控股有限公司 A kind of information display method, device and equipment
CN108319592A (en) * 2018-02-08 2018-07-24 广东小天才科技有限公司 A kind of method, apparatus and intelligent terminal of translation
CN110619126A (en) * 2018-06-20 2019-12-27 钉钉控股(开曼)有限公司 Message processing method and device and terminal equipment
US20210110120A1 (en) * 2018-06-20 2021-04-15 Dingtalk Holding (Cayman) Limited Message processing method, device and terminal device
CN108959274A (en) * 2018-06-27 2018-12-07 维沃移动通信有限公司 A kind of interpretation method and server of application program
CN111310482A (en) * 2020-01-20 2020-06-19 北京无限光场科技有限公司 Real-time translation method, device, terminal and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023226848A1 (en) * 2022-05-24 2023-11-30 北京字跳网络技术有限公司 Video data generation method and apparatus, and electronic device and storage medium

Similar Documents

Publication Publication Date Title
US11467715B2 (en) User interface display method, terminal and non-transitory computer-readable storage medium for splitting a display using a multi-finger swipe
WO2021232930A1 (en) Application screen splitting method and apparatus, storage medium and electric device
CN112041791B (en) Method and terminal for displaying virtual keyboard of input method
US20230035047A1 (en) Remote assistance method, device, storage medium, and terminal
WO2021203821A1 (en) Page manipulation method and device, storage medium, and terminal
WO2020156199A1 (en) Application login method and device, terminal and storage medium
CN111602107B (en) Display method and terminal during application quitting
CN111124668A (en) Memory release method and device, storage medium and terminal
US20230117213A1 (en) Page display method and electronic device
CN113268212A (en) Screen projection method and device, storage medium and electronic equipment
CN109683760B (en) Recent content display method, device, terminal and storage medium
CN111127469A (en) Thumbnail display method, device, storage medium and terminal
CN110572815A (en) Network access method, device, storage medium and terminal
CN111913614B (en) Multi-picture display control method and device, storage medium and display
CN111859999A (en) Message translation method, device, storage medium and electronic equipment
CN112995562A (en) Camera calling method and device, storage medium and terminal
CN113419650A (en) Data moving method and device, storage medium and electronic equipment
CN113312572A (en) Resource processing method and device, storage medium and electronic equipment
CN112612633A (en) Inter-process communication method, device, storage medium and terminal
CN110853643A (en) Method, device, equipment and storage medium for voice recognition in fast application
CN113098859B (en) Webpage page rollback method, device, terminal and storage medium
CN110536020B (en) Incoming call reminding setting method, equipment and computer readable storage medium
CN113204283A (en) Text input method, text input device, storage medium and electronic equipment
CN111008006A (en) RFC file modification method and device, storage medium and terminal
CN114443204A (en) Interface content generation method and device, storage medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination