CN105867649A - Input method based on equipment information and mobile terminal - Google Patents
Input method based on equipment information and mobile terminal Download PDFInfo
- Publication number
- CN105867649A CN105867649A CN201610190529.3A CN201610190529A CN105867649A CN 105867649 A CN105867649 A CN 105867649A CN 201610190529 A CN201610190529 A CN 201610190529A CN 105867649 A CN105867649 A CN 105867649A
- Authority
- CN
- China
- Prior art keywords
- input
- information
- user
- preset
- thesaurus
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements 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/0233—Character input methods
- G06F3/0237—Character input methods using prediction or retrieval techniques
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Character Discrimination (AREA)
Abstract
本发明提供了一种基于设备信息的输入方法,属于输入技术领域,包括:将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口;根据获取的信息生成第一输入候选词,便于用户进行选择输入,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。
The invention provides an input method based on device information, belonging to the field of input technology, comprising: matching a character string input by a user with a keyword in a preset first thesaurus; The information acquisition interface corresponding to the successful keyword; the first input candidate word is generated according to the acquired information, which is convenient for the user to select and input. Compared with the existing technology, it solves the problem that the input content is single and cannot meet the needs of users to input diverse content. , while improving the input efficiency.
Description
技术领域technical field
本发明涉及信息输入技术领域,特别是涉及一种基于设备信息的输入方法和移动终端。The invention relates to the technical field of information input, in particular to an input method based on device information and a mobile terminal.
背景技术Background technique
随着计算机技术的发展,电子设备的使用已经深深融入人们的日常生活中,人们使用电脑、移动终端等电子设备实现各种信息的交互。而“输入法”则是安装在电子设备上的一种重要的信息输入工具。通过输入法软件,可以实现单个字符、词组、短语、句子的输入,甚至还可以实现类似图片的符号输入。因此,利用输入法进行信息输入的效率一直是人们关注的问题。With the development of computer technology, the use of electronic equipment has been deeply integrated into people's daily life. People use electronic equipment such as computers and mobile terminals to realize the interaction of various information. The "input method" is an important information input tool installed on an electronic device. Through the input method software, the input of single characters, phrases, phrases, and sentences can be realized, and even symbols similar to pictures can be input. Therefore, the efficiency of information input using input methods has always been a concern of people.
现有技术中,为了提高信息输入的效率,输入法软件根据输入语言词频或者的上下文关联,可以进行“词语联想”,以快速实现信息输入。例如,用户输入“手”字之后,输入法根据预先建立的联想词库,以“手”字作为关键词,在预先建立的词库中进行匹配,输出“手机”、“手势”、“手工”等侯选词,以备用户选择输入;当用户输入“手机”之后,输入法进一步以“手机”作为关键词,在预先建立的词库中进行匹配,输出“坏了”、“丢了”、“在哪”等侯选词,以备用户选择输入。In the prior art, in order to improve the efficiency of information input, the input method software can perform "word association" according to the word frequency or context association of the input language, so as to quickly realize information input. For example, after the user enters the word "hand", the input method uses the word "hand" as a keyword to match in the pre-established lexicon according to the pre-established associative thesaurus, and outputs "mobile phone", "gesture", "manual" and so on. " and other candidate words, in case the user chooses to input; when the user enters "mobile phone", the input method further uses "mobile phone" as a keyword to match in the pre-established thesaurus, and outputs "broken", "lost ", "Where" and other candidate words, in case the user chooses to input.
然而,现有技术中的输入法至少存在以下缺陷:根据预先建立的词库输出候选词,并且词库根据词频或输入语言的普适上下文创建并固化,输入内容单一,无法满足用户输入多样化内容的需求。However, the input methods in the prior art have at least the following defects: output candidate words according to the pre-established thesaurus, and the thesaurus is created and solidified according to the word frequency or the universal context of the input language, and the input content is single, which cannot satisfy the diversification of user input. content needs.
发明内容Contents of the invention
本发明提供一种信息输入方法和移动终端,解决现有技术中的输入法由于仅能预先建立的词库输出候选词,并且所述词库根据词频或输入语言的普适上下文创建并固化,输入内容单一,无法满足用户输入多样化内容的需求问题。The present invention provides an information input method and a mobile terminal, which solves the problem that the input method in the prior art can only output candidate words from a pre-established thesaurus, and the thesaurus is created and solidified according to the word frequency or the universal context of the input language. The input content is single, which cannot meet the needs of users to input diverse content.
第一方面,为了解决上述问题,本发明实施例提供了一种基于设备信息的输入方法,应用于移动终端,包括:将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词。In the first aspect, in order to solve the above problems, an embodiment of the present invention provides an input method based on device information, which is applied to a mobile terminal, including: matching the character string input by the user with the keywords in the preset first thesaurus ; Acquiring information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus; generating a first input candidate word according to the acquired information.
第二方面,为了解决上述问题,本发明实施例还提供了一种移动终端,包括:In the second aspect, in order to solve the above problems, the embodiment of the present invention also provides a mobile terminal, including:
第一匹配模块,用于将用户输入的字符串用户输入的字符串与预设的第一词库中的关键字匹配;The first matching module is used to match the character string input by the user with the keywords in the preset first thesaurus;
信息获取模块,用于通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;An information acquisition module, configured to acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus;
第一候选生成模块,用于根据所述信息获取模块获取的信息生成第一输入候选词。A first candidate generation module, configured to generate a first input candidate word according to the information acquired by the information acquisition module.
本发明的实施例,通过将用户输入的字符串用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。In the embodiment of the present invention, by matching the character string input by the user with the keyword in the preset first thesaurus; and obtaining the information corresponding to the successfully matched keyword in the first thesaurus The interface is used to obtain information in the mobile terminal; the first input candidate word is generated according to the obtained information. Compared with the prior art, it solves the problem that the input content is single and cannot meet the needs of users to input diverse content, and at the same time improves the input efficiency.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without paying creative labor.
图1是本发明实施例一信息输入方法的流程图;Fig. 1 is a flowchart of an information input method according to an embodiment of the present invention;
图2是本发明实施例二信息输入方法的流程图;FIG. 2 is a flow chart of an information input method in Embodiment 2 of the present invention;
图3是本发明实施例三信息输入方法的流程图;FIG. 3 is a flow chart of an information input method in Embodiment 3 of the present invention;
图4是本发明实施例四信息输入方法的流程图;FIG. 4 is a flowchart of an information input method in Embodiment 4 of the present invention;
图5是本发明实施例五的移动终端的结构图;FIG. 5 is a structural diagram of a mobile terminal according to Embodiment 5 of the present invention;
图6是本发明实施例六的移动终端的结构图;FIG. 6 is a structural diagram of a mobile terminal according to Embodiment 6 of the present invention;
图7是本发明实施例七的移动终端的结构图;FIG. 7 is a structural diagram of a mobile terminal according to Embodiment 7 of the present invention;
图8是本发明实施例八的移动终端的结构图;FIG. 8 is a structural diagram of a mobile terminal according to Embodiment 8 of the present invention;
图9是本发明实施例九的移动终端的结构图;FIG. 9 is a structural diagram of a mobile terminal according to Embodiment 9 of the present invention;
图10是本发明实施例十的移动终端的结构图。FIG. 10 is a structural diagram of a mobile terminal according to Embodiment 10 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
实施例一:Embodiment one:
本实施例提供了一种信息输入方法如图1所示,该方法包括:步骤130至步骤150。This embodiment provides an information input method, as shown in FIG. 1 , the method includes: Step 130 to Step 150 .
步骤130,将用户输入的字符串与预设的第一词库中的关键字匹配。Step 130, matching the character string input by the user with the keywords in the preset first thesaurus.
下面以使用拼音输入法进行中文输入为例,详细说明本发明的具体实施过程。Taking Chinese input using the pinyin input method as an example, the specific implementation process of the present invention will be described in detail below.
当用户通过拼音输入法输入拼音,并选择了输入拼音对应的候选词以后,执行本实施例的步骤130。以用户输入拼音为“dianliang”为例,拼音输入引擎会输出相应的候选词,例如:电量、点亮、掂量等,用户选择其中一个候选词之后,触发基于设备信息的联想输入。After the user inputs pinyin through the pinyin input method and selects a candidate word corresponding to the input pinyin, step 130 of this embodiment is executed. Taking the user input pinyin as "dianliang" as an example, the pinyin input engine will output corresponding candidate words, such as: battery, lighting, weighing, etc. After the user selects one of the candidate words, the association input based on device information will be triggered.
然后,在步骤130中,将用户输入的字符串与预设的第一词库中的关键字匹配。其中,用户输入的字符串中可以包括一个字符,也可以包括多个字符。所述预设的第一词库至少包括:标识设备信息的关键字,与所述关键字对应的信息获取接口。在预设的第一词库中,标识设备信息的关键字和与所述关键字对应的信息获取接口以键值对的形式进行对应,即“关键字-信息获取接口”,每个关键字至少对应一个信息获取接口,多个关键字可以对应一个信息获取接口。为了提高输入的效率,通常设置关键字和信息获取接口一一对应。Then, in step 130, the character string input by the user is matched with the keywords in the preset first thesaurus. Wherein, the character string input by the user may include one character or multiple characters. The preset first thesaurus at least includes: keywords identifying device information, and an information acquisition interface corresponding to the keywords. In the preset first thesaurus, keywords identifying device information correspond to information acquisition interfaces corresponding to the keywords in the form of key-value pairs, that is, "keyword-information acquisition interface", and each keyword It corresponds to at least one information acquisition interface, and multiple keywords can correspond to one information acquisition interface. In order to improve the efficiency of input, it is usual to set a one-to-one correspondence between keywords and information acquisition interfaces.
具体匹配时,将用户输入的字符串与预设的第一词库中的关键字匹配,可以采用完全匹配或者模糊匹配的方式,根据输入需要设置,本发明对此不做限定。During specific matching, the character string input by the user is matched with the keywords in the preset first thesaurus, which can be done in a complete match or a fuzzy match, which is set according to input requirements, which is not limited in the present invention.
步骤140,通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。Step 140, acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus.
若发现匹配成功的关键字,根据匹配成功的所述第一词库中的关键字,获取移动终端内的信息,包括:确定与所述关键字对应的信息获取接口;调用所述信息获取接口获取移动终端内的信息。首先,根据预设的第一词库中的“关键字-信息获取接口”的对应关系,确定预设的第一词库中匹配成功的关键字对应的信息获取接口;然后,调用确定的信息获取接口,读取设备信息。以匹配成功的关键词为“电量”为例,详细说明本发明读取设备信息的过程。若第一词库中关键字“电量”对应的信息获取接口为“读取电池剩余电量”,则调用“读取电池剩余电量”函数,获取移动终端的剩余电量数据。If a successfully matched keyword is found, according to the successfully matched keyword in the first thesaurus, obtaining information in the mobile terminal includes: determining an information acquisition interface corresponding to the keyword; calling the information acquisition interface Get the information in the mobile terminal. First, according to the corresponding relationship of "keyword-information acquisition interface" in the preset first thesaurus, determine the information acquisition interface corresponding to the successfully matched keyword in the preset first thesaurus; then, call the determined information Get the interface and read the device information. Taking the successfully matched keyword as "power" as an example, the process of reading device information in the present invention is described in detail. If the information acquisition interface corresponding to the keyword "power" in the first thesaurus is "reading the remaining battery power", the function of "reading the remaining battery power" is called to obtain the remaining power data of the mobile terminal.
步骤150,根据获取的信息生成第一输入候选词。Step 150, generating a first input candidate word according to the acquired information.
信息获取接口读取到的数据可以直接作为候选词,如调用“读取电池剩余电量”接口时返回“46%”,则可以将“46%”直接作为候选词。The data read by the information acquisition interface can be directly used as a candidate word. For example, if "46%" is returned when the interface "reading the remaining battery power" is called, then "46%" can be directly used as a candidate word.
在另一种情况下,信息获取接口读取到的移动终端内的信息以类、数据包等形式返回时,需要提取数据包或类中的有用数据,并生成第一输入候选词。或者,信息获取接口返回的数据格式复杂,不便于用户浏览时,优选地,所述根据获取的信息生成第一输入候选词,包括:解析获取的所述信息并进行后处理,生成第一输入候选词。In another case, when the information in the mobile terminal read by the information acquisition interface is returned in the form of classes, data packets, etc., it is necessary to extract useful data in the data packets or classes, and generate the first input candidate word. Alternatively, when the format of the data returned by the information acquisition interface is complex and inconvenient for users to browse, preferably, the generating the first input candidate words according to the acquired information includes: parsing the acquired information and performing post-processing to generate the first input Candidates.
首先,解析信息获取接口读取的数据,将读取到的数据进行进一步分词、裁剪等处理;然后,选择关注的数据,并将所述关注的数据格式化为第一输入候选词。以用户输入的字符串为“分辨率”为例,说明解析并格式化获取的所述信息,生成第一输入候选词的过程。首先以“分辨率”作为待匹配的关键字,在预设的第一词库中已经建立了“分辨率”和“获得移动终端分辨率”函数的对应关系,因此,在用户选择“分辨率”完成输入后,步骤130中将“分辨率”与第一词库中的所有关键字进行逐一匹配,并与“分辨率”一词匹配成功;然后根据预设的第一词库中的“关键字-信息获取接口”的对应关系,即对应关系“分辨率-获得移动终端分辨率”确定信息获取接口为“获得移动终端分辨率”函数;之后,“获得移动终端分辨率”函数读取移动终端分辨率,并返回移动终端的分辨率信息。通常,移动终端的分辨率信息以类的形式返回,如CGRect size,即信息获取接口返回的移动终端信息不是字符串形式,则需要对返回的移动终端内的信息进行解析,并对解析得到的数据进行后处理。具体实施时,对解析得到的数据进行后处理包括:提取关键数据,组成第一输入候选词;将解析得到的转换成特定格式等。以size.width=480,size.height=640为例,解析所述移动终端内的信息并格式化为第一输入候选词“640×480”。通过对信息获取接口返回的数据进行解析、后处理,可以进一步改善用户体验。若匹配不成功,则不再调用信息获取接口。Firstly, the data read by the information acquisition interface is analyzed, and the read data is further processed by word segmentation, cutting, etc.; then, the concerned data is selected, and the concerned data is formatted as the first input candidate word. Taking the character string input by the user as "resolution" as an example, the process of parsing and formatting the obtained information to generate the first input candidate word is described. First, "resolution" is used as the keyword to be matched, and the corresponding relationship between "resolution" and the function "obtaining mobile terminal resolution" has been established in the preset first lexicon. Therefore, when the user selects "resolution "After completing the input, in step 130, "resolution" is matched one by one with all keywords in the first thesaurus, and is successfully matched with the word "resolution"; then according to the "resolution" in the preset first thesaurus Keyword-Information Acquisition Interface", that is, the corresponding relationship "resolution-obtain mobile terminal resolution" determines that the information acquisition interface is the "obtain mobile terminal resolution" function; after that, the "obtain mobile terminal resolution" function reads Mobile terminal resolution, and returns the resolution information of the mobile terminal. Usually, the resolution information of the mobile terminal is returned in the form of a class, such as CGRect size, that is, the mobile terminal information returned by the information acquisition interface is not in the form of a string, so it is necessary to analyze the returned information in the mobile terminal, and analyze the obtained The data were post-processed. During specific implementation, the post-processing of the analyzed data includes: extracting key data to form the first input candidate word; converting the analyzed data into a specific format, and the like. Taking size.width=480, size.height=640 as an example, the information in the mobile terminal is parsed and formatted as the first input candidate word "640×480". By analyzing and post-processing the data returned by the information acquisition interface, the user experience can be further improved. If the matching is unsuccessful, the information acquisition interface will no longer be called.
生成第一输入候选词之后,输出所述第一输入候选词。所述第一输入候选词是与用户输入的词语相关联的移动终端内的词语,便于用户进行选择输入。After the first input candidate word is generated, the first input candidate word is output. The first input candidate word is a word in the mobile terminal associated with the word input by the user, which is convenient for the user to select and input.
具体实施时,生成第一输入候选词可以是一个,也可以是多个,本发明对此不做限定。若生成第一输入候选词为多个时,可以按照信息获取接口读取的顺序输出,也可以根据预先设置的顺序输出,本发明对此不做限定。During specific implementation, there may be one or more candidate words for generating the first input, which is not limited in the present invention. If multiple first input candidate words are generated, they can be output in the order read by the information acquisition interface, or in a preset order, which is not limited in the present invention.
本发明的实施例通过,将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词,便于用户进行选择输入,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。In the embodiment of the present invention, the character string input by the user is matched with the keywords in the preset first thesaurus; through the information acquisition interface corresponding to the successfully matched keywords in the first thesaurus, the mobile terminal The information within; the first input candidate word is generated according to the obtained information, which is convenient for the user to select and input. Compared with the existing technology, it solves the problem that the input content is single and cannot meet the needs of users to input diverse content, and at the same time improves the input efficiency. .
实施例二:Embodiment two:
基于实施例一,本发明的另一优选实施例中,如图2所示,所述方法包括:步骤100至步骤150。Based on Embodiment 1, in another preferred embodiment of the present invention, as shown in FIG. 2 , the method includes: Step 100 to Step 150 .
步骤100,创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。Step 100, creating a first thesaurus, the first thesaurus includes: keywords, and information acquisition interfaces corresponding to the keywords.
在移动终端内预先安装或设置所述第一词库。所述预设的第一词库至少包括:标识设备信息的关键字,与所述关键字对应的信息获取接口。所述标识设备信息的关键字可以包括:标识设备硬件信息的关键字、标识设备存储数据的关键字中的一种或多种。为了提高输入效率,预先选择输入频率较高或对用户意义较大的设备信息作为联想输入的对象,并提取标识该设备信息的关键字,如:分辨率、屏幕尺寸、品牌、几核、电量等。The first thesaurus is pre-installed or set in the mobile terminal. The preset first thesaurus at least includes: keywords identifying device information, and an information acquisition interface corresponding to the keywords. The keyword identifying device information may include: one or more of: a keyword identifying device hardware information, and a keyword identifying device storage data. In order to improve input efficiency, pre-select device information with high input frequency or great significance to users as the object of association input, and extract keywords identifying the device information, such as: resolution, screen size, brand, several cores, power Wait.
与所述关键字对应的信息获取接口可以为:移动终端自带的设备信息读取接口、预先编写的设备信息读取函数、预先编写的设备信息读取库、第三方应用接口等中的任意一种或多种。移动终端自带的设备信息读取接口,如:电池电量读取接口、操作系统版本读取接口等,也可以是非操作系统自带的设备信息读取接口。以IOS操作系统的设备为例,IOS系统中的UIDevice提供了当前IOS设备的详细信息,如name(名称),systemVersion(系统版本号),Model(设备型号),batteryLevel(电池电量)等,通过这些系统自带的设备信息读取接口,可以获得相关的设备信息。对于一些数据,如通讯录、记事本等,操作系统没有提供自带的设备信息读取接口,在建立预设的第一词库时,需要预先编写设备信息读取代码,并预置到第一词库中,便于进行联想输入时通过所述设备信息读取代码进行调用。例如,当预设的第一词库中包含关键词“生日”时,对应的设备信息读取代码为读取通讯录中存储的联系人的生日数据,操作系统没有自带的读取通讯录中联系人生日数据的接口,则需要预先编写程序代码来实现读取通讯录中的生日数据,并将预先编写程序代码固化在预设的第一词库中。The information acquisition interface corresponding to the keyword may be any of: a device information reading interface provided by the mobile terminal, a pre-written device information reading function, a pre-written device information reading library, a third-party application interface, etc. one or more. The device information reading interface provided by the mobile terminal, such as: battery power reading interface, operating system version reading interface, etc., may also be a device information reading interface not provided by the operating system. Taking the device of the IOS operating system as an example, UIDevice in the IOS system provides detailed information of the current IOS device, such as name (name), systemVersion (system version number), Model (device model), batteryLevel (battery level), etc., through The device information reading interface that comes with these systems can obtain relevant device information. For some data, such as address book, notepad, etc., the operating system does not provide its own interface for reading device information. In the vocabulary, it is convenient to call through the device information reading code when performing association input. For example, when the preset first dictionary contains the keyword "birthday", the corresponding device information reading code is to read the birthday data of the contact stored in the address book, and the operating system does not have a built-in read address book For the interface of the birthday data of the contacts in the address book, it is necessary to pre-write the program code to realize the reading of the birthday data in the address book, and solidify the pre-written program code in the preset first thesaurus.
步骤110,检测用户输入的信息。Step 110, detecting the information input by the user.
步骤120,判断所述信息是否符合预设条件,若所述信息符合预设条件,则将所述信息作为用户输入的字符串;若所述信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。Step 120, judging whether the information meets the preset conditions, if the information meets the preset conditions, then use the information as a character string input by the user; if the information does not meet the preset conditions, then use the information The recognition result obtained after the recognition is used as the character string input by the user.
所述预设条件为:输入信息为候选字或候选词。The preset condition is: the input information is a candidate word or a candidate word.
对用户输入的信息进行识别时可以调用移动终端内的字符识别引擎,包括但不限于:拼音输入引擎、笔画输入引擎、手写输入引擎、字根输入引擎中的一种。When recognizing the information input by the user, the character recognition engine in the mobile terminal may be invoked, including but not limited to: one of a pinyin input engine, a stroke input engine, a handwriting input engine, and a radical input engine.
仍以拼音输入为例,首先检测用户输入的信息。在用户输入“dianliang”之后,会获取到字符串“dianliang”,通过判断当前所处的输入流程,可以确定输入的信息是否符合预设条件。以拼音输入为例,若用户输入拼音之后还没有选择拼音对应的候选字或候选词,则输入的信息为拼音,不符合预设条件。若用户已经选择了候选字或候选词,则确定输入的信息符合预设条件。还可以根据输入的信息的编码确定所述信息是否符合预设条件。例如,在拼音输入法中,若输入的信息中字符编码小于0xFF,则确定输入的信息不符合预设条件。Still taking pinyin input as an example, first detect the information entered by the user. After the user inputs "dianliang", the character string "dianliang" will be obtained. By judging the current input process, it can be determined whether the input information meets the preset conditions. Taking Pinyin input as an example, if the user has not selected a candidate character or candidate word corresponding to Pinyin after inputting Pinyin, the input information is Pinyin, which does not meet the preset condition. If the user has selected a candidate word or a candidate word, it is determined that the input information meets the preset condition. It can also be determined according to the code of the input information whether the information meets the preset condition. For example, in the pinyin input method, if the character code in the input information is less than 0xFF, it is determined that the input information does not meet the preset condition.
若所述信息不符合预设条件,调用移动终端中预设的字符识别引擎对所述信息进行识别,将得到的识别结果作为用户输入的字符串。例如:调用拼音输入引擎对“dianliang”进行识别,得到拼音的候选词,例如:电量、点亮、掂量等,所有拼音的候选词分别作为用户输入的字符串。If the information does not meet the preset conditions, the character recognition engine preset in the mobile terminal is invoked to recognize the information, and the obtained recognition result is used as a character string input by the user. For example: call the pinyin input engine to identify "dianliang", and get the candidate words of pinyin, such as: battery, lighting, weighing, etc., and all the candidate words of pinyin are respectively used as character strings input by the user.
若所述字符符合预设条件,则将所述字符作为用户输入的字符串。If the character meets the preset condition, the character is used as a character string input by the user.
步骤130,将用户输入的字符串与预设的第一词库中的关键字匹配。Step 130, matching the character string input by the user with the keywords in the preset first thesaurus.
将用户输入的字符串与预设的第一词库中的关键字匹配的具体实施方案参见实施例一中的步骤130,此处不再赘述。For a specific implementation solution of matching the character string input by the user with the keywords in the preset first thesaurus, refer to step 130 in Embodiment 1, which will not be repeated here.
步骤140,通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。Step 140, acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus.
本步骤的具体实施方案参见实施例一中的步骤140,此处不再赘述。For the specific implementation of this step, refer to step 140 in Embodiment 1, which will not be repeated here.
步骤150,根据获取的信息生成第一输入候选词。Step 150, generating a first input candidate word according to the acquired information.
本步骤的具体实施方案参见实施例一中的步骤150,此处不再赘述。For the specific implementation of this step, refer to step 150 in Embodiment 1, which will not be repeated here.
本申请文件中,受篇幅所限,仅以拼音输入为例对检测输入的字符,并将输入的字符转换成用户输入的字符串的过程进行了详细说明。具体实施时,本发明还可以应用在笔画输入、字根输入、手写输入、甚至是语音输入等输入法引擎中。In this application document, limited by the space, only pinyin input is taken as an example to describe in detail the process of detecting input characters and converting the input characters into character strings input by the user. During specific implementation, the present invention can also be applied in input method engines such as stroke input, radical input, handwriting input, and even voice input.
本实施例通过和输入法引擎相结合,在没有选择候选词之前即进行设备信息输入,减少了输入步骤,进一步提高了输入效率。In this embodiment, by combining with the input method engine, device information is input before candidate words are selected, which reduces input steps and further improves input efficiency.
实施例三:Embodiment three:
基于实施例一和二,本发明的另一优选实施例中,如图3所示,所述方法包括步骤100至步骤160。Based on the first and second embodiments, in another preferred embodiment of the present invention, as shown in FIG. 3 , the method includes steps 100 to 160.
步骤100,创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。Step 100, creating a first thesaurus, the first thesaurus includes: keywords, and information acquisition interfaces corresponding to the keywords.
创建第一词库的具体实施方案参见实施例二中的步骤100,此处不再赘述。For the specific implementation of creating the first thesaurus, please refer to step 100 in the second embodiment, which will not be repeated here.
步骤110,检测用户输入的信息。Step 110, detecting the information input by the user.
步骤120,判断所述信息是否符合预设条件,若所述信息符合预设条件,则将所述信息作为用户输入的字符串;若所述信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。Step 120, judging whether the information meets the preset conditions, if the information meets the preset conditions, then use the information as a character string input by the user; if the information does not meet the preset conditions, then use the information The recognition result obtained after the recognition is used as the character string input by the user.
步骤110和步骤120的具体实施方案参见实施例二中的相应步骤,此处不再赘述。For the specific implementation of step 110 and step 120, refer to the corresponding steps in the second embodiment, which will not be repeated here.
步骤130,将用户输入的字符串与预设的第一词库中的关键字匹配。Step 130, matching the character string input by the user with the keywords in the preset first thesaurus.
将用户输入的字符串与预设的第一词库中的关键字匹配的具体实施方案参见实施例一中的步骤130,此处不再赘述。For a specific implementation solution of matching the character string input by the user with the keywords in the preset first thesaurus, refer to step 130 in Embodiment 1, which will not be repeated here.
步骤140,通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。Step 140, acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus.
本步骤的具体实施方案参见实施例一中的步骤140,此处不再赘述。For the specific implementation of this step, refer to step 140 in Embodiment 1, which will not be repeated here.
步骤150,根据获取的信息生成第一输入候选词。Step 150, generating a first input candidate word according to the acquired information.
本步骤的具体实施方案参见实施例一中的步骤150,此处不再赘述。For the specific implementation of this step, refer to step 150 in Embodiment 1, which will not be repeated here.
步骤160,将生成的所述第一输入候选词和根据预设的第二词库对用户输入的字符串进行匹配获得的第二输入候选词按照预设规则排列并输出。Step 160, arrange and output the generated first input candidate word and the second input candidate word obtained by matching the character string input by the user according to the preset second thesaurus according to preset rules.
上述预设第二词库为根据输入语言的词频或者上下文关联建立的联想词库。通常,所述联想词库中包括:关键词和候选词的对应关系表。在进行匹配时,以检测到的用户输入的字符串作为关键字,分别与预设第二词库中的各关键词进行匹配,若匹配成功,则根据对应关系表查找匹配成功的关键词对应的候选词,作为所述关键字关联的第二输入候选词。关键字匹配的具体方式可以为完全匹配或部分匹配或模糊匹配等,根据输入需要设置,本发明对此不做限定。The aforementioned second preset thesaurus is an associative thesaurus established according to word frequency or context association of the input language. Usually, the associative thesaurus includes: a table of correspondences between keywords and candidate words. When matching, use the detected character string input by the user as a keyword to match with each keyword in the preset second thesaurus, if the match is successful, then search for the corresponding keyword corresponding to the successful match according to the corresponding relationship table The candidate word of is used as the second input candidate word associated with the keyword. The specific manner of keyword matching can be complete match, partial match or fuzzy match, etc., which can be set according to input requirements, and the present invention does not limit this.
在得到用户输入的字符串之后,即可以将输入的词语作为关键字,分别与预设第二词库中的各关键词进行匹配,以查找与所述关键词对应的候选词。然后,将查找到的与所述关键词对应的候选词和步骤150中动态生成的所述第一输入候选词按照预设的规则混合排序,然后输出,便于用户进行选择输入。After the character string input by the user is obtained, the input words can be used as keywords to be matched with the keywords in the preset second thesaurus, so as to search for candidate words corresponding to the keywords. Then, the searched candidate words corresponding to the keywords and the first input candidate words dynamically generated in step 150 are mixed and sorted according to preset rules, and then output, which is convenient for the user to select and input.
例如,用户输入“电量”之后,从预设的第二词库中查找到的第二输入候选词为:不足、显示、指示、助手等;根据预设的第一词库匹配并动态生成的第一输入候选词为:46%,则将两组候选词混合排列并输出。若预设排列规则为:第一输入候选词排在首位,则混合排列后的候选词为:46%、不足、显示、指示、助手等;若预设排列规则为:第一输入候选词排在中间,则混合排列后的候选词为:不足、显示、46%、指示、助手等。本发明对排列规则不做限定,根据本发明实施例公开的预设排列规则,本领域技术人员在没有经过创造性劳动而想到的其他排列规则都应属于本发明保护的范畴。For example, after the user enters "power", the second input candidate words found from the preset second word bank are: insufficient, display, instruction, assistant, etc.; The first input candidate word is: 46%, then the two groups of candidate words are mixed and arranged and output. If the default arrangement rule is: the first input candidate word ranks first, then the candidate words after the mixed arrangement are: 46%, insufficient, display, instruction, assistant, etc.; if the default arrangement rule is: the first input candidate word ranks In the middle, the candidate words after mixed arrangement are: insufficiency, display, 46%, instruction, assistant and so on. The present invention does not limit the arrangement rules. According to the preset arrangement rules disclosed in the embodiments of the present invention, other arrangement rules conceived by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
本实施例通过结合固定的预设第二词库和与设备信息相关的预设的第一词库,将在预设第二词库中匹配查找得到的候选词和在预设的第一词库中匹配并动态生成的候选词混合输出,既满足了用户根据普适的上下文或词频进行快速输入的需求,又满足了用户快速输入设备信息的需求,增加了候选词的可选性,进一步提高了输入效率,同时改善了用户体验。In this embodiment, by combining the fixed preset second thesaurus and the preset first thesaurus related to device information, the candidate words found in the preset second thesaurus will be matched with the preset first word The mixed output of candidate words matched and dynamically generated in the library not only meets the user's needs for fast input according to the universal context or word frequency, but also meets the user's needs for fast input of device information, increases the selectivity of candidate words, and further Improve input efficiency and improve user experience at the same time.
实施例四:Embodiment four:
基于实施例二,本发明的另一优选实施例中,若步骤120中用户输入的信息不符合预设条件,则在根据获取的信息生成第一输入候选词的步骤之后,所述方法还包括:步骤170和步骤180。Based on Embodiment 2, in another preferred embodiment of the present invention, if the information input by the user in step 120 does not meet the preset conditions, after the step of generating the first input candidate words according to the acquired information, the method further includes : Step 170 and Step 180.
如图4所示,所述方法包括:步骤100至步骤180。As shown in FIG. 4 , the method includes: Step 100 to Step 180 .
步骤100,创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。Step 100, creating a first thesaurus, the first thesaurus includes: keywords, and information acquisition interfaces corresponding to the keywords.
创建第一词库的具体实施方案参见实施例二中的步骤100,此处不再赘述。For the specific implementation of creating the first thesaurus, please refer to step 100 in the second embodiment, which will not be repeated here.
步骤110,检测用户输入的信息。Step 110, detecting the information input by the user.
步骤120,判断所述信息是否符合预设条件,若所述信息符合预设条件,则将所述信息作为用户输入的字符串;若所述信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。Step 120, judging whether the information meets the preset conditions, if the information meets the preset conditions, then use the information as a character string input by the user; if the information does not meet the preset conditions, then use the information The recognition result obtained after the recognition is used as the character string input by the user.
所述预设条件为:输入信息为候选字或候选词。以拼音输入为例,若用户输入拼音之后还没有选择拼音对应的候选字或候选词,则输入的信息为拼音,不符合预设条件。The preset condition is: the input information is a candidate word or a candidate word. Taking Pinyin input as an example, if the user has not selected a candidate character or candidate word corresponding to Pinyin after inputting Pinyin, the input information is Pinyin, which does not meet the preset condition.
若所述信息不符合预设条件,调用移动终端中预设的字符识别引擎对所述信息进行识别,将得到的识别结果作为用户输入的字符串。例如:调用拼音输入引擎对“dianliang”进行识别,得到拼音的候选词,例如:电量、点亮、掂量等,所有拼音的候选词分别作为用户输入的字符串。If the information does not meet the preset conditions, the character recognition engine preset in the mobile terminal is invoked to recognize the information, and the obtained recognition result is used as a character string input by the user. For example: call the pinyin input engine to identify "dianliang", and get the candidate words of pinyin, such as: battery, lighting, weighing, etc., and all the candidate words of pinyin are respectively used as character strings input by the user.
步骤110和步骤120的具体实施方案参见实施例二中的相应步骤,此处不再赘述。For the specific implementation of step 110 and step 120, refer to the corresponding steps in the second embodiment, which will not be repeated here.
步骤130,将用户输入的字符串与预设的第一词库中的关键字匹配。Step 130, matching the character string input by the user with the keywords in the preset first thesaurus.
将用户输入的字符串与预设的第一词库中的关键字匹配的具体实施方案参见实施例一中的步骤130,此处不再赘述。For a specific implementation solution of matching the character string input by the user with the keywords in the preset first thesaurus, refer to step 130 in Embodiment 1, which will not be repeated here.
步骤140,通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。Step 140, acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus.
本步骤的具体实施方案参见实施例一中的步骤140,此处不再赘述。For the specific implementation of this step, refer to step 140 in Embodiment 1, which will not be repeated here.
步骤150,根据获取的信息生成第一输入候选词。Step 150, generating a first input candidate word according to the acquired information.
本步骤的具体实施方案参见实施例一中的步骤150,此处不再赘述。For the specific implementation of this step, refer to step 150 in Embodiment 1, which will not be repeated here.
步骤160,将生成的所述第一输入候选词和根据预设的第二词库对用户输入的字符串进行匹配获得的第二输入候选词按照预设规则排列并输出。Step 160, arrange and output the generated first input candidate word and the second input candidate word obtained by matching the character string input by the user according to the preset second thesaurus according to preset rules.
本步骤的具体实施方案参见实施例三中的步骤160,此处不再赘述。For the specific implementation of this step, refer to step 160 in Embodiment 3, which will not be repeated here.
步骤170,组合所述用户输入的字符串和所述第一输入候选词生成第三输入候选词。Step 170, combining the character string input by the user and the first input candidate word to generate a third input candidate word.
若步骤120中判断用户输入的信息不符合预设条件,则对所述信息进行识别,将对所述信息进行识别后得到的识别结果作为用户输入的字符串。If it is judged in step 120 that the information input by the user does not meet the preset condition, the information is identified, and the identification result obtained after identifying the information is used as the character string input by the user.
然后,将用户输入的字符串(如:电量)与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词(如:46%)。Then, match the character string (such as: electricity) input by the user with the keywords in the preset first thesaurus; through the information acquisition interface corresponding to the successfully matched keywords in the first thesaurus, obtain the mobile terminal The information within; generate the first input candidate word (eg: 46%) according to the obtained information.
本实施例中,进一步将所述用户输入的字符串和根据获取的信息生成第一输入候选词进行组合,生成第三输入候选词(如:电量46%)。所述第三输入候选词包含所述第一输入候选词。本实施例中用户输入的字符串是根据用户输入的信息进行识别后得到的识别结果。鉴于第一输入候选词根据用户输入的字符获得,优选地,第三输入候选词为所述用户输入的字符在前,第一输入候选词在后组成的候选词。In this embodiment, the character string input by the user is further combined with the first candidate input word generated according to the acquired information to generate a third candidate input word (for example: battery 46%). The third input candidate includes the first input candidate. In this embodiment, the character string input by the user is a recognition result obtained after recognition is performed according to the information input by the user. In view of the fact that the first input candidate word is obtained according to the characters input by the user, preferably, the third input candidate word is a candidate word composed of the characters input by the user first and the first input candidate word later.
步骤180,将所述第一输入候选词、第三输入候选词、对所述信息进行识别后得到的识别结果按照预设规则排列并输出。Step 180, arranging and outputting the first input candidate word, the third input candidate word, and the recognition result obtained after identifying the information according to preset rules.
最后,所述第一输入候选词、第三输入候选词和对所述信息进行识别后得到的识别结果按照预设规则排列并输出。步骤120中,通过调用移动终端内预置的字符识别引擎对步骤110中检测到的用户输入的信息进行识别,可以得到所述信息的识别结果。Finally, the first input candidate word, the third input candidate word and the recognition result obtained after recognizing the information are arranged according to preset rules and output. In step 120, the information input by the user detected in step 110 is recognized by invoking a character recognition engine preset in the mobile terminal to obtain a recognition result of the information.
仍以拼音输入为例,在用户输入拼音时,首先检测用户输入的信息。在用户输入“dianliang”之后,会获取到字符串“dianliang”,步骤120中判断输入的信息不符合预设条件,则调用移动终端中预设的字符识别引擎对所述信息进行识别,将得到的识别结果作为用户输入的字符串。例如:调用拼音输入引擎对“dianliang”进行识别,得到拼音的候选词,例如:电量、点亮、掂量等,所有拼音的候选词分别作为用户输入的字符串。以用户输入的字符是“电量”为例,经过步骤130至步骤150处理之后,会得到如“46%”作为第一输入候选词。本步骤中将用户输入的字符“电量”和根据该用户输入的字符获得的第一候选词“46%”进行组合,得到第三输入候选词“电量46%”。最后,按照预设规则输出“46%”、“电量46%”、“电量”、“点亮”等候选词,便于用户选择。Still taking pinyin input as an example, when the user inputs pinyin, the information input by the user is first detected. After the user enters "dianliang", the character string "dianliang" will be obtained. In step 120, it is judged that the input information does not meet the preset conditions, and the character recognition engine preset in the mobile terminal is called to recognize the information, and the obtained The recognition result is used as a string entered by the user. For example: call the pinyin input engine to identify "dianliang", and get the candidate words of pinyin, such as: battery, lighting, weighing, etc., and all the candidate words of pinyin are respectively used as character strings input by the user. Taking the character input by the user as "electricity" as an example, after processing from step 130 to step 150, such as "46%" will be obtained as the first input candidate word. In this step, the character "power" input by the user is combined with the first candidate word "46%" obtained from the character input by the user to obtain the third input candidate word "power 46%". Finally, output candidate words such as "46%", "power 46%", "power" and "light up" according to preset rules, which is convenient for users to choose.
本发明的实施例,通过调用输入法引擎对用户输入的信息进行识别,得到用户输入的字符,然后将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词,并进一步将识别得到的用户输入的字符和第一输入候选词组合成第三输入候选词,便于用户进行选择输入,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。In the embodiment of the present invention, the information input by the user is identified by calling the input method engine to obtain the characters input by the user, and then the character string input by the user is matched with the keywords in the preset first thesaurus; The information acquisition interface corresponding to the successfully matched keyword in a thesaurus acquires the information in the mobile terminal; generates the first input candidate word according to the acquired information, and further combines the recognized character input by the user and the first input candidate phrase Synthesizing the third input candidate words is convenient for users to select and input. Compared with the prior art, it solves the problem that the input content is single and cannot meet the needs of users to input diversified content, and at the same time improves the input efficiency.
实施例五:Embodiment five:
相应地,本发明还公开了一种移动终端,如图5所示,包括:Correspondingly, the present invention also discloses a mobile terminal, as shown in FIG. 5 , including:
第一匹配模块530,用于将用户输入的字符串与预设的第一词库中的关键字匹配;The first matching module 530 is used to match the character string input by the user with the keywords in the preset first thesaurus;
信息获取模块540,用于通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;An information acquisition module 540, configured to acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keyword in the first thesaurus;
第一候选生成模块550,用于根据所述信息获取模块540获取的信息生成第一输入候选词。The first candidate generation module 550 is configured to generate a first input candidate word according to the information acquired by the information acquisition module 540 .
具体实施时,在将用户输入的字符串与预设的第一词库中的关键字匹配之前,所述移动终端需要设置有第一词库。所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。During specific implementation, before the character string input by the user is matched with the keywords in the preset first thesaurus, the mobile terminal needs to be provided with the first thesaurus. The first thesaurus includes: keywords, and an information acquisition interface corresponding to the keywords.
具体实施时,所述信息获取模块540,进一步包括:During specific implementation, the information acquisition module 540 further includes:
确定子模块,用于确定与所述关键字对应的信息获取接口;A determining submodule, configured to determine an information acquisition interface corresponding to the keyword;
读取子模块,用于调用所述确定子模块确定的信息获取接口获取移动终端内的信息。The reading sub-module is used to call the information acquisition interface determined by the determining sub-module to acquire information in the mobile terminal.
信息获取接口读取到的数据可以直接作为候选词,如调用“读取电池剩余电量”接口时返回“46%”,则可以将“46%”直接作为候选词。The data read by the information acquisition interface can be directly used as a candidate word. For example, if "46%" is returned when the interface "reading the remaining battery power" is called, then "46%" can be directly used as a candidate word.
在另一种情况下,信息获取接口读取到的移动终端内的信息以类、数据包等形式返回时,需要提取数据包或类中的有用数据,并生成第一输入候选词。或者,信息获取接口返回的数据格式复杂,不便于用户浏览时,优选地,所述第一候选生成模块550,进一步用于解析获取的所述信息并进行后处理,生成第一输入候选词。通过对信息获取接口返回的数据进行解析、后处理,可以进一步改善用户体验。In another case, when the information in the mobile terminal read by the information acquisition interface is returned in the form of classes, data packets, etc., it is necessary to extract useful data in the data packets or classes, and generate the first input candidate word. Alternatively, when the format of the data returned by the information acquisition interface is complex and inconvenient for users to browse, preferably, the first candidate generating module 550 is further configured to analyze the acquired information and perform post-processing to generate first input candidate words. By analyzing and post-processing the data returned by the information acquisition interface, the user experience can be further improved.
本发明的实施例通过,将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词,便于用户进行选择输入,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。In the embodiment of the present invention, the character string input by the user is matched with the keywords in the preset first thesaurus; through the information acquisition interface corresponding to the successfully matched keywords in the first thesaurus, the mobile terminal The information within; the first input candidate word is generated according to the obtained information, which is convenient for the user to select and input. Compared with the existing technology, it solves the problem that the input content is single and cannot meet the needs of users to input diverse content, and at the same time improves the input efficiency. .
实施例六:Embodiment six:
基于实施例五,本发明的另一实施例中,如图6所示,所述移动终端包括以下模块。Based on the fifth embodiment, in another embodiment of the present invention, as shown in FIG. 6 , the mobile terminal includes the following modules.
第一词库建立模块500,用于创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。The first thesaurus building module 500 is configured to create a first thesaurus, the first thesaurus includes: keywords, and an information acquisition interface corresponding to the keywords.
所述标识设备信息的关键字可以包括:标识设备硬件信息的关键字、标识设备存储数据的关键字中的一种或多种。为了提高输入效率,预先选择输入频率较高或对用户意义较大的设备信息作为联想输入的对象,并提取标识该设备信息的关键字,如:分辨率、屏幕尺寸、品牌、几核、电量等。与所述关键字对应的信息获取接口可以为:移动终端自带的设备信息读取接口、预先编写的设备信息读取函数、预先编写的设备信息读取库、第三方应用接口等中的任意一种或多种。The keyword identifying device information may include: one or more of: a keyword identifying device hardware information, and a keyword identifying device storage data. In order to improve input efficiency, pre-select device information with high input frequency or great significance to users as the object of association input, and extract keywords identifying the device information, such as: resolution, screen size, brand, several cores, power Wait. The information acquisition interface corresponding to the keyword may be any of: a device information reading interface provided by the mobile terminal, a pre-written device information reading function, a pre-written device information reading library, a third-party application interface, etc. one or more.
检测模块510,用于检测用户输入的信息;A detection module 510, configured to detect information input by the user;
转换模块520,用于判断所述检测模块获得的信息是否符合预设条件,若所述检测模块510获得的信息符合预设条件,则将所述信息作为用户输入的字符串;若所述检测模块510获得的信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。The conversion module 520 is used to judge whether the information obtained by the detection module meets the preset conditions, and if the information obtained by the detection module 510 meets the preset conditions, then use the information as a character string input by the user; if the detected If the information obtained by module 510 does not meet the preset conditions, the recognition result obtained after recognizing the information is used as the character string input by the user.
所述预设条件为:输入信息为候选字或候选词。The preset condition is: the input information is a candidate word or a candidate word.
对信息进行识别时可以调用移动终端内的字符识别引擎,包括但不限于:拼音输入引擎、笔画输入引擎、手写输入引擎、字根输入引擎中的一种。When identifying information, a character recognition engine in the mobile terminal may be invoked, including but not limited to: one of a pinyin input engine, a stroke input engine, a handwriting input engine, and a radical input engine.
若所述信息不符合预设条件,调用移动终端中预设的字符识别引擎对所述信息进行识别,得到用户输入的字符串。仍以拼音输入为例,若输入信息为“dianliang”,调用拼音输入引擎对“dianliang”进行识别,得到拼音的候选词,例如:电量、点亮、掂量等,所有候选词分别作为用户输入的字符串。If the information does not meet the preset conditions, call the preset character recognition engine in the mobile terminal to identify the information, and obtain the character string input by the user. Still taking pinyin input as an example, if the input information is "dianliang", call the pinyin input engine to recognize "dianliang", and get the candidate words of pinyin, such as: battery, light, weighing, etc., and all the candidate words are used as the user input string.
若所述信息符合预设条件,则将所述信息作为用户输入的字符串。If the information meets the preset condition, the information is used as a character string input by the user.
第一匹配模块530,用于将用户输入的字符串与预设的第一词库中的关键字匹配。The first matching module 530 is configured to match the character string input by the user with the keywords in the preset first thesaurus.
第一匹配模块530的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first matching module 530, refer to Embodiment 5, which will not be repeated here.
信息获取模块540,用于通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。The information acquisition module 540 is configured to acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keywords in the first thesaurus.
信息获取模块540的具体实现方案参见实施例五,此处不再赘述。For the specific implementation scheme of the information acquisition module 540, refer to Embodiment 5, which will not be repeated here.
第一候选生成模块550,用于根据所述信息获取模块540获取的信息生成第一输入候选词。The first candidate generation module 550 is configured to generate a first input candidate word according to the information acquired by the information acquisition module 540 .
第一候选生成模块550的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first candidate generation module 550, refer to Embodiment 5, which will not be repeated here.
具体实施时,本发明还可以应用在笔画输入、字根输入、手写输入、甚至是语音输入等输入法引擎中。During specific implementation, the present invention can also be applied in input method engines such as stroke input, radical input, handwriting input, and even voice input.
本实施例通过和输入法引擎相结合,在没有选择候选词之前即进行设备信息输入,减少了输入步骤,进一步提高了输入效率。In this embodiment, by combining with the input method engine, device information is input before candidate words are selected, which reduces input steps and further improves input efficiency.
实施例七:Embodiment seven:
基于前述实施例,本发明的另一实施例中,如图7所示,所述移动终端包括以下模块。Based on the foregoing embodiments, in another embodiment of the present invention, as shown in FIG. 7 , the mobile terminal includes the following modules.
第一词库建立模块500,用于创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。The first thesaurus building module 500 is configured to create a first thesaurus, the first thesaurus includes: keywords, and an information acquisition interface corresponding to the keywords.
创建第一词库的具体实现方案参见方法实施例和实施例六,此处不再赘述。For the specific implementation scheme of creating the first thesaurus, refer to the method embodiment and embodiment 6, which will not be repeated here.
检测模块510,用于检测用户输入的信息;A detection module 510, configured to detect information input by the user;
转换模块520,判断所述检测模块获得的信息是否符合预设条件,若所述检测模块510获得的信息符合预设条件,则将所述信息作为用户输入的字符串;若所述检测模块510获得的信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。The conversion module 520 judges whether the information obtained by the detection module meets the preset conditions. If the information obtained by the detection module 510 meets the preset conditions, the information is used as a character string input by the user; if the detection module 510 If the obtained information does not meet the preset condition, the recognition result obtained after recognizing the information is used as the character string input by the user.
检测模块510和转换模块520的具体实现方案参见实施例六中的相应模块,此处不再赘述。For the specific implementation solutions of the detection module 510 and the conversion module 520, refer to the corresponding modules in Embodiment 6, which will not be repeated here.
第一匹配模块530,用于将用户输入的字符串与预设的第一词库中的关键字匹配。The first matching module 530 is configured to match the character string input by the user with the keywords in the preset first thesaurus.
第一匹配模块530的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first matching module 530, refer to Embodiment 5, which will not be repeated here.
信息获取模块540,用于通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。The information acquisition module 540 is configured to acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keywords in the first thesaurus.
信息获取模块540的具体实现方案参见实施例五,此处不再赘述。For the specific implementation scheme of the information acquisition module 540, refer to Embodiment 5, which will not be repeated here.
第一候选生成模块550,用于根据所述信息获取模块540获取的信息生成第一输入候选词。The first candidate generation module 550 is configured to generate a first input candidate word according to the information acquired by the information acquisition module 540 .
第一候选生成模块550的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first candidate generation module 550, refer to Embodiment 5, which will not be repeated here.
第一混合输出模块560,用于将所述第一候选生成模块550生成的所述第一输入候选词和根据预设的第二词库匹配获得的第二输入候选词按照预设规则排列并输出。The first mixed output module 560 is configured to arrange the first input candidate words generated by the first candidate generation module 550 and the second input candidate words obtained according to the preset second thesaurus matching according to preset rules and output.
上述预设第二词库为根据输入语言的词频或者上下文关联建立的联想词库。通常,所述联想词库中包括:关键词和候选词的对应关系表。在进行匹配时,以检测到的用户输入的字符串作为关键字,分别与预设第二词库中的各关键词进行匹配,若匹配成功,则根据对应关系表查找匹配成功的关键词对应的候选词,作为所述关键字关联的第二输入候选词。关键字匹配的具体方式可以为完全匹配或部分匹配或模糊匹配等,根据输入需要设置,本发明对此不做限定。The aforementioned second preset thesaurus is an associative thesaurus established according to word frequency or context association of the input language. Usually, the associative thesaurus includes: a table of correspondences between keywords and candidate words. When matching, use the detected character string input by the user as a keyword to match with each keyword in the preset second thesaurus, if the match is successful, then search for the corresponding keyword corresponding to the successful match according to the corresponding relationship table The candidate word of is used as the second input candidate word associated with the keyword. The specific manner of keyword matching can be complete match, partial match or fuzzy match, etc., which can be set according to input requirements, and the present invention does not limit this.
在得到用户输入的字符串之后,即可以将用户输入的字符串作为关键字,分别与预设第二词库中的各关键词进行匹配,以查找与所述关键词对应的候选词。然后,将查找到的与所述关键词对应的候选词和和第一候选生成模块550动态生成的所述第一输入候选词按照预设的规则混合排序,然后输出,便于用户进行选择输入。After the character string input by the user is obtained, the character string input by the user can be used as a keyword to be matched with each keyword in the preset second thesaurus, so as to find candidate words corresponding to the keyword. Then, the searched candidate words corresponding to the keywords and the first input candidate words dynamically generated by the first candidate generation module 550 are mixed and sorted according to preset rules, and then output, which is convenient for the user to select and input.
本实施例通过结合固定的预设第二词库和与设备信息相关的预设的第一词库,将在预设第二词库中匹配查找得到的候选词和在预设的第一词库中匹配并动态生成的候选词混合输出,既满足了用户根据普适的上下文或词频进行快速输入的需求,又满足了用户快速输入设备信息的需求,增加了候选词的可选性,进一步提高了输入效率,同时改善了用户体验。In this embodiment, by combining the fixed preset second thesaurus and the preset first thesaurus related to device information, the candidate words found in the preset second thesaurus will be matched with the preset first word The mixed output of candidate words matched and dynamically generated in the library not only meets the user's needs for fast input according to the universal context or word frequency, but also meets the user's needs for fast input of device information, increases the selectivity of candidate words, and further Improve input efficiency and improve user experience at the same time.
实施例八:Embodiment eight:
基于前述实施例,本发明的另一实施例中,若转换模块520中用户输入的信息不符合预设条件,所述移动终端还包括:组合模块570和第二混合输出模块580。Based on the foregoing embodiments, in another embodiment of the present invention, if the information input by the user in the conversion module 520 does not meet the preset conditions, the mobile terminal further includes: a combination module 570 and a second mixing output module 580 .
如图8所示,所述移动终端包括以下模块。As shown in Fig. 8, the mobile terminal includes the following modules.
第一词库建立模块500,用于创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。The first thesaurus building module 500 is configured to create a first thesaurus, the first thesaurus includes: keywords, and an information acquisition interface corresponding to the keywords.
创建第一词库的具体实现方案参见方法实施例和实施例六,此处不再赘述。For the specific implementation scheme of creating the first thesaurus, refer to the method embodiment and embodiment 6, which will not be repeated here.
检测模块510,用于检测用户输入的信息;A detection module 510, configured to detect information input by the user;
转换模块520,判断所述检测模块获得的信息是否符合预设条件,若所述检测模块510获得的信息符合预设条件,则将所述信息作为用户输入的字符串;若所述检测模块510获得的信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。The conversion module 520 judges whether the information obtained by the detection module meets the preset conditions. If the information obtained by the detection module 510 meets the preset conditions, the information is used as a character string input by the user; if the detection module 510 If the obtained information does not meet the preset condition, the recognition result obtained after recognizing the information is used as the character string input by the user.
检测模块510和转换模块520的具体实现方案参见实施例六中的相应模块,此处不再赘述。For the specific implementation solutions of the detection module 510 and the conversion module 520, refer to the corresponding modules in Embodiment 6, which will not be repeated here.
第一匹配模块530,用于将用户输入的字符串与预设的第一词库中的关键字匹配。The first matching module 530 is configured to match the character string input by the user with the keywords in the preset first thesaurus.
第一匹配模块530的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first matching module 530, refer to Embodiment 5, which will not be repeated here.
信息获取模块540,用于通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息。The information acquisition module 540 is configured to acquire information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keywords in the first thesaurus.
信息获取模块540的具体实现方案参见实施例五,此处不再赘述。For the specific implementation scheme of the information acquisition module 540, refer to Embodiment 5, which will not be repeated here.
第一候选生成模块550,用于根据所述信息获取模块540获取的信息生成第一输入候选词。The first candidate generation module 550 is configured to generate a first input candidate word according to the information acquired by the information acquisition module 540 .
第一候选生成模块550的具体实现方案参见实施例五,此处不再赘述。For a specific implementation solution of the first candidate generation module 550, refer to Embodiment 5, which will not be repeated here.
组合模块570,用于组合所述用户输入的字符串和所述第一输入候选词生成第三输入候选词。A combining module 570, configured to combine the character string input by the user and the first input candidate word to generate a third input candidate word.
本实施例中,进一步将所述用户输入的字符串和根据获取的信息生成第一输入候选词进行组合,生成第三输入候选词。所述第三输入候选词包含所述第一输入候选词。本实施例中用户输入的字符串是根据用户输入的信息进行识别后得到的识别结果。鉴于第一输入候选词根据用户输入的字符获得,优选地,第三输入候选词为所述用户输入的字符在前,第一输入候选词在后组成的候选词。In this embodiment, the character string input by the user is further combined with the first input candidate word generated according to the acquired information to generate a third input candidate word. The third input candidate includes the first input candidate. In this embodiment, the character string input by the user is a recognition result obtained after recognition is performed according to the information input by the user. In view of the fact that the first input candidate word is obtained according to the characters input by the user, preferably, the third input candidate word is a candidate word composed of the characters input by the user first and the first input candidate word later.
第二混合输出模块580,用于将所述第一输入候选词、第三输入候选词和对所述信息进行识别后得到的识别结果按照预设规则排列并输出。通过调用移动终端内预置的字符识别引擎对检测模块510检测到的用户输入的信息进行识别,可以得到所述信息的识别结果。The second mixed output module 580 is configured to arrange and output the first input candidate word, the third input candidate word and the recognition result obtained after recognizing the information according to preset rules. By invoking a character recognition engine preset in the mobile terminal to recognize the information input by the user detected by the detection module 510, the recognition result of the information can be obtained.
本发明的实施例,通过调用输入法引擎对用户输入的信息进行识别,得到用户输入的字符,然后将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词,并进一步将识别得到的用户输入的字符和第一输入候选词组合成第三输入候选词,便于用户进行选择输入,与现有技术相比,解决了输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。In the embodiment of the present invention, the information input by the user is identified by calling the input method engine to obtain the characters input by the user, and then the character string input by the user is matched with the keywords in the preset first thesaurus; The information acquisition interface corresponding to the successfully matched keyword in a thesaurus acquires the information in the mobile terminal; generates the first input candidate word according to the acquired information, and further combines the recognized character input by the user and the first input candidate phrase Synthesizing the third input candidate words is convenient for users to select and input. Compared with the prior art, it solves the problem that the input content is single and cannot meet the needs of users to input diversified content, and at the same time improves the input efficiency.
实施例九:Embodiment nine:
图9是本发明另一个实施例的移动终端的框图。图7所示的移动终端900包括:至少一个处理器901、存储器902、至少一个网络接口904和用户接口903、总线系统905。移动终端900中的各个组件通过总线系统905耦合在一起。可理解,总线系统905用于实现这些组件之间的连接通信。总线系统905除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图9中将各种总线都标为总线系统905。FIG. 9 is a block diagram of a mobile terminal according to another embodiment of the present invention. The mobile terminal 900 shown in FIG. 7 includes: at least one processor 901 , memory 902 , at least one network interface 904 and user interface 903 , and a bus system 905 . Various components in the mobile terminal 900 are coupled together through a bus system 905 . It can be understood that the bus system 905 is used to realize connection and communication between these components. In addition to the data bus, the bus system 905 also includes a power bus, a control bus and a status signal bus. However, the various buses are labeled as bus system 905 in FIG. 9 for clarity of illustration.
其中,用户接口903可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板、触摸屏或者触控板等。Wherein, the user interface 903 may include a display, a keyboard, or a pointing device (for example, a mouse, a trackball (trackball), a touch panel, a touch screen, or a touchpad, and the like.
可以理解,本发明实施例中的存储器902可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-OnlyMemory,ROM)、可编程只读存储器(ProgrammableROM,PROM)、可擦除可编程只读存储器(ErasablePROM,EPROM)、电可擦除可编程只读存储器(ElectricallyEPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(RandomAccessMemory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(StaticRAM,SRAM)、动态随机存取存储器(DynamicRAM,DRAM)、同步动态随机存取存储器(SynchronousDRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(DoubleDataRate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(SynchlinkDRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambusRAM,DRRAM)。本文描述的系统和方法的存储器902旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 902 in this embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the non-volatile memory can be read-only memory (Read-OnlyMemory, ROM), programmable read-only memory (ProgrammableROM, PROM), erasable programmable read-only memory (ErasablePROM, EPROM), electrically erasable Programming read-only memory (Electrically EPROM, EEPROM) or flash memory. The volatile memory may be random access memory (Random Access Memory, RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DoubleDataRate SDRAM, DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced SDRAM, ESDRAM), Synchronous Connection Dynamic Random Access Memory (SynchlinkDRAM, SLDRAM) and Direct Memory Bus Random Access Memory Access memory (DirectRambusRAM, DRRAM). Memory 902 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器902存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统9021和应用程序9022。本实施例中,存储器902还用于存储预设的第一词库和预设第二词库。In some implementations, the memory 902 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 9021 and an application program 9022 . In this embodiment, the memory 902 is also used to store a preset first thesaurus and a preset second thesaurus.
其中,操作系统9021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序9022,包含各种应用程序,例如媒体播放器(MediaPlayer)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序9022中。Among them, the operating system 9021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 9022 includes various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 9022 .
在本发明实施例中,通过调用存储器902存储的程序或指令,具体的,可以是应用程序9022中存储的程序或指令。通过用户接口903中的触摸屏检测用户使用应用程序的操作,例如检测用户选择待输入的第一候选词的操作。处理器901用于将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词。In the embodiment of the present invention, the programs or instructions stored in the memory 902 are invoked, specifically, the programs or instructions stored in the application program 9022 may be used. The user's operation of using the application program is detected through the touch screen in the user interface 903 , for example, the user's operation of selecting the first candidate word to be input is detected. The processor 901 is configured to match the character string input by the user with the keywords in the preset first thesaurus; through the information acquisition interface corresponding to the successfully matched keywords in the first thesaurus, obtain the information in the mobile terminal. information; generating a first input candidate word according to the obtained information.
上述本发明实施例揭示的方法部分可以应用于处理器901中,或者由处理器901实现。处理器901可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器901中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器901可以是通用处理器、数字信号处理器(DigitalSignalProcessor,DSP)、专用集成电路(ApplicationSpecific IntegratedCircuit,ASIC)、现成可编程门阵列(FieldProgrammableGateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器902,处理器901读取存储器902中的用户对应用程序的使用次数,结合其硬件完成上述方法的步骤。Part of the methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 901 or implemented by the processor 901 . The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 901 or instructions in the form of software. The above-mentioned processor 901 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates Or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. The storage medium is located in the memory 902, and the processor 901 reads the number of times the user uses the application program in the memory 902, and completes the steps of the above method in combination with its hardware.
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecificIntegratedCircuits,ASIC)、数字信号处理器(DigitalSignalProcessing,DSP)、数字信号处理设备(DSPDevice,DSPD)、可编程逻辑设备(ProgrammableLogicDevice,PLD)、现场可编程门阵列(Field-ProgrammableGateArray,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application-specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSPDevice, DSPD), programmable logic device (ProgrammableLogicDevice, PLD ), Field-Programmable Gate Array (Field-Programmable GateArray, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application, or a combination thereof.
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
在本发明的一个具体实施例中,处理器901还用于:创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。In a specific embodiment of the present invention, the processor 901 is further configured to: create a first thesaurus, the first thesaurus including: keywords, and information acquisition interfaces corresponding to the keywords.
可选地,所述根据获取的信息生成第一输入候选词时,所述处理器901具体用于:解析获取的所述信息并进行后处理,生成第一输入候选词。Optionally, when generating the first input candidate words according to the acquired information, the processor 901 is specifically configured to: parse the acquired information and perform post-processing to generate the first input candidate words.
可选地,所述处理器901还用于:检测用户输入的信息;判断所述信息是否符合预设条件,若所述信息符合预设条件,则将所述信息作为用户输入的字符串;若所述信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。Optionally, the processor 901 is further configured to: detect information input by the user; judge whether the information meets a preset condition, and if the information meets the preset condition, use the information as a character string input by the user; If the information does not meet the preset condition, the identification result obtained after identifying the information is used as the character string input by the user.
可选地,所述处理器901还用于:将生成的所述第一输入候选词和根据预设的第二词库对用户输入的字符串进行匹配获得的第二输入候选词按照预设规则排列并输出。Optionally, the processor 901 is further configured to: match the generated first input candidate word with the second input candidate word obtained by matching the character string input by the user according to the preset second thesaurus according to the preset Rules are arranged and output.
所述预设的第一词库中的关键字包括:标识设备硬件信息的关键字、标识设备存储数据的关键字中的一种或多种。The keywords in the preset first thesaurus include: one or more of keywords identifying device hardware information and keywords identifying device storage data.
可选地,所述处理器901还用于组合所述用户输入的字符串和所述第一输入候选词生成第三输入候选词;将所述第一输入候选词、第三输入候选词和对所述信息进行识别后得到的识别结果按照预设规则排列并输出。Optionally, the processor 901 is further configured to combine the character string input by the user and the first input candidate word to generate a third input candidate word; combine the first input candidate word, the third input candidate word and The recognition results obtained after recognizing the information are arranged and output according to preset rules.
移动终端900能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。通过本实施例,解决了现有技术中输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。The mobile terminal 900 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here. Through this embodiment, the problem that the input content in the prior art is single and cannot meet the user's demand for inputting diverse content is solved, and the input efficiency is improved at the same time.
实施例十:Embodiment ten:
图10是本发明另一个实施例的移动终端的结构示意图。具体地,图10中的移动终端可以为手机、平板电脑、个人数字助理(PersonalDigitalAssistant,PDA)、或车载电脑等。Fig. 10 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. Specifically, the mobile terminal in FIG. 10 may be a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), or a vehicle-mounted computer.
图10中的移动终端包括射频(RadioFrequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、处理器1060、音频电路1070、WiFi(WirelessFidelity)模块1080和电源1090。The mobile terminal in FIG. 10 includes a radio frequency (Radio Frequency, RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a processor 1060, an audio circuit 1070, a WiFi (Wireless Fidelity) module 1080 and a power supply 1090.
其中,输入单元1030可用于接收用户输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元1030可以包括触控面板1031。触控面板1031,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器1060,并能接收处理器1060发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 1030 can be used to receive number or character information input by the user, and generate signal input related to user setting and function control of the mobile terminal. Specifically, in the embodiment of the present invention, the input unit 1030 may include a touch panel 1031 . The touch panel 1031, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 1031 using any suitable object or accessory such as a finger, a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 1031 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1060, and can receive and execute commands sent by the processor 1060. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.
其中,显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及移动终端1000的各种菜单界面。显示单元1040可包括显示面板1041,可选的,可以采用LCD或有机发光二极管(OrganicLight-EmittingDiode,OLED)等形式来配置显示面板1041。Wherein, the display unit 1040 can be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 1000 . The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).
应注意,触控面板1031可以覆盖显示面板1041,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器1060以确定触摸事件的类型,随后处理器1060根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 1031 can cover the display panel 1041 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 1060 to determine the type of the touch event, and then the processor 1060 provides corresponding visual output on the touch display screen according to the type of the touch event.
触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.
其中处理器1060是移动终端1000的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器1021内的软件程序和/或模块,以及调用存储在第二存储器1022内的数据,执行移动终端1000的各种功能和处理数据,从而对移动终端1000进行整体监控。可选的,处理器1060可包括一个或多个处理单元。Wherein the processor 1060 is the control center of the mobile terminal 1000, which uses various interfaces and lines to connect the various parts of the entire mobile phone, by running or executing the software programs and/or modules stored in the first memory 1021, and calling the software programs and/or modules stored in the second memory 1021. The data in the memory 1022 executes various functions of the mobile terminal 1000 and processes data, so as to monitor the mobile terminal 1000 as a whole. Optionally, the processor 1060 may include one or more processing units.
在本发明实施例中,通过调用存储该第一存储器1021内的软件程序和/或模块和/或该第二存储器1022内的数据,处理器1060用于将用户输入的字符串与预设的第一词库中的关键字匹配;通过所述第一词库中与匹配成功的关键字对应的信息获取接口,获取移动终端内的信息;根据获取的信息生成第一输入候选词。In the embodiment of the present invention, the processor 1060 is used to combine the character string input by the user with the preset matching keywords in the first thesaurus; acquiring information in the mobile terminal through an information acquisition interface corresponding to the successfully matched keywords in the first thesaurus; generating first input candidate words according to the acquired information.
在本发明的一个具体实施例中,处理器1060还用于:创建第一词库,所述第一词库中包括:关键字,与所述关键字对应的信息获取接口。In a specific embodiment of the present invention, the processor 1060 is further configured to: create a first thesaurus, the first thesaurus including: keywords, and information acquisition interfaces corresponding to the keywords.
可选地,所述根据获取的信息生成第一输入候选词时,所述处理器1060具体用于:解析获取的所述信息并进行后处理,生成第一输入候选词。Optionally, when generating the first input candidate words according to the acquired information, the processor 1060 is specifically configured to: parse the acquired information and perform post-processing to generate the first input candidate words.
可选地,所述处理器1060还用于:检测用户输入的信息;判断所述信息是否符合预设条件,若所述信息符合预设条件,则将所述信息作为用户输入的字符串;若所述信息不符合预设条件,则将对所述信息进行识别后得到的识别结果作为用户输入的字符串。Optionally, the processor 1060 is further configured to: detect information input by the user; determine whether the information meets a preset condition, and if the information meets the preset condition, use the information as a character string input by the user; If the information does not meet the preset condition, the identification result obtained after identifying the information is used as the character string input by the user.
可选地,所述处理器1060还用于:将生成的所述第一输入候选词和根据预设的第二词库对用户输入的字符串进行匹配获得的第二输入候选词按照预设规则排列并输出。Optionally, the processor 1060 is further configured to: match the generated first input candidate word with the second input candidate word obtained by matching the character string input by the user according to the preset second thesaurus according to the preset Rules are arranged and output.
可选地,所述处理器1060还用于:组合所述用户输入的字符串和所述第一输入候选词生成第三输入候选词;将所述第一输入候选词、第三输入候选词和对所述信息进行识别后得到的识别结果按照预设规则排列并输出。Optionally, the processor 1060 is further configured to: combine the character string input by the user and the first input candidate word to generate a third input candidate word; combine the first input candidate word, the third input candidate word And the identification results obtained after identifying the information are arranged and output according to preset rules.
所述预设的第一词库中的关键字包括:标识设备硬件信息的关键字、标识设备存储数据的关键字中的一种或多种。The keywords in the preset first thesaurus include: one or more of keywords identifying device hardware information and keywords identifying device storage data.
可见,通过本实施例,解决了现有技术中输入内容单一,无法满足用户输入多样化内容的需求问题,同时提高了输入效率。It can be seen that, through this embodiment, the problem in the prior art that the input content is single and cannot meet the user's demand for inputting diverse content is solved, and the input efficiency is improved at the same time.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的移动终端的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the mobile terminal described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于移动终端实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the mobile terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to the part of the description of the method embodiment.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610190529.3A CN105867649B (en) | 2016-03-29 | 2016-03-29 | A kind of input method and mobile terminal based on facility information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610190529.3A CN105867649B (en) | 2016-03-29 | 2016-03-29 | A kind of input method and mobile terminal based on facility information |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105867649A true CN105867649A (en) | 2016-08-17 |
CN105867649B CN105867649B (en) | 2019-03-05 |
Family
ID=56627621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610190529.3A Active CN105867649B (en) | 2016-03-29 | 2016-03-29 | A kind of input method and mobile terminal based on facility information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105867649B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108984701A (en) * | 2018-07-06 | 2018-12-11 | 郑州云海信息技术有限公司 | Data managing method and device in cloud data system |
CN110286775A (en) * | 2018-03-19 | 2019-09-27 | 北京搜狗科技发展有限公司 | A lexicon management method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101697098A (en) * | 2009-09-29 | 2010-04-21 | 深圳华为通信技术有限公司 | Method and terminal for inputting character |
CN101847159A (en) * | 2010-05-11 | 2010-09-29 | 中兴通讯股份有限公司 | Terminal equipment and method for updating word stock thereof |
CN102508903A (en) * | 2011-11-09 | 2012-06-20 | 中兴通讯股份有限公司 | Updating method for word bank of input method, character input method and terminal |
CN104917669A (en) * | 2015-05-29 | 2015-09-16 | 北京搜狗科技发展有限公司 | Information processing method and device |
-
2016
- 2016-03-29 CN CN201610190529.3A patent/CN105867649B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101697098A (en) * | 2009-09-29 | 2010-04-21 | 深圳华为通信技术有限公司 | Method and terminal for inputting character |
CN101847159A (en) * | 2010-05-11 | 2010-09-29 | 中兴通讯股份有限公司 | Terminal equipment and method for updating word stock thereof |
US20120296865A1 (en) * | 2010-05-11 | 2012-11-22 | Zte Corporation | Terminal device and word stock update method thereof |
CN102508903A (en) * | 2011-11-09 | 2012-06-20 | 中兴通讯股份有限公司 | Updating method for word bank of input method, character input method and terminal |
CN104917669A (en) * | 2015-05-29 | 2015-09-16 | 北京搜狗科技发展有限公司 | Information processing method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110286775A (en) * | 2018-03-19 | 2019-09-27 | 北京搜狗科技发展有限公司 | A lexicon management method and device |
CN108984701A (en) * | 2018-07-06 | 2018-12-11 | 郑州云海信息技术有限公司 | Data managing method and device in cloud data system |
Also Published As
Publication number | Publication date |
---|---|
CN105867649B (en) | 2019-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10489508B2 (en) | Incremental multi-word recognition | |
US9026428B2 (en) | Text/character input system, such as for use with touch screens on mobile phones | |
CN106598266B (en) | Method and system for multilingual mixed input | |
US7719521B2 (en) | Navigational interface providing auxiliary character support for mobile and wearable computers | |
CN106201177A (en) | A kind of operation execution method and mobile terminal | |
CN101576783B (en) | User interface, equipment and method for hand input | |
US9009624B2 (en) | Keyboard gestures for character string replacement | |
CN101882007A (en) | Method and device for carrying out information input and execution based on input interface | |
CN105468256A (en) | Input method keyboard switching method and device | |
CN106095751A (en) | The knowledge mistake processing method of a kind of word input and mobile terminal | |
CN107479822A (en) | A kind of data inputting method and terminal | |
CN106095128A (en) | The character input method of a kind of mobile terminal and mobile terminal | |
CN107179838B (en) | Method for displaying candidate words and mobile terminal | |
CN106774985A (en) | A kind of literal processing method and mobile terminal | |
CN107368205A (en) | A kind of hand-written inputting method and mobile terminal | |
CN107193396A (en) | A kind of input method and mobile terminal | |
CN105867649A (en) | Input method based on equipment information and mobile terminal | |
CN107133308A (en) | The single generation method of one kind song and mobile terminal | |
CN106503061A (en) | One population message display method and mobile terminal | |
CN106210346A (en) | A kind of video calling information processing method and mobile terminal | |
CN107193394A (en) | The method and mobile terminal of a kind of text input | |
CN106202215A (en) | A kind of processing method showing element and mobile terminal | |
CN107608967A (en) | A kind of error character recognition methods and terminal | |
WO2014144388A1 (en) | Handling inappropriate input method use | |
CN106484136A (en) | A kind of vocabulary input method and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |