Method, device and equipment for realizing session translation and computer readable storage medium

By automatically detecting the language of users and conversation objects, and enabling the translation function when the language is different, the problem of low communication efficiency in cross-language collaborative office is solved and office efficiency is improved.

CN120106099APending Publication Date: 2025-06-06BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510246154.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

In the cross-language collaborative office scenario, due to language barriers, communication efficiency and office efficiency between employees are reduced.

Method used

By obtaining the user's subject language information and the language information of the session object, when the two are different, the translation function in the session is automatically turned on to realize automatic translation of messages.

Benefits of technology

It improves the communication efficiency between users in cross-language communication scenarios, enhances the efficiency of users' collaborative office work, and reduces the translation processing operations of users in conversations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106099A_ABST
    Figure CN120106099A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method, device and equipment for realizing session translation and a computer readable storage medium, and the method comprises the steps: responding to a user entering a session interface, and obtaining main language information of the user as first language information; obtaining language information of a session object of the user in the session as second language information; and when the first language information is different from the second language information, starting a translation function in the session. According to the embodiment of the invention, the communication efficiency between users in a cross-language communication scene can be improved, and the cooperative office efficiency of the users is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention patent application is a divisional application of the Chinese invention patent application with an application date of 2022-05-24, application number 202210571394.0, and name “Method, device, equipment and computer-readable storage medium for implementing conversational translation”. Technical Field

[0002] This document relates to the field of communication technology, and in particular to a method, device, equipment and computer-readable storage medium for implementing conversation translation. Background Art

[0003] With the rapid development of global collaborative office scenarios, more and more employees in large multinational companies are collaborating through collaborative office software. These employees are usually distributed in different countries / regions and use different languages. Most collaborative office software integrates multiple office applications such as instant messaging, cloud documents, audio and video conferencing, etc., which greatly improves the efficiency of collaborative office between employees in different countries / regions of multinational companies.

[0004] In a cross-language collaborative office scenario, when employees from different countries / regions collaborate through collaborative office software, they may be limited by language barriers, which reduces communication efficiency and office efficiency. For example, when employee A who speaks language X communicates with employee B who speaks language Y through collaborative office software, since A and B are not familiar with each other's language, A needs to translate the content to be communicated from language X to language Y through translation software before sending it to B. This additional translation processing operation reduces the communication efficiency between A and B, and thus reduces office efficiency.

[0005] Based on this, it is necessary to provide a technical solution to improve the communication efficiency between users in cross-language communication scenarios and improve the collaborative office efficiency of users. Summary of the invention

[0006] The embodiments of this specification provide a method, apparatus, device, and computer-readable storage medium for implementing conversation translation, which can improve the communication efficiency between users in cross-language communication scenarios and improve the collaborative office efficiency of users.

[0007] In a first aspect, an embodiment of the present specification provides a method for implementing conversation translation, including: In response to a user entering a conversation interface, obtaining primary language information of the user as first language information; Acquire language information of a conversation object of the user in the conversation as second language information; When the first language information is different from the second language information, a translation function in the conversation is enabled.

[0008] In a second aspect, an embodiment of the present specification provides a device for implementing conversation translation, including: A first acquisition unit, configured to acquire, in response to a user entering a conversation interface, primary language information of the user as first language information; A second acquiring unit, configured to acquire language information of a conversation partner of the user in the conversation as second language information; A function activation unit is used to activate the translation function in the conversation when the first language information is different from the second language information.

[0009] In a third aspect, an embodiment of this specification provides an electronic device, including: processor; and, A memory configured to store computer executable instructions, which, when executed by a processor, enable the processor to implement the steps of the method described in the first aspect above.

[0010] In a fourth aspect, an embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions, when executed by a processor, implement the steps of the method described in the first aspect above.

[0011] In the embodiment of this specification, in response to the user entering the conversation interface, the user's main language information is obtained as the first language information, and the language information of the user's conversation object in the conversation is obtained as the second language information. When the first language information and the second language information are different, the translation function in the conversation is enabled. It can be seen that through this embodiment, when the user is in a cross-language collaborative office scenario and needs to translate the conversation, the user does not need to perform additional translation processing operations and translation function activation operations. The system automatically enables the translation function for the user according to the user's needs, so that the user can achieve automatic translation when sending and receiving messages in the conversation, which improves the communication efficiency between users in the cross-language communication scenario and improves the collaborative office efficiency of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor. Figure 1 A flowchart of a method for implementing conversation translation provided in an embodiment of this specification; Figure 2A flowchart of a method for implementing conversation translation provided by another embodiment of this specification; Figure 3 A flowchart of a method for implementing conversation translation provided in yet another embodiment of the present specification; Figure 4 A schematic diagram showing how to close a translation control provided in an embodiment of this specification; Figure 5 A schematic diagram of the structure of a device for implementing conversation translation provided in an embodiment of this specification; Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of this specification. DETAILED DESCRIPTION

[0013] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.

[0014] An embodiment of the present specification provides a method for implementing conversation translation. When a user is in a cross-language collaborative office scenario and needs to translate a conversation, the user does not need to perform additional translation processing operations or translation function activation operations. The system automatically activates the translation function for the user according to the user's needs, so that the user can achieve automatic translation when sending and receiving messages in the conversation, thereby improving the communication efficiency between users in the cross-language communication scenario and improving the users' collaborative office efficiency.

[0015] Figure 1 A flowchart of a method for implementing conversation translation provided in an embodiment of this specification is shown in FIG. Figure 1 As shown, the process includes the following steps: Step S102, in response to the user entering the conversation interface, obtaining the user's primary language information as the first language information; Step S104, obtaining the language information of the conversation partner of the user in the conversation as the second language information; Step S106, when the first language information and the second language information are different, enabling the translation function in the conversation.

[0016] In the embodiment of the present specification, in response to the user entering the conversation interface, the user's main language information is obtained as the first language information, and the language information of the user's conversation object in the conversation is obtained as the second language information. When the first language information and the second language information are different, the translation function in the conversation is enabled. It can be seen that through this embodiment, when the user enters a conversation in a cross-language collaborative office scenario and needs to translate the conversation, the user does not need to perform additional translation processing operations and translation function activation operations. The system automatically enables the translation function for the user in the conversation according to the user's needs, so that the user can achieve automatic translation when sending and receiving messages in the conversation, which improves the communication efficiency between users in the cross-language communication scenario and improves the user's collaborative office efficiency. In addition, compared with manually enabling the translation function for all conversations in advance, it is not necessary to translate all messages in all conversations of the user, which reduces interference to the user.

[0017] In one embodiment of the present disclosure, in the above step S102, it is detected whether the user enters the conversation interface of the instant messaging application provided by the collaborative office software.

[0018] In other embodiments, the conversation may also be a conversation in other scenarios, such as a conversation in an independent instant messaging application, a conversation in a video or audio conference, a conversation for communication between different users in various platform applications (such as an e-commerce platform, a video platform, a social platform), etc. Among them, for an e-commerce platform, different sellers, different buyers, sellers and buyers, buyers and platform customer service, and sellers and platform customer service can all communicate through conversations. For a video platform, each video delivery blogger, and video delivery blogger and platform customer service can all communicate through conversations. For a social platform, each platform user, and platform user and platform customer service can all communicate through conversations. Even more, a conversation can also be a conversation entered by a user when sending a text message or multimedia message through a mobile phone base station. Therefore, in step S102, it can be detected whether the user enters a conversation interface in any scenario.

[0019] In the above step S102, in response to the user entering the conversation interface, the user's primary language information is obtained as the first language information.

[0020] In one embodiment, obtaining the user's main language information as the first language information specifically includes: obtaining the main language information pre-set by the user as the first language information. In this embodiment, in one case, the user can set the main language information for himself, such as setting it to English, and then obtaining the main language information set by the user as the first language information. Of course, the user can change the main language information set by himself, and there is no limitation here.

[0021] In another embodiment, the primary language information of the user is obtained, specifically: using a machine learning model to identify the language of the message sent by the user, for example, the conversation message sent by the user in the conversation of the instant messaging application is input into a pre-trained machine learning model, and the machine learning model outputs the language information of the conversation message, and the language information output by the machine learning model is used as the language label of the conversation message, so that the language label of the conversation message sent by the user in the recent period (such as 3 months) can be counted to determine the primary language information of the user. It should be noted that in the embodiment of the present disclosure, the primary language of the user and the information to be sent obtained according to the user's needs are legally obtained, so as to provide the user with the services he needs.

[0022] In the above step S104, the language information of the conversation object of the user in the conversation is obtained as the second language information. In one embodiment, the language information of the conversation object of the user in the conversation is obtained as the second language information, specifically: (b1) when the session type is a single chat session, obtaining the primary language information of the conversation partner of the user in the session as the second language information; or obtaining the language information of the message that meets the preset conditions sent by the conversation partner in the session as the second language information; (b2) When the session type is a group chat session, determine the target message for the user to perform a preset message response operation in the session, use the sender of the target message as the session object of the user in the session, and obtain the primary language information of the session object as the second language information, or use the language information of the target message as the second language information.

[0023] The session type of the session includes a single chat session and a group chat session. When the session type is a single chat session, the user can enter the single chat session after receiving a single chat message, or actively enter the single chat session without receiving a single chat message. When the session type is a group chat session, the user can enter the group chat session after receiving a group chat message, or actively enter the group chat session without receiving a group chat message.

[0024] In a one-on-one chat session, in one case, the main language information of the conversation object of the user in the session is obtained as the second language information. The language of the message sent by the conversation object is identified using a machine learning model. For example, the conversation message sent by the conversation object in the conversation of the instant messaging application is input into a pre-trained machine learning model, and the machine learning model outputs the language information of the conversation message. The language information output by the machine learning model is used as the language label of the conversation message. In this way, the language labels of the conversation messages sent by the conversation object in the recent period (such as 3 months) can be counted to determine the main language information of the conversation object. Of course, if the conversation object sets a label for the main language information for itself, the label can be directly obtained to determine the main language information of the conversation object.

[0025] In a one-on-one chat session, in another case, the language information of the message that meets the preset conditions and is sent by the conversation object in the session is used as the second language information. Among them, the message that meets the preset conditions includes one or more of the following: the last message read by the above user, and the message to be replied marked by the above user. Specifically, in the one-on-one chat session between the above user and the conversation object, the conversation object sends a conversation message, and the language information of the last message read by the above user in the sent conversation message is used as the second language information, or the language information of the message to be replied marked by the above user in the sent conversation message is used as the second language information. When there are both the message read by the above user and the message to be replied marked by the above user in the sent conversation message, the language information of the last message read by the above user can be obtained, and the language information of the message to be replied marked by the above user can be obtained. When the two language information are the same, the same language information is used as the second language information. When the two language information are different, the language information of the message to be replied marked by the above user is taken as the second language information.

[0026] In a group chat session, first, the target message for which the user performs a preset message response operation in the session is determined, then the sender of the target message is used as the session object of the user in the session, and finally, in the same manner as in the above case, the primary language information of the session object is obtained as the second language information, or the language information of the target message is used as the second language information. The language information of the target message can be identified by a machine learning model.

[0027] In one embodiment, the preset message response operation includes a message reading operation and a message marking operation of marking a message as a message to be replied to, and determining a target message for the user to perform the preset message response operation in the conversation is specifically: (b21) If there is a pending reply message of the above user obtained according to the message marking operation mark in the conversation, the pending reply message is determined as the target message; if there is no pending reply message of the above user obtained according to the message marking operation mark in the conversation, the read message of the above user in the conversation is determined as the target message according to the message reading operation.

[0028] Specifically, after the user performs a preset message response operation on the group chat message in the conversation, it is determined whether there is a pending reply message of the user marked according to the message marking operation in the conversation. If so, the pending reply message is determined as the target message. If not, the read messages of the user in the conversation are determined as the target messages according to the message reading operation.

[0029] In one embodiment, the preset message response operation includes: a message reading operation; determining a target message for a user to perform the preset message response operation in a conversation, including: (b22) determining, according to the message reading operation, a message that has been read by the user in the conversation as a target message. That is, when the preset message response operation includes a message reading operation, a message that has been read by the user in the conversation is determined as a target message.

[0030] In one embodiment, the preset message response operation includes: a message marking operation for marking a message as a message to be replied; determining a target message for the user to perform the preset message response operation in a conversation, including: (b23) determining the message to be replied of the user marked in the conversation as the target message according to the message marking operation. That is, when the preset message response operation includes the message marking operation, the message to be replied marked by the user in the conversation is determined as the target message.

[0031] It can be seen that in this embodiment, in a single chat session, the subject language information of the conversation object can be determined. In a group chat session, the conversation object is first determined according to the user operation, and the sender corresponding to the message to be replied marked by the user is most likely the conversation object to which the user is replying. If the user does not mark the message to be replied, the sender corresponding to the message read by the user is most likely the conversation object to which the user is replying. Then, the subject language information of the conversation object is obtained, so as to accurately determine the subject language information of the conversation object.

[0032] Considering that a user may have read multiple messages in a group chat session, in the above process, the user's read messages in the session are determined as target messages according to the message reading operation. When there are multiple messages, the last message read by the user determined according to the message reading operation is determined as the target message. Thus, if the user has not marked a message to be replied and has read multiple messages, the last message read can be determined as the target message, so that the sender of the target message can be further used as the user's session object in the group chat session.

[0033] In the above step S106, when the first language information and the second language information are different, the translation function in the conversation is enabled. After the translation function in the conversation is enabled, the message input by the user can be translated into the second language and sent to the conversation object, so that the conversation object can understand it easily. The message sent by the conversation object in the conversation can also be translated into the first language and displayed, so that the user can understand the intention of the conversation object easily.

[0034] In one embodiment, before the translation function in the session is enabled, the session activity of the user relative to the session is also determined, and then, when the first language information and the second language information are different and the session activity meets the preset activity requirement, the step of enabling the translation function in the session is performed. The session activity meeting the preset activity requirement may be that the session activity is greater than a preset activity threshold.

[0035] In one embodiment, determining the session activity of a user relative to a session is specifically as follows: (a1) when the session type is a single chat session, obtaining the number of session messages sent by the user to the session object in the session within a first preset time range, and determining the session activity according to the number of messages; (a2) When the session type is a group chat session, obtaining at least one of the following information, and determining the session activity based on the obtained information; the information includes: The number of conversation messages sent by the user in the conversation within a second preset time range; The user's processing operations on the session messages in the session; the number of conversation messages sent by the user to a specific conversation partner in the conversation within a third preset time range; The number of session members in the session; The specific session object is a session member that sends a directional session message to the user in the session, or the specific session object is the last session member that sends a session message before the user enters the session.

[0036] Specifically, when the session type is a single chat session, the number of session messages sent by the user to the session object in the session within a first preset time range is obtained. The first preset time range may be the time range from when the user establishes a friend relationship with the session object in the single chat session to when the user is detected to have entered the session this time. Alternatively, the first time range may be a period of time before the current time, such as within 3 months before the current time. The number of session messages sent by the user to the session object in the session within the first preset time range is equal to the sum of the number of session messages sent by the user to the session object in the session through the single chat session and the group chat session within the first preset time range. The session message sent by the user to the session object through the group chat session is a directional session message for the session object in the group chat session, for example, a directional session message sent to the session object through the @ method in the group chat session.

[0037] In a single chat session, the more conversation messages the user obtains and sends to the conversation object in the session within the first preset time range, the higher the conversation activity is, and the conversation activity can be equal to the number of conversation messages multiplied by a preset coefficient.

[0038] When the session type is a group chat session, at least one of the above information is obtained. When obtaining the number of session messages sent by the user in the session within a second preset time range, the second preset time range may be a time range from when the user joins the session as a session member to the current time, and the number of session messages sent by the user in the session within this time range is obtained.

[0039] When obtaining the processing operation of the user on the session message in the session, the processing operation on the session message in the session, that is, the group chat message, can be obtained after the user enters the session this time. The processing operation includes a message reading operation on the session message, a message marking operation to mark the message as a message to be replied, a message deleting operation, a message ignoring operation to mark the message as an ignored message, etc.

[0040] In the session, there may be a specific session object, which is a session member that sends a targeted session message to the user in the session. For example, the specific session object may be a session member that sends a targeted session message to the user in the session within a period of time, such as 10 minutes, before the user enters the session this time, for example, a session member that sends a targeted session message to the user through the @ method. Alternatively, the specific session object may be the last session member that sends a session message before the user enters the session. For example, the specific session object may be the last session member that sends a session message in the session before the user enters the session this time.

[0041] Here, the number of session messages sent by the user to the specific session object in the session within the third preset time range can be obtained. The third preset time range can be a period of time before the current time, for example, within 1 month before the current time. The number of session messages sent by the user to the specific session object in the session within the third preset time range is equal to the sum of the number of session messages sent by the user to the specific session object through single chat sessions and group chat sessions within the third preset time range. Among them, the session message sent by the user to the specific session object through the group chat session is a targeted session message for the specific session object sent by the user in the group chat session entered this time or in other group chat sessions, for example, a targeted session message sent by the user to the specific session object through the @ method.

[0042] When obtaining the number of session members in a session, the current number of session members in the session may be obtained after the user enters the session this time.

[0043] In the above action (a2), after obtaining any information, the session activity is determined according to the obtained information. In one embodiment, the session activity is determined according to the obtained information, specifically: Determine the activity of the session based on the acquired information and a preset activity determination rule; Among them, the activity determination rule includes at least one of the following: when the number of conversation messages sent by the user in the conversation within the second preset time range is obtained, if the obtained number is greater than or equal to the first number threshold, the conversation activity increases; when the user's processing operation on the conversation message in the conversation is obtained, if the processing operation includes a message marking operation of marking the message as a message to be replied to, the conversation activity increases; when the number of conversation messages sent by the user to a specific conversation object in the conversation within the third preset time range is obtained, if the obtained number is greater than or equal to the second number threshold, the conversation activity increases; when the number of conversation members in the conversation is obtained, if the number of conversation members is less than or equal to the preset number of people, the conversation activity increases.

[0044] Specifically, in a group chat session, an activity determination rule is preset, and the session activity can be determined based on the acquired information by the rule. In a specific example, the activity determination rule presets a baseline activity, and a rule is set to adjust the baseline activity based on the acquired information, and the adjusted baseline activity is the session activity.

[0045] In detail, when the number of conversation messages sent by the user in the conversation within the second preset time range is obtained, if the obtained number is greater than or equal to the first number threshold, the baseline activity is increased, such as increasing the baseline activity by a preset value; if the obtained number is less than the first number threshold, the baseline activity is reduced, such as reducing the baseline activity by a preset value.

[0046] Similarly, after obtaining the user's entry into the session, when processing operations on the group chat message in the group chat session, if the processing operation includes a message reading operation or a message marking operation to mark the message as a message to be replied to, it means that the user is more likely to reply to the group chat message, then the baseline activity is increased; otherwise, if the user does not perform the message reading operation and the message marking operation, then the baseline activity is reduced.

[0047] Similarly, when the number of conversation messages sent by the user to a specific conversation object in the conversation within a third preset time range is obtained, if the obtained number is greater than or equal to the second number threshold, the baseline activity is increased, such as by increasing the baseline activity by a preset value; if the obtained number is less than the second number threshold, the baseline activity is reduced, such as by reducing the baseline activity by a preset value.

[0048] Similarly, when the number of session members in the session is obtained, if the number of session members is less than or equal to the preset number, the baseline activity is increased; if the number of session members is greater than the preset number, the baseline activity is decreased.

[0049] In this step, the baseline activity level, which is increased or decreased according to the acquired information, is used as the session activity level.

[0050] It can be seen that through this embodiment, the user's session activity can be determined in different ways in single chat sessions and group chat sessions, and the session activity can be determined based on different session types, which can ensure the accuracy of determining the session activity. In addition, in this embodiment, in a group chat session, the user's session activity can be determined by combining multiple information, thereby improving the accuracy of determining the session activity.

[0051] Moreover, in the present embodiment, the focus is on the number of conversation messages sent by the user to a specific conversation object. It can be understood that since the specific conversation object is a conversation member that sent a targeted conversation message to the user before the user entered the conversation this time, or is the last conversation member that sent a conversation message before the user entered the conversation this time, the user is very likely to be attracted to enter the conversation by the conversation message sent by the specific conversation object. Therefore, the number of conversation messages sent by the user to the specific conversation object can reflect the relationship activity between the user and the specific conversation object, and then accurately evaluate the possibility of the user sending conversation messages in the conversation, so as to accurately determine the user's conversation activity.

[0052] In one embodiment, when the session type is a group chat session, if the user enters the group chat session after receiving a group chat message, the user's processing operations on the session message in the session and the number of session messages sent by the user to a specific session object in the session within a third preset time range in the above information can be obtained, and the user's session activity can be determined based on the obtained information. On the contrary, if the user actively enters the group chat session without receiving a group chat message, for example, no group chat message is generated in the session within a preset time period such as half an hour before the user enters the session, the number of session messages sent by the user in the session within the second preset time range and the number of session members in the session can be obtained from the above information, and the user's session activity can be determined based on the obtained information. In this way, the user's session activity can be determined based on different situations according to the different ways in which the user enters the session.

[0053] In one embodiment, before the step of enabling the translation function in the conversation, the method further includes: obtaining user operation information on the translation function, and determining whether the operation information satisfies a preset condition for automatically enabling the translation function. Accordingly, when the first language information and the second language information are different and the operation information satisfies the preset condition for automatically enabling the translation function, the step of enabling the translation function in the conversation is executed.

[0054] Obtaining the user's operation information on the translation function. Specifically, the instant messaging application provides a translation function to the user, and the user's operation information on the translation function includes at least the opening information of the translation function and the closing information of the translation function through the operation entrance of the translation function. After detecting the user's opening and closing operations on the translation function, the terminal device generates corresponding opening information and closing information, thereby obtaining the user's operation information on the translation function. In one embodiment, the user's operation information on the translation function may include the user's opening and closing information on the translation function before entering the current session within a preset time range, such as within the last month, and also includes the opening and closing information on the translation function executed by the user after entering the current session.

[0055] Figure 2 A flowchart of a method for implementing conversation translation provided by another embodiment of the present specification, the method can be executed by a terminal device or a server, such as Figure 2 As shown, the method includes: Step S202, after detecting that the user enters the conversation interface of the instant messaging application, obtaining the user's primary language information as the first language information; Step S204, obtaining user operation information for the translation function; Step S206, obtaining the language information of the user's conversation partner as the second language information; Step S208, determining the session activity of the user relative to the session; Step S210, determining whether the first language information is the same as the second language information; If they are different, execute step S212; if they are the same, execute step S218.

[0056] Step S212, determining whether the session activity meets a preset activity requirement; If so, execute step S214; if not, execute step S218.

[0057] Step S214, determining whether the operation information satisfies a preset condition for automatically starting the translation function; If so, execute step S216; if not, execute step S218.

[0058] Step S216, turning on the translation function in the conversation, or, if the translation function in the conversation is already turned on, keeping the turned-on state.

[0059] Step S218: When the translation function in the conversation is not enabled, the disabled state is maintained.

[0060] Specifically, each time a user is detected to enter a session of an instant messaging application, the translation function in the session is defaulted to a closed state. Through steps S210 to S218, when the first language information is different from the second language information, and the session activity meets the preset activity requirement, and the operation information meets the preset translation function automatic start condition, the translation function under the session is turned on. Of course, if the user has manually turned on the translation function, then in step S216, if the translation function under the session is already turned on, the turned-on state is maintained.

[0061] If the above-mentioned enabling condition is not met, since the translation function in the session is in a disabled state by default, in step S218, when the translation function in the session is not enabled, the disabled state can be maintained.

[0062] In one embodiment, after obtaining the user's operation information for the translation function, it is determined whether the operation information meets the preset conditions for automatically starting the translation function, specifically: (c1) determining, based on the operation information, whether the operation performed on the translation function by the user before entering the session meets the preset conditions, and determining whether the translation function has been closed by the user after entering the session; (c2) If it is determined based on the operation information that the operation performed on the translation function before the user enters the conversation meets the preset conditions, and the user has not closed the translation function after entering the conversation, then it is determined that the operation information meets the preset conditions for automatically starting the translation function; otherwise, it is determined that the operation information does not meet the preset conditions for automatically starting the translation function.

[0063] According to the above description, the user's operation information on the translation function may include the user's turning on and off information on the translation function within a preset time range, such as within the last month, before entering the current session, and also include the user's turning on and off information on the translation function after entering the current session.

[0064] Then, in this action, firstly, based on the operation information before the user enters the session, it is determined whether the operation performed on the translation function before the user enters the session meets the preset conditions, and based on the operation information after the user enters the session, it is determined whether the user has turned off the translation function after entering the session. If the operation performed on the translation function before the user enters the session meets the preset conditions, and the user has not turned off the translation function after entering the session, it is determined that the operation information meets the preset conditions for automatically turning on the translation function.

[0065] In one embodiment, the above-mentioned preset conditions include: the translation function of N sessions has not been closed continuously; N is a positive integer greater than or equal to 2; accordingly, judging whether the operation performed on the translation function before the user enters the session meets the preset conditions according to the operation information may be: determining whether the translation function of N sessions has been closed continuously before the user enters the session according to the operation information; if so, determining that the operation performed on the translation function before the user enters the session does not meet the preset conditions; if not, determining that the operation performed on the translation function before the user enters the session meets the preset conditions. That is, if the user has not closed the translation function of two or more sessions continuously before entering the current session, determining that the operation performed on the translation function before the user enters the session meets the preset conditions.

[0066] It can be seen that through this embodiment, it is also possible to judge whether the user is willing to turn on the translation function from the perspective of the user's willingness, based on the user's operation information on the translation function, both before the user enters the conversation and after the user enters the conversation, thereby improving the user's conversation translation experience.

[0067] In one embodiment, before enabling the translation function in the conversation, the above process further includes: determining whether the first language information is the preset common language information; accordingly, enabling the translation function in the conversation includes: if it is determined that the first language information is not the preset common language information, enabling the translation function in the conversation.

[0068] Figure 3 A flowchart of a method for implementing conversation translation provided in another embodiment of the present specification is provided. The method can be executed by a terminal device or a server. Figure 3 As shown, the method includes: Step S302, after detecting that the user enters the conversation interface of the instant messaging application, obtaining the user's primary language information as the first language information; Step S304, obtaining user operation information for the translation function; Step S306, obtaining the language information of the user's conversation partner as the second language information; Step S308, determining the session activity of the user relative to the session; Step S310, determining whether the first language information is the same as the second language information; If they are different, execute step 312; if they are the same, execute step S320.

[0069] Step S312, determining whether the session activity meets the preset activity requirement; If so, execute step S314; if not, execute step S320.

[0070] Step S314, determining whether the operation information satisfies a preset condition for automatically starting the translation function; If so, execute step S316; if not, execute step S320.

[0071] Step S316, determining whether the first language information is the preset common language information; If not, execute step S318, and if so, execute step S320.

[0072] Step S318, turning on the translation function in the conversation, or, if the translation function in the conversation is already turned on, keeping the turned-on state.

[0073] Step S320: When the translation function in the conversation is not enabled, the disabled state is maintained.

[0074] Specifically, before turning on the translation function in the conversation, it is necessary to determine that the first language information is not the preset common language information. If the first language information is the preset common language information, it is considered that the conversation object can understand the language information, and the translation function can be turned off. Otherwise, the translation function needs to be turned on.

[0075] Furthermore, in this embodiment, after the translation function under the conversation is enabled, you can also: (d1) obtaining target text data obtained by translating the conversation message input by the user according to the second language information; the target text format of the target text data is consistent with the source text format of the conversation message; (d2) Send the target text data to the session.

[0076] Specifically, after the translation function is turned on, the conversation message input by the user is translated in real time according to the second language information to obtain the target text data, and the target text format of the target text data is set to be consistent with the source text format of the conversation message. The translation and formatting actions can be completed by a pre-trained machine learning model. When training, the machine learning model can use the formatted text data and the translation with the same format as the text data as training data, and train the parameters in the model through the training data. The trained model has the ability to translate text and keep the original and translated formats the same.

[0077] Next, the target text data is provided to the user for confirmation, and the target text data after the user's confirmation or the voice data corresponding to the target text data after the user's confirmation is sent to the conversation object. For example, the server pushes the target text data to the user through the terminal device for the user's confirmation, or the terminal device displays the target text data to the user for the user's confirmation. After the user confirms, the target text data confirmed by the user is sent to the conversation object, or the target text data confirmed by the user is converted into voice data and sent to the conversation object. Of course, the user can also modify the target text data first and confirm the modified target text data.

[0078] It can be seen that through this embodiment, after the conversation function is turned on for the user, the conversation message input by the user is automatically translated and sent to the conversation object, and the format of the text before and after the translation is kept the same, which not only facilitates the communication between the user and the conversation object, but also makes it easier for the conversation object to understand the user's conversation intention by keeping the format of the text before and after the translation the same, thereby improving the communication and collaborative work efficiency of both parties.

[0079] In one embodiment, after the translation function in the conversation is turned on, a control for turning off the translation function is also displayed on the conversation interface. Figure 4 A schematic diagram showing how to close a translation control is provided in an embodiment of this specification, such as Figure 4 As shown, after the translation function in the conversation is turned on, the message sent by the conversation object to the conversation can be translated into the first language and displayed. Figure 4 The example in which the first language is Chinese is used for illustration, so that the user can understand the intention of the conversation partner more easily. Figure 4 The interface also provides a control to turn off the translation function (the "Close entry" in the figure), and users can turn off the translation function by triggering this control.

[0080] In summary, in the embodiment of this specification, in response to the user entering the conversation interface, the user's main language information is obtained as the first language information, and the language information of the user's conversation object in the conversation is obtained as the second language information. When the first language information and the second language information are different, the translation function in the conversation is enabled. It can be seen that through this embodiment, when the user is in a cross-language collaborative office scenario and needs to translate the conversation, the user does not need to perform additional translation processing operations and translation function activation operations. The system automatically enables the translation function for the user according to the user's needs, so that the user can achieve automatic translation when sending and receiving messages in the conversation, which improves the communication efficiency between users in the cross-language communication scenario and improves the collaborative office efficiency of users.

[0081] Figure 5 A schematic diagram of a structure of a device for implementing conversation translation provided in an embodiment of this specification is shown in FIG. Figure 5As shown, the device comprises: A first acquisition unit 51 is configured to acquire the primary language information of the user as the first language information in response to the user entering the conversation interface; A second acquiring unit 52 is used to acquire language information of a conversation partner of the user in the conversation as second language information; The function activation unit 53 is configured to activate the translation function in the conversation when the first language information is different from the second language information.

[0082] Optionally, the second acquiring unit 52 is specifically configured to: When the session type is a single chat session, obtaining the main language information of the conversation object of the user in the session as the second language information, or using the language information of the message that meets the preset condition and is sent by the conversation object in the session as the second language information; When the session type is a group chat session, determine the target message for the user to perform a preset message response operation in the session, use the sender of the target message as the session object of the user in the session, and obtain the main language information of the session object as the second language information, or use the language information of the target message as the second language information.

[0083] Optionally, the preset message response operation includes: a message reading operation and a message marking operation of marking a message as a message to be replied; the second acquisition unit 52 is further specifically used for: if there is a message to be replied of the user obtained by the message marking operation mark in the conversation, then the message to be replied is determined as the target message; if there is no message to be replied of the user obtained by the message marking operation mark in the conversation, then the read message of the user in the conversation is determined as the target message according to the message reading operation; or, The preset message response operation includes: a message reading operation; the second acquisition unit 52 is further specifically configured to: determine the user's read message in the conversation as a target message according to the message reading operation; or, The preset message response operation includes: a message marking operation of marking a message as a message to be replied; the second acquisition unit 52 is further specifically used to: determine the user's message to be replied marked in the conversation as a target message according to the message marking operation.

[0084] Optionally, the second acquiring unit 52 is further specifically configured to: When the number of the read messages is multiple, the last message read by the user determined according to the message reading operation is determined as the target message.

[0085] Optionally, the message that meets the preset condition includes one or more of the following: the last message read by the user; The message marked by the user as waiting for reply.

[0086] Optionally, it further includes an activity determination unit, which is used to: determine the session activity of the user relative to the session before the step of enabling the translation function in the session; Wherein, when the first language information is different from the second language information and the session activity meets a preset activity requirement, the step of enabling the translation function in the session is performed.

[0087] Optionally, the activity determination unit is specifically used to: When the session type is a single chat session, obtaining the number of session messages sent by the user to the session object in the session within a first preset time range, and determining the session activity according to the number of messages; When the session type is a group chat session, at least one of the following information is obtained, and the session activity is determined according to the obtained information: The number of conversation messages sent by the user in the conversation within a second preset time range; The user's processing operation on the session message in the session; The number of conversation messages sent by the user to a specific conversation object in the conversation within a third preset time range; wherein the specific conversation object is a conversation member who sends a targeted conversation message to the user in the conversation, or the specific conversation object is the last conversation member to send a conversation message before the user enters the conversation; The number of session members in the session.

[0088] Optionally, the activity determination unit is further specifically configured to: Determining the activity of the session according to the acquired information and a preset activity determination rule; The activity determination rule includes at least one of the following: when the number of conversation messages sent by the user in the conversation within a second preset time range is obtained, if the obtained number is greater than or equal to a first number threshold, the conversation activity increases; when the processing operation of the user on the conversation message in the conversation is obtained, if the processing operation includes a message marking operation of marking a message as a message to be replied to, the conversation activity increases; when the number of conversation messages sent by the user to a specific conversation object in the conversation within a third preset time range is obtained, if the obtained number is greater than or equal to a second number threshold, the conversation activity increases; when the number of conversation members in the conversation is obtained, if the number of conversation members is less than or equal to a preset number of people, the conversation activity increases.

[0089] Optionally, it further includes an operation judgment unit, which is used to: before the step of turning on the translation function in the conversation, obtain the user's operation information on the translation function, and judge whether the operation information meets the preset translation function automatic turning on condition; Wherein, when the first language information is different from the second language information and the operation information satisfies a preset condition for automatically starting the translation function, a step of starting the translation function in the conversation is performed.

[0090] Optionally, the operation determination unit is specifically configured to: Determine, based on the operation information, whether the operation performed on the translation function by the user before entering the session meets a preset condition, and determine whether the translation function has been turned off after the user enters the session; If it is determined according to the operation information that the operation performed on the translation function before the user enters the session meets the preset condition, and the user has not closed the translation function after entering the session, then it is determined that the operation information meets the preset condition for automatically starting the translation function; otherwise, it is determined that the operation information does not meet the preset condition for automatically starting the translation function.

[0091] Optionally, the preset condition includes: the translation function of N sessions has not been closed continuously; N is a positive integer greater than or equal to 2; The operation judgment unit is also specifically used to: determine, based on the operation information, whether the user has continuously closed the translation function of N sessions before entering the session; if so, determine that the operation performed on the translation function before the user enters the session does not meet the preset conditions; if not, determine that the operation performed on the translation function before the user enters the session meets the preset conditions.

[0092] Optionally, a control display unit is further included, which is used to: after the translation function in the conversation is turned on, display a control for turning off the translation function on the conversation interface.

[0093] Optionally, it further includes a language determination unit, which is used to: before starting the translation function in the conversation, determine whether the first language information is a preset common language information; The function activation unit is specifically configured to activate the translation function in the conversation if it is determined that the first language information is not the preset common language information.

[0094] Optionally, it also includes a translation unit, which is used to: after the translation function in the conversation is turned on, obtain target text data obtained by translating the conversation message input by the user according to the second language information; the target text format of the target text data is consistent with the source text format of the conversation message; and send the target text data to the conversation.

[0095] It should be noted that the device for implementing conversation translation in this embodiment can implement each process of the aforementioned method embodiment for implementing conversation translation and achieve the same effects and functions, which will not be repeated here.

[0096] An embodiment of the present specification also provides an electronic device, Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification, such as Figure 6 As shown, the electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors 801 and memory 802, and one or more applications or data may be stored in the memory 802. Among them, the memory 802 may be a temporary storage or a permanent storage. The application stored in the memory 802 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the electronic device. Furthermore, the processor 801 may be configured to communicate with the memory 802 to execute a series of computer executable instructions in the memory 802 on the electronic device. The electronic device may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input or output interfaces 805, one or more keyboards 806, etc.

[0097] In a specific embodiment, the electronic device may be a server or terminal device of an instant messaging application, and includes a processor; and a memory configured to store computer executable instructions, wherein when the computer executable instructions are executed by the processor, the processor implements the following process: In response to a user entering a conversation interface, obtaining primary language information of the user as first language information; Acquire language information of a conversation object of the user in the conversation as second language information; When the first language information is different from the second language information, a translation function in the conversation is enabled.

[0098] It should be noted that the electronic device in this embodiment can implement the various processes of the aforementioned method embodiment for realizing conversation translation and achieve the same effects and functions, which will not be repeated here.

[0099] Another embodiment of the present specification further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the following process is implemented: In response to a user entering a conversation interface, obtaining primary language information of the user as first language information; Acquire language information of a conversation object of the user in the conversation as second language information; When the first language information is different from the second language information, a translation function in the conversation is enabled.

[0100] It should be noted that the storage medium in this embodiment can implement each process of the aforementioned method embodiment for implementing conversation translation and achieve the same effects and functions, which will not be repeated here.

[0101] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0102] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0103] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.

[0104] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0105] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0106] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0107] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0108] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0110] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0111] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0112] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0113] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.

Claims

1. A method for realizing conversation translation, It is characterized in that include: In response to a user entering a conversation interface, obtaining primary language information of the user as first language information; Acquire language information of a conversation object of the user in the conversation as second language information; When the first language information is different from the second language information, enabling a translation function in the conversation; Among them, the obtaining of the language information of the conversation object of the user in the conversation as the second language information includes: when the conversation type is a group chat conversation, determining the target message of the user performing a preset message response operation in the conversation, taking the sender of the target message as the conversation object of the user in the conversation, and obtaining the main language information of the conversation object as the second language information, or taking the language information of the target message as the second language information.

2. The method according to claim 1, It is characterized in that The preset message response operation includes: a message reading operation and a message marking operation of marking a message as a message to be replied; the determining the target message for the user to perform the preset message response operation in the conversation includes: if there is a message to be replied of the user marked according to the message marking operation in the conversation, then determining the message to be replied as the target message; if there is no message to be replied of the user marked according to the message marking operation in the conversation, then determining the read message of the user in the conversation as the target message according to the message reading operation; or, The preset message response operation includes: a message reading operation; the determining the target message for the user to perform the preset message response operation in the conversation includes: determining the user's read message in the conversation as the target message according to the message reading operation; or, The preset message response operation includes: a message marking operation of marking a message as a message to be replied; the determining of the target message for the user to perform the preset message response operation in the conversation includes: determining the user's message to be replied marked in the conversation as the target message according to the message marking operation.

3. The method according to claim 2, It is characterized in that The determining, according to the message reading operation, the read message of the user in the conversation as the target message includes: When the number of the read messages is multiple, the last message read by the user determined according to the message reading operation is determined as the target message.

4. The method according to claim 1, It is characterized in that Before the step of enabling the translation function in the session, the method further includes: determining the session activity of the user relative to the session; When the first language information is different from the second language information and the session activity meets a preset activity requirement, the step of enabling the translation function in the session is performed.

5. The method according to claim 4, It is characterized in that The determining the session activity of the user relative to the session includes: When the session type is a single chat session, obtaining the number of session messages sent by the user to the session object in the session within a first preset time range, and determining the session activity according to the number of messages; When the session type is a group chat session, at least one of the following information is obtained, and the session activity is determined according to the obtained information: The number of conversation messages sent by the user in the conversation within a second preset time range; The user's processing operation on the session message in the session; The number of conversation messages sent by the user to a specific conversation object in the conversation within a third preset time range; wherein the specific conversation object is a conversation member who sends a targeted conversation message to the user in the conversation, or the specific conversation object is the last conversation member to send a conversation message before the user enters the conversation; The number of session members in the session.

6. The method according to claim 5, It is characterized in that Determining the session activity according to the acquired information includes: Determining the activity of the session according to the acquired information and a preset activity determination rule; The activity determination rule includes at least one of the following: when the number of conversation messages sent by the user in the conversation within a second preset time range is obtained, if the obtained number is greater than or equal to a first number threshold, the conversation activity increases; when the processing operation of the user on the conversation message in the conversation is obtained, if the processing operation includes a message marking operation of marking a message as a message to be replied to, the conversation activity increases; when the number of conversation messages sent by the user to a specific conversation object in the conversation within a third preset time range is obtained, if the obtained number is greater than or equal to a second number threshold, the conversation activity increases; when the number of conversation members in the conversation is obtained, if the number of conversation members is less than or equal to a preset number of people, the conversation activity increases.

7. The method according to claim 1, It is characterized in that Before the step of enabling the translation function in the conversation, the method further includes: obtaining the user's operation information on the translation function, and determining whether the operation information meets a preset condition for automatically enabling the translation function; When the first language information is different from the second language information and the operation information satisfies a preset condition for automatically starting the translation function, a step of starting the translation function in the conversation is performed.

8. The method according to claim 7, It is characterized in that The determining whether the operation information satisfies a preset condition for automatically starting the translation function includes: Determine, based on the operation information, whether the operation performed on the translation function by the user before entering the session meets a preset condition, and determine whether the translation function has been turned off after the user enters the session; If it is determined according to the operation information that the operation performed on the translation function before the user enters the session meets the preset condition, and the user has not closed the translation function after entering the session, then it is determined that the operation information meets the preset condition for automatically starting the translation function; otherwise, it is determined that the operation information does not meet the preset condition for automatically starting the translation function.

9. The method according to claim 8, It is characterized in that The preset conditions include: the translation function has not been closed for N consecutive sessions; N is a positive integer greater than or equal to 2; The determining, according to the operation information, whether the operation performed on the translation function before the user enters the session meets the preset condition includes: determining, according to the operation information, whether the user has successively closed the translation function of N sessions before entering the session; if so, determining that the operation performed on the translation function before the user enters the session does not meet the preset condition; if not, determining that the operation performed on the translation function before the user enters the session meets the preset condition.

10. The method according to claim 1, It is characterized in that After enabling the translation function in the conversation, the method further includes: A control for turning off the translation function is displayed on the conversation interface.

11. The method according to claim 1, It is characterized in that Before enabling the translation function in the conversation, the method further includes: determining whether the first language information is a preset common language information; The enabling of the translation function in the conversation further includes: if it is determined that the first language information is not preset common language information, enabling the translation function in the conversation.

12. The method according to claim 1, It is characterized in that After enabling the translation function in the conversation, the method further includes: Acquire target text data obtained by translating the conversation message input by the user according to the second language information; the target text format of the target text data is consistent with the source text format of the conversation message; The target text data is sent to the session.

13. A device for implementing conversation translation, It is characterized in that include: A first acquisition unit, configured to acquire, in response to a user entering a conversation interface, primary language information of the user as first language information; A second acquiring unit, configured to acquire language information of a conversation partner of the user in the conversation as second language information; a function activation unit, configured to activate a translation function in the conversation when the first language information is different from the second language information; Among them, the second acquisition unit is specifically used to: when the session type is a group chat session, determine the target message of the user performing a preset message response operation in the session, use the sender of the target message as the session object of the user in the session, and obtain the main language information of the session object as the second language information, or use the language information of the target message as the second language information.

14. An electronic device, It is characterized in that include: processor; as well as, A memory configured to store computer executable instructions, wherein when the computer executable instructions are executed by a processor, the processor is caused to implement the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, It is characterized in that The computer-readable storage medium is used to store computer-executable instructions, and the computer-executable instructions implement the method of any one of claims 1 to 12 when executed by a processor.

16. A computer program product, It is characterized in that The computer program product comprises a computer program, and when the computer program is executed, the method according to any one of claims 1 to 12 is implemented.