[go: up one dir, main page]

CN111814492A - A translation method, terminal and computer storage medium - Google Patents

A translation method, terminal and computer storage medium Download PDF

Info

Publication number
CN111814492A
CN111814492A CN202010543789.0A CN202010543789A CN111814492A CN 111814492 A CN111814492 A CN 111814492A CN 202010543789 A CN202010543789 A CN 202010543789A CN 111814492 A CN111814492 A CN 111814492A
Authority
CN
China
Prior art keywords
translation
target language
translated
content
terminal
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
CN202010543789.0A
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.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying Information Technology Co 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 Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN202010543789.0A priority Critical patent/CN111814492A/en
Publication of CN111814492A publication Critical patent/CN111814492A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种翻译方法、终端及计算机存储介质,所述翻译方法包括:识别使用场景;根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果;显示所述目标语言翻译结果。本申请提供的翻译方法、终端及计算机存储介质,终端根据用户使用场景对待翻译内容自动进行翻译,翻译操作便捷,提高了翻译效率并提升了用户使用体验。

Figure 202010543789

The present application discloses a translation method, a terminal and a computer storage medium. The translation method includes: identifying a usage scenario; translating content to be translated according to the usage scenario to obtain a corresponding target language translation result; displaying the target language translation result. With the translation method, terminal and computer storage medium provided by the present application, the terminal automatically translates the content to be translated according to the user usage scenario, the translation operation is convenient, the translation efficiency is improved, and the user experience is improved.

Figure 202010543789

Description

一种翻译方法、终端及计算机存储介质A translation method, terminal and computer storage medium

技术领域technical field

本申请涉及终端领域,特别是涉及一种翻译方法、终端及计算机存储介质。The present application relates to the field of terminals, and in particular, to a translation method, a terminal and a computer storage medium.

背景技术Background technique

随着经济全球化和世界经济一体化的趋势不断增强,人们有时也需要了解外国技术、与外国人交流等,但是,语言的差异给认知、交流等带来极大的不便。以中国和英国的用户通话为例,中国用户大多使用汉语,英国用户大多使用英语,语言不通成为两者之间交流的最大障碍。虽然已有许多翻译软件或部分软件自带翻译功能,但是大多数翻译软件的翻译范围仅局限于本应用之内,想要实现多语言翻译功能,必须通过输入、复制、粘贴文本的方式进行操作,而自带翻译功能的软件通常需要用户手动操作进行翻译,现有翻译方式存在翻译操作繁琐的问题,影响翻译操作效率和用户使用体验。With the increasing trend of economic globalization and world economic integration, people sometimes need to understand foreign technologies and communicate with foreigners. However, language differences bring great inconvenience to cognition and communication. Take the communication between users in China and the United Kingdom as an example. Most of the Chinese users use Chinese, and most of the British users use English. The language barrier has become the biggest obstacle to communication between the two. Although there are many translation software or some software with built-in translation function, the translation scope of most translation software is limited to this application. To achieve multi-language translation function, you must operate by inputting, copying, and pasting text. , and the software with its own translation function usually requires the user to perform translation manually. The existing translation method has the problem of cumbersome translation operation, which affects the translation operation efficiency and user experience.

前面的叙述在于提供一般的背景信息,并不一定构成现有技术。The preceding statements are intended to provide general background information and may not constitute prior art.

发明内容SUMMARY OF THE INVENTION

本申请的目的在于提供一种翻译方法、终端及计算机存储介质,终端根据用户使用场景对待翻译内容自动进行翻译,翻译操作便捷,提高了翻译效率并提升了用户使用体验。The purpose of the present application is to provide a translation method, a terminal and a computer storage medium. The terminal automatically translates the content to be translated according to the user's usage scenario, the translation operation is convenient, the translation efficiency is improved, and the user experience is improved.

为达到上述目的,本申请的技术方案是这样实现的:In order to achieve the above-mentioned purpose, the technical scheme of the present application is achieved in this way:

第一方面,本申请实施例提供了一种翻译方法,应用于终端,包括:In a first aspect, an embodiment of the present application provides a translation method, which is applied to a terminal, including:

识别使用场景;Identify usage scenarios;

根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果;Translate the content to be translated according to the usage scenario, and obtain the corresponding target language translation result;

显示所述目标语言翻译结果。Display the target language translation result.

作为其中一种实施方式,所述识别使用场景,包括:As an implementation manner, the identifying usage scenario includes:

获取所述终端显示屏上所显示的内容;obtain the content displayed on the terminal display screen;

对所述终端显示屏上所显示的内容进行场景特征值提取,并基于提取的场景特征值确定使用场景。Extracting the scene characteristic value of the content displayed on the display screen of the terminal, and determining the usage scene based on the extracted scene characteristic value.

作为其中一种实施方式,所述根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:As one of the implementations, the translation of the content to be translated according to the usage scenario to obtain a corresponding translation result in the target language includes:

根据所述使用场景,确定对应于所述使用场景的翻译服务功能;According to the usage scenario, determine the translation service function corresponding to the usage scenario;

基于所述翻译服务功能对待翻译内容进行翻译,获得对应的目标语言翻译结果。Based on the translation service function, the content to be translated is translated, and a corresponding target language translation result is obtained.

作为其中一种实施方式,所述基于所述翻译服务功能对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:As one of the implementations, the translation of the content to be translated based on the translation service function to obtain a corresponding translation result in the target language includes:

基于所述翻译服务功能确定待翻译内容;Determine the content to be translated based on the translation service function;

对所述待翻译内容进行翻译,获得对应的目标语言翻译结果。Translate the to-be-translated content to obtain a corresponding target language translation result.

作为其中一种实施方式,所述根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果之前,还包括:As one of the implementation manners, before the translation of the content to be translated according to the usage scenario, before obtaining the corresponding translation result in the target language, the method further includes:

接收输入的语言选择指令,将所述语言选择指令所选定的语言确定为目标语言;receiving the input language selection instruction, and determining the language selected by the language selection instruction as the target language;

或,将所述终端的系统语言确定为目标语言;Or, determining the system language of the terminal as the target language;

或,根据所述使用场景确定目标语言。Or, the target language is determined according to the usage scenario.

作为其中一种实施方式,所述使用场景包括聊天场景;所述根据所述使用场景确定目标语言,包括:As one of the implementation manners, the usage scenario includes a chat scenario; and the determining the target language according to the usage scenario includes:

获取聊天场景中聊天对象的特征信息;Obtain the characteristic information of the chat object in the chat scene;

根据所述聊天对象的特征信息确定目标语言。The target language is determined according to the characteristic information of the chat object.

作为其中一种实施方式,所述识别使用场景之前,还包括:As an implementation manner, before the identifying the usage scenario, the method further includes:

检测所述聊天场景中所述聊天对象与当前用户是否具有相同预设特征;Detecting whether the chat object in the chat scene and the current user have the same preset characteristics;

若否,则开启智能翻译功能,以识别使用场景。If not, turn on the intelligent translation function to identify the usage scenario.

作为其中一种实施方式,所述待翻译内容包括待翻译语音信息;所述根据所述用户使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:As an implementation manner, the content to be translated includes voice information to be translated; and the translation of the content to be translated according to the user usage scenario to obtain a corresponding translation result in the target language includes:

将待翻译语音信息转换为文本信息,并将所述文本信息翻译为目标语言的目标文本信息。Convert the voice information to be translated into text information, and translate the text information into target text information in the target language.

第二方面,本申请实施例提供了一种终端,所述终端包括处理器以及用于存储程序的存储装置;当所述程序被所述处理器执行,使得所述处理器实现如第一方面所述的翻译方法。In a second aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a storage device for storing a program; when the program is executed by the processor, the processor implements the first aspect the translation method described.

第三方面,本申请实施例提供了一种计算机存储介质,存储有计算机程序,所述计算机程序被处理器执行时,实现如第一方面所述的翻译方法。In a third aspect, an embodiment of the present application provides a computer storage medium storing a computer program, and when the computer program is executed by a processor, the translation method according to the first aspect is implemented.

本申请实施例提供的翻译方法、终端及计算机存储介质,所述翻译方法包括:识别使用场景;根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果;显示所述目标语言翻译结果。如此,终端根据用户使用场景对待翻译内容自动进行翻译,无需用户手动操作,且能够自适应将待翻译内容翻译成所需语言,翻译操作便捷,提高了翻译效率并提升了用户使用体验。The translation method, terminal, and computer storage medium provided by the embodiments of the present application include: identifying a usage scenario; translating the content to be translated according to the usage scenario to obtain a corresponding target language translation result; displaying the target language translation result. In this way, the terminal automatically translates the content to be translated according to the user's usage scenario, without manual operation by the user, and can adaptively translate the content to be translated into the required language, the translation operation is convenient, the translation efficiency is improved, and the user experience is improved.

附图说明Description of drawings

图1为现有翻译过程的界面示意图;Fig. 1 is the interface schematic diagram of existing translation process;

图2为本申请实施例提供的一种翻译方法的流程示意图;2 is a schematic flowchart of a translation method provided in an embodiment of the present application;

图3为本申请实施例中翻译效果示意图;3 is a schematic diagram of translation effect in the embodiment of the application;

图4为本申请实施例提供的一种翻译方法的具体流程示意图;Fig. 4 is a specific schematic flow chart of a translation method provided by an embodiment of the present application;

图5为本申请实施例提供的另一种翻译方法的具体流程示意图;FIG. 5 is a schematic flow chart of another translation method provided by the embodiment of the present application;

图6为本申请实施例提供的一种终端的结构示意图。FIG. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.

具体实施方式Detailed ways

以下结合说明书附图及具体实施例对本申请技术方案做进一步的详细阐述。除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。本文所使用的术语“和/或”包括一个或多个相关的所列项目的任意的和所有的组合。The technical solutions of the present application will be further elaborated below with reference to the accompanying drawings and specific embodiments of the description. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein in the specification of the application are for the purpose of describing specific embodiments only, and are not intended to limit the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.

参见图2,为本申请实施例提供的一种翻译方法,该翻译方法可以适用于需要对显示的内容等进行翻译的情况,该翻译方法可以由本申请实施例提供的一种翻译装置来执行,该翻译装置可以采用软件和/或硬件的方式来实现,在具体应用中,该翻译装置可以具体是智能手机、个人数字助理、平板电脑等终端。本实施例中以所述翻译方法的执行主体为终端为例,该翻译方法包括以下步骤应用于:Referring to FIG. 2 , a translation method provided by the embodiment of the present application can be applied to the situation that the displayed content and the like need to be translated, and the translation method can be performed by a translation device provided by the embodiment of the present application, The translation device may be implemented in software and/or hardware. In a specific application, the translation device may be a terminal such as a smart phone, a personal digital assistant, or a tablet computer. In this embodiment, the execution subject of the translation method is taken as a terminal as an example, and the translation method includes the following steps and is applied:

步骤S101:识别使用场景;Step S101: Identify the usage scenario;

这里,所述使用场景可以是指用户需要使用翻译功能时终端所展示的场景,可包括娱乐场景、聊天场景、学习场景等,所述使用场景可以具体是“听歌”、“看电影”、“聊天”、“查找网页”、“玩游戏”等。由于使用场景具体可通过所述终端显示屏上所显示的内容进行表征,因此,可通过所述终端显示屏上所显示的内容对使用场景进行识别。在一实施方式中,所述识别使用场景,可包括:获取所述终端显示屏上所显示的内容;对所述终端显示屏上所显示的内容进行场景特征值提取,并基于提取的场景特征值确定使用场景。这里,所述终端可通过扫描等方式获取所述终端显示屏上所显示的内容,而根据所述终端显示屏上所显示的内容可获知页面布局信息,进而可对所述终端显示屏上所显示的内容进行场景特征值提取,获得对应的场景特征值,最后基于提取的场景特征值确定使用场景。可以理解地,所述终端可预先设置有场景特征值与用户使用场景的对应关系,例如,场景特征值“歌词”对应的使用场景为听歌等。此外,终端也可以根据所述终端所运行的应用程序等信息确定使用场景,比如,智能手机在运行游戏应用时,使用场景为玩游戏。如此,实现精准获取使用场景,且操作速度快。Here, the usage scenarios may refer to the scenarios displayed by the terminal when the user needs to use the translation function, which may include entertainment scenarios, chat scenarios, learning scenarios, etc. The usage scenarios may specifically be “listening to songs”, “watching movies”, "Chat," "Find the Web," "Play Games," and more. Since the usage scenario can be specifically represented by the content displayed on the display screen of the terminal, the usage scenario can be identified by the content displayed on the display screen of the terminal. In one embodiment, the identifying the usage scene may include: acquiring the content displayed on the display screen of the terminal; extracting the scene feature value of the content displayed on the display screen of the terminal, and extracting the scene feature based on the extracted scene feature. The value determines the usage scenario. Here, the terminal can acquire the content displayed on the display screen of the terminal by scanning or other means, and can obtain the page layout information according to the content displayed on the display screen of the terminal, and then can obtain the content displayed on the display screen of the terminal. The displayed content is subjected to scene feature value extraction to obtain the corresponding scene feature value, and finally the usage scene is determined based on the extracted scene feature value. It is understandable that the terminal may be preset with a corresponding relationship between the scene feature value and the user usage scene, for example, the usage scene corresponding to the scene feature value "lyrics" is listening to a song or the like. In addition, the terminal may also determine a usage scenario according to information such as an application program running on the terminal. For example, when a smartphone runs a game application, the usage scenario is playing a game. In this way, accurate acquisition of usage scenarios is achieved, and the operation speed is fast.

步骤S102:根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果;Step S102: Translate the content to be translated according to the usage scenario, and obtain a corresponding target language translation result;

需要说明的是,所述使用场景可表征需要翻译为哪种语言即目标语言,比如,若使用场景为与一英国人聊天,则可确定目标语言为英文。同时,根据所述使用场景也可表征用户所需要的翻译服务功能,如全网页翻译、字幕翻译、图片文字翻译等。在一实施方式中,所述根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:根据所述使用场景,确定对应于所述使用场景的翻译服务功能;基于所述翻译服务功能对待翻译内容进行翻译,获得对应的目标语言翻译结果。可以理解地,在不同场景下,用户所需要使用的翻译服务功能可能不同,例如,用户在浏览网页时,可能需要进行全局翻译即实时翻译;用户在听歌或看电影时,可能需要对字幕翻译;用户在拍摄图像时,可能需要对图像中文字进行翻译;用户在玩游戏时,可能需要对输入的文字进行翻译。终端在根据所述使用场景确定对应于所述使用场景的翻译服务功能后,可基于所述翻译服务功能对待翻译内容进行翻译,从而获得对应的目标语言翻译结果。相对于现有用户根据实际需要手动选择翻译服务功能的方式,自动根据用户使用场景确定翻译服务功能更加便捷,进一步提高了翻译操作的效率。It should be noted that the usage scenario may represent the language to be translated into, that is, the target language. For example, if the usage scenario is chatting with an English person, the target language may be determined to be English. At the same time, the translation service functions required by the user, such as full webpage translation, subtitle translation, picture text translation, etc., can also be represented according to the usage scenarios. In one embodiment, translating the content to be translated according to the usage scenario and obtaining a corresponding target language translation result includes: determining, according to the usage scenario, a translation service function corresponding to the usage scenario; The translation service function translates the content to be translated and obtains the corresponding translation result in the target language. Understandably, in different scenarios, the translation service functions that users need to use may be different. For example, when users browse web pages, they may need to perform global translation, that is, real-time translation; when users listen to songs or watch movies, they may need to interpret subtitles. Translation; users may need to translate the text in the image when taking an image; users may need to translate the input text when playing a game. After determining the translation service function corresponding to the usage scenario according to the usage scenario, the terminal may translate the content to be translated based on the translation service function, thereby obtaining a corresponding target language translation result. Compared with the existing method in which users manually select translation service functions according to actual needs, it is more convenient to automatically determine translation service functions according to user usage scenarios, which further improves the efficiency of translation operations.

在一实施方式中,所述基于所述翻译服务功能对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:基于所述翻译服务功能确定待翻译内容;对所述待翻译内容进行翻译,获得对应的目标语言翻译结果。这里,所述终端基于所述翻译服务功能可确定待翻译内容所在位置,并基于待翻译内容所在位置,可通过光学字符识别或者辅助服务从所述终端显示屏上所显示的内容中获取待翻译内容,进而对所述待翻译内容进行翻译,获得对应的目标语言翻译结果。以所述翻译服务功能为字幕翻译为例,终端可确定待翻译内容所在位置为字幕,进而可从终端显示屏上所显示的内容中获取显示于字幕中的内容作为待翻译内容。In one embodiment, translating the content to be translated based on the translation service function to obtain a corresponding translation result in the target language includes: determining the content to be translated based on the translation service function; translating the content to be translated, Obtain the corresponding target language translation result. Here, the terminal may determine the location of the content to be translated based on the translation service function, and based on the location of the content to be translated, may obtain the content to be translated from the content displayed on the display screen of the terminal through optical character recognition or an auxiliary service content, and then translate the content to be translated to obtain a corresponding translation result in the target language. Taking the translation service function as subtitle translation as an example, the terminal may determine the location of the content to be translated as the subtitle, and then obtain the content displayed in the subtitle as the content to be translated from the content displayed on the terminal display screen.

步骤S103:显示所述目标语言翻译结果。Step S103: Display the target language translation result.

具体地,终端在对待翻译内容进行翻译而获得目标语言翻译结果后,显示所述目标语言翻译结果。这里,所述显示所述目标语言翻译结果可以是在所述待翻译内容所在位置的上方区域显示所述目标语言翻译结果,具体可以是根据所述目标语言翻译结果确定所需显示区域大小,基于所述所需显示区域大小将所述目标语言翻译结果显示于所述待翻译内容所在位置的上方区域。Specifically, after translating the content to be translated and obtaining the translation result in the target language, the terminal displays the translation result in the target language. Here, the displaying the translation result in the target language may be displaying the translation result in the target language in the upper area of the location where the content to be translated is located, and specifically may be determining the required display area size according to the translation result in the target language, based on The required size of the display area displays the target language translation result in the area above where the content to be translated is located.

应当指出的是,本申请的翻译方法,识别使用场景,根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,并显示所述目标语言翻译结果,一方面,此种功能可以命令为智能翻译功能,也可以命令为其它功能;另一方面,此种功能可以是作为系统功能一直处于运行状态,例如类似笔记本电脑的触摸板一样,也可以是在接收到开启指令时运行该功能。因此,智能翻译功能的描述性说明并不对本申请的翻译方法进行限制,只是对本申请的翻译方法的功能效果作概述性的描述。It should be noted that the translation method of the present application identifies the usage scenario, translates the content to be translated according to the usage scenario, obtains the corresponding translation result in the target language, and displays the translation result in the target language. The command is an intelligent translation function, or it can be another function; on the other hand, this function can be always running as a system function, such as a touchpad similar to a notebook computer, or it can be run when an opening command is received. Function. Therefore, the descriptive description of the intelligent translation function does not limit the translation method of the present application, but only briefly describes the functional effects of the translation method of the present application.

需要说明的是,所述终端可以以各种形式来实施,本实施例中描述的终端可以包括诸如手机、平板电脑、笔记本电脑、掌上电脑、个人数字助理(Personal DigitalAssistant,PDA)、便捷式媒体播放器(Portable Media Player,PMP)、导航装置、可穿戴设备、智能手环、计步器等移动终端。这里,所述终端中设置有智能翻译功能,在所述智能翻译功能开启的情况下,所述终端可识别使用场景,根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,并显示所述目标语言翻译结果,从而实现自动进行翻译。需要说明的是,所述终端可设置有智能翻译功能的开关按钮,通过对所述开关按钮进行开关操作,可以开启或关闭智能翻译功能。这里,所述终端在智能翻译功能开启之后,可以在显示界面显示一用于表征智能翻译功能已开启的状态标识,以便于用户对所述终端进行操作。It should be noted that the terminal may be implemented in various forms, and the terminal described in this embodiment may include, for example, a mobile phone, a tablet computer, a notebook computer, a handheld computer, a Personal Digital Assistant (PDA), a portable media Players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers and other mobile terminals. Here, the terminal is provided with an intelligent translation function, and when the intelligent translation function is enabled, the terminal can identify a usage scenario, translate the content to be translated according to the usage scenario, and obtain a corresponding target language translation result, And display the target language translation result, so as to realize automatic translation. It should be noted that the terminal may be provided with a switch button for the intelligent translation function, and the intelligent translation function can be turned on or off by switching the switch button. Here, after the intelligent translation function is enabled, the terminal may display a status indicator on the display interface to indicate that the intelligent translation function has been enabled, so as to facilitate the user to operate the terminal.

综上,上述实施例提供的翻译方法中,终端根据用户使用场景对待翻译内容自动进行翻译,无需用户手动操作,且能够自适应将待翻译内容翻译成所需语言,翻译操作便捷,提高了翻译效率并提升了用户使用体验。To sum up, in the translation method provided by the above embodiment, the terminal automatically translates the content to be translated according to the user's usage scenario, without the need for manual operation by the user, and can adaptively translate the content to be translated into the required language, the translation operation is convenient, and the translation is improved. efficiency and improve user experience.

在一实施方式中,所述根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果之前,还包括:接收用户输入的语言选择指令,将所述语言选择指令所选定的语言确定为目标语言;或,将所述终端的系统语言确定为目标语言;或,根据所述使用场景确定目标语言。具体地,终端可显示有语言列表,用户可通过点击语言列表而从中选择一语言作为目标语言,此时终端接收用户输入的语言选择指令,并将所述语言选择指令所选定的语言确定为目标语言。例如,假设终端提供有汉语、英语和法语三种语言的语言列表,用户从其中选择法语时,终端将法语作为目标语言。或者,由于用户大多数情况下都是需要将用其它语言表达的文字、语音等翻译为自己所熟悉的语言,而自己所熟悉的语言通常也被设置为终端的系统语言,因此,可直接将所述终端的系统语言确定为目标语言。或者,由于用户使用场景在一定程度上也能够表征用户需要将待翻译内容翻译成的语言,比如用户在与一日本人聊天时,为了实现沟通正常,用户输入的汉字需要转换为日语,此时日语为目标语言。在一实施方式中,所述使用场景包括聊天场景;所述根据所述使用场景确定目标语言,包括:获取聊天场景中聊天对象的特征信息;根据所述聊天对象的特征信息确定目标语言。可以理解地,所述聊天对象的特征信息可包括与所述聊天对象的历史聊天记录、所述聊天对象的地域信息、对所述聊天对象的标记信息等,例如,终端可根据与所述聊天对象的历史聊天记录获知与所述聊天对象进行聊天时所用语言,并将该语言作为目标语言;或者,终端可根据所述聊天对象的国籍,将对应的语言作为目标语言;或者,终端可根据用户对所述聊天对象所标记的国籍、工作地址等将对应的语言作为目标语言。如此,通过聊天对象的特征信息确定需要翻译成的目标语言,精准且快速。In one embodiment, before translating the content to be translated according to the usage scenario and obtaining the corresponding target language translation result, the method further includes: receiving a language selection instruction input by the user, and converting the language selected by the language selection instruction to the target language. Determine as the target language; or, determine the system language of the terminal as the target language; or, determine the target language according to the usage scenario. Specifically, the terminal may display a language list, and the user may select a language from the language list as the target language by clicking on the language list. At this time, the terminal receives the language selection instruction input by the user, and determines the language selected by the language selection instruction as Target language. For example, it is assumed that the terminal provides a language list of three languages, Chinese, English, and French. When the user selects French, the terminal uses French as the target language. Or, because the user needs to translate the text, voice, etc. expressed in other languages into the language he is familiar with in most cases, and the language he is familiar with is usually set as the system language of the terminal, therefore, you can directly translate The system language of the terminal is determined as the target language. Or, because the user's usage scenario can also represent the language that the user needs to translate the content to be translated into to a certain extent. For example, when the user is chatting with a Japanese person, in order to achieve normal communication, the Chinese characters entered by the user need to be converted into Japanese. At this time, Japanese is the target language. In one embodiment, the usage scenario includes a chat scenario; the determining the target language according to the usage scenario includes: acquiring feature information of a chat object in the chat scene; and determining the target language according to the feature information of the chat object. It can be understood that the characteristic information of the chat object may include historical chat records with the chat object, regional information of the chat object, tag information for the chat object, etc. For example, the terminal may The historical chat records of the object know the language used when chatting with the chat object, and use the language as the target language; or, the terminal can use the corresponding language as the target language according to the nationality of the chat object; The user takes the corresponding language as the target language for the nationality, work address, etc. marked by the chat object. In this way, the target language to be translated into is determined by the characteristic information of the chat object, which is accurate and fast.

在一实施方式中,所述识别使用场景之前,还包括:检测所述聊天场景中所述聊天对象与当前用户是否具有相同预设特征;若否,则开启智能翻译功能,以识别使用场景。具体地,终端检测所述聊天场景中所述聊天对象与所述终端的当前用户是否具有相同预设特征,若所述聊天对象与所述当前用户具有相同预设特征,说明两者所使用语言相同,可不必开启智能翻译功能;若所述聊天对象与所述当前用户不具有相同预设特征,说明两者所使用语言不相同,需要开启智能翻译功能。可以理解地,当用户与使用同一语言的另一用户进行聊天时,此时不必对聊天内容进行翻译,而只有在用户与不使用同一语言的另一用户进行聊天时,才需要对聊天内容进行翻译,例如,中国用户与英国用户进行聊天时,通常需要对聊天内容进行翻译,才能实现双方顺利沟通。这里,终端检测所述聊天场景中所述聊天对象与当前用户是否具有相同预设特征可以是检测所述聊天对象的国籍、所使用语言是否与当前用户对应的国籍或所使用语言相同。若所述聊天对象的国籍与当前用户对应的国籍不相同和/或所述聊天对象所使用语言与当前用户所使用语言不相同,说明所述聊天对象与当前用户之间进行交流时需要进行翻译。如此,只有在检测到聊天对象与当前用户不具有相同预设特征时才开启智能翻译功能,以对对话内容进行翻译,提高了翻译操作灵活性,进一步提升了用户使用体验。In one embodiment, before the identifying the usage scenario, the method further includes: detecting whether the chat object in the chat scenario and the current user have the same preset characteristics; if not, enabling the intelligent translation function to identify the usage scenario. Specifically, the terminal detects whether the chat object in the chat scene and the current user of the terminal have the same preset characteristics, and if the chat object and the current user have the same preset characteristics, it indicates the language used by both If they are the same, it is not necessary to enable the intelligent translation function; if the chat object and the current user do not have the same preset characteristics, it means that the languages used by the two are different, and the intelligent translation function needs to be enabled. Understandably, when a user chats with another user who uses the same language, the chat content does not need to be translated at this time, and only when the user chats with another user who does not use the same language, the chat content needs to be translated. Translation. For example, when a Chinese user chats with a British user, it is usually necessary to translate the chat content to achieve smooth communication between the two parties. Here, the terminal detecting whether the chat object and the current user in the chat scene have the same preset feature may be detecting whether the nationality of the chat object and the language used are the same as the nationality or language corresponding to the current user. If the nationality of the chat object is not the same as the nationality corresponding to the current user and/or the language used by the chat object is not the same as the language used by the current user, it means that the chat object needs to be translated when communicating with the current user . In this way, the intelligent translation function is enabled only when it is detected that the chat object and the current user do not have the same preset characteristics, so as to translate the content of the conversation, which improves the flexibility of translation operations and further improves the user experience.

在一实施方式中,所述待翻译内容包括待翻译语音信息;所述根据所述使用场景对待翻译内容进行翻译,获得对应的目标语言翻译结果,包括:将待翻译语音信息转换为文本信息,并将所述文本信息翻译为目标语言的目标文本信息。可以理解地,在聊天场景中,用户之间可能是通过发送语音消息方式进行聊天,此时需要将语音先转换为文字,然后再进行翻译。例如,在一中国用户与一英国用户进行聊天时,若该中国用户以汉语方式输入一段语音,此时需要先将该语音转换为汉语文字,然后再将该汉语文字翻译为英语文字,进而发送给该英国客户,此时目标语言为英语;接着,若该中国用户接收到该英国用户发送的另一段语音,此时需要先将该语音转换为英语文字,然后再将该英语文字翻译为汉语文字进行显示,此时目标语言为汉语。以所述终端为手机,参见图3,为本申请实施例提供的翻译效果示意图,手机检测到与一中国用户进行聊天的聊天对象为一英国人时,若中国用户向手机输入一语音消息“有什么可以帮助的吗”,则手机需要先将该语音转换为文字消息“有什么可以帮助的吗”,然后再翻译为英文“Can I Help You”,然后再将该英文显示于该语音消息的上方区域。此外,所述语音消息上方也可显示一按键,只有在用户点击该按键时,才显示该英文。In one embodiment, the content to be translated includes voice information to be translated; the translating the content to be translated according to the usage scenario to obtain a corresponding translation result in the target language includes: converting the voice information to be translated into text information, and translate the text information into target text information in the target language. Understandably, in a chat scenario, users may chat by sending voice messages. In this case, the voice needs to be converted into text first, and then translated. For example, when a Chinese user is chatting with a British user, if the Chinese user inputs a piece of speech in Chinese, the speech needs to be converted into Chinese characters first, then the Chinese characters are translated into English characters, and then sent To the British customer, the target language is English at this time; then, if the Chinese user receives another voice sent by the British user, the voice needs to be converted into English text first, and then the English text is translated into Chinese The text is displayed, and the target language is Chinese at this time. Taking the terminal as a mobile phone, referring to FIG. 3 , a schematic diagram of the translation effect provided in the embodiment of the present application, when the mobile phone detects that the chat object chatting with a Chinese user is an Englishman, if the Chinese user inputs a voice message to the mobile phone " Can I help you?", the phone needs to first convert the voice into a text message "Can I help you", then translate it into English "Can I Help You", and then display the English in the voice message the upper area. In addition, a button may also be displayed above the voice message, and the English is displayed only when the user clicks the button.

基于前述实施例相同的发明构思,本实施例通过一具体示例对前述实施例的技术方案进行详细说明。参见图4,为本申请实施例提供的翻译方法的具体流程示意图,包括以下步骤:Based on the same inventive concept as the foregoing embodiments, the present embodiment describes in detail the technical solutions of the foregoing embodiments through a specific example. Referring to Fig. 4, the specific flow chart of the translation method provided by the embodiment of the present application includes the following steps:

步骤S201:设置翻译目标语言;Step S201: set the translation target language;

这里,终端在启动翻译服务后,用户可设置要翻译成的目标语言。如果用户没有手动设置,则可使用终端的系统语言作为目标语言。Here, after the terminal starts the translation service, the user can set the target language to be translated into. If the user does not manually set it, the system language of the terminal can be used as the target language.

步骤S202:根据页面特征值获取用户所在场景;Step S202: obtaining the scene where the user is located according to the page feature value;

这里,终端可提取页面特征值,并根据页面特征值判断用户所在场景,比如是否在玩游戏、听歌、玩社交应用或购物等。Here, the terminal can extract the page feature value, and judge the scene where the user is located according to the page feature value, such as whether he is playing games, listening to songs, playing social applications, or shopping.

步骤S203:根据用户所在场景执行算法匹配以提供对应的翻译功能;Step S203: perform algorithm matching according to the scene where the user is located to provide the corresponding translation function;

这里,终端可根据用户所在场景执行算法匹配,以提供对应的翻译功能。比如,用户所在场景为浏览网页时,可提供全文翻译功能;用户所在场景为听歌时,可提供字幕翻译功能等。Here, the terminal may perform algorithm matching according to the scene where the user is located, so as to provide the corresponding translation function. For example, when the user's scene is browsing a web page, the full-text translation function can be provided; when the user's scene is listening to a song, the subtitle translation function can be provided.

步骤S204:提取文本信息翻译成目标语言;Step S204: extracting text information and translating it into the target language;

这里,终端可根据用户所在场景提取需要翻译的文本信息,并通过翻译引擎将文本信息翻译成目标语言。Here, the terminal can extract the text information that needs to be translated according to the scene where the user is located, and translate the text information into the target language through a translation engine.

步骤S205:将翻译结果显示在原文区域上方。Step S205: Display the translation result above the original text area.

这里,终端可根据翻译结果计算该翻译结果所需多大的矩形框才能完全显示,再将翻译结果显示在原文即所述文本信息上方。Here, according to the translation result, the terminal can calculate the size of the rectangular frame required for the translation result to be completely displayed, and then display the translation result above the original text, that is, the text information.

综上,在启动终端的翻译服务后,终端自动识别用户所在的场景,根据当前的特征值进行算法匹配,然后通过OCR或者辅助服务识别场景里的文本内容以及文本内容所对应位置信息,将识别出来的文本内容翻译为预先设置的目标语言,并将翻译结果按照之前文本内容对应位置进行显示。如此,实现了在不同场景下通过获取在终端上文本信息调用翻译引擎进行翻译不同场景下显示有不同的方案显示,解决了现有技术文本翻译操作繁琐的问题,能够极大地方便用户进行文本识别翻译,提高了用户操作的效率。To sum up, after starting the translation service of the terminal, the terminal automatically identifies the scene where the user is located, performs algorithm matching according to the current feature value, and then uses OCR or auxiliary services to identify the text content in the scene and the location information corresponding to the text content. The text content is translated into the preset target language, and the translation result is displayed according to the corresponding position of the previous text content. In this way, it is realized that in different scenarios, the translation engine is called for translation by acquiring the text information on the terminal, and different solutions are displayed in different scenarios, which solves the problem of cumbersome text translation operations in the prior art, and can greatly facilitate users to perform text recognition. Translate, improve the efficiency of user operations.

基于前述实施例相同的发明构思,本实施例通过另一具体示例对前述实施例的技术方案进行详细说明。参见图5,为本申请实施例提供的翻译方法的具体流程示意图,包括以下步骤:Based on the same inventive concept as the foregoing embodiments, this embodiment will describe in detail the technical solutions of the foregoing embodiments through another specific example. Referring to Fig. 5, a specific schematic flow chart of the translation method provided by the embodiment of the present application includes the following steps:

步骤S301:开启智能对话翻译功能,并显示在终端屏幕上方;Step S301: Turn on the intelligent dialogue translation function and display it on the top of the terminal screen;

这里,终端可根据用户输入的启动指令而开启智能对话翻译功能,并将已开启智能对话翻译功能的标识显示在终端屏幕上方。当然,终端也可以根据当前对话的聊天对象检测是否需要开启智能对话翻译功能,比如在聊天对象所使用的语言与用户所使用的语言不相同时,开启智能对话翻译功能。Here, the terminal may enable the intelligent dialogue translation function according to the activation instruction input by the user, and display an indicator that the intelligent dialogue translation function has been enabled on the top of the terminal screen. Of course, the terminal can also detect whether the intelligent dialogue translation function needs to be enabled according to the chat object of the current conversation. For example, when the language used by the chat object is different from the language used by the user, the intelligent dialogue translation function is enabled.

步骤S302:识别用户所在场景;Step S302: Identify the scene where the user is located;

这里,终端可识别是需要翻译终端里的系统语音还是需要开启麦克风去记录终端外部的声音。Here, the terminal can identify whether the system voice in the terminal needs to be translated or the microphone needs to be turned on to record the sound outside the terminal.

步骤S303:监听用户接收语音信息事件;Step S303: monitor the event that the user receives the voice information;

这里,终端可启动用户获取信息监听器,监听用户接收语音信息事件。Here, the terminal may activate a user acquisition information listener to monitor the event of the user receiving voice information.

步骤S304:将语音转换为文字,并将文字翻译为预设的目标语言表达的翻译结果;Step S304: converting the speech into text, and translating the text into a translation result expressed in a preset target language;

具体地,终端的语音识别模块可先对所记录下的语音信息进行噪音消除,过滤掉冗余信息,将有效信息转换为文本,识别语言的同时将文本输入到翻译引擎中进行翻译。Specifically, the voice recognition module of the terminal can first perform noise removal on the recorded voice information, filter out redundant information, convert valid information into text, and input the text into the translation engine for translation while recognizing the language.

步骤S305:显示翻译结果。Step S305: Display the translation result.

这里,文本信息翻译为预先设置的目标语言表达的翻译结果后,将翻译结果显示在原文区域上方。Here, after the text information is translated into a translation result expressed in a preset target language, the translation result is displayed above the original text area.

综上,用户有语音翻译需求时进行智能场景判断,场景分为外部翻译场景和内部翻译场景,并在自动识别后弹出场景选择框,用户确认后即可按照需求实时翻译,无需跳转到翻译应用,可以做到随时随地做到语音对话翻译,让身处国外有面对面或是视频对话时,让用户没有语言障碍。因此,实现了用户在社交过程中做到实时的跨语言对话,无需在社交应用和翻译应用间来回跳转,让用户在对话过程中无需考虑语言障碍,做到能跟对方按照自己的母语习惯进行沟通交流。In summary, intelligent scene judgment is made when users have voice translation needs. The scenes are divided into external translation scenes and internal translation scenes. After automatic recognition, a scene selection box will pop up. After the user confirms, they can translate in real time according to their needs without jumping to translation. The application can achieve voice conversation translation anytime, anywhere, so that users have no language barriers when they have face-to-face or video conversations abroad. Therefore, users can achieve real-time cross-language dialogue in the social process, and there is no need to jump back and forth between social applications and translation applications, so that users do not need to consider language barriers during the dialogue process, so that they can communicate with each other according to their native language habits. Communicate.

基于前述实施例相同的发明构思,本申请实施例提供了一种终端,如图6所示,该终端包括:处理器110和用于存储能够在处理器110上运行的计算机程序的存储器111;其中,图6中示意的处理器110并非用于指代处理器110的个数为一个,而是仅用于指代处理器110相对其他器件的位置关系,在实际应用中,处理器110的个数可以为一个或多个;同样,图6中示意的存储器111也是同样的含义,即仅用于指代存储器111相对其他器件的位置关系,在实际应用中,存储器111的个数可以为一个或多个。所述处理器110用于运行所述计算机程序时,实现上述任一所述的翻译方法。Based on the same inventive concept as the foregoing embodiments, an embodiment of the present application provides a terminal. As shown in FIG. 6 , the terminal includes: a processor 110 and a memory 111 for storing a computer program that can be executed on the processor 110; The processor 110 shown in FIG. 6 is not used to refer to the number of processors 110 being one, but is only used to refer to the positional relationship of the processor 110 relative to other devices. The number can be one or more; similarly, the memory 111 shown in FIG. 6 has the same meaning, that is, it is only used to refer to the positional relationship of the memory 111 relative to other devices. In practical applications, the number of the memory 111 can be one or more. The processor 110 is configured to implement any one of the above-mentioned translation methods when running the computer program.

该终端还可包括:至少一个网络接口112。该终端中的各个组件通过总线系统113耦合在一起。可理解,总线系统113用于实现这些组件之间的连接通信。总线系统113除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图6中将各种总线都标为总线系统113。The terminal may also include: at least one network interface 112 . The various components in the terminal are coupled together by bus system 113 . It can be understood that the bus system 113 is used to realize the connection communication between these components. In addition to the data bus, the bus system 113 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the various buses are labeled as bus system 113 in FIG. 6 .

其中,存储器111可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random AccessMemory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM 可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器 (DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM, SynchronousDynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器 (DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,SyncLink Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器111旨在包括但不限于这些和任意其它适合类型的存储器。Wherein, the memory 111 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), an erasable programmable read-only memory (EPROM, Erasable Programmable Read-only memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD-ROM, or Compact Disc Read-Only Memory (CD-ROM, Compact Disc Read-Only Memory); the magnetic surface memory can be a magnetic disk memory or a tape memory. The volatile memory may be Random Access Memory (RAM), which is used as an external cache memory. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), Synchronous Dynamic Random Access Memory (SDRAM, SynchronousDynamic Random Access Memory), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, SyncLink Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) . The memory 111 described in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.

本申请实施例中的存储器111用于存储各种类型的数据以支持该终端的操作。这些数据的示例包括:用于在该终端上操作的任何计算机程序,如操作系统和应用程序;联系人数据;电话簿数据;消息;图片;视频等。其中,操作系统包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序可以包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。这里,实现本申请实施例方法的程序可以包含在应用程序中。The memory 111 in this embodiment of the present application is used to store various types of data to support the operation of the terminal. Examples of such data include: any computer programs used to operate on the terminal, such as operating systems and applications; contact data; phonebook data; messages; pictures; videos, etc. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program may include various application programs, such as a media player (Media Player), a browser (Browser), etc., for implementing various application services. Here, the program for implementing the method of the embodiment of the present application may be included in the application program.

基于前述实施例相同的发明构思,本实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,计算机存储介质可以是磁性随机存取存储器(FRAM,ferromagnetic random access memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器 (EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器 (EEPROM,Electrically Erasable Programmable Read-Only Memory)、快闪存储器(FlashMemory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory) 等存储器;也可以是包括上述存储器之一或任意组合的各种设备,如移动电话、计算机、平板设备、个人数字助理等。所述计算机存储介质中存储的计算机程序被处理器运行时,实现上述任一所述的翻译方法。所述计算机程序被处理器执行时实现的具体步骤流程请参考图2所示实施例的描述,在此不再赘述。Based on the same inventive concept as the foregoing embodiments, this embodiment further provides a computer storage medium, where a computer program is stored, and the computer storage medium may be a magnetic random access memory (FRAM, ferromagnetic random access memory). , Read Only Memory (ROM, Read Only Memory), Programmable Read Only Memory (PROM, Programmable Read-Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read-Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Flash Memory (FlashMemory), Magnetic Surface Memory, Optical Disc, or Compact Disc Read-Only Memory (CD-ROM, Compact Disc Read-Only Memory) and other memories; also It can be a variety of devices including one or any combination of the above memories, such as mobile phones, computers, tablet devices, personal digital assistants, and the like. When the computer program stored in the computer storage medium is executed by the processor, any one of the translation methods described above is implemented. Please refer to the description of the embodiment shown in FIG. 2 for the specific flow of steps implemented when the computer program is executed by the processor, which will not be repeated here.

以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above-described embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be regarded as the scope described in this specification.

本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行如上各种可能的实施方式中所述的方法。The embodiments of the present application further provide a computer program product, the computer program product includes computer program code, when the computer program code is run on a computer, the computer is made to execute the method described in the various possible implementation manners above.

本申请实施例还提供一种芯片,包括存储器和处理器,所述存储器用于存储计算机程序,所述处理器用于从所述存储器中调用并运行所述计算机程序,使得安装有所述芯片的设备执行如上各种可能的实施方式中所述的方法。An embodiment of the present application further provides a chip, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a chip installed with the chip is The apparatus performs the method as described in the various possible embodiments above.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素,此外,本申请不同实施例中具有同样命名的部件、特征、要素可能具有相同含义,也可能具有不同含义,其具体含义需以其在该具体实施例中的解释或者进一步结合该具体实施例中上下文进行确定。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises a..." does not preclude the presence of additional identical elements in the process, method, article, or device that includes the element, and further, different implementations of the present application Components, features and elements with the same names in the examples may have the same meaning or may have different meanings, and their specific meanings need to be determined by their explanations in this specific embodiment or further combined with the context in this specific embodiment.

应当理解,尽管在本文可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本文范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语"如果"可以被解释成为"在……时"或"当……时"或"响应于确定"。再者,如同在本文中所使用的,单数形式“一”、“一个”和“该”旨在也包括复数形式,除非上下文中有相反的指示。应当进一步理解,术语“包含”、“包括”表明存在所述的特征、步骤、操作、元件、组件、项目、种类、和/或组,但不排除一个或多个其他特征、步骤、操作、元件、组件、项目、种类、和/或组的存在、出现或添加。此处使用的术语“或”和“和/或”被解释为包括性的,或意味着任一个或任何组合。因此,“A、B或C”或者“A、B和/或C”意味着“以下任一个:A;B;C;A和B;A和 C;B和C;A、B和C”。仅当元件、功能、步骤或操作的组合在某些方式下内在地互相排斥时,才会出现该定义的例外。It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of this document. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determining". Also, as used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context dictates otherwise. It should be further understood that the terms "comprising" and "comprising" indicate the presence of stated features, steps, operations, elements, components, items, kinds, and/or groups, but do not exclude one or more other features, steps, operations, The existence, appearance or addition of an element, component, item, category, and/or group. The terms "or" and "and/or" as used herein are to be construed to be inclusive or to mean any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C" . Exceptions to this definition arise only when combinations of elements, functions, steps, or operations are inherently mutually exclusive in some way.

应该理解的是,虽然本申请实施例中的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他步骤或者其他步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flowcharts in the embodiments of the present application are displayed in sequence according to the arrows, these steps are not necessarily executed in the sequence indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order and may be performed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution order is not necessarily sequential. Instead, it may be performed in turn or alternately with other steps or at least a portion of sub-steps or stages of other steps.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (10)

1. A translation method applied to a terminal is characterized by comprising the following steps:
identifying a usage scenario;
translating the content to be translated according to the use scene to obtain a corresponding target language translation result;
and displaying the target language translation result.
2. The method of claim 1, wherein the identifying a usage scenario comprises:
acquiring content displayed on a display screen of the terminal;
and extracting scene characteristic values of the content displayed on the display screen of the terminal, and determining a use scene based on the extracted scene characteristic values.
3. The method according to claim 1 or 2, wherein translating the content to be translated according to the usage scenario to obtain a corresponding target language translation result comprises:
determining a translation service function corresponding to the use scene according to the use scene;
and translating the content to be translated based on the translation service function to obtain a corresponding target language translation result.
4. The method according to claim 3, wherein translating the content to be translated based on the translation service function to obtain the corresponding target language translation result comprises:
determining content to be translated based on the translation service function;
and translating the content to be translated to obtain a corresponding target language translation result.
5. The method according to claim 1, wherein before translating the content to be translated according to the usage scenario and obtaining the corresponding target language translation result, the method further comprises:
receiving an input language selection instruction, and determining a language selected by the language selection instruction as a target language;
or, determining the system language of the terminal as a target language;
or determining the target language according to the use scene.
6. The method of claim 5, wherein the usage scenario comprises a chat scenario; the determining the target language according to the use scenario comprises:
acquiring characteristic information of a chat object in a chat scene;
and determining a target language according to the characteristic information of the chat object.
7. The method of claim 6, wherein prior to identifying the usage scenario, further comprising:
detecting whether the chat object in the chat scene has the same preset characteristics with the current user;
if not, the intelligent translation function is started to identify the use scene.
8. The method of claim 1, wherein the content to be translated comprises speech information to be translated; the translating the content to be translated according to the use scene to obtain a corresponding target language translation result comprises the following steps:
and converting the voice information to be translated into text information, and translating the text information into target text information of a target language.
9. A terminal, comprising: a processor and a memory for storing a computer program capable of running on the processor,
wherein the processor, when running the computer program, implements the translation method of any of claims 1 to 8.
10. A computer storage medium, characterized in that a computer program is stored which, when executed by a processor, implements the translation method according to any one of claims 1 to 8.
CN202010543789.0A 2020-06-15 2020-06-15 A translation method, terminal and computer storage medium Pending CN111814492A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010543789.0A CN111814492A (en) 2020-06-15 2020-06-15 A translation method, terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010543789.0A CN111814492A (en) 2020-06-15 2020-06-15 A translation method, terminal and computer storage medium

Publications (1)

Publication Number Publication Date
CN111814492A true CN111814492A (en) 2020-10-23

Family

ID=72845186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010543789.0A Pending CN111814492A (en) 2020-06-15 2020-06-15 A translation method, terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN111814492A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190308A (en) * 2021-04-20 2021-07-30 北京异乡旅行网络科技有限公司 Method, device and equipment for determining translation text of overseas renting house application
CN114091484A (en) * 2021-11-12 2022-02-25 北京中科凡语科技有限公司 Speech translation method and device based on invalid information filtering
CN114611531A (en) * 2022-03-09 2022-06-10 中译语通科技股份有限公司 Translation method, translation device and translation terminal
CN116227504A (en) * 2023-02-08 2023-06-06 广州数字未来文化科技有限公司 Communication method, system, equipment and storage medium for simultaneous translation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204679734U (en) * 2015-06-15 2015-09-30 徐世通 Intelligent translation glasses
CN107590137A (en) * 2017-08-07 2018-01-16 北京小米移动软件有限公司 Interpretation method, device and computer-readable recording medium
CN108415905A (en) * 2018-03-06 2018-08-17 喻海联 Real time translating method, intelligent glasses and computer readable storage medium
CN108712271A (en) * 2018-04-02 2018-10-26 深圳市沃特沃德股份有限公司 Interpretation method and translating equipment
CN109697291A (en) * 2018-12-29 2019-04-30 北京百度网讯科技有限公司 The semantic paragraph recognition methods of text and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN204679734U (en) * 2015-06-15 2015-09-30 徐世通 Intelligent translation glasses
CN107590137A (en) * 2017-08-07 2018-01-16 北京小米移动软件有限公司 Interpretation method, device and computer-readable recording medium
CN108415905A (en) * 2018-03-06 2018-08-17 喻海联 Real time translating method, intelligent glasses and computer readable storage medium
CN108712271A (en) * 2018-04-02 2018-10-26 深圳市沃特沃德股份有限公司 Interpretation method and translating equipment
CN109697291A (en) * 2018-12-29 2019-04-30 北京百度网讯科技有限公司 The semantic paragraph recognition methods of text and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113190308A (en) * 2021-04-20 2021-07-30 北京异乡旅行网络科技有限公司 Method, device and equipment for determining translation text of overseas renting house application
CN114091484A (en) * 2021-11-12 2022-02-25 北京中科凡语科技有限公司 Speech translation method and device based on invalid information filtering
CN114611531A (en) * 2022-03-09 2022-06-10 中译语通科技股份有限公司 Translation method, translation device and translation terminal
CN116227504A (en) * 2023-02-08 2023-06-06 广州数字未来文化科技有限公司 Communication method, system, equipment and storage medium for simultaneous translation
CN116227504B (en) * 2023-02-08 2024-01-23 广州数字未来文化科技有限公司 Communication method, system, equipment and storage medium for simultaneous translation

Similar Documents

Publication Publication Date Title
US12235921B2 (en) Contextual deep bookmarking
CN111814492A (en) A translation method, terminal and computer storage medium
US11178356B2 (en) Media message creation with automatic titling
CN109979450B (en) Information processing method and device and electronic equipment
CN110797022A (en) Application control method and device, terminal and server
US20200234008A1 (en) Information processing method and device
US20140068497A1 (en) Method and apparatus for providing intelligent service using inputted character in a user device
CN110085222A (en) For supporting the interactive device and method of voice dialogue service
CN109558513A (en) A kind of content recommendation method, device, terminal and storage medium
CN103533155B (en) The method and apparatus for recording in the terminal and playing user speech
CN103631506A (en) Terminal-based reading method and corresponding terminal
WO2020240838A1 (en) Conversation control program, conversation control method, and information processing device
CN113360127B (en) Audio playing method and electronic equipment
CN102968266A (en) Identification method and device
CN111984129A (en) Input method, device, equipment and machine readable medium
CN110929122A (en) Data processing method and device and data processing device
CN115687807A (en) Information display method, device, terminal and storage medium
WO2016107278A1 (en) Method, device, and system for labeling user information
CN108803972A (en) Information display method, device, mobile terminal and storage medium
EP2717121B1 (en) Method and apparatus for providing intelligent service using inputted character in a user device
US20140297285A1 (en) Automatic page content reading-aloud method and device thereof
WO2024149183A1 (en) Document display method and apparatus, and electronic device
CN113704609B (en) Search result display method, device and device for displaying search results
WO2023061020A1 (en) Web content translation method, computer device, storage medium, and program product
US20140350929A1 (en) Method and apparatus for managing audio data in electronic device

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: 20201023