CN111147346A - Communication method, device, equipment and system - Google Patents

Communication method, device, equipment and system Download PDF

Info

Publication number
CN111147346A
CN111147346A CN201811204042.1A CN201811204042A CN111147346A CN 111147346 A CN111147346 A CN 111147346A CN 201811204042 A CN201811204042 A CN 201811204042A CN 111147346 A CN111147346 A CN 111147346A
Authority
CN
China
Prior art keywords
communication
translation
information
component
communication information
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
CN201811204042.1A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201811204042.1A priority Critical patent/CN111147346A/en
Publication of CN111147346A publication Critical patent/CN111147346A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a communication method, a device, equipment and a system, wherein the method comprises the following steps: an interaction region of an instant messaging application is identified. And extracting the newly added communication information corresponding to the target information type in the interaction area, and acquiring a translation result of the communication information. And displaying the communication information and the translation result in the interaction area in an associated manner. Therefore, the instant messaging application program can realize the translation of the communication information by virtue of the communication component executing the communication method, and the instant messaging application program does not need to be modified, so that the application program has the translation function on the basis of not prolonging the development cycle of the instant messaging application program.

Description

Communication method, device, equipment and system
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a communication method, apparatus, device, and system.
Background
Instant Messaging (IM) systems allow two or more people to communicate in text, voice, or video form at once. Because the IM system can only locally display the message sent by the user in the chat area in the chat interface, users with different languages cannot smoothly communicate with each other.
To solve this problem, in the prior art, the IM system is usually modified from the code layer to form a coupling relationship with a translation system, so that the IM system has a real-time translation function. However, the method for enabling the IM system to have the translation function through great modification greatly prolongs the development period of the IM system.
Disclosure of Invention
In view of this, embodiments of the present invention provide a communication method, apparatus, device and system, so as to enable an IM system to have a real-time translation function while not extending a development cycle of the IM system.
In a first aspect, an embodiment of the present invention provides a communication method, including:
identifying an interaction area of an instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
extracting newly added communication information corresponding to the target information type in the interaction area;
acquiring a translation result of the communication information;
presenting the translation result in association with the communication information.
In a second aspect, an embodiment of the present invention provides a communication apparatus, including:
the identification module is used for identifying an interaction area of the instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
the extraction module is used for extracting communication information which is newly added in the interaction area and corresponds to the target information type;
the translation result acquisition module is used for acquiring the translation result of the communication information;
and the display module is used for displaying the translation result in association with the communication information.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the memory is used to store one or more computer instructions, and when executed by the processor, the one or more computer instructions implement the communication method in the first aspect. The electronic device may also include a communication interface for communicating with other devices or a communication network.
An embodiment of the present invention provides a computer storage medium for storing and storing a computer program, where the computer program is used to enable a computer to implement the communication method in the first aspect when executed.
In a fourth aspect, an embodiment of the present invention provides a communication system, including: the translation component comprises a first communication component, a second communication component and a translation component, wherein the second communication component and the translation component are respectively connected with the first communication component;
the second communication assembly is used for receiving communication information and displaying the communication information in an interaction area of the second communication assembly, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
the first communication component to identify the interaction zone; extracting newly added communication information corresponding to the target information type in the interaction area; and acquiring a translation result of the communication information and displaying the translation result in association with the communication information.
The translation component is used for translating the communication information to obtain the translation result.
The communication method provided by the embodiment of the invention identifies the interaction area of the instant messaging application program, wherein the interaction area corresponds to the interaction scene of the first user and the second user. And then, extracting the newly added communication information corresponding to the target information type in the interaction area. Then, the translation result of the communication information is obtained, and finally, the communication information of the target information type and the translation result are displayed in the interaction area in an associated mode. The communication method can be executed by the communication component, and the instant communication application program can acquire the translation result of the communication information corresponding to the target information type by means of the communication component executing the method, so that the instant communication application program has the translation function, and the instant communication application program does not need to be modified, so that the instant communication application program has the translation function on the basis of not prolonging the development cycle of the instant communication application program.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present invention;
fig. 2 is a flowchart of a communication method according to an embodiment of the present invention;
fig. 3 is a flow chart of another communication method provided by the embodiment of the invention;
fig. 4 is a schematic structural diagram of a communication device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device corresponding to the communication apparatus provided in the embodiment shown in fig. 4.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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 invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if," "if," as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a recognition," depending on the context. Similarly, the phrases "if determined" or "if identified (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when identified (a stated condition or event)" or "in response to an identification (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Fig. 1 is a schematic structural diagram of a communication system according to an embodiment of the present invention, and as shown in fig. 1, the system may include: a first communication component 11, and a second communication component 12 and a translation component 13 connected to the first communication component 11, respectively.
The present embodiment and the following description each take a communication procedure between two users, that is, a first user and a second user, as an example.
In practice, the second communication component 12 may be an instant communication application, in particular a chat application, the translation component 13 may be a translation application, the first communication component 11 may also be an application or a plug-in, etc., with which a connection between the second communication component 12 and the translation component 13 may be established. And all three can be installed in the same terminal equipment, such as a mobile phone or a personal computer.
The first user may use the second communication component 12 to communicate with the second user. At this time, the second communication component 12 used by the first user may receive the communication generated by the second user and display the communication in the interaction area of the second communication component 12, where the interaction area corresponds to the interaction scene of the first user and the second user. For example, if the second communication component 12 is a chat application, the interaction area can alternatively be understood as the area of the chat application used to display chat content, which interaction area is typically located throughout the body of the chat interface.
Optionally, in practical applications, the display of the communication information may be supported by a display carrier, and the display carrier may be embodied as an interface element in the chat interface in the chat application program, such as a message, a picture, and the like. In addition, the user avatar and various function buttons displayed in the chat interface may also be considered as interface elements. When the type of the communication information is a text type, the display carrier may include the display style of the communication information, such as font, eye color, font size, etc., in addition to the communication information, i.e., text content.
After the first user starts to communicate with the second user using the second communication component 12, the first communication component 11 will first identify the interaction area. And as the communication between the two users continues, new communication information is continuously displayed in the interaction area of the second communication component 12. During the communication, the first communication component 11 extracts the communication information corresponding to the target information type newly added in the interaction area, and sends the extracted communication information to the translation component 13.
For the extraction of the communication information, the first communication component 11 may alternatively listen to the interaction area. And if newly-added communication information corresponding to the target information type is monitored in the interaction area, extracting the communication information. Alternatively, the first user may trigger a click operation on a button provided on the interface of the first communication component 11, so that the first communication component 11 responds to the click operation of the first user, thereby determining that there is new communication information corresponding to the target information type in the interaction area, and extracting the communication information.
The translation component 13 then translates the communication to obtain a translation result. Further, the translation component 13 sends the translation result to the first communication component 11, so that the first communication component 11 obtains the translation result, and displays the translation result and the communication information corresponding to the target information type in an interaction area in the second communication component 12 in an associated manner. At this time, the first user can know the meaning of the target type communication information sent by the second user through the translation result, so that the communication information is replied, and normal operation of communication among multiple users is guaranteed.
As can be seen from the above description, after the second communication component 12 displays the communication information corresponding to the type of the target information, the first communication component 11 processes the communication information, further obtains the translation result translated by the translation component 13, and further displays the translation result. Therefore, it is easily understood that the communication information and the translation result corresponding to the type of the target information are displayed asynchronously. However, even such asynchronous display does not affect the fluency of communication between users, since the time difference between the two displays is usually short.
In addition, in practical applications, the user does not always need to translate the communication information. Therefore, when the user needs to perform translation, optionally, a virtual key may be provided on the interface of the second communication component 12, and the user may trigger the start operation of the translation function by clicking the virtual key. The second communication component 12 will then generate a translation function opening message in response to the user-triggered click operation and send this message to the first communication component 11. After receiving the translation function opening message, the first communication component 11 opens the connection between the first communication component 11 and the translation component 13, so that the translation component 13 can translate the communication information.
When the user no longer needs to translate, the user can optionally also cause the second communication component 12 to produce a translation function close message by clicking the virtual key again and send this message to the first communication component 11. After receiving the message of closing the translation function, the first communication component 11 disconnects the first communication component from the translation component, i.e. the translation component 13 stops translating the communication information.
In addition to the above-described clicking operation, the user may optionally control the connection relationship between the first communication component 11 and the translation component 13 in such a way that a voice command is issued to the second communication component 12.
The above is a system-wide description of how the first communication component 11 is utilized to establish a connection between the second communication component 12 and the translation component 13, thereby enabling the second communication component 12 to have a translation function. The specific operation of the components, in particular the first communication component 11, is not described in detail. The specific operation of the first communication component 11 can be seen in the following embodiments.
In the embodiment of the present invention, the communication system includes a first communication component 11, a second communication component 12, and a translation component 13. After the communication information sent by the second user, the first communication component 11 used by the first user will extract the newly added communication information corresponding to the target information type in the interaction area. The translation component 13 then translates this extracted communication information to obtain a translation result, and sends this translation result to the first communication component 11. After obtaining the translation result, the first communication component 11 also displays the communication information corresponding to the target information type and the translation result in the interaction area of the second communication component 12 in an associated manner, so that the first user using the communication system can know the meaning of the communication information sent by the second user, thereby ensuring the normal communication between the two users.
The sequence of steps in the method embodiments described below is merely exemplary and not strictly limiting.
Based on the communication system shown in fig. 1, fig. 2 is a flowchart of a communication method provided by an embodiment of the present invention, and the communication method provided by the embodiment of the present invention can be executed by the first communication component 11 in the communication system. For simplicity of description, the first communication component 11 is simply referred to as a communication component in the present method embodiment and the method embodiments described below. As shown in fig. 2, the method may include the steps of:
s101, identifying an interaction area of the instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user.
The instant messaging application may be understood as the second communication component 12 in fig. 1. During the course of the first and second users communicating, the communication information may be displayed in the interaction area of the second communication component 12. In addition, the interface provided by the second communication assembly 12 can include function button areas, contact areas, and the like.
During the course of a first user using the second communication component 12 to communicate with a second user, the communication component may identify the interaction area of the second communication component 12. Alternatively, the communication component may obtain the source code of the second communication component 12, and determine which part is the code corresponding to the interactive area by the area identification written in the source code. After determining the code corresponding to the interaction area, the second communication component 12, i.e. the interaction area of the instant communication application, is indirectly identified.
S102, extracting the communication information which is newly added in the interaction area and corresponds to the target information type.
Next, the communication component may first determine whether there is new communication information corresponding to the target information type in the interaction area. If so, the communication information is extracted.
Alternatively, a listening mode may be adopted to determine whether there is new communication information corresponding to the target type in the interaction area. Specifically, if the monitoring result indicates that the interaction area has the newly added communication information sent by the second user, and the type of the newly added communication information is the target information type, it indicates that the communication information needs to be translated, and at this time, the communication component will extract the communication information. Wherein optionally, communication information of different information types, such as text, pictures, video, audio, etc., can be displayed in the interaction area. The type of the target information may be preset as a character, and when the communication component determines that there is communication information of a new character type in the interaction area, the communication information is extracted, that is, the character is extracted.
For the above listening operation, optionally, the listening component may be handed over to complete, and at this time, the listening component may be installed in the same mobile terminal as the communication system shown in fig. 1. And the monitoring component can send the monitoring result to the communication component at regular time or irregular time so that the communication component judges whether to extract the communication information according to the monitoring result. Of course, alternatively, this listening operation may also be performed by the communication component itself, and the specific listening process may be referred to the following description in the method embodiment shown in fig. 3.
Alternatively, the communication component may be caused to determine whether the target type of communication information is newly added in the interaction area in a manual triggering manner. For the manual triggering manner, reference may be made to the related description in the embodiment described in fig. 1, and details are not repeated here.
S103, obtaining the translation result of the communication information.
S104, displaying the translation result in association with the communication information.
For the acquisition of the translation result, in an optional manner, the communication component itself is configured with a translation module, and at this time, the communication component may directly use the translation module to translate the communication information, so that the communication component directly acquires the translation result of the communication information. Alternatively, similar to the description of the system embodiment shown in fig. 1, the communication component may send the extracted communication information corresponding to the target information type to the translation component 13, and perform translation by the translation component 13 to generate a translation result, where the translation result of the communication information acquired by the communication component may be sent by the translation component 13. Wherein, optionally, the translation component 13 may be a translation application. Finally, the translation result and the communication information are displayed in the interaction area in a related mode, so that the first user can know the meaning of the communication information which is sent by the second user and corresponds to the target information type. On the basis, the first user can reply the communication information sent by the second user, so that the communication between the two users is ensured to be carried out smoothly.
Alternatively, the translation result and the communication information may be displayed in a fixed positional relationship, and the positional relationship may be set in advance. For example, the translation result may be displayed below or above the communication information, and the like. Of course, the communication information may be displayed in an overlaid manner using the translation result.
In practical applications, the communication component in this embodiment and the following embodiments may be an application program or a plug-in installed in the terminal device.
In the embodiment of the present invention, the communication component first identifies the interaction area of the second communication component 12, where the interaction area corresponds to the interaction scenario of the first user and the second user. And then, newly-added communication information corresponding to the target information type in the interaction area is extracted. Then, a translation result obtained after the communication information is translated is obtained, and finally, the communication information of the target information type and the translation result are displayed in the interaction area in an associated mode. The communication method is implemented by the communication component, and the second communication component 12 can obtain the translation result of the newly added communication information corresponding to the target type by means of the communication component, so that the second communication component 12 has the translation function, and no modification is needed to be performed on the second communication component 12, and the second communication component 12 is ensured to have the translation function on the basis of not prolonging the development cycle of the second communication component 12.
Fig. 3 is a flowchart of another communication method according to an embodiment of the present invention, and as shown in fig. 3, the communication method may include the following steps:
s201, identifying an interaction area of the instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user.
The execution process of step 201 is similar to the corresponding steps in the foregoing embodiment, and reference may be made to the related description in the embodiment shown in fig. 2, which is not repeated herein.
S202, monitoring whether communication information is added in the interaction region or not by inserting an event into the document object model node registered in the interaction region.
S203, if the communication information is newly added, determining whether the communication information is the communication information corresponding to the target information type according to the information type identifier corresponding to the communication information, if so, executing step 204, otherwise, executing step 207.
And S204, extracting the communication information.
S205, the translation result corresponding to the communication information sent by the translation component is obtained.
S206, displaying the translation result in association with the communication information.
And S207, displaying the communication information.
The communication component can register a document object model node insertion event, namely a DOMNodeInserted event, for the interaction region in advance, and the communication component can monitor whether new communication information exists in the interaction region or not by utilizing the event. Optionally, the triggering condition for listening to the interaction area using the listening event may be: and clicking a virtual key provided in the communication interface of the second communication assembly by the user so as to start the function of translating the communication information.
In the process that the communication component monitors the interaction region by using the domnodelnserted event, if new communication information exists in the interaction region, the communication component further determines whether the new communication information is communication information corresponding to the target information type according to the information type identifier of the communication information.
If the newly added communication is a communication corresponding to the target information type, the communication component performs steps 204-206. The execution process of steps 204-206 is similar to the corresponding steps in the embodiment shown in fig. 2, and reference may be made to the related description therein, which is not repeated herein.
If the newly added communication information is not the communication information corresponding to the target information type, the communication component executes step 207, that is, directly displays the communication information in the interaction area without performing a translation process on the communication information. And in this case the communication is typically a picture, audio-visual or the like, for which type of communication the communication component does not need to interpret it either.
When the newly added communication information is the communication information corresponding to the target information type, the translation result of the communication information is shown in the interaction area in association with the communication information. The display of the communication information and the translation result mentioned in the embodiment shown in fig. 1 is based on the display carrier, and therefore, the translation result and the communication information are displayed in association, that is, the first display carrier corresponding to the translation result and the second display carrier corresponding to the communication information are displayed in association.
For the presentation of the translation result, the communication component may optionally send the translation result directly to the second communication component 12, causing the second communication component 12 to present the translation result in the interaction area.
In this way, the communication component does not perform any processing, but the second communication component 12 actively creates a first display carrier corresponding to the translation result, and the second communication component 12 displays the first display carrier in the interaction area.
Alternatively, after the translation result is obtained, a first display carrier corresponding to the translation result may be actively created by the communication component and displayed in the interaction area.
For the associated display of both the first display carrier corresponding to the translation result and the second display carrier corresponding to the communication information, the communication component optionally first obtains the position information of the second display carrier in the interaction area. And then, determining the display position of the first display carrier in the interactive area according to the acquired position information and a preset display position relation between the first display carrier and the second display carrier. Finally, the first display carrier is displayed at the display position, so that the associated display of the first display carrier and the second display carrier is realized. For the preset display position relationship between the two display carriers, for example, the first display carrier is displayed below the second display carrier, and the two display carriers are separated by a preset distance. For example, the second display carrier may be displayed overlaid on the first display carrier.
The interaction area is a part of the communication interface provided by the second communication component 12, and based on this, this can be understood as: the communication component generates an interface which has the same size and the same display style as the communication interface, and the other part of the interface is transparent, only the actively created first display carrier corresponding to the translation result is opaque, and at the moment, the two communication interfaces are superposed to display the effect that the first display carrier corresponding to the translation result and the second display carrier corresponding to the communication information of the target information type are displayed in the interaction area in a correlated mode.
In addition, in practical applications, not all information types of communication information need to be translated, so before step 204, the communication method may further include the following steps:
first, translation language information is obtained from an instant messaging application.
Second, if it is determined that the communication information needs to be translated from the translation language information, the communication information is extracted.
Specifically, the instant messaging application, i.e., the second communication component 12, may store therein translation language information, which includes a correspondence relationship between language types preset by the user, such as language a — language B. This correspondence is used to indicate that if the language to which the communication information corresponding to the type of the target information belongs is language a, the communication information needs to be translated into language B.
Therefore, when the communication component monitors that the communication information corresponding to the target information type is newly added in the interaction area, the language to which the communication information belongs is further identified, and the above example is carried out, and if the language to which the communication information belongs is a, which indicates that the communication information needs to be translated, the communication component continues to perform the step of "extracting the communication information", so that the communication information is translated into the language B.
In the embodiment of the invention, the communication component monitors the interaction area, so as to determine that the newly added communication information corresponding to the target information type exists in the interaction area. Then, it is determined whether this communication information corresponding to the target information type needs to be translated, based on the translation language information recorded in the second communication component 12. If translation is needed, the communication information is extracted, and a translation result is further obtained. Finally, the first display carrier corresponding to the translation result and the second display carrier corresponding to the communication information of the target information type are associated and displayed in the interaction area. This allows the user performing communication to understand the meaning of the communication information transmitted from the other party, thereby ensuring normal communication, and also allows the second communication module 12 to have the translation function without extending the development period. Meanwhile, the communication assembly judges whether the communication information needs to be translated or not by using the translation language information, so that the translation pressure can be relieved on one hand, the display pressure of the communication information can be relieved on the other hand, and a user has smooth communication experience.
It should be noted that, in each of the above embodiments, two communication users are taken as an example for description. However, in practical applications, the number of users communicating with each other may be three or more, and in this case, the processing procedure of the communication component is the same, but the translation component 13 needs to perform more translation work due to the increase of communication users.
In addition, in the above embodiments, only the target information type is mentioned as a text type, but in practical applications, the target information type may also be set as a voice type. At this time, the communication information in the voice format needs to be converted into a text format before subsequent processing. Then, after the translation result is obtained, the translation result in the text form needs to be converted into a voice form, so that smooth voice communication between users using different languages is realized.
It should be noted that the interactive area described in the above embodiments may generally be an area of the second communication component 12 displaying chat content. In practical applications, the interaction area may alternatively be an information input area in the second communication component 12. At this time, assuming that the target information type is still the character type, when the first user inputs the communication information of the character type, the communication component may also extract the communication information input by the first user in real time, where the extracted communication information is actually the communication information that is being input by the first user and is not edited. At the same time, the communication component will continuously extract and send the unfinished communication input by the first user, so that the translation component 13 translates the unfinished communication in real time.
Since the communication is unedited, the translation component 13 will also continually correct the translation results as the communication is continually entered during translation. After the first user finishes inputting, the translation result of the communication information of the character type is displayed in the interaction area, so that the first user can see the corresponding translation result before the communication information is sent. The first user can send the translation result to the second user, so that normal communication between the first user and the second user is realized. In this case, both the first display carrier for displaying the translation result and the second display carrier for displaying the communication information can also be understood as information input areas.
For example, the second user sends an english communication message, and the communication component in the terminal device used by the first user may display the translation result corresponding to the english communication message in the chat area. Then, the first user inputs a Chinese communication message in the interactive region in order to reply to the English communication message. At the moment, through the real-time cooperation of the communication component and the translation component, in the process that the first user inputs the Chinese communication information in real time, the English translation result of the Chinese communication information can be corrected in real time and displayed in the interactive area. After the first user finishes inputting the Chinese communication information, the final version of the English translation result corresponding to the Chinese communication information is displayed in the interaction area, namely, the first user can see the corresponding translation result before the Chinese communication information is sent. Finally, the first user can send the final English translation result to the second user, so that the second user sees the English communication information, and normal communication between the two users is realized.
Of course, when the communication component itself is configured with a translation module, the operation of the translation component for the communication information in the above description can be completed by the translation module, and the translation component 13 is not needed.
The communication device of one or more embodiments of the present invention will be described in detail below. Those skilled in the art will appreciate that these communication devices may each be configured using commercially available hardware components through the steps taught by the present solution.
Fig. 4 is a schematic structural diagram of a communication device according to an embodiment of the present invention, and as shown in fig. 4, the communication device includes: a recognition module 21, an extraction module 22, a translation result acquisition module 23 and a presentation module 24.
The identification module 21 is configured to identify an interaction area of the instant messaging application, where the interaction area corresponds to an interaction scenario of a first user and a second user.
And the extracting module 22 is configured to extract the communication information that is newly added to the interaction area and corresponds to the target information type.
And a translation result obtaining module 23, configured to obtain a translation result of the communication information.
And a display module 24, configured to display the translation result in association with the communication information.
Optionally, the apparatus further comprises: a listening module 31 and a type determination module 32.
The monitoring module 31 is configured to monitor whether communication information is added to the interaction region by inserting an event into the document object model node registered in the interaction region.
The type determining module 32 is configured to determine whether the communication information is the communication information corresponding to the target information type according to the information type identifier corresponding to the communication information if communication information is newly added.
Optionally, the apparatus further comprises: the information obtaining module 33 is configured to obtain translation language information from the instant messaging application, where the translation language information includes a correspondence between a preset language type to which the communication information belongs and a language type to which the translation result belongs.
The extracting module 22 is configured to extract the communication information if it is determined that the communication information needs to be translated according to the translation language information.
Optionally, the translation result obtaining module 23 is specifically configured to: sending the communication information to a translation component to enable the translation component to translate the communication information; and receiving the translation result sent by the translation component.
Optionally, the translation result obtaining module 23 is further specifically configured to: and translating the communication information to obtain a translation result.
Optionally, the presentation module 24 is configured to send the translation result to the instant messaging application program, so that the instant messaging application program presents the translation result in association with the communication information.
Optionally, the display module 24 specifically includes: a creation unit 241 and a presentation unit 242.
The creating unit 241 is configured to create a first display carrier corresponding to the translation result.
The display unit 242 is configured to display the first display carrier in the interaction area.
Optionally, the display unit 242 is specifically configured to: acquiring position information of a second display carrier corresponding to the communication information in the interaction area; determining the display position of the first display carrier in the interaction area according to the position information; and displaying the first display carrier at the display position.
Optionally, the display position is the same as the position corresponding to the position information,
the display unit 242 is configured to display the first display carrier on the second display carrier in an overlaying manner.
The apparatus shown in fig. 4 can perform the method of the embodiment shown in fig. 2 to 3, and reference may be made to the related description of the embodiment shown in fig. 2 to 3 for a part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the descriptions in the embodiments shown in fig. 2 to fig. 3, and are not described herein again.
The internal functions and structures of the communication device are described above, and in one possible design, the structure of the communication device may be implemented as an electronic device, which may be a terminal device such as a computer, a mobile phone, etc. installed with an instant messaging application and a translation application, and as shown in fig. 5, the electronic device may include: a processor 41 and a memory 42. Wherein the memory 42 is used for storing programs that support the electronic device to execute the communication method provided in the embodiments shown in fig. 2 to 3, and the processor 41 is configured to execute the programs stored in the memory 42.
The program comprises one or more computer instructions which, when executed by the processor 41, are capable of performing the steps of:
identifying an interaction area of an instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
extracting newly added communication information corresponding to the target information type in the interaction area;
acquiring a translation result of the communication information;
presenting the translation result in association with the communication information.
Optionally, the processor 41 is further configured to perform all or part of the steps in the embodiments shown in fig. 2 to 3.
The electronic device may further include a communication interface 43 for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for the electronic device, which includes a program for executing the communication method in the method embodiments shown in fig. 2 to 3.
The above-described embodiments of the apparatus are merely illustrative, and 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course, can also be implemented by a combination of hardware and software. With this understanding in mind, the above-described aspects and portions of the present technology which contribute substantially or in part to the prior art may be embodied in the form of a computer program product, which may be embodied on one or more computer-usable storage media having computer-usable program code embodied therein, including without limitation disk storage, CD-ROM, optical storage, and the like.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A method of communication, comprising:
identifying an interaction area of an instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
extracting newly added communication information corresponding to the target information type in the interaction area;
acquiring a translation result of the communication information;
presenting the translation result in association with the communication information.
2. The method according to claim 1, wherein before extracting the communication information corresponding to the target information type added in the interaction area, the method further comprises:
monitoring whether communication information is added to the interaction region or not by inserting an event into a document object model node registered in the interaction region;
and if the communication information is newly added, determining whether the communication information is the communication information corresponding to the target information type according to the information type identifier corresponding to the communication information.
3. The method according to claim 1, wherein before extracting the communication information corresponding to the target information type added in the interaction area, the method further comprises:
acquiring translation language information from the instant messaging application program, wherein the translation language information comprises a preset correspondence between a language type to which the communication information belongs and a language type to which the translation result belongs;
the extracting of the communication information which is newly added in the interaction area and corresponds to the target information type comprises the following steps:
and if the communication information needs to be translated according to the translation language information, extracting the communication information.
4. The method of claim 1, wherein obtaining the translation result of the communication comprises:
sending the communication information to a translation component to enable the translation component to translate the communication information;
and receiving a translation result sent by the translation component.
5. The method of claim 1, wherein obtaining the translation result of the communication comprises:
and translating the communication information to obtain a translation result.
6. The method of claim 1, wherein presenting the translation results in association with the communication comprises:
and sending the translation result to the instant messaging application program so that the instant messaging application program displays the translation result in a manner of being associated with the communication information.
7. The method of claim 1, wherein presenting the translation results in association with the communication comprises:
creating a first display carrier corresponding to the translation result;
displaying the first display carrier in the interaction area.
8. The method of claim 7, wherein said presenting the first display carrier in the interaction area comprises:
acquiring position information of a second display carrier corresponding to the communication information in the interaction area;
determining the display position of the first display carrier in the interaction area according to the position information;
displaying the first display carrier at the display location.
9. The method of claim 8, wherein the display location is the same as a location corresponding to the location information, and wherein presenting the first display carrier at the display location comprises:
and displaying the first display carrier on the second display carrier in an overlaying manner.
10. A communications apparatus, comprising:
the identification module is used for identifying an interaction area of the instant messaging application program, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
the extraction module is used for extracting communication information which is newly added in the interaction area and corresponds to the target information type;
the translation result acquisition module is used for acquiring the translation result of the communication information;
and the display module is used for displaying the translation result in association with the communication information.
11. An electronic device, comprising: a memory, a processor; wherein the content of the first and second substances,
the memory is to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the communication method of any of claims 1 to 9.
12. A communication system, comprising: the translation component comprises a first communication component, a second communication component and a translation component, wherein the second communication component and the translation component are respectively connected with the first communication component;
the second communication assembly is used for receiving communication information and displaying the communication information in an interaction area of the second communication assembly, wherein the interaction area corresponds to an interaction scene of a first user and a second user;
the first communication component to identify the interaction zone; if the communication information which is newly added in the interaction area and corresponds to the target information type is extracted; and acquiring a translation result of the communication information, and displaying the translation result in association with the communication information.
The translation component is used for translating the communication information to obtain the translation result.
13. The system as recited in claim 12, wherein the first communication component is configured to: and responding to a translation function starting message sent by the second communication component, and starting the connection between the first communication component and the translation component.
14. The system of claim 12 or 13, wherein the first communication component is further configured to: and in response to a translation function closing message sent by the second communication component, disconnecting the first communication component from the translation component.
CN201811204042.1A 2018-10-16 2018-10-16 Communication method, device, equipment and system Pending CN111147346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811204042.1A CN111147346A (en) 2018-10-16 2018-10-16 Communication method, device, equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811204042.1A CN111147346A (en) 2018-10-16 2018-10-16 Communication method, device, equipment and system

Publications (1)

Publication Number Publication Date
CN111147346A true CN111147346A (en) 2020-05-12

Family

ID=70515089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811204042.1A Pending CN111147346A (en) 2018-10-16 2018-10-16 Communication method, device, equipment and system

Country Status (1)

Country Link
CN (1) CN111147346A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239706A (en) * 2021-04-19 2021-08-10 杭州轻寻科技有限公司 Webpage text translation method, system, terminal and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983311A (en) * 2005-12-15 2007-06-20 英业达股份有限公司 Real-time information auxiliary translation system and method
CN101385024A (en) * 2006-02-17 2009-03-11 微软公司 Machine translation in instant messaging applications
CN104010267A (en) * 2013-02-22 2014-08-27 三星电子株式会社 Method and system for supporting a translation-based communication service and terminal supporting the service
US20160117315A1 (en) * 2013-07-18 2016-04-28 Tencent Technology (Shenzhen) Company Limited Method And Apparatus For Processing Message
CN108595445A (en) * 2018-04-23 2018-09-28 Oppo广东移动通信有限公司 Interpretation method, device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983311A (en) * 2005-12-15 2007-06-20 英业达股份有限公司 Real-time information auxiliary translation system and method
CN101385024A (en) * 2006-02-17 2009-03-11 微软公司 Machine translation in instant messaging applications
CN104010267A (en) * 2013-02-22 2014-08-27 三星电子株式会社 Method and system for supporting a translation-based communication service and terminal supporting the service
US20160117315A1 (en) * 2013-07-18 2016-04-28 Tencent Technology (Shenzhen) Company Limited Method And Apparatus For Processing Message
CN108595445A (en) * 2018-04-23 2018-09-28 Oppo广东移动通信有限公司 Interpretation method, device and terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113239706A (en) * 2021-04-19 2021-08-10 杭州轻寻科技有限公司 Webpage text translation method, system, terminal and medium

Similar Documents

Publication Publication Date Title
US10554805B2 (en) Information processing method, terminal, and computer-readable storage medium
CN104505091B (en) Man machine language's exchange method and system
CN103079092B (en) Obtain the method and apparatus of people information in video
US11140315B2 (en) Method, storage medium, terminal device, and server for managing push information
US11196962B2 (en) Method and a device for a video call based on a virtual image
US20210110120A1 (en) Message processing method, device and terminal device
US9612886B2 (en) Method and device for monitoring API function scheduling in mobile terminal
CN108829371B (en) Interface control method and device, storage medium and electronic equipment
CN109274999A (en) A kind of video playing control method, device, equipment and medium
CN103544721A (en) Method and system for adding remark into picture and mobile terminal
JP2021034003A (en) Human object recognition method, apparatus, electronic device, storage medium, and program
CN109782997B (en) Data processing method, device and storage medium
CN111291151A (en) Interaction method and device and computer equipment
CN111767554A (en) Screen sharing method and device, storage medium and electronic equipment
CN107168974A (en) The display control method and device of message in display items related content, social class application
CN113918856A (en) Digital human application system, application method, computer device, and storage medium
CN106774852B (en) Message processing method and device based on virtual reality
CN110968362B (en) Application running method, device and storage medium
CN113255377A (en) Translation method, translation device, electronic equipment and storage medium
CN108574878B (en) Data interaction method and device
CN111147346A (en) Communication method, device, equipment and system
CN111651049B (en) Interaction method, device, computer equipment and storage medium
CN111107283B (en) Information display method, electronic equipment and storage medium
CN112306612A (en) Document content copying method, device, storage medium and processor
CN113963355B (en) OCR character recognition method, device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200512