+

CN112650398B - Input method, device and medium - Google Patents

Input method, device and medium Download PDF

Info

Publication number
CN112650398B
CN112650398B CN202011522551.6A CN202011522551A CN112650398B CN 112650398 B CN112650398 B CN 112650398B CN 202011522551 A CN202011522551 A CN 202011522551A CN 112650398 B CN112650398 B CN 112650398B
Authority
CN
China
Prior art keywords
input
candidate
content
string
tone
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.)
Active
Application number
CN202011522551.6A
Other languages
Chinese (zh)
Other versions
CN112650398A (en
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.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development 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 Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN202011522551.6A priority Critical patent/CN112650398B/en
Publication of CN112650398A publication Critical patent/CN112650398A/en
Application granted granted Critical
Publication of CN112650398B publication Critical patent/CN112650398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/274Converting codes to words; Guess-ahead of partial word inputs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Document Processing Apparatus (AREA)
  • Machine Translation (AREA)

Abstract

本发明实施例提供了一种输入方法、装置和介质。其中的方法具体包括:接收用户的输入串;对所述输入串进行意图识别,以得到输入意图;依据所述输入意图,确定并输出所述输入串对应的第一候选。本发明实施例可以降低用户的记忆难度,而且能够提高目标信息的输入效率和输入准确率。

The embodiments of the present invention provide an input method, device and medium. The method specifically includes: receiving a user's input string; performing intent recognition on the input string to obtain an input intent; and determining and outputting a first candidate corresponding to the input string according to the input intent. The embodiments of the present invention can reduce the user's memory difficulty and improve the input efficiency and input accuracy of the target information.

Description

输入方法、装置和介质Input methods, devices and media

技术领域Technical Field

本发明涉及输入技术领域,尤其涉及一种输入方法、装置和用于介质。The present invention relates to the field of input technology, and in particular to an input method, device and medium therefor.

背景技术Background Art

输入法是指为了将字符输入计算机或其他设备(如手机、平板电脑等)而采用的编码方法,输入法可被应用于多种场景。Input method refers to the encoding method used to input characters into computers or other devices (such as mobile phones, tablets, etc.). Input method can be applied in a variety of scenarios.

目前的输入法,可以依据用户的输入串,在词库中进行查找,以得到对应的候选。例如,对于输入串“你好”,输入法可以提供如下候选项:“你好”、“你号”、“拟好”等。Current input methods can search in the word library according to the user's input string to obtain corresponding candidates. For example, for the input string "hello", the input method can provide the following candidates: "hello", "your number", "nice", etc.

发明人在实施本发明实施例的过程中发现,目前的输入方法,通常需要用户记忆目标信息(包括文字、或者文字部件等用户欲要输入的信息)的读音,这增加了用户的记忆难度;而且,在记错读音的时候,将无法实现目标信息的输入,这影响了目标信息的输入效率和输入准确率。The inventors discovered during the implementation of the embodiments of the present invention that current input methods usually require users to memorize the pronunciation of target information (including text, or text components, etc., which the user wants to input), which increases the difficulty of memory for the user; moreover, when the pronunciation is remembered incorrectly, the input of the target information cannot be achieved, which affects the input efficiency and accuracy of the target information.

发明内容Summary of the invention

本发明实施例提供一种输入方法、装置和介质,能够降低用户的记忆难度,而且能够提高目标信息的输入效率和输入准确率。The embodiments of the present invention provide an input method, device and medium, which can reduce the memory difficulty of users and improve the input efficiency and input accuracy of target information.

为了解决上述问题,本发明实施例公开了一种输入方法,包括:In order to solve the above problem, an embodiment of the present invention discloses an input method, including:

接收用户的输入串;Receive the user's input string;

对所述输入串进行意图识别,以得到输入意图;Performing intent recognition on the input string to obtain input intent;

依据所述输入意图,确定并输出所述输入串对应的第一候选。According to the input intention, a first candidate corresponding to the input string is determined and output.

另一方面,本发明实施例公开了一种输入装置,包括:On the other hand, an embodiment of the present invention discloses an input device, comprising:

接收模块,用于接收用户的输入串;A receiving module, used for receiving an input string from a user;

意图识别模块,用于对所述输入串进行意图识别,以得到输入意图;以及an intention recognition module, used to perform intention recognition on the input string to obtain input intention; and

第一候选处理模块,用于依据所述输入意图,确定并输出所述输入串对应的第一候选。The first candidate processing module is used to determine and output a first candidate corresponding to the input string according to the input intention.

再一方面,本发明实施例公开了一种用于输入的装置,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:In another aspect, an embodiment of the present invention discloses a device for input, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, and the one or more programs include instructions for performing the following operations:

接收用户的输入串;Receive the user's input string;

对所述输入串进行意图识别,以得到输入意图;Performing intent recognition on the input string to obtain input intent;

依据所述输入意图,确定并输出所述输入串对应的第一候选。According to the input intention, a first candidate corresponding to the input string is determined and output.

又一方面,本发明实施例公开了一种机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行如前述一个或多个所述的输入方法。On the other hand, an embodiment of the present invention discloses a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, causes a device to perform one or more of the input methods described above.

本发明实施例包括以下优点:The embodiments of the present invention include the following advantages:

本发明实施例对输入串进行意图识别,并依据识别得到的输入意图,确定并输出上述输入串对应的第一候选。上述意图识别可以不要求用户记忆目标信息的读音,因此,本发明实施例不仅能够降低用户的记忆难度,而且能够提高目标信息的输入效率和输入准确率。The embodiment of the present invention performs intent recognition on the input string, and determines and outputs the first candidate corresponding to the input string according to the input intent obtained by the recognition. The above-mentioned intent recognition does not require the user to remember the pronunciation of the target information. Therefore, the embodiment of the present invention can not only reduce the memory difficulty of the user, but also improve the input efficiency and input accuracy of the target information.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

图1是本发明实施例的一种输入方法的应用环境的示意;FIG1 is a schematic diagram of an application environment of an input method according to an embodiment of the present invention;

图2是本发明的一种输入方法实施例一的步骤流程图;FIG2 is a flow chart of the steps of an input method embodiment 1 of the present invention;

图3是本发明的一种输入方法实施例二的步骤流程图;FIG3 is a flow chart of the steps of a second embodiment of an input method of the present invention;

图4是本发明的一种输入方法实施例三的步骤流程图;FIG4 is a flow chart of the steps of a third embodiment of an input method of the present invention;

图5是本发明的一种输入方法实施例四的步骤流程图;FIG5 is a flow chart of the steps of a fourth embodiment of an input method of the present invention;

图6是本发明的一种输入装置实施例的结构框图;FIG6 is a block diagram of an input device embodiment of the present invention;

图7是本发明的一种用于输入的装置1100的框图;及FIG. 7 is a block diagram of a device 1100 for inputting according to the present invention; and

图8是本发明的一些实施例中服务端的结构示意图。FIG. 8 is a schematic diagram of the structure of a server in some embodiments of the present invention.

具体实施方式DETAILED DESCRIPTION

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

针对传统技术中偏旁部首的读音的记忆难度大、以及输入效率低和输入准确率低的技术问题,本发明实施例提出了一种输入方案。该输入方案可以包括:接收用户的输入串;对上述输入串进行意图识别,以得到输入意图;依据上述输入意图,确定并输出上述输入串对应的第一候选。In view of the difficulty in remembering the pronunciation of radicals in traditional technologies, as well as the low input efficiency and low input accuracy, an input solution is proposed in an embodiment of the present invention. The input solution may include: receiving an input string from a user; performing intent recognition on the input string to obtain an input intent; and determining and outputting a first candidate corresponding to the input string based on the input intent.

本发明实施例对输入串进行意图识别,并依据识别得到的输入意图,确定并输出上述输入串对应的第一候选。上述意图识别可以不要求用户记忆欲要输入的目标信息的读音,因此,本发明实施例不仅能够降低用户的记忆难度,而且能够提高目标信息的输入效率和输入准确率。The embodiment of the present invention performs intent recognition on the input string, and determines and outputs the first candidate corresponding to the input string according to the input intent obtained by recognition. The above-mentioned intent recognition does not require the user to remember the pronunciation of the target information to be input. Therefore, the embodiment of the present invention can not only reduce the memory difficulty of the user, but also improve the input efficiency and input accuracy of the target information.

本发明实施例提供的输入方法可应用于图1所示的应用环境中,如图1所示,客户端100与服务端200位于有线或无线网络中,通过该有线或无线网络,客户端100与服务端200进行数据交互。The input method provided by the embodiment of the present invention can be applied to the application environment shown in Figure 1. As shown in Figure 1, the client 100 and the server 200 are located in a wired or wireless network, and the client 100 and the server 200 interact with data through the wired or wireless network.

可选地,客户端100可以运行在终端上,上述终端具体包括但不限于:智能手机、平板电脑、电子书阅读器、MP3(动态影像专家压缩标准音频层面3,Moving Picture ExpertsGroup Audio Layer III)播放器、MP4(动态影像专家压缩标准音频层面4,Moving PictureExperts Group Audio Layer IV)播放器、膝上型便携计算机、车载电脑、台式计算机、机顶盒、智能电视机、可穿戴设备等等。客户端100可以对应于网站、或者APP(应用程序,Application)。客户端100可以对应有输入法APP、即时通信APP等应用程序。Optionally, the client 100 can be run on a terminal, which specifically includes but is not limited to: a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer, a car computer, a desktop computer, a set-top box, a smart TV, a wearable device, etc. The client 100 can correspond to a website or an APP (Application). The client 100 can correspond to an application such as an input method APP and an instant messaging APP.

本发明实施例的服务端可以为云服务端。云服务端是一种简单高效、安全可靠、处理能力可弹性伸缩的计算服务。云服务端的资源信息具有动态性,使得其处理能力可弹性伸缩。服务端可以利用丰富资源,针对预测请求得到对应的预测候选。服务端还可以在预测候选的质量符合预设质量条件(如质量得分超过得分阈值等)的情况下,向客户端返回预测候选;换言之,若不存在符合预设质量条件的预测候选,则不向客户端返回预测候选。The server of the embodiment of the present invention may be a cloud server. The cloud server is a simple, efficient, secure, reliable, and elastically scalable computing service. The resource information of the cloud server is dynamic, so that its processing capacity can be elastically scalable. The server can use rich resources to obtain corresponding prediction candidates for prediction requests. The server can also return prediction candidates to the client if the quality of the prediction candidate meets the preset quality conditions (such as the quality score exceeds the score threshold, etc.); in other words, if there is no prediction candidate that meets the preset quality conditions, the prediction candidate will not be returned to the client.

本发明实施例可应用于键盘符号、手写、语音等各种输入方式的输入法程序。以键盘符号输入方式为例,用户可以通过编码字符串进行文字输入,输入串可以指用户输入的编码字符串。在输入法领域,对于例如中文、日文、韩文、或者其它语言的输入法程序,通常可以把用户输入的输入串转换成相应语言的候选项。以下主要以中文为例进行说明,日文、韩文等其它语言相互参照即可。可以理解,上述中文输入法可以包括但不限于全拼、简拼、笔画、五笔等,本发明实施例对于某种语言对应的具体输入法程序不加以限制。The embodiments of the present invention can be applied to input method programs of various input methods such as keyboard symbols, handwriting, and voice. Taking the keyboard symbol input method as an example, the user can input text through a coded string, and the input string can refer to the coded string input by the user. In the field of input methods, for input method programs such as Chinese, Japanese, Korean, or other languages, the input string input by the user can usually be converted into a candidate of the corresponding language. The following is mainly explained by taking Chinese as an example, and other languages such as Japanese and Korean can be referenced to each other. It can be understood that the above-mentioned Chinese input method can include but is not limited to full spelling, simplified spelling, strokes, Wubi, etc., and the embodiments of the present invention do not limit the specific input method program corresponding to a certain language.

以中文的输入为例,编码字符串的类型可以包括:拼音串、字形串(如五笔串等)、或者语音特征串等。以英文的输入为例,编码字符串的类型可以包括:字母字符串等。Taking Chinese input as an example, the types of encoded character strings may include: pinyin string, character string (such as Wubi string, etc.), or voice feature string, etc. Taking English input as an example, the types of encoded character strings may include: letter string, etc.

在实际应用中,对于键盘符号的输入方式,用户可以通过实体键盘、或者虚拟键盘等输入上述输入串。例如,对于具有触摸屏的终端,其可以在输入界面中设置虚拟键盘,以通过触发上述虚拟键盘包括的虚拟按键进行输入串的输入。可选地,上述虚拟键盘的例子可以包括:9键键盘和26键键盘等。并且,可以理解,上述输入界面中除了设置有字母对应的虚拟按键之外,还可以设置有符号按键、数字按键、例如中英切换按键的功能按键,或者,还可以设置有工具栏按键等,可以理解,本发明实施例对于输入界面所包含的具体按键不加以限制。In actual applications, for the input method of keyboard symbols, the user can input the above input string through a physical keyboard or a virtual keyboard. For example, for a terminal with a touch screen, a virtual keyboard can be set in the input interface to input the input string by triggering the virtual keys included in the above virtual keyboard. Optionally, examples of the above virtual keyboard may include: a 9-key keyboard and a 26-key keyboard. In addition, it can be understood that in addition to the virtual keys corresponding to letters, the above input interface can also be provided with symbol keys, number keys, function keys such as Chinese-English switching keys, or toolbar keys, etc. It can be understood that the embodiment of the present invention does not limit the specific keys included in the input interface.

根据一些实施例,上述输入串可以包括但不限于:用户通过按键所输入的一个按键符号或多个按键符号的组合。上述按键符号具体可以包括:拼音、笔画、假名等。According to some embodiments, the input string may include, but is not limited to, a key symbol or a combination of multiple key symbols input by the user through keys. The key symbol may specifically include pinyin, strokes, kana, and the like.

本发明实施例中,候选可用于表示输入法程序提供的待被用户选择的一个或多个字符。候选可以为中文字符、英文字符、日文字符等语言的字符,候选也可以为颜文字、图片等形式的符号组合。其中,上述颜文字包括但不限于线条、符号、文字所组成的图画,例如,上述颜文字的例子可以包括:“:P”、“:-o”、“:-)”等。In the embodiment of the present invention, the candidate may be used to represent one or more characters provided by the input method program to be selected by the user. The candidate may be characters in languages such as Chinese characters, English characters, and Japanese characters, and the candidate may also be a combination of symbols in the form of emoticons, pictures, and the like. The emoticons include but are not limited to pictures composed of lines, symbols, and words. For example, examples of the emoticons may include: “:P”, “:-o”, “:-)”, and the like.

方法实施例一Method Example 1

参照图2,示出了本发明的一种输入方法实施例一的步骤流程图,具体可以包括如下步骤:2, a flow chart of the steps of an input method embodiment 1 of the present invention is shown, which may specifically include the following steps:

步骤201、接收用户的输入串;Step 201, receiving a user input string;

步骤202、对上述输入串进行意图识别,以得到输入意图;Step 202: performing intent recognition on the input string to obtain input intent;

步骤203、依据上述输入意图,确定并输出上述输入串对应的第一候选。Step 203: According to the input intention, determine and output the first candidate corresponding to the input string.

步骤201中,输入串的类型可以包括:拼音串、字形串(如五笔串等)、或者语音特征串等,其中,拼音串对应拼音输入方式,字形串对应字形输入方式,语音特征串对应语音输入方式。In step 201, the types of input strings may include: pinyin string, glyph string (such as Wubi string, etc.), or voice feature string, etc., wherein the pinyin string corresponds to the pinyin input method, the glyph string corresponds to the glyph input method, and the voice feature string corresponds to the voice input method.

或者,输入串的类型可以包括:已上屏内容。上屏可以指将预览窗口中的内容输出显示到应用程序窗口的操作。具体到输入法,上屏可以指将候选窗口中的候选输出显示到应用程序窗口的操作。Alternatively, the type of input string may include: content that has been put on screen. Putting on screen may refer to the operation of outputting the content in the preview window to the application window. Specifically for the input method, putting on screen may refer to the operation of displaying the candidate output in the candidate window to the application window.

已上屏内容可以表征上屏的候选。本发明实施例的已上屏内容可以包括:一次或多次的上屏内容。上述已上屏内容可以对应字词、短语、句子等语言单位。The on-screen content may represent a candidate for being on-screen. The on-screen content of the embodiment of the present invention may include: one or more on-screen contents. The on-screen content may correspond to language units such as words, phrases, and sentences.

步骤202中,本发明实施例可以依据目标信息的规律,对上述输入串进行意图识别,以得到输入意图。In step 202, the embodiment of the present invention may perform intent recognition on the input string according to the rules of the target information to obtain the input intent.

本发明实施例可以提供对上述输入串进行意图识别的如下技术方案:The embodiment of the present invention can provide the following technical solution for performing intent recognition on the above input string:

技术方案1、Technical solution 1,

技术方案1可以适用于文字部件的输入。本发明实施例中,文字部件可以表征文字的构成部件。文字部件可以包括:偏旁、部首或笔画等。文字部件可以适用于中文汉字、日文汉字、蒙文等语言。Technical solution 1 can be applied to the input of text components. In the embodiment of the present invention, the text components can represent the components of text. The text components can include: radicals, radicals or strokes. The text components can be applied to Chinese characters, Japanese characters, Mongolian and other languages.

目前的输入方法,会利用偏旁部首与偏旁部首变形前的汉字读音之间的强映射关系。参照表1,示出了偏旁部首与偏旁部首变形前的汉字读音之间的强映射的示意。The current input method utilizes the strong mapping relationship between radicals and the pronunciation of Chinese characters before the radicals are transformed. Referring to Table 1, a schematic diagram of the strong mapping between radicals and the pronunciation of Chinese characters before the radicals are transformed is shown.

表1Table 1

目前的输入方法,需要用户准确记忆偏旁部首的读音,这增加了用户的记忆难度;而且,在记错读音的时候,将无法实现偏旁部首的输入,这影响了偏旁部首的输入效率和输入准确率。The current input method requires users to remember the pronunciation of radicals accurately, which increases the difficulty of memory for users; moreover, when the pronunciation is remembered incorrectly, the input of radicals will be impossible, which affects the input efficiency and accuracy of radicals.

针对传统技术中偏旁部首的读音的记忆难度大、以及输入效率低和输入准确率低的技术问题,本发明实施例提出了一种输入方案。该输入方案可以包括:接收用户的输入串;依据上述输入串,在文字部件与文字部件名称对应编码字符串之间的映射关系中进行查找,以得到上述输入串对应的文字部件候选;输出上述文字部件候选。In view of the difficulty in remembering the pronunciation of radicals in traditional technologies, as well as the low input efficiency and low input accuracy, an input scheme is proposed in an embodiment of the present invention. The input scheme may include: receiving an input string from a user; searching in a mapping relationship between text components and encoding strings corresponding to text component names according to the input string to obtain text component candidates corresponding to the input string; and outputting the text component candidates.

发明人在实施本发明实施例的过程中发现,文字部件名称被大多数用户熟知,例如,用户熟知提手旁、利刀旁、宝盖头、秃宝盖等文字部件名称。因此,本发明实施例依据文字部件名称对应的编码字符串,进行文字部件的输入。由于文字部件名称被大多数用户所熟知,因此,本发明实施例不仅能够降低用户的记忆难度,而且能够提高文字部件的输入效率和输入准确率。The inventors found in the process of implementing the embodiments of the present invention that the names of the text components are well known to most users. For example, users are familiar with the names of the text components such as the handle radical, the knife radical, the roof of a treasure, and the bald roof of a treasure. Therefore, the embodiments of the present invention input the text components according to the encoding string corresponding to the text component names. Since the text component names are well known to most users, the embodiments of the present invention can not only reduce the memory difficulty of users, but also improve the input efficiency and input accuracy of the text components.

本发明实施例可以应用于文字部件的输入场景中。例如,在教学场景下,教师可以利用输入的文字部件进行教学;又如,在聊天场景下,用户可以利用输入的文字部件进行聊天等。可以理解,本发明实施例对于具体的输入场景不加以限制。The embodiments of the present invention can be applied to input scenarios of text components. For example, in a teaching scenario, a teacher can use the input text components for teaching; in a chat scenario, a user can use the input text components for chatting, etc. It can be understood that the embodiments of the present invention are not limited to specific input scenarios.

技术方案1中,上述对所述输入串进行意图识别,包括:对所述输入串与文字部件名称对应的编码字符串进行匹配,若匹配成功,则输入意图可以包括:文字部件输入意图,所述输入串对应的第一候选可以包括:文字部件候选。In Technical Solution 1, the above-mentioned intention recognition of the input string includes: matching the input string with the encoded character string corresponding to the text component name, if the match is successful, the input intention may include: text component input intention, and the first candidate corresponding to the input string may include: text component candidate.

在输入意图包括:文字部件输入意图的情况下,可以依据文字部件与文字部件名称对应编码字符串之间的映射关系,确定所述文字部件输入意图、以及所述文字部件输入意图对应的文字部件候选。When the input intention includes a text component input intention, the text component input intention and the text component candidates corresponding to the text component input intention may be determined based on a mapping relationship between text components and encoding character strings corresponding to text component names.

以拼音输入方式为例,用户欲要输入部首“扌”,则可以输入该部首的名称对应的编码字符串,如“tishoupang”。Taking the pinyin input method as an example, if the user wants to input the radical "扌", he can enter the encoded string corresponding to the name of the radical, such as "tishoupang".

根据一种实施例,可以针对文字部件,确定对应的文字部件名称。文字部件名称,可以为用于识别文字部件的专属名词。文字部件名称可以为法定名称、规范名称、别名或花名,本发明实施例对于具体的文字部件名称不加以限制。According to an embodiment, a corresponding text component name may be determined for a text component. The text component name may be a specific noun used to identify the text component. The text component name may be a legal name, a standard name, an alias, or a nickname. The embodiment of the present invention does not limit the specific text component name.

编码字符串可以表征输入法的编码方法对应的字符串。以拼音输入方式为例,部首“扌”的名称“提手旁”对应的编码字符串可以包括:“tishoupang”、“tishoup”、“tishp”、“tshp”等。可以理解,编码字符串可以为全拼拼音串,也可以为简拼拼音串。The encoding string can represent the string corresponding to the encoding method of the input method. Taking the pinyin input method as an example, the encoding string corresponding to the name of the radical "扌" "提手旁" can include: "tishoupang", "tishoup", "tishp", "tshp", etc. It can be understood that the encoding string can be a full pinyin string or a simplified pinyin string.

本发明实施例可以针对文字部件名称,确定对应的编码字符串,并保存文字部件与文字部件名称对应编码字符串之间的映射关系。The embodiment of the present invention can determine the corresponding encoding string for the text component name, and save the mapping relationship between the text component and the encoding string corresponding to the text component name.

本发明实施例可以预先建立并保存文字部件与文字部件名称对应编码字符串之间的映射关系。这样,可以依据输入串,在上述映射关系中进行查找,以得到输入串对应的文字部件候选。参照表2,示出了文字部件对应的文字部件名称和编码字符串的示意。The embodiment of the present invention can pre-establish and save the mapping relationship between the text component and the encoding string corresponding to the text component name. In this way, the text component candidate corresponding to the input string can be searched in the above mapping relationship according to the input string. Referring to Table 2, a schematic diagram of the text component name and encoding string corresponding to the text component is shown.

表2Table 2

偏旁部首Radical 偏旁部首变形前的汉字Chinese characters before radicals are transformed 编码字符串Encoding Strings 提手旁Next to the handle tishoupangtishoupan 利刀旁Next to the sharp knife lidaopanglidaopang Roof 宝盖头Baogaitou baogaitoubaogaitou 秃宝盖Bald Baogai tubaogaitubaogai

本发明的一种实施例中,在上述映射关系中进行查找可以包括:将上述输入串或纠正输入串,与映射关系中的编码字符串进行匹配,并将匹配成功的文字部件,作为上述输入串对应的文字部件候选。例如,输入串为“tishoup”,可以基于映射关系得到其对应的文字部件候选“扌”。In one embodiment of the present invention, searching in the above mapping relationship may include: matching the above input string or corrected input string with the encoded string in the mapping relationship, and using the successfully matched text component as the text component candidate corresponding to the above input string. For example, if the input string is "tishoup", its corresponding text component candidate "扌" can be obtained based on the mapping relationship.

纠正输入串可以为对输入串进行纠错后得到的字符串。在实际应用中,用户很有可能因为按错键(PC上)或者点错屏幕位置(手机上)等原因而导致键入错误的输入串。输入纠错,是针对上述错误的一种输入法系统解决方案,它能够主动识别用户的输入错误,并将错误的输入串纠正成正确的输入串,使用户在不修改输入串的前提下就能够输入正确的文字。The corrected input string can be a string obtained after error correction of the input string. In actual applications, users are likely to enter an incorrect input string due to reasons such as pressing the wrong key (on a PC) or clicking the wrong screen position (on a mobile phone). Input error correction is an input method system solution for the above errors. It can actively identify user input errors and correct the incorrect input string into a correct input string, so that users can enter the correct text without modifying the input string.

本发明实施例的输入纠错方案具体可以包括:基于编辑距离的纠错方案和基于统计的纠错方案;其中,基于编辑距离的纠错方案可以对输入串的每个位置进行如下纠错尝试:插入一个字符、删除一个字符、替换一个字符等,以产生该输入串对应的纠错候选;基于统计的纠错方案可以通过大数据挖掘生成纠错模型,该纠错模型可用于学习纠错候选被错输为输入串的概率。The input error correction scheme of the embodiment of the present invention may specifically include: an error correction scheme based on edit distance and an error correction scheme based on statistics; wherein, the error correction scheme based on edit distance may perform the following correction attempts on each position of the input string: insert a character, delete a character, replace a character, etc., to generate an error correction candidate corresponding to the input string; the error correction scheme based on statistics may generate an error correction model through big data mining, and the error correction model may be used to learn the probability that the error correction candidate is mistakenly input as the input string.

例如,输入串为“tishoupeng”,可以对其进行纠错,得到纠正输入串“tishoupang”。For example, the input string is "tishoupeng", which can be corrected to obtain the corrected input string "tishoupang".

技术方案2Technical Solution 2

技术方案2可以适用于读音的输入。传统的输入法,可以提供带有声调的声调软键盘,声调软键盘上可以设置有带有声调的字母按键,以供用户选择和输入。然而,声调软键盘的触发和以字母为粒度的输入,通常耗费较多的操作成本。例如,用户欲要输入读音“háo”,则需要在点击普通键盘上的“h”后,触发声调软键盘,并点击声调软键盘上的“á”,然后返回普通键盘并进行“o”的输入。Technical solution 2 can be applied to the input of pronunciation. The traditional input method can provide a tone soft keyboard with tones, and the tone soft keyboard can be provided with letter keys with tones for users to select and input. However, the triggering of the tone soft keyboard and the input with letter granularity usually consume more operating costs. For example, if the user wants to input the pronunciation "háo", he needs to trigger the tone soft keyboard after clicking "h" on the ordinary keyboard, and click "á" on the tone soft keyboard, and then return to the ordinary keyboard and input "o".

技术方案2基于意图识别,自动识别语音输入意图,可以节省普通键盘与声调软键盘之间的切换成本,提高读音的输入效率。Technical Solution 2 is based on intention recognition and automatically identifies the voice input intention, which can save the switching cost between the ordinary keyboard and the tone soft keyboard and improve the input efficiency of pronunciation.

技术方案2中,上述对所述输入串进行意图识别,具体可以包括:若所述输入串包括:表征第一声调信息的第二字符串、以及用于表征第一音节的第一字符串,则所述输入意图为读音输入意图,所述输入串对应的第一候选包括:所述第一字符串对应的读音候选,所述读音候选可以包括:所述第一音节以及所述第一声调信息。In Technical Solution 2, the above-mentioned intention recognition of the input string may specifically include: if the input string includes: a second character string representing the first tone information, and a first character string used to represent the first syllable, then the input intention is a pronunciation input intention, and the first candidate corresponding to the input string includes: the pronunciation candidate corresponding to the first character string, and the pronunciation candidate may include: the first syllable and the first tone information.

本发明实施例中,音节是可以区分清楚的语音的基本单位。音节通常是声母和韵母组合的拼读音节,也有两个韵母组合的拼读音节,也有一个韵母组合的拼读音节。In the embodiment of the present invention, a syllable is a basic unit of speech that can be clearly distinguished. A syllable is usually a spelling syllable composed of an initial consonant and a final vowel, a spelling syllable composed of two final vowels, or a spelling syllable composed of one final vowel.

本发明实施例自动从输入串中识别出第一字符串和第二字符串,其中,第一字符串可以表征待添加声调的音节,第二字符串可以表征第一声调信息。The embodiment of the present invention automatically identifies a first character string and a second character string from an input string, wherein the first character string may represent a syllable to which a tone is to be added, and the second character string may represent first tone information.

在本发明的一种可选实施例中,可以从所述输入串中确定出与预设声调内容相匹配的第二字符串。预设声调内容可以包括:“一声”、“二声”、“三声”、“四声”等。预设声调内容可以对应有拼音形式,如“yisheng”、“ersheng”、“sansheng”、“sisheng”等。当然,预设声调内容可以对应有字形形式或语音形式。In an optional embodiment of the present invention, a second character string matching the preset tone content can be determined from the input string. The preset tone content may include: "first tone", "second tone", "third tone", "fourth tone", etc. The preset tone content may correspond to a pinyin form, such as "yisheng", "ersheng", "sansheng", "sisheng", etc. Of course, the preset tone content may correspond to a glyph form or a phonetic form.

例如,可以从输入串“haoersheng”或“ershenghao”或“haodeersheng”中确定出与预设声调内容相匹配的第二字符串“ersheng”。又如,语音特征串与“好二声”相应,则可以从语音特征串中确定出“好”对应的第一字符串和“二声”对应的第二字符串。For example, the second character string "ersheng" matching the preset tone content can be determined from the input string "haoersheng" or "ershenghao" or "haodeersheng". For another example, if the voice feature string corresponds to "好二声", the first character string corresponding to "好" and the second character string corresponding to "二声" can be determined from the voice feature string.

可选地,可以依据输入串中与第二字符串邻近的字符串,得到第一字符串。例如,将输入串“haoersheng”或“ershenghao”中与第二字符串“ersheng”相邻的字符串“hao”,作为第一字符串。Optionally, the first string may be obtained based on a string adjacent to the second string in the input string. For example, the string "hao" adjacent to the second string "ersheng" in the input string "haoersheng" or "ershenghao" is used as the first string.

本发明实施例可以依据上述第二字符串对应的第一声调信息,为上述第一字符串对应的第一音节添加声调,以得到第一字符串对应的读音候选。具体地,可以依据音节与声调信息之间的对应关系,为上述第一字符串对应的第一音节添加声调。例如,可以保存音节“hao”与“一声”、“二声”、“三声”、“四声”等声调信息之间的对应关系,这样,可以依据对应关系的查找,实现声调的添加。例如,针对输入串“haoersheng”或“ershenghao”中的第一音节“hao”添加“ersheng”对应的声调,进而得到读音候选“háo”。The embodiment of the present invention can add a tone to the first syllable corresponding to the first character string according to the first tone information corresponding to the second character string, so as to obtain a pronunciation candidate corresponding to the first character string. Specifically, a tone can be added to the first syllable corresponding to the first character string according to the correspondence between the syllable and the tone information. For example, the correspondence between the syllable "hao" and the tone information such as "first tone", "second tone", "third tone", and "fourth tone" can be saved, so that the tone can be added according to the search of the correspondence. For example, the tone corresponding to "ersheng" is added to the first syllable "hao" in the input string "haoersheng" or "ershenghao", and the pronunciation candidate "háo" is obtained.

技术方案3Technical Solution 3

技术方案3中,可以针对用户的已上屏内容,依据已上屏内容中指示的第二音节及第二声调信息,提供基于读音的推荐服务。In technical solution 3, a pronunciation-based recommendation service can be provided for the user's on-screen content according to the second syllable and second tone information indicated in the on-screen content.

例如,本发明实施例可以针对已上屏内容A“好的二声有哪些字”,确定第二音节“hao”以及第二声调信息“二声”,并提供基于读音“háo”的字推荐服务;具体地,可以推荐“háo”的字,如“毫”、“豪”、“嚎”、“号”等。For example, an embodiment of the present invention can determine the second syllable "hao" and the second tone information "second tone" for the on-screen content A "What are the words with the second tone of 好", and provide a word recommendation service based on the pronunciation "háo"; specifically, words with "háo" can be recommended, such as "毫", "豪", "嗷", "号", etc.

技术方案3中,上述输入串可以包括:已上屏内容,上述对所述输入串进行意图识别,包括:若所述已上屏内容指示第二音节和第二声调信息,则所述输入意图为语音推荐意图,所述输入串对应的第一候选具体包括:所述第二音节、所述第二声调信息和所述已上屏内容的语音信息对应的推荐候选。In Technical Solution 3, the above-mentioned input string may include: the content that has been on the screen, and the above-mentioned intention recognition of the input string includes: if the content that has been on the screen indicates a second syllable and a second tone information, then the input intention is a voice recommendation intention, and the first candidate corresponding to the input string specifically includes: the recommendation candidate corresponding to the second syllable, the second tone information and the voice information of the content that has been on the screen.

第二音节以及第二声调信息的确定过程,具体包括:从用户的已上屏内容中确定出与预设声调内容相匹配的声调内容;从用户的已上屏内容中确定出所述声调内容对应的音节内容;确定所述声调内容对应的第二声调信息、以及确定所述音节内容对应的第二音节。例如,本发明实施例可以针对已上屏内容A“好的二声有哪些字”,从中确定出声调内容“二声”及其对应的第二声调信息;进一步,可以从用户的已上屏内容中确定出与声调内容“二声”邻近的音节内容“好”及其对应的第二音节“hao”。The process of determining the second syllable and the second tone information specifically includes: determining the tone content that matches the preset tone content from the user's on-screen content; determining the syllable content corresponding to the tone content from the user's on-screen content; determining the second tone information corresponding to the tone content, and determining the second syllable corresponding to the syllable content. For example, the embodiment of the present invention can determine the tone content "second tone" and its corresponding second tone information from the on-screen content A "what are the words with the second tone of good"; further, it can determine the syllable content "good" and its corresponding second syllable "hao" adjacent to the tone content "second tone" from the user's on-screen content.

根据一种实施例,上述确定并输出所述输入串对应的第一候选,具体包括:确定语义信息对应的目标数据库,依据上述第二音节和上述第二声调信息,查询所述目标数据库,以得到推荐候选。According to an embodiment, the determining and outputting the first candidate corresponding to the input string specifically includes: determining a target database corresponding to the semantic information, and querying the target database according to the second syllable and the second tone information to obtain a recommended candidate.

目标数据库的类型可以与语义信息相匹配,推荐候选的类型可以与目标数据库的类型相匹配。例如,推荐候选的类型包括:字、词、成语、句子等。The type of the target database may be matched with the semantic information, and the type of the recommendation candidate may be matched with the type of the target database. For example, the types of the recommendation candidate include: characters, words, idioms, sentences, etc.

例如,本发明实施例可以针对已上屏内容B“号的二声如何组词”,本发明实施例可以推荐“二声号”的组词结果,如“号叫”、“哀号”、“号哭”、“号丧”等。又如,本发明实施例可以针对已上屏内容C“号的二声如何造句”,提供造句服务等。再如,本发明实施例可以针对已上屏内容D“全用二声组成的成语有哪些”,提供成语服务等For example, for the content B on the screen, "How to form words with the second tone of the word hao", the embodiment of the present invention can recommend word formation results for "two-tone hao", such as "howling", "wailing", "crying", "mourning", etc. For another example, for the content C on the screen, "How to form sentences with the second tone of the word hao", the embodiment of the present invention can provide sentence formation services, etc. For another example, for the content D on the screen, "What are the idioms composed entirely of the second tone", the embodiment of the present invention can provide idiom services, etc.

本发明实施例可以利用语义分析方法,确定已上屏内容对应的语义信息。语义分析方法可以包括:句子成分分析方法、机器学习方法等,可以理解,本发明实施例对于具体的语义分析方法不加以限制。The embodiment of the present invention can use a semantic analysis method to determine the semantic information corresponding to the on-screen content. The semantic analysis method can include: a sentence component analysis method, a machine learning method, etc. It can be understood that the embodiment of the present invention does not limit the specific semantic analysis method.

以上通过技术方案1至技术方案3,对上述对所述输入串进行意图识别的过程进行了详细介绍,可以理解,本领域技术人员可以根据实际应用需求,采用上述技术方案1至技术方案3中的任一或者组合。The above technical solutions 1 to 3 have introduced in detail the process of intent recognition of the input string. It can be understood that those skilled in the art can adopt any one or a combination of the above technical solutions 1 to 3 according to actual application requirements.

步骤203中,可以依据上述输入意图,确定并输出上述输入串对应的第一候选。In step 203, a first candidate corresponding to the input string may be determined and output according to the input intention.

具体地,在输入意图包括文字部件输入意图的情况下,输入串对应的第一候选可以包括:文字部件候选。在输入意图为读音输入意图的情况下,所述输入串对应的第一候选包括:所述第一字符串对应的读音候选。在输入意图为语音推荐意图的情况下,输入串对应的第一候选具体包括:所述第二音节、所述第二声调信息和所述已上屏内容的语音信息对应的推荐候选。Specifically, when the input intention includes a text component input intention, the first candidate corresponding to the input string may include: a text component candidate. When the input intention is a pronunciation input intention, the first candidate corresponding to the input string includes: a pronunciation candidate corresponding to the first character string. When the input intention is a voice recommendation intention, the first candidate corresponding to the input string specifically includes: a recommendation candidate corresponding to the second syllable, the second tone information, and the voice information of the on-screen content.

本发明实施例中,可选的是,可以在输入法的首屏位置,展示所述第一侯选。In the embodiment of the present invention, optionally, the first candidate may be displayed at the first screen position of the input method.

本发明实施例可以在候选区域展示输入串对应的候选,受到展示区域的限制,一屏的展示区域承载的候选数量通常是有限的,例如,候选数量在4~6之间,用户需要经由翻页操作进行屏幕的切换。例如,向后的翻页操作,用于将候选从第i(i可以为大于0的自然数)屏切换为第(i+1)屏;向前的翻页操作,用于将候选从第i屏切换为第(i-1)屏。The embodiment of the present invention can display the candidates corresponding to the input string in the candidate area. Due to the limitation of the display area, the number of candidates carried by the display area of one screen is usually limited. For example, the number of candidates is between 4 and 6. The user needs to switch the screen through the page turning operation. For example, the backward page turning operation is used to switch the candidates from the i-th (i can be a natural number greater than 0) screen to the (i+1)-th screen; the forward page turning operation is used to switch the candidates from the i-th screen to the (i-1)-th screen.

本发明实施例将第一候选展示在首屏位置,可以在用户未触发翻页操作的情况下提供第一候选,因此能够提高第一的输入效率。The embodiment of the present invention displays the first candidate at the first screen position, and can provide the first candidate when the user does not trigger a page turning operation, thereby improving the first input efficiency.

在本发明的一种可选实施例中,上述方法还可以包括:依据所述输入串,在词库中进行查找,以得到所述输入串对应的第二候选。第二候选的类型具体包括:文字候选、图片候选、或表情候选等。例如,依据输入串“tishoupeng”,在词库中查找得到对应的文字候选“提手旁”、“提手”等。In an optional embodiment of the present invention, the method may further include: searching in a word library according to the input string to obtain a second candidate corresponding to the input string. The types of the second candidate specifically include: text candidates, image candidates, or expression candidates, etc. For example, according to the input string "tishoupeng", the corresponding text candidates "提手旁", "提手", etc. are searched in the word library.

综上,本发明实施例的输入方法,对输入串进行意图识别,并依据识别得到的输入意图,确定并输出上述输入串对应的第一候选。上述意图识别可以不要求用户记忆目标信息的读音,因此,本发明实施例不仅能够降低用户的记忆难度,而且能够提高目标信息的输入效率和输入准确率。In summary, the input method of the embodiment of the present invention performs intent recognition on the input string, and determines and outputs the first candidate corresponding to the input string according to the input intent obtained by recognition. The above-mentioned intent recognition does not require the user to remember the pronunciation of the target information. Therefore, the embodiment of the present invention can not only reduce the memory difficulty of the user, but also improve the input efficiency and input accuracy of the target information.

方法实施例二Method Example 2

参照图3,示出了本发明的一种输入方法实施例二的步骤流程图,具体可以包括如下步骤:3, a flow chart of the steps of Embodiment 2 of an input method of the present invention is shown, which may specifically include the following steps:

步骤301、接收用户的输入串;Step 301, receiving a user input string;

步骤302、依据上述输入串,在文字部件与文字部件名称对应编码字符串之间的映射关系中进行查找,以得到上述输入串对应的文字部件候选;Step 302: Based on the input string, search in the mapping relationship between the text components and the encoding character strings corresponding to the text component names to obtain text component candidates corresponding to the input string;

步骤303、输出上述文字部件候选。Step 303: output the above text component candidates.

步骤302中,可以依据文字部件与文字部件名称对应编码字符串之间的映射关系,识别输入串是否对应文字部件输入意图,若是,则可以得到输入串对应的文字部件候选。In step 302, it is possible to identify whether the input string corresponds to the text component input intention based on the mapping relationship between the text component and the encoding string corresponding to the text component name. If so, the text component candidate corresponding to the input string can be obtained.

步骤303中,服务端可以向客户端输出上述文字部件候选,或者,客户端可以对上述文字部件候选进行展示,以供用户选择。In step 303, the server may output the above text component candidates to the client, or the client may display the above text component candidates for user selection.

在本发明的一种可选实施例中,可以在输入法的首屏位置,展示所述文字部件候选。本发明实施例将文字部件候选展示在首屏位置,可以在用户未触发翻页操作的情况下提供文字部件候选,因此能够提高文字部件候选的输入效率。In an optional embodiment of the present invention, the text component candidates can be displayed at the first screen position of the input method. The embodiment of the present invention displays the text component candidates at the first screen position, and can provide text component candidates without the user triggering a page turning operation, thereby improving the input efficiency of the text component candidates.

综上,本发明实施例的输入方法,依据文字部件与文字部件名称对应编码字符串之间的映射关系,进行文字部件的输入。由于文字部件名称被大多数用户所熟知,因此,本发明实施例不仅能够降低用户的记忆难度,而且能够提高文字部件的输入效率和输入准确率。In summary, the input method of the embodiment of the present invention inputs the text components according to the mapping relationship between the text components and the encoding strings corresponding to the text component names. Since the text component names are well known to most users, the embodiment of the present invention can not only reduce the memory difficulty of the user, but also improve the input efficiency and input accuracy of the text components.

方法实施例三Method Example 3

参照图4,示出了本发明的一种输入方法实施例三的步骤流程图,应用于服务端,具体可以包括如下步骤:4, a flowchart of a third embodiment of an input method of the present invention is shown, which is applied to a server and may specifically include the following steps:

步骤401、接收用户的输入串;Step 401: receiving a user input string;

步骤402、从上述输入串中确定出第一字符串和第二字符串;Step 402: Determine a first character string and a second character string from the input string;

步骤403、依据上述第二字符串对应的第一声调信息,为上述第一字符串对应的音节添加声调,以得到上述第一字符串对应的读音候选;Step 403: adding a tone to the syllable corresponding to the first character string according to the first tone information corresponding to the second character string, so as to obtain a pronunciation candidate corresponding to the first character string;

步骤404、输出上述读音候选。Step 404: output the above-mentioned pronunciation candidates.

本发明实施例用于自动为输入串指示的音节添加指示的声调,并输出添加声调后的读音候选,由此可以实现读音的便捷输入。The embodiment of the present invention is used to automatically add indicated tones to syllables indicated by an input string, and output pronunciation candidates after the tones are added, thereby realizing convenient input of pronunciation.

本发明实施例可以在候选区展示读音候选,也即,可以将读音候选作为候选进行展示,以供用户选择。可以理解,可以依据用户针对读音候选的选择操作,对读音候选进行上屏,由此可以实现读音候选的便捷输入。The embodiment of the present invention can display the pronunciation candidates in the candidate area, that is, the pronunciation candidates can be displayed as candidates for the user to select. It can be understood that the pronunciation candidates can be put on the screen according to the user's selection operation on the pronunciation candidates, thereby realizing the convenient input of the pronunciation candidates.

综上,本发明实施例的输入方法,自动为输入串指示的音节添加指示的声调,并输出添加声调后的读音候选,由此可以实现读音的便捷输入。In summary, the input method of the embodiment of the present invention automatically adds the indicated tone to the syllable indicated by the input string, and outputs the pronunciation candidates after the tone is added, thereby realizing convenient input of the pronunciation.

方法实施例四Method Example 4

参照图5,示出了本发明的一种输入方法实施例四的步骤流程图,具体可以包括如下步骤:5, a flowchart of a fourth embodiment of an input method of the present invention is shown, which may specifically include the following steps:

步骤501、接收用户的已上屏内容;Step 501: receiving the user's on-screen content;

步骤502、依据上述已上屏内容,确定第二音节以及第二声调信息;Step 502: Determine the second syllable and the second tone information according to the above-mentioned on-screen content;

步骤503、依据上述第二音节、上述第二声调信息、以及上述已上屏内容对应的语义信息,确定并输出推荐候选。Step 503: Determine and output a recommendation candidate based on the second syllable, the second tone information, and the semantic information corresponding to the on-screen content.

本发明实施例可以针对用户的已上屏内容,依据已上屏内容中指示的第二音节及第二声调信息,提供基于读音的推荐服务。The embodiment of the present invention can provide a pronunciation-based recommendation service for the user's on-screen content according to the second syllable and second tone information indicated in the on-screen content.

例如,本发明实施例可以针对已上屏内容A“好的二声有哪些字”,确定第二音节“hao”以及第二声调信息“二声”,并提供基于读音“háo”的字推荐服务;具体地,可以推荐“háo”的字,如“毫”、“豪”、“嚎”、“号”等。For example, an embodiment of the present invention can determine the second syllable "hao" and the second tone information "second tone" for the on-screen content A "What are the words with the second tone of 好", and provide a word recommendation service based on the pronunciation "háo"; specifically, words with "háo" can be recommended, such as "毫", "豪", "嗷", "号", etc.

本发明实施例可以在候选区展示推荐候选,也即,可以将推荐候选作为候选进行展示,以供用户选择。可以理解,可以依据用户针对推荐候选的选择操作,对推荐候选进行上屏,由此可以实现推荐候选的便捷输入。The embodiment of the present invention can display the recommended candidates in the candidate area, that is, the recommended candidates can be displayed as candidates for the user to select. It can be understood that the recommended candidates can be put on the screen according to the user's selection operation on the recommended candidates, thereby realizing the convenient input of the recommended candidates.

综上,本发明实施例针对用户的已上屏内容,依据已上屏内容中指示的第二音节及第二声调信息,提供基于读音的推荐服务。上述推荐服务可以是字词、成语或句子的推荐服务,可以提高推荐的智能性。In summary, the embodiment of the present invention provides a pronunciation-based recommendation service for the user's on-screen content according to the second syllable and second tone information indicated in the on-screen content. The above recommendation service can be a recommendation service for words, idioms or sentences, which can improve the intelligence of the recommendation.

需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的运动动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的运动动作并不一定是本发明实施例所必须的。It should be noted that, for the method embodiments, for the sake of simplicity of description, they are all described as a series of motion combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the described sequence of actions, because according to the embodiments of the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the motions involved are not necessarily required by the embodiments of the present invention.

装置实施例Device Embodiment

参照图6,示出了本发明的一种输入装置实施例的结构框图,具体可以包括:6, a structural block diagram of an input device embodiment of the present invention is shown, which may specifically include:

接收模块601,用于接收用户的输入串;Receiving module 601, used to receive a user input string;

意图识别模块602,用于对上述输入串进行意图识别,以得到输入意图;以及The intention recognition module 602 is used to perform intention recognition on the input string to obtain the input intention; and

第一候选处理模块603,用于依据上述输入意图,确定并输出上述输入串对应的第一候选。The first candidate processing module 603 is used to determine and output the first candidate corresponding to the input string according to the input intention.

可选地,意图识别模块602可以包括:Optionally, the intention recognition module 602 may include:

第一意图识别模块,用于对上述输入串与文字部件名称对应的编码字符串进行匹配,若匹配成功,则输入意图可以包括:文字部件输入意图,上述输入串对应的第一候选可以包括:文字部件候选。The first intention recognition module is used to match the above input string with the encoded character string corresponding to the text component name. If the match is successful, the input intention may include: text component input intention, and the first candidate corresponding to the above input string may include: text component candidate.

可选地,上述输入意图可以包括:文字部件输入意图;依据文字部件与文字部件名称对应编码字符串之间的映射关系,确定上述文字部件输入意图、以及上述文字部件输入意图对应的文字部件候选。Optionally, the input intention may include: text component input intention; determining the text component input intention and text component candidates corresponding to the text component input intention based on a mapping relationship between text components and encoding character strings corresponding to text component names.

可选地,意图识别模块602可以包括:Optionally, the intention recognition module 602 may include:

第二意图识别模块,用于若上述输入串可以包括:表征第一声调信息的第二字符串、以及用于表征第一音节的第一字符串,则上述输入意图为读音输入意图,上述输入串对应的第一候选可以包括:上述第一字符串对应的读音候选,上述读音候选可以包括:上述第一音节以及上述第一声调信息。The second intention recognition module is used for if the above-mentioned input string can include: a second character string representing the first tone information, and a first character string used to represent the first syllable, then the above-mentioned input intention is a pronunciation input intention, and the first candidate corresponding to the above-mentioned input string may include: a pronunciation candidate corresponding to the above-mentioned first character string, and the above-mentioned pronunciation candidate may include: the above-mentioned first syllable and the above-mentioned first tone information.

可选地,上述输入串可以包括:已上屏内容,意图识别模块602可以包括:Optionally, the input string may include: content that has been on the screen, and the intention recognition module 602 may include:

第三意图识别模块,用于若上述已上屏内容指示第二音节和第二声调信息,则上述输入意图为语音推荐意图,上述输入串对应的第一候选可以包括:上述第二音节、上述第二声调信息和上述已上屏内容的语音信息对应的推荐候选。The third intention recognition module is used for if the above-mentioned on-screen content indicates the second syllable and the second tone information, then the above-mentioned input intention is a voice recommendation intention, and the first candidate corresponding to the above-mentioned input string may include: the recommendation candidates corresponding to the above-mentioned second syllable, the above-mentioned second tone information and the voice information of the above-mentioned on-screen content.

可选地,上述装置还可以包括:Optionally, the above device may further include:

第一确定模块,用于从上述已上屏内容中确定出与预设声调内容相匹配的声调内容;A first determining module, used to determine the tone content matching the preset tone content from the above-mentioned on-screen content;

第二确定模块,用于从上述已上屏内容中确定出上述声调内容对应的音节内容;A second determination module is used to determine the syllable content corresponding to the tone content from the content on the screen;

第三确定模块,用于确定上述声调内容对应的第二声调信息、以及确定上述音节内容对应的第二音节。The third determining module is used to determine the second tone information corresponding to the tone content and determine the second syllable corresponding to the syllable content.

可选地,第一候选处理模块603可以包括:Optionally, the first candidate processing module 603 may include:

数据库确定模块,用于确定上述语义信息对应的目标数据库;A database determination module, used to determine the target database corresponding to the above semantic information;

数据库查询模块,用于依据上述第二音节和上述第二声调信息,查询上述目标数据库,以得到推荐候选。The database query module is used to query the target database according to the second syllable and the second tone information to obtain the recommendation candidates.

可选地,第一候选处理模块603可以包括:Optionally, the first candidate processing module 603 may include:

展示模块,用于在输入法的首屏位置,展示上述第一侯选。The display module is used to display the first candidate at the first screen position of the input method.

可选地,上述装置还可以包括:Optionally, the above device may further include:

第二候选确定模块,用于依据上述输入串,在词库中进行查找,以得到上述输入串对应的第二候选。The second candidate determination module is used to search in the word library according to the input string to obtain the second candidate corresponding to the input string.

对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device 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.

本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

本发明实施例提供了一种用于输入的装置,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:接收用户的输入串;对所述输入串进行意图识别,以得到输入意图;依据所述输入意图,确定并输出所述输入串对应的第一候选。An embodiment of the present invention provides a device for input, including a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: receiving an input string from a user; performing intent recognition on the input string to obtain an input intent; and determining and outputting a first candidate corresponding to the input string based on the input intent.

图7是根据一示例性实施例示出的一种用于输入的装置1100的框图。例如,装置1100可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 7 is a block diagram of a device 1100 for input according to an exemplary embodiment. For example, the device 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

参照图7,装置1100可以包括以下一个或多个组件:处理组件1102,存储器1104,电源组件1106,多媒体组件1108,音频组件1110,输入/输出(I/O)的接口1112,传感器组件1114,以及通信组件1116。7 , device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input/output (I/O) interface 1112 , a sensor component 1114 , and a communication component 1116 .

处理组件1102通常控制装置1100的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1102可以包括一个或多个处理器1120来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1102可以包括一个或多个模块,便于处理组件1102和其他组件之间的交互。例如,处理组件1102可以包括多媒体模块,以方便多媒体组件1108和处理组件1102之间的交互。The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1102 may include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.

存储器1104被配置为存储各种类型的数据以支持在设备1100的操作。这些数据的示例包括用于在装置1100上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1104可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 1104 is configured to store various types of data to support operations on the device 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

电源组件1106为装置1100的各种组件提供电力。电源组件1106可以包括电源管理系统,一个或多个电源,及其他与为装置1100生成、管理和分配电力相关联的组件。The power supply component 1106 provides power to the various components of the device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1100.

多媒体组件1108包括在所述装置1100和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1108包括一个前置摄像头和/或后置摄像头。当设备1100处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and/or a rear camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

音频组件1110被配置为输出和/或输入音频信号。例如,音频组件1110包括一个麦克风(MIC),当装置1100处于操作模式,如呼叫模式、记录模式和语音输入模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1104或经由通信组件1116发送。在一些实施例中,音频组件1110还包括一个扬声器,用于输出音频信号。The audio component 1110 is configured to output and/or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the device 1100 is in an operation mode, such as a call mode, a recording mode, and a voice input mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.

I/O接口1112为处理组件1102和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

传感器组件1114包括一个或多个传感器,用于为装置1100提供各个方面的状态评估。例如,传感器组件1114可以检测到设备1100的打开/关闭状态,组件的相对定位,例如所述组件为装置1100的显示器和小键盘,传感器组件1114还可以检测装置1100或装置1100一个组件的位置改变,用户与装置1100接触的存在或不存在,装置1100方位或加速/减速和装置1100的温度变化。传感器组件1114可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1114还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1114还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 1114 includes one or more sensors for providing various aspects of the status assessment of the device 1100. For example, the sensor assembly 1114 can detect the open/closed state of the device 1100, the relative positioning of components, such as the display and keypad of the device 1100, the sensor assembly 1114 can also detect the position change of the device 1100 or a component of the device 1100, the presence or absence of user contact with the device 1100, the orientation or acceleration/deceleration of the device 1100, and the temperature change of the device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件1116被配置为便于装置1100和其他设备之间有线或无线方式的通信。装置1100可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1116经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1116还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID,Radio Frequency Identification)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 1116 is configured to facilitate wired or wireless communication between the device 1100 and other devices. The device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID, Radio Frequency Identification) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置1100可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the device 1100 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1104,上述指令可由装置1100的处理器1120执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

图8是本发明的一些实施例中服务器的结构示意图。该服务器1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processingunits,CPU)1922(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1922可以设置为与存储介质1930通信,在服务器1900上执行存储介质1930中的一系列指令操作。FIG8 is a schematic diagram of the structure of a server in some embodiments of the present invention. The server 1900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1922 (for example, one or more processors) and memory 1932, and one or more storage media 1930 (for example, one or more mass storage devices) storing application programs 1942 or data 1944. Among them, the memory 1932 and the storage medium 1930 may be short-term storage or permanent storage. The program stored in the storage medium 1930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1922 may be configured to communicate with the storage medium 1930 and execute a series of instruction operations in the storage medium 1930 on the server 1900.

服务器1900还可以包括一个或一个以上电源1926,一个或一个以上有线或无线网络接口1950,一个或一个以上输入输出接口1958,一个或一个以上键盘1956,和/或,一个或一个以上操作系统1941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and/or, one or more operating systems 1941, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置(服务器或者终端)的处理器执行时,使得装置能够执行图2或图3或图4或图5所示的输入方法。A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute the input method shown in Figure 2 or Figure 3 or Figure 4 or Figure 5.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由装置(服务器或者终端)的处理器执行时,使得装置能够执行一种输入方法,所述方法包括:接收用户的输入串;对所述输入串进行意图识别,以得到输入意图;依据所述输入意图,确定并输出所述输入串对应的第一候选。A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a device (server or terminal), enables the device to execute an input method, the method comprising: receiving a user's input string; performing intent recognition on the input string to obtain an input intent; and determining and outputting a first candidate corresponding to the input string based on the input intent.

本发明实施例公开了A1、一种输入方法,所述方法包括:The embodiment of the present invention discloses A1, an input method, the method comprising:

接收用户的输入串;Receive the user's input string;

对所述输入串进行意图识别,以得到输入意图;Performing intent recognition on the input string to obtain input intent;

依据所述输入意图,确定并输出所述输入串对应的第一候选。According to the input intention, a first candidate corresponding to the input string is determined and output.

A2、根据A1所述的方法,其特征在于,所述对所述输入串进行意图识别,包括:A2. The method according to A1, characterized in that the performing intent recognition on the input string comprises:

对所述输入串与文字部件名称对应的编码字符串进行匹配,若匹配成功,则输入意图包括:文字部件输入意图,所述输入串对应的第一候选包括:文字部件候选。The input string is matched with the encoded character string corresponding to the text component name. If the match is successful, the input intention includes: text component input intention, and the first candidate corresponding to the input string includes: text component candidate.

A3、根据A1所述的方法,其特征在于,所述输入意图包括:文字部件输入意图;依据文字部件与文字部件名称对应编码字符串之间的映射关系,确定所述文字部件输入意图、以及所述文字部件输入意图对应的文字部件候选。A3. The method according to A1 is characterized in that the input intention includes: text component input intention; determining the text component input intention and the text component candidates corresponding to the text component input intention based on the mapping relationship between the text component and the encoding string corresponding to the text component name.

A4、根据A1所述的方法,其特征在于,所述对所述输入串进行意图识别,包括:A4. The method according to A1, characterized in that the performing intent recognition on the input string comprises:

若所述输入串包括:表征第一声调信息的第二字符串、以及用于表征第一音节的第一字符串,则所述输入意图为读音输入意图,所述输入串对应的第一候选包括:所述第一字符串对应的读音候选,所述读音候选包括:所述第一音节以及所述第一声调信息。If the input string includes: a second character string representing a first tone information, and a first character string used to represent a first syllable, then the input intention is a pronunciation input intention, and the first candidate corresponding to the input string includes: a pronunciation candidate corresponding to the first character string, and the pronunciation candidate includes: the first syllable and the first tone information.

A5、根据A1所述的方法,其特征在于,所述输入串包括:已上屏内容,所述对所述输入串进行意图识别,包括:A5. The method according to A1, characterized in that the input string includes: content that has been on the screen, and the performing intent recognition on the input string includes:

若所述已上屏内容指示第二音节和第二声调信息,则所述输入意图为语音推荐意图,所述输入串对应的第一候选包括:所述第二音节、所述第二声调信息和所述已上屏内容的语音信息对应的推荐候选。If the on-screen content indicates a second syllable and second tone information, the input intention is a voice recommendation intention, and the first candidate corresponding to the input string includes: the second syllable, the second tone information and the recommendation candidate corresponding to the voice information of the on-screen content.

A6、根据A5所述的方法,其特征在于,所述方法还包括:A6. The method according to A5, characterized in that the method further comprises:

从所述已上屏内容中确定出与预设声调内容相匹配的声调内容;Determining tone content that matches preset tone content from the on-screen content;

从所述已上屏内容中确定出所述声调内容对应的音节内容;Determining the syllable content corresponding to the tone content from the content already on the screen;

确定所述声调内容对应的第二声调信息、以及确定所述音节内容对应的第二音节。The second tone information corresponding to the tone content is determined, and the second syllable corresponding to the syllable content is determined.

A7、根据A5所述的方法,其特征在于,所述确定并输出所述输入串对应的第一候选,包括:A7. The method according to A5, characterized in that the determining and outputting the first candidate corresponding to the input string comprises:

确定所述语义信息对应的目标数据库;Determining a target database corresponding to the semantic information;

依据所述第二音节和所述第二声调信息,查询所述目标数据库,以得到推荐候选。The target database is queried according to the second syllable and the second tone information to obtain recommendation candidates.

A8、根据A1至A7中任一所述的方法,其特征在于,所述确定并输出所述输入串对应的第一候选,包括:A8. The method according to any one of A1 to A7, characterized in that the determining and outputting the first candidate corresponding to the input string comprises:

在输入法的首屏位置,展示所述第一侯选。The first candidate is displayed on the first screen of the input method.

A9、根据A1至A7中任一所述的方法,其特征在于,所述方法还包括:A9. The method according to any one of A1 to A7, characterized in that the method further comprises:

依据所述输入串,在词库中进行查找,以得到所述输入串对应的第二候选。According to the input string, a search is performed in the word library to obtain a second candidate corresponding to the input string.

本发明实施例公开了B10、一种输入装置,其特征在于,包括:The embodiment of the present invention discloses B10, an input device, characterized in that it includes:

接收模块,用于接收用户的输入串;A receiving module, used for receiving an input string from a user;

意图识别模块,用于对所述输入串进行意图识别,以得到输入意图;以及an intention recognition module, used to perform intention recognition on the input string to obtain input intention; and

第一候选处理模块,用于依据所述输入意图,确定并输出所述输入串对应的第一候选。The first candidate processing module is used to determine and output a first candidate corresponding to the input string according to the input intention.

B11、根据B10所述的装置,其特征在于,所述意图识别模块包括:B11. The device according to B10, wherein the intention recognition module comprises:

第一意图识别模块,用于对所述输入串与文字部件名称对应的编码字符串进行匹配,若匹配成功,则输入意图包括:文字部件输入意图,所述输入串对应的第一候选包括:文字部件候选。The first intention recognition module is used to match the input string with the encoded character string corresponding to the text component name. If the match is successful, the input intention includes: text component input intention, and the first candidate corresponding to the input string includes: text component candidate.

B12、根据B10所述的装置,其特征在于,所述输入意图包括:文字部件输入意图;依据文字部件与文字部件名称对应编码字符串之间的映射关系,确定所述文字部件输入意图、以及所述文字部件输入意图对应的文字部件候选。B12. The device according to B10 is characterized in that the input intention includes: text component input intention; determining the text component input intention and the text component candidates corresponding to the text component input intention based on the mapping relationship between the text component and the encoding string corresponding to the text component name.

B13、根据B10所述的装置,其特征在于,所述意图识别模块包括:B13. The device according to B10, wherein the intention recognition module comprises:

第二意图识别模块,用于若所述输入串包括:表征第一声调信息的第二字符串、以及用于表征第一音节的第一字符串,则所述输入意图为读音输入意图,所述输入串对应的第一候选包括:所述第一字符串对应的读音候选,所述读音候选包括:所述第一音节以及所述第一声调信息。A second intention recognition module is used for if the input string includes: a second character string representing the first tone information, and a first character string used to represent the first syllable, then the input intention is a pronunciation input intention, and the first candidate corresponding to the input string includes: the pronunciation candidate corresponding to the first character string, and the pronunciation candidate includes: the first syllable and the first tone information.

B14、根据B10所述的装置,其特征在于,所述输入串包括:已上屏内容,所述意图识别模块包括:B14. The device according to B10, characterized in that the input string includes: content that has been on the screen, and the intention recognition module includes:

第三意图识别模块,用于若所述已上屏内容指示第二音节和第二声调信息,则所述输入意图为语音推荐意图,所述输入串对应的第一候选包括:所述第二音节、所述第二声调信息和所述已上屏内容的语音信息对应的推荐候选。The third intention recognition module is used to: if the on-screen content indicates a second syllable and a second tone information, the input intention is a voice recommendation intention, and the first candidate corresponding to the input string includes: the second syllable, the second tone information and the recommendation candidate corresponding to the voice information of the on-screen content.

B15、根据B14所述的装置,其特征在于,所述装置还包括:B15. The device according to B14, characterized in that the device further comprises:

第一确定模块,用于从所述已上屏内容中确定出与预设声调内容相匹配的声调内容;A first determining module, configured to determine, from the on-screen content, a tone content that matches a preset tone content;

第二确定模块,用于从所述已上屏内容中确定出所述声调内容对应的音节内容;A second determination module is used to determine the syllable content corresponding to the tone content from the content that has been displayed on the screen;

第三确定模块,用于确定所述声调内容对应的第二声调信息、以及确定所述音节内容对应的第二音节。The third determining module is used to determine the second tone information corresponding to the tone content and determine the second syllable corresponding to the syllable content.

B16、根据B14所述的装置,其特征在于,所述第一候选处理模块包括:B16. The device according to B14, wherein the first candidate processing module comprises:

数据库确定模块,用于确定所述语义信息对应的目标数据库;A database determination module, used to determine a target database corresponding to the semantic information;

数据库查询模块,用于依据所述第二音节和所述第二声调信息,查询所述目标数据库,以得到推荐候选。The database query module is used to query the target database according to the second syllable and the second tone information to obtain recommendation candidates.

B17、根据B10至B16中任一所述的装置,其特征在于,所述第一候选处理模块包括:B17. The device according to any one of B10 to B16, wherein the first candidate processing module comprises:

展示模块,用于在输入法的首屏位置,展示所述第一侯选。The display module is used to display the first candidate at the first screen position of the input method.

B18、根据B10至B16中任一所述的装置,其特征在于,所述装置还包括:B18. The device according to any one of B10 to B16, characterized in that the device further comprises:

第二候选确定模块,用于依据所述输入串,在词库中进行查找,以得到所述输入串对应的第二候选。The second candidate determination module is used to search in a word library according to the input string to obtain a second candidate corresponding to the input string.

本发明实施例公开了C19、一种用于输入的装置,其特征在于,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:The embodiment of the present invention discloses C19, a device for input, characterized in that it includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations:

接收用户的输入串;Receive the user's input string;

对所述输入串进行意图识别,以得到输入意图;Performing intent recognition on the input string to obtain input intent;

依据所述输入意图,确定并输出所述输入串对应的第一候选。According to the input intention, a first candidate corresponding to the input string is determined and output.

C20、根据C19所述的装置,其特征在于,所述对所述输入串进行意图识别,包括:C20. The device according to C19, wherein the performing intent recognition on the input string comprises:

对所述输入串与文字部件名称对应的编码字符串进行匹配,若匹配成功,则输入意图包括:文字部件输入意图,所述输入串对应的第一候选包括:文字部件候选。The input string is matched with the encoded character string corresponding to the text component name. If the match is successful, the input intention includes: text component input intention, and the first candidate corresponding to the input string includes: text component candidate.

C21、根据C19所述的装置,其特征在于,所述输入意图包括:文字部件输入意图;依据文字部件与文字部件名称对应编码字符串之间的映射关系,确定所述文字部件输入意图、以及所述文字部件输入意图对应的文字部件候选。C21. The device according to C19 is characterized in that the input intention includes: text component input intention; determining the text component input intention and the text component candidates corresponding to the text component input intention based on the mapping relationship between the text component and the encoding string corresponding to the text component name.

C22、根据C19所述的装置,其特征在于,所述对所述输入串进行意图识别,包括:C22. The device according to C19, wherein the performing intent recognition on the input string comprises:

若所述输入串包括:表征第一声调信息的第二字符串、以及用于表征第一音节的第一字符串,则所述输入意图为读音输入意图,所述输入串对应的第一候选包括:所述第一字符串对应的读音候选,所述读音候选包括:所述第一音节以及所述第一声调信息。If the input string includes: a second character string representing a first tone information, and a first character string used to represent a first syllable, then the input intention is a pronunciation input intention, and the first candidate corresponding to the input string includes: a pronunciation candidate corresponding to the first character string, and the pronunciation candidate includes: the first syllable and the first tone information.

C23、根据C19所述的装置,其特征在于,所述输入串包括:已上屏内容,所述对所述输入串进行意图识别,包括:C23. The device according to C19, wherein the input string includes: content that has been on the screen, and the performing intent recognition on the input string includes:

若所述已上屏内容指示第二音节和第二声调信息,则所述输入意图为语音推荐意图,所述输入串对应的第一候选包括:所述第二音节、所述第二声调信息和所述已上屏内容的语音信息对应的推荐候选。If the on-screen content indicates a second syllable and second tone information, the input intention is a voice recommendation intention, and the first candidate corresponding to the input string includes: the second syllable, the second tone information and the recommendation candidate corresponding to the voice information of the on-screen content.

C24、根据C23所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:C24. The device according to C23, characterized in that the device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

从所述已上屏内容中确定出与预设声调内容相匹配的声调内容;Determining tone content that matches preset tone content from the on-screen content;

从所述已上屏内容中确定出所述声调内容对应的音节内容;Determining the syllable content corresponding to the tone content from the content already on the screen;

确定所述声调内容对应的第二声调信息、以及确定所述音节内容对应的第二音节。The second tone information corresponding to the tone content is determined, and the second syllable corresponding to the syllable content is determined.

C25、根据C23所述的装置,其特征在于,所述确定并输出所述输入串对应的第一候选,包括:C25. The device according to C23, characterized in that the determining and outputting the first candidate corresponding to the input string comprises:

确定所述语义信息对应的目标数据库;Determining a target database corresponding to the semantic information;

依据所述第二音节和所述第二声调信息,查询所述目标数据库,以得到推荐候选。The target database is queried according to the second syllable and the second tone information to obtain recommendation candidates.

C26、根据C19至C25中任一所述的装置,其特征在于,所述确定并输出所述输入串对应的第一候选,包括:C26. The device according to any one of C19 to C25, wherein determining and outputting the first candidate corresponding to the input string comprises:

在输入法的首屏位置,展示所述第一侯选。The first candidate is displayed on the first screen of the input method.

C27、根据C19至C25中任一所述的装置,其特征在于,所述装置还经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:C27. The device according to any one of C19 to C25, characterized in that the device is further configured to execute, by one or more processors, the one or more programs including instructions for performing the following operations:

依据所述输入串,在词库中进行查找,以得到所述输入串对应的第二候选。According to the input string, a search is performed in the word library to obtain a second candidate corresponding to the input string.

本发明实施例公开了D28、一种机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行如A1至A9中一个或多个所述的输入方法。An embodiment of the present invention discloses D28, a machine-readable medium having instructions stored thereon, which, when executed by one or more processors, enables a device to execute an input method as described in one or more of A1 to A9.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本发明旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

以上对本发明所提供的一种输入方法、一种输入装置、一种用于输入的装置、以及一种机器可读介质,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The above is a detailed introduction to an input method, an input device, a device for input, and a machine-readable medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims (8)

1. An input method, the method comprising:
receiving an input string of a user, the input string comprising: on-screen content;
performing intention recognition on the input string to obtain an input intention;
determining and outputting a first candidate corresponding to the input string according to the input intention;
The intent recognition of the input string includes:
If the on-screen content indicates second syllable and second voice information, the input intention is voice recommendation intention, and the first candidate corresponding to the input string comprises: recommendation candidates corresponding to the second syllable, the second tone information and the voice information of the on-screen content;
Determining tone content matched with preset tone content from the on-screen content;
Determining syllable content corresponding to the tone content from the on-screen content;
Determining second tone information corresponding to the tone content and determining a second syllable corresponding to the syllable content;
The determining and outputting the first candidate corresponding to the input string includes:
determining semantic information corresponding to the on-screen content, and determining a target database corresponding to the semantic information;
Inquiring the target database according to the second syllable and the second tone information to obtain recommendation candidates; the type of the recommendation candidate is matched with the type of the target database; the types of the recommendation candidates include: words, phrases, sentences.
2. The method of claim 1, wherein the determining and outputting the first candidate corresponding to the input string comprises:
and displaying the first candidate at the first screen position of the input method.
3. The method according to claim 1, wherein the method further comprises:
And searching in a word stock according to the input string to obtain a second candidate corresponding to the input string.
4. An input device, comprising:
A receiving module, configured to receive an input string of a user, where the input string includes: on-screen content;
The intention recognition module is used for carrying out intention recognition on the input string so as to obtain an input intention; and
The first candidate processing module is used for determining and outputting a first candidate corresponding to the input string according to the input intention;
The intention recognition module includes:
a third intention recognition module, configured to, if the on-screen content indicates second syllable and second voice information, determine that the input intention is a voice recommendation intention, where the first candidate corresponding to the input string includes: recommendation candidates corresponding to the second syllable, the second tone information and the voice information of the on-screen content;
The apparatus further comprises:
the first determining module is used for determining tone content matched with preset tone content from the on-screen content;
The second determining module is used for determining syllable content corresponding to the tone content from the on-screen content;
a third determining module, configured to determine second tone information corresponding to the tone content, and determine a second syllable corresponding to the syllable content;
The first candidate processing module includes:
The database determining module is used for determining semantic information corresponding to the on-screen content and determining a target database corresponding to the semantic information;
The database query module is used for querying the target database according to the second syllable and the second tone information to obtain recommendation candidates; the type of the recommendation candidate is matched with the type of the target database; the types of the recommendation candidates include: words, phrases, sentences.
5. The apparatus of claim 4, wherein the first candidate processing module comprises:
and the display module is used for displaying the first candidate at the first screen position of the input method.
6. The apparatus of claim 4, wherein the apparatus further comprises:
and the second candidate determining module is used for searching in a word stock according to the input string so as to obtain a second candidate corresponding to the input string.
7. An apparatus for inputting comprising a memory and one or more programs, wherein one or more programs are stored in the memory and when executed by one or more processors, implement the steps of the method of any of claims 1 to 3.
8. A machine readable medium having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the input method of one or more of claims 1 to 3.
CN202011522551.6A 2020-12-21 2020-12-21 Input method, device and medium Active CN112650398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522551.6A CN112650398B (en) 2020-12-21 2020-12-21 Input method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522551.6A CN112650398B (en) 2020-12-21 2020-12-21 Input method, device and medium

Publications (2)

Publication Number Publication Date
CN112650398A CN112650398A (en) 2021-04-13
CN112650398B true CN112650398B (en) 2024-10-29

Family

ID=75358759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522551.6A Active CN112650398B (en) 2020-12-21 2020-12-21 Input method, device and medium

Country Status (1)

Country Link
CN (1) CN112650398B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1127898A (en) * 1995-01-26 1996-07-31 李琳山 Smart Mandarin voice input method and Mandarin dictation machine
CN1949148A (en) * 2006-07-25 2007-04-18 网之易信息技术(北京)有限公司 Chinese characters inputting method and device
CN101510123A (en) * 2008-11-17 2009-08-19 张家港市赫图阿拉信息技术有限公司 Chinese character radical inputting method
CN111179645A (en) * 2019-12-30 2020-05-19 陈泉 Pinyin spelling method, device, equipment and computer readable storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG42314A1 (en) * 1995-01-30 1997-08-15 Mitsubishi Electric Corp Language processing apparatus and method
JP3889961B2 (en) * 2001-12-13 2007-03-07 セイコーエプソン株式会社 Character processing device and character processing method of character processing device
CN101414226A (en) * 2007-10-15 2009-04-22 南京国触科技有限公司 Touch and draw the formula pronunciation inputting method and touch a stroke formula instant voice input device
KR100952196B1 (en) * 2008-04-25 2010-04-09 엔에이치엔(주) System and method for retrieving local information based on at least one of Hangul's initial, neutral and final
CN101539428A (en) * 2009-04-28 2009-09-23 北京四维图新科技股份有限公司 Searching method with first letter of pinyin and intonation in navigation system and device thereof
CN101794176A (en) * 2010-03-26 2010-08-04 李幼安 Computer Chinese input method and keyboard based on Chinese pinyin scheme
WO2011143808A1 (en) * 2010-05-18 2011-11-24 Nokia Corporation Chinese character input method, apparatus, and associated memory medium
CN102736741A (en) * 2011-04-12 2012-10-17 腾讯科技(深圳)有限公司 Pinyin input method and system of Chinese characters
CN106294306B (en) * 2015-05-14 2019-04-26 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105279227B (en) * 2015-09-11 2020-07-28 百度在线网络技术(北京)有限公司 Method and device for processing voice search of homophone
CN108008832A (en) * 2016-10-31 2018-05-08 北京搜狗科技发展有限公司 A kind of input method and device, a kind of device for being used to input
CN108073293B (en) * 2016-11-11 2022-01-14 北京搜狗科技发展有限公司 Method and device for determining target phrase
CN107632718B (en) * 2017-08-03 2021-01-22 百度在线网络技术(北京)有限公司 Method, device and readable medium for recommending digital information in voice input
CN108549493B (en) * 2018-04-04 2022-10-04 科大讯飞股份有限公司 Candidate word screening method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1127898A (en) * 1995-01-26 1996-07-31 李琳山 Smart Mandarin voice input method and Mandarin dictation machine
CN1949148A (en) * 2006-07-25 2007-04-18 网之易信息技术(北京)有限公司 Chinese characters inputting method and device
CN101510123A (en) * 2008-11-17 2009-08-19 张家港市赫图阿拉信息技术有限公司 Chinese character radical inputting method
CN111179645A (en) * 2019-12-30 2020-05-19 陈泉 Pinyin spelling method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112650398A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
TWI720062B (en) Voice input method, device and terminal equipment
WO2018076450A1 (en) Input method and apparatus, and apparatus for input
CN111369978B (en) A data processing method, a data processing device and a data processing device
CN107564526B (en) Processing method, apparatus and machine-readable medium
CN109002183B (en) Information input method and device
US20230267282A1 (en) Poetry generation
CN110633017A (en) Input method, input device and input device
CN111414766A (en) Translation method and device
CN107424612B (en) Processing method, apparatus and machine-readable medium
KR102327790B1 (en) Information processing methods, devices and storage media
CN111381685B (en) A sentence association method and device
CN111198619A (en) Method and device for generating associative candidates
CN112837668B (en) Voice processing method and device for processing voice
CN112650398B (en) Input method, device and medium
CN113515618B (en) Voice processing method, device and medium
CN108073294B (en) Intelligent word forming method and device for intelligent word forming
CN111324214A (en) Statement error correction method and device
CN112434521B (en) Vocabulary processing method and device
CN113010768B (en) Data processing method and device for data processing
CN112181163B (en) Input method, device and device for input
CN113703590A (en) Input method, input device and input device
CN110389668B (en) Input method, device and device for inputting
CN114115550A (en) Associated candidate processing method, device and device for processing associative candidates
CN115016652B (en) Input method, device and medium
CN112528129A (en) Language searching method and device for multi-language translation system

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
GR01 Patent grant
GR01 Patent grant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载