Movatterモバイル変換


[0]ホーム

URL:


CN109521889B - Input method and device, terminal and storage medium - Google Patents

Input method and device, terminal and storage medium
Download PDF

Info

Publication number
CN109521889B
CN109521889BCN201811145603.5ACN201811145603ACN109521889BCN 109521889 BCN109521889 BCN 109521889BCN 201811145603 ACN201811145603 ACN 201811145603ACN 109521889 BCN109521889 BCN 109521889B
Authority
CN
China
Prior art keywords
input
character
scene
tolerant
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811145603.5A
Other languages
Chinese (zh)
Other versions
CN109521889A (en
Inventor
白召
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Music Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Music Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Music Co Ltd, MIGU Culture Technology Co LtdfiledCriticalChina Mobile Communications Group Co Ltd
Priority to CN201811145603.5ApriorityCriticalpatent/CN109521889B/en
Publication of CN109521889ApublicationCriticalpatent/CN109521889A/en
Priority to PCT/CN2019/107363prioritypatent/WO2020063548A1/en
Application grantedgrantedCritical
Publication of CN109521889BpublicationCriticalpatent/CN109521889B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the invention discloses an input method and device, a terminal and a storage medium. The method comprises the following steps: when the virtual keyboard is called, determining a current input scene; determining a target character corresponding to the input scene and a fault-tolerant character corresponding to the target character in a virtual keyboard; determining characters to be input based on the detected input operation; and determining input characters according to the characters to be input, the target characters and the fault-tolerant characters.

Description

Translated fromChinese
一种输入方法及装置、终端及存储介质Input method and device, terminal and storage medium

技术领域technical field

本发明实施例涉及电子信息技术,涉及但不限于一种输入方法及装置、终端及存储介质。The embodiments of the present invention relate to electronic information technology, and relate to, but are not limited to, an input method and device, a terminal, and a storage medium.

背景技术Background technique

目前应用于智能终端的显示屏幕多为触控设计,当进行输入时,使用的是触控显示屏上显示的虚拟键盘。而虚拟键盘没有真实键盘的触感,使用时容易在输入的过程中出现误触,从而使输入的准确率降低,影响用户体验。At present, the display screens applied to smart terminals are mostly designed for touch control. When inputting, a virtual keyboard displayed on the touch screen display is used. However, the virtual keyboard does not have the tactile feeling of a real keyboard, and is prone to mistouch during the input process, thereby reducing the accuracy of the input and affecting the user experience.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例为解决现有技术中存在的至少一个问题而提供一种输入方法及装置、终端及存储介质。In view of this, embodiments of the present invention provide an input method and device, a terminal, and a storage medium to solve at least one problem existing in the prior art.

本发明实施例提供一种输入方法,该方法包括:An embodiment of the present invention provides an input method, and the method includes:

调用虚拟键盘时,确定当前的输入场景;When calling the virtual keyboard, determine the current input scene;

在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符;determining a target character corresponding to the input scene and a fault-tolerant character corresponding to the target character in the virtual keyboard;

基于检测到的输入操作,确定待输入字符;Based on the detected input operation, determine the character to be input;

根据所述待输入字符、所述目标字符和所述容错字符,确定输入字符。The input character is determined according to the to-be-input character, the target character and the error-tolerant character.

本发明实施例还提供一种输入装置,该装置包括:An embodiment of the present invention also provides an input device, the device comprising:

第一确定单元,配置为调用虚拟键盘时,确定当前的输入场景;The first determining unit is configured to determine the current input scene when calling the virtual keyboard;

第二确定单元,配置为在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符;a second determining unit, configured to determine, in the virtual keyboard, a target character corresponding to the input scene and an error-tolerant character corresponding to the target character;

第三确定单元,配置为基于检测到的输入操作,确定待输入字符;a third determination unit, configured to determine the character to be input based on the detected input operation;

第四确定单元,配置为根据所述待输入字符、所述目标字符和所述容错字符,确定输入字符。The fourth determination unit is configured to determine the input character according to the to-be-input character, the target character and the error-tolerant character.

本发明实施例还提供一种终端,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述输入方法中的步骤。An embodiment of the present invention further provides a terminal, including a memory and a processor, where the memory stores a computer program that can be run on the processor, and the processor implements the steps in the above input method when the processor executes the program.

本发明实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现上述输入方法中的步骤。Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in the above input method.

本发明技术方案,通过确定输入场景及输入场景所对应的目标字符,来确定目标字符对应的容错字符,从而将检测到的输入操作的待输入字符或将目标字符确定为输入字符。如此,可以根据输入场景实现输入容错,在输入错误的情况下也能快速将正确内容确定为输入字符,从而大大减少了输入错误的可能,防止误输入造成的不便,提升了用户的使用感受。The technical solution of the present invention is to determine the error-tolerant character corresponding to the target character by determining the input scene and the target character corresponding to the input scene, so as to determine the input character to be input or the target character of the detected input operation as the input character. In this way, input error tolerance can be realized according to the input scene, and the correct content can be quickly determined as the input character in the case of input error, thereby greatly reducing the possibility of input errors, preventing the inconvenience caused by wrong input, and improving the user experience.

附图说明Description of drawings

图1为本发明实施例的一种输入方法实现流程示意图;FIG. 1 is a schematic flowchart of an implementation of an input method according to an embodiment of the present invention;

图2为本发明实施例的另一种输入方法实现流程示意图;2 is a schematic flowchart of another input method implementation according to an embodiment of the present invention;

图3A为本发明实施例的又一种输入方法实现流程示意图;FIG. 3A is a schematic flowchart of another input method implementation according to an embodiment of the present invention;

图3B为本发明实施例中数字九宫格键盘示意图;3B is a schematic diagram of a digital nine-square grid keyboard in an embodiment of the present invention;

图3C为本发明实施例中全键盘示意图;3C is a schematic diagram of a full keyboard in an embodiment of the present invention;

图3D为本发明实施例的一种应用场景的示意图;FIG. 3D is a schematic diagram of an application scenario according to an embodiment of the present invention;

图3E为本发明实施例的又一应用场景的示意图;3E is a schematic diagram of another application scenario of an embodiment of the present invention;

图4为本发明实施例的一种输入装置的组成结构示意图;FIG. 4 is a schematic diagram of a composition structure of an input device according to an embodiment of the present invention;

图5为本发明实施例的智能终端的一种硬件实体示意图。FIG. 5 is a schematic diagram of a hardware entity of an intelligent terminal according to an embodiment of the present invention.

具体实施方式Detailed ways

随着互联网技术的快速发展,各类应用逐渐增多,为人们的工作和生活带来了很多便利。而在如今的移动互联网时代,智能终端逐渐成为人们工作和生活的重要工具。用户为了使用各种功能的应用,往往需要输入手机号码进行注册、登录或者接收验证码。With the rapid development of Internet technology, various applications have gradually increased, bringing a lot of convenience to people's work and life. In today's mobile Internet era, smart terminals have gradually become an important tool for people's work and life. In order to use applications with various functions, users often need to enter their mobile phone numbers to register, log in, or receive verification codes.

目前的智能终端通常采用触控式屏幕,当需要进行文字输入时,会在屏幕上显示虚拟键盘以供用户使用。而虚拟键盘在使用的过程中难免会出现误触。假设用户在输入手机号以获取验证码的过程中,由于误触而导致用户的手机无法收到验证码,而验证码的使用往往设置有有效期,因而当用户的手机号码输入错误后,需要等待几分钟才能重新输入并获取验证码,降低了使用效率,影响用户体验。The current smart terminal usually adopts a touch screen, and when text input is required, a virtual keyboard is displayed on the screen for the user to use. In the process of using the virtual keyboard, there will inevitably be accidental touches. Suppose the user is in the process of entering the mobile phone number to obtain the verification code, and the user's mobile phone cannot receive the verification code due to the wrong touch, and the use of the verification code is often set to have an expiration date. It takes a few minutes to re-enter and obtain the verification code, which reduces the use efficiency and affects the user experience.

下面结合附图和实施例对本发明的技术方案进一步详细阐述。The technical solutions of the present invention will be further elaborated below with reference to the accompanying drawings and embodiments.

本发明实施例提供一种输入方法,该方法用于智能终端中,该智能终端在执行该方法的时候能够根据当前输入场景,确定目标字符与容错字符,并根据输入操作确定最终的输入字符,该方法所实现的功能可以通过智能终端中的处理器调用程序代码来实现,当然程序代码可以保存在计算机存储介质中,可见,该智能终端至少包括处理器和存储介质。An embodiment of the present invention provides an input method, which is used in an intelligent terminal. When executing the method, the intelligent terminal can determine the target character and the error-tolerant character according to the current input scene, and determine the final input character according to the input operation, The functions implemented by the method can be implemented by calling the program code by the processor in the intelligent terminal. Of course, the program code can be stored in a computer storage medium. It can be seen that the intelligent terminal includes at least a processor and a storage medium.

图1为本发明实施例的输入方法实现流程示意图,如图1所示,该方法包括:FIG. 1 is a schematic diagram of an implementation flowchart of an input method according to an embodiment of the present invention. As shown in FIG. 1 , the method includes:

步骤S101、调用虚拟键盘时,确定当前的输入场景;Step S101, when calling the virtual keyboard, determine the current input scene;

虚拟键盘应用于带有触摸屏的智能终端上,当智能终端在非输入的场景下,一般无需显示虚拟键盘,当进入某种输入场景时,自动调用虚拟键盘。例如,当智能手机进入短信编辑场景时,会自动调用虚拟键盘,以供用户输入短信内容等。The virtual keyboard is applied to a smart terminal with a touch screen. When the smart terminal is in a non-input scenario, it is generally not necessary to display the virtual keyboard. When entering a certain input scenario, the virtual keyboard is automatically invoked. For example, when the smartphone enters the text message editing scene, the virtual keyboard will be automatically invoked for the user to input the text message and so on.

不同的输入场景可能会应用到不同的虚拟键盘或需要输入不同的内容。例如,当应用程序需要进行用户登录时,可能会进入用户账号密码输入场景;也有可能通过手机号码登录,从而进入手机号码输入场景,当输入完手机号时,应用程序可以向该手机号码发送验证码,而后进入验证码输入场景。Different input scenarios may apply to different virtual keyboards or require different input. For example, when the application needs to perform user login, it may enter the user account and password input scene; it is also possible to log in through the mobile phone number to enter the mobile phone number input scene. When the mobile phone number is entered, the application can send a verification to the mobile phone number. code, and then enter the verification code input scene.

在本实施例中,为了后续步骤有针对性地进行输入容错处理,应用程序需要在调用虚拟键盘时,确定当前的输入场景。In this embodiment, in order to perform input error tolerance processing in a targeted manner in subsequent steps, the application needs to determine the current input scene when invoking the virtual keyboard.

步骤S102、在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符;Step S102, determining the target character corresponding to the input scene and the error-tolerant character corresponding to the target character in the virtual keyboard;

在虚拟键盘中确定了输入场景后,可以根据输入场景确定对应的目标字符。这里的目标字符是指在当前输入场景下,预测出的用户最有可能期望输入的内容。例如,在手机号码输入场景下,尤其是输入手机号码获取验证码的场景下,此时用户最有可能输入本机的手机号码,以获取验证码,那么应用程序可以先通过手机的相关通信接口获取到本机号码,或者根据已有的本机号码记录来获取,并将该本机号码作为输入容错的标准。也就是说,应用程序可以将本机号码的每一位数字,作为当前手机号码输入场景的目标字符。After the input scene is determined in the virtual keyboard, the corresponding target character can be determined according to the input scene. The target character here refers to the predicted content that the user is most likely to expect to input under the current input scenario. For example, in the scenario of entering a mobile phone number, especially in the scenario of entering a mobile phone number to obtain a verification code, the user is most likely to enter the mobile phone number of the machine to obtain the verification code, then the application can first pass the relevant communication interface of the mobile phone. Obtain the own number, or obtain it according to the existing own number record, and use the own number as the input fault tolerance standard. That is to say, the application can use each digit of the phone number as the target character of the current mobile phone number input scene.

这样做可以依然为用户提供手动输入的场景,用户可以输入本机号码,也可以根据自身需求输入其他号码,而不采用自动填入本机号码的方法来限制用户的输入。Doing so can still provide the user with a manual input scenario. The user can input the phone number or input other numbers according to their own needs, instead of restricting the user's input by automatically filling in the phone number.

这里,除了输入手机号的场景,也可以是输入邮箱账号、用户名、常用快捷短信、固定格式的邮件等等。在这些场景中,都可以预先设定目标字符以确定目标输入内容,在运用到输入场景时,可以根据实际需求修改,也可以快速输入并且避免输入错误。Here, in addition to the scenario of entering a mobile phone number, you can also enter an email account, a user name, a commonly used quick text message, an email in a fixed format, and so on. In these scenarios, the target character can be preset to determine the target input content. When applied to the input scenario, it can be modified according to actual needs, and it can also be input quickly and avoid input errors.

当确定了输入场景对应的目标字符后,应用程序可以根据目标字符来确定目标字符对应的容错字符。这里的容错字符的作用是,当用户点击容错字符时,应用程序就可以认为用户的输入是错误的,并将对应的目标字符提供给用户。当然这里可以直接将容错字符替换成目标字符,也可以向用户来提供选择。After the target character corresponding to the input scene is determined, the application can determine the error-tolerant character corresponding to the target character according to the target character. The function of the error-tolerant character here is that when the user clicks the error-tolerant character, the application can consider that the user's input is wrong, and provide the corresponding target character to the user. Of course, the fault-tolerant character can be directly replaced with the target character here, and the user can also be provided with a choice.

这里容错字符的设置可以根据实际情况而不同,例如,可以将每个目标字符在虚拟键盘的位置附近的字符,如上下左右四个字符作为该目标字符对应的容错字符;也可以根据输入内容的特点来确定容错字符,如手机号码的第一位一般都是数字“1”,也就是输入手机号码场景的第一位目标字符为数字“1”,由于手机号码的第一位几乎不会是其他数字,那么就可以将虚拟键盘上的其他所有字符均作为该目标字符的容错字符。容错字符的设置还需要考虑到虚拟键盘的模式,比如全键盘或九宫格键盘等;还可以考虑到键盘的大小来设置,例如较大的显示屏具有较大的虚拟键盘,此时可以将目标字符最近的相邻字符作为容错字符;当较小的显示屏的虚拟键盘也较小时,虚拟键盘的按键较为密集,那么可以将目标字符相邻的字符和相隔的字符均作为容错字符。The setting of the error-tolerant characters here can be different according to the actual situation. For example, the characters near the position of the virtual keyboard for each target character, such as four characters of the upper, lower, left, and right, can be used as the error-tolerant characters corresponding to the target character; or according to the input content Characteristics to determine the error-tolerant character, such as the first digit of the mobile phone number is generally the number "1", that is, the first target character of the input mobile phone number scene is the number "1", because the first digit of the mobile phone number is almost never other numbers, then all other characters on the virtual keyboard can be used as fault-tolerant characters for the target character. The setting of fault-tolerant characters also needs to consider the mode of the virtual keyboard, such as the full keyboard or the nine-square keyboard, etc.; it can also be set in consideration of the size of the keyboard, for example, a larger display screen has a larger virtual keyboard, at this time, the target character can be set. The nearest adjacent characters are used as error-tolerant characters; when the virtual keyboard of the smaller display screen is also smaller, and the keys of the virtual keyboard are denser, the characters adjacent to and separated from the target character can be used as error-tolerant characters.

步骤S103、基于检测到的输入操作,确定待输入字符;Step S103, based on the detected input operation, determine the character to be input;

这里通过触摸屏的检测,可以感应到用户的输入操作,也就是确定用户所点击虚拟键盘的位置。应用程序根据用户点击虚拟键盘的位置,确定用户点击的字符为待输入字符。Here, through the detection of the touch screen, the input operation of the user can be sensed, that is, the position of the virtual keyboard clicked by the user can be determined. According to the position where the user clicks on the virtual keyboard, the application program determines that the character clicked by the user is the character to be input.

步骤S104、根据所述待输入字符、所述目标字符和所述容错字符,确定输入字符。Step S104: Determine the input character according to the to-be-input character, the target character and the error-tolerant character.

这里的输入字符是最终确认的字符,也就是应用程序所接受并会进行后续处理的字符,而待输入字符是根据检测到的用户的触摸输入来确定的。这里,应用程序要综合待输入字符、目标字符和容错字符的情况来确定输入字符。比如,待输入字符未触及到容错字符,那么就可以将待输入字符确定为输入字符;如果待输入字符触及到了容错字符,那么可以将容错字符所对应的目标字符作为输入字符。The input character here is the final confirmed character, that is, the character accepted by the application and will be processed subsequently, and the character to be input is determined according to the detected touch input of the user. Here, the application needs to combine the conditions of the character to be input, the target character and the error-tolerant character to determine the input character. For example, if the character to be input does not touch the fault-tolerant character, the character to be input can be determined as the input character; if the character to be input touches the fault-tolerant character, the target character corresponding to the fault-tolerant character can be used as the input character.

在一实施例中,该方法还包括:In one embodiment, the method further includes:

步骤S11、确定所述输入场景是否为预设的指定场景;Step S11, determining whether the input scene is a preset designated scene;

步骤S12、若不是,则将所述待输入字符确定为输入字符。Step S12: If not, determine the character to be input as an input character.

这里,应用程序可以预设进行上述输入容错处理的指定场景,当需要进行输入时,应用程序判断当前输入场景是否为预设的指定场景,如果是,则针对该场景下的输入进行输入容错的处理;如果不是,则将待输入字符确定为输入字符。也就是说,当不是指定场景时,将接收到用户输入直接确定为输入字符,而不进行输入容错的处理。上述指定场景可以是应用程序对应的输入场景,也可以是根据用户的预设确定的输入场景。例如,输入手机号码并获取验证码的场景,输入账号、密码的场景、输入邮箱地址的场景、输入网址的场景等等。Here, the application can preset the specified scene for the above-mentioned input fault-tolerant processing. When input is required, the application determines whether the current input scene is the preset specified scene. Process; if not, determine the character to be input as the input character. That is, when it is not the specified scene, the received user input is directly determined as the input character, and the input error tolerance processing is not performed. The above-mentioned specified scene may be an input scene corresponding to an application program, or may be an input scene determined according to a user's preset. For example, the scenario of entering a mobile phone number and obtaining a verification code, the scenario of entering an account number and password, the scenario of entering an email address, the scenario of entering a website address, and so on.

在实际应用中,需要输入字符的场景可能有很多,并不是所有的场景都适合本实施例中提到的确定输入场景对应的目标字符,并进行后续的容错处理。也就是说,只有在指定场景下,才能够进行后续的容错处理。而当确定当前场景不是预设的指定场景时,则直接将待输入字符确定为输入字符,也就是直接接受用户的输入而不进行容错处理。In practical applications, there may be many scenarios in which characters need to be input, and not all scenarios are suitable for determining the target characters corresponding to the input scenarios mentioned in this embodiment, and performing subsequent fault-tolerant processing. That is to say, subsequent fault-tolerant processing can be performed only in specified scenarios. When it is determined that the current scene is not the preset designated scene, the character to be input is directly determined as the input character, that is, the user's input is directly accepted without error-tolerant processing.

本发明实施例提供另一种输入方法,如图2所示,该方法包括:An embodiment of the present invention provides another input method, as shown in FIG. 2 , the method includes:

步骤S201、调用虚拟键盘时,确定当前的输入场景;Step S201, when calling the virtual keyboard, determine the current input scene;

步骤S202、在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符;Step S202, determining the target character corresponding to the input scene and the error-tolerant character corresponding to the target character in the virtual keyboard;

步骤S203、基于检测到的输入操作,确定待输入字符;Step S203, based on the detected input operation, determine the character to be input;

上述步骤S201至S203与实施例一种的步骤S101至S103相同,这里不再赘述。The foregoing steps S201 to S203 are the same as the steps S101 to S103 of the first embodiment, and are not repeated here.

步骤S204、根据所述待输入字符、所述目标字符和所述容错字符,确定输入字符,包括:Step S204: Determine the input character according to the character to be input, the target character and the error-tolerant character, including:

步骤S204a、当所述待输入字符与所述目标字符相同时,将所述目标字符确定为所述输入字符;Step S204a, when the character to be input is the same as the target character, determine the target character as the input character;

步骤S204b当所述待输入字符与所述容错字符相同时,将所述目标字符确定为所述输入字符;Step S204b, when the character to be input is the same as the error-tolerant character, determine the target character as the input character;

这里给出了确定输入字符的两种类似的情况,第一,当待输入字符与目标字符相同时,应用程序可以认为待输入字符的输入是正确的,并将这一目标字符,也同时是待输入字符确定为输入字符,此时,由于输入正确,就无需进行容错的修正。第二,当待输入字符与容错字符相同时,应用程序可以认为待输入字符的输入是错误的,并将这一容错字符对应的目标字符确定为输入字符,也就是对待输入字符进行了容错的纠正,将待输入字符修改为了目标字符。Two similar situations for determining the input character are given here. First, when the to-be-input character is the same as the target character, the application can consider the input of the to-be-input character to be correct, and assign the target character, which is also the same as the target character. The to-be-input character is determined to be the input character. At this time, since the input is correct, no error-tolerant correction is required. Second, when the character to be input is the same as the fault-tolerant character, the application can consider that the input of the character to be input is wrong, and determine the target character corresponding to the fault-tolerant character as the input character, that is, the input character is fault-tolerant. Correction, modify the character to be input into the target character.

步骤S204c、当所述待输入字符与所述目标字符不同时,且,所述待输入字符与所述容错字符不同,将所述待输入字符确定为所述输入字符。Step S204c, when the to-be-input character is different from the target character, and the to-be-input character is different from the error-tolerant character, determine the to-be-input character as the input character.

这里给出了确定输入字符的另一种情况,检测到的用户输入也就是确定的待输入字符既不是目标字符,也不是目标字符所对应的容错字符。此时,说明用户点击的位置与目标字符较远,这种情况下用户误触的可能性就相对较低。因此,应用程序可以认为此时用户没有输入错误,而是确实需要输入与目标字符并不相同的字符,这样进行容错的修正就变得没有必要,所以此时可以直接将用户输入的字符,即待输入字符确定为输入字符。Another case of determining the input character is given here. The detected user input, that is, the determined character to be input is neither the target character nor the error-tolerant character corresponding to the target character. At this point, it means that the position where the user clicks is far from the target character, and in this case, the possibility of the user touching by mistake is relatively low. Therefore, the application program can think that the user does not have an input error at this time, but does need to input a character that is not the same as the target character, so the error-tolerant correction becomes unnecessary, so the character input by the user can be directly input at this time, namely The character to be input is determined as the input character.

当然,无论哪种情况,用户都是可以通过手动修改的方式来进行修正,而不会因为应用程序对于容错的判断与实际需求不符而导致无法修改错误的输入。Of course, in either case, the user can make corrections by manual modification, and it will not be impossible to modify the wrong input because the application's judgment on fault tolerance does not match the actual needs.

在一实施例中,所述当所述待输入字符与所述容错字符相同时,将所述目标字符确定为所述输入字符,包括:In an embodiment, when the character to be input is the same as the error-tolerant character, determining the target character as the input character includes:

步骤S21、当所述待输入字符与所述容错字符相同时,输出选择提示;其中,所述选择提示用于提示是否将所述待输入字符替换为所述目标字符;Step S21, when the character to be input is the same as the error-tolerant character, output a selection prompt; wherein, the selection prompt is used to prompt whether to replace the character to be input with the target character;

步骤S22、当接收到根据选择提示输入的选择结果为是时,则将所述目标字符确定输入字符。Step S22, when the selection result input according to the selection prompt is received, determine the input character of the target character.

这里,当检测到的输入操作触碰的字符与容错字符相同时,也就是待输入字符与容错字符相同时,这里可能有几种情况:Here, when the character touched by the detected input operation is the same as the fault-tolerant character, that is, when the character to be input is the same as the fault-tolerant character, there may be several situations:

第一、待输入字符错误,用户希望输入正确字符应该是该容错字符对应的目标字符;First, if the character to be input is wrong, the user expects that the correct character to be input should be the target character corresponding to the error-tolerant character;

第二、待输入字符正确,用户希望输入的字符与目标字符不同,而用户希望输入当前的待输入字符;Second, the character to be input is correct, the character that the user wants to input is different from the target character, and the user wants to input the current character to be input;

第三、待输入字符错误,用户希望输入的字符不是当前的待输入字符,即容错字符,也不是该容错字符所对应的目标字符,而是其他字符。Third, the character to be input is wrong, and the character that the user wants to input is not the current character to be input, that is, the error-tolerant character, nor the target character corresponding to the error-tolerant character, but other characters.

根据上述三种情况,应用程序就需要提供选择,供用户确认,也就是输出选择提示。这里输出的选择提示用于提示是否将所述待输入字符替换为所述目标字符,因此,选择提示中至少需要包括将目标字符确定为输入字符的选项,也就是确定为上述第一种情况的选项,当检测到用户选择了该选项后,再将目标字符确定为输入字符。若用户没有选择这一选项,应用程序可以默认待输入字符正确,也就是第二种情况,此时将待输入字符确定为输入字符。若属于第三种情况,则可以通过虚拟键盘提供的删除键、退格键等供用户进行删除操作,当检测到删除操作时,删除当前的待输入字符,继续等待接收新的输入。According to the above three situations, the application program needs to provide a choice for the user to confirm, that is, to output a choice prompt. The selection prompt output here is used to prompt whether to replace the to-be-input character with the target character. Therefore, the selection prompt needs to include at least the option of determining the target character as the input character, that is, the first case above. option, when it is detected that the user has selected this option, the target character is determined as the input character. If the user does not select this option, the application program can assume that the character to be input is correct, that is, the second case, at this time, the character to be input is determined as the input character. If it belongs to the third case, the delete key and the backspace key provided by the virtual keyboard can be used for the user to perform the delete operation. When the delete operation is detected, the current character to be input is deleted, and the new input is continued to be received.

在一实施例中,所述调用虚拟键盘时,确定当前的输入场景,包括:In one embodiment, when the virtual keyboard is invoked, the current input scene is determined, including:

步骤S31a、当调用虚拟键盘的显示界面上的显示内容包括输入手机号码的提示时,确定当前输入场景为输入手机号码;Step S31a, when the displayed content on the display interface of the invoking virtual keyboard includes a prompt for inputting a mobile phone number, determine that the current input scene is inputting a mobile phone number;

步骤S31b、当调用虚拟键盘的显示界面上的显示内容包括输入邮箱地址的提示时,确定当前输入场景为输入邮箱地址;Step S31b, when the display content on the display interface of the invoking virtual keyboard includes a prompt for inputting an email address, determine that the current input scene is inputting an email address;

步骤S31c、当调用虚拟键盘的显示界面上的显示内容包括输入网址的提示时,确定当前输入场景为输入网址。Step S31c, when the displayed content on the display interface for invoking the virtual keyboard includes a prompt for inputting a web address, determine that the current input scene is inputting a web address.

这里是以输入手机号码场景、输入邮箱地址或输入网址的为例,应用程序根据显示见面上显示的内容可以确定当前的输入场景,当显示内容包括输入手机号码、输入邮箱地址或输入网址的提示时,确定当前输入场景为输入手机号码。例如,显示界面上显示输入框,并在输入框上方显示“请输入手机号码”,此时就可以确定当前的输入场景为输入手机号码。Here is an example of inputting a mobile phone number, inputting an email address or inputting a web address. The application can determine the current input scenario according to the content displayed on the display screen. When the displayed content includes a prompt for inputting a mobile phone number, inputting an email address or inputting a web address , confirm that the current input scene is inputting a mobile phone number. For example, if an input box is displayed on the display interface, and "Please input a mobile phone number" is displayed above the input box, it can be determined that the current input scene is inputting a mobile phone number.

在一实施例中,所述方法还包括:In one embodiment, the method further includes:

步骤S32a、当所述输入场景为输入手机号码时,获取本机的手机号码;Step S32a, when the input scene is to input a mobile phone number, obtain the mobile phone number of the machine;

步骤S33a、将所述手机号码对应虚拟键盘中的每一按键对应的数字字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符;Step S33a, determining the numeric character corresponding to each key in the virtual keyboard corresponding to the mobile phone number as the target character, and determining the adjacent character of each target character as the fault-tolerant character;

或者,or,

步骤S32b、当所述输入场景为输入邮箱地址时,获取已登录邮箱的邮箱地址;Step S32b, when the input scenario is inputting an email address, obtain the email address of the logged-in email;

步骤S33b、将所述邮箱地址在虚拟键盘中的数字字符或字母字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符;Step S33b, determining the numeric character or alphabetic character of the email address in the virtual keyboard as the target character, and determining the adjacent character of each target character as the fault-tolerant character;

或者,or,

步骤S32c、当所述输入场景为输入网址时,获取预设网址;Step S32c, when the input scene is an input URL, obtain a preset URL;

步骤S33c、将所述预设网址在虚拟键盘中的数字字符或字母字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符。Step S33c: Determine the numeric character or alphabetic character of the preset website address in the virtual keyboard as the target character, and determine the character adjacent to each target character as the error-tolerant character.

这里还是以上述实施例中的输入手机号码场景、输入邮箱地址场景或输入网址为例。当输入场景为输入手机号码场景时,首先获取本机的手机号码,可以通过调用当前手机的系统接口,访问手机上的SIM卡(Subscriber Identification Module,用户身份识别卡),通过SIM卡获取到本机的手机号码。也可以通过预先的设定来确定当前的手机号码,例如,首次使用当前应用程序时,输入预设的手机号码。然后,再将手机号码的每一位数字在虚拟键盘中对应位置的虚拟按键作为目标字符。Here again, the scenario of inputting a mobile phone number, a scenario of inputting an email address, or inputting a website address in the above-mentioned embodiment is taken as an example. When the input scene is the mobile phone number input scene, the mobile phone number of the machine is obtained first. You can access the SIM card (Subscriber Identification Module) on the mobile phone by calling the system interface of the current mobile phone, and obtain the phone number through the SIM card. the phone number of the machine. The current mobile phone number can also be determined through a preset setting, for example, when the current application is used for the first time, the preset mobile phone number is input. Then, the virtual key at the corresponding position of each digit of the mobile phone number in the virtual keyboard is used as the target character.

当输入场景为输入邮箱地址场景时,可以获取本机应用程序已经登录的邮箱地址,并将该邮箱地址在虚拟键盘中对应位置的虚拟按键作为目标字符。When the input scenario is the scenario of inputting an email address, the email address that the local application has logged in can be obtained, and the virtual key at the corresponding position of the email address in the virtual keyboard can be used as the target character.

当输入场景为输入网址是,可以根据用户预设的网址,也可以根据获取特定相关网站的网址作为输入,并将网址在虚拟键盘中对应位置的虚拟按键作为目标字符。When the input scenario is to input a web address, the web address preset by the user or the web address of a specific relevant website can be used as the input, and the virtual key at the corresponding position of the web address in the virtual keyboard can be used as the target character.

上述几种场景中,可以根据能够获取到的本机已有信息来确定输入的内容,也可以通过提前预设的方式,根据用户预设的内容作为以后进行输入时的内容。In the above several scenarios, the input content can be determined according to the existing information of the local machine that can be obtained, or the content preset by the user can be used as the content for subsequent input in a way preset in advance.

当然,在实际应用中并不限于以上几种场景,还有可能包括输入其他内容的各种场景,比如,输入账号、输入常用短消息等等。Of course, the practical application is not limited to the above scenarios, and may also include various scenarios of inputting other content, such as inputting an account number, inputting a common short message, and so on.

在一实施例中,所述在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符,包括:In one embodiment, the determining in the virtual keyboard the target character corresponding to the input scene and the error-tolerant character corresponding to the target character includes:

步骤S41、确定所述虚拟键盘的类型;Step S41, determining the type of the virtual keyboard;

步骤S42、在所述虚拟键盘中确定与所述输入场景对应的目标字符;Step S42, determining the target character corresponding to the input scene in the virtual keyboard;

步骤S43、根据所述虚拟键盘的类型和所述目标字符,在所述虚拟键盘中将所述目标字符的相邻字符确定为所述容错字符。Step S43 , according to the type of the virtual keyboard and the target character, determine the adjacent characters of the target character in the virtual keyboard as the error-tolerant character.

不同的智能终端品牌、类型可能对应不同模式的虚拟键盘,不同的输入法或不同的用户设置都可能对应不同模式的虚拟键盘。比如,虚拟键盘有九宫格模式、全键盘模式,或者其他模式等各种不同的类型。对于不同虚拟键盘类型,每个字符在虚拟键盘中的排列也不相同,这时,就需要针对不同类型的虚拟键盘订制不同的输入容错方法。Different smart terminal brands and types may correspond to different modes of virtual keyboards, and different input methods or different user settings may correspond to different modes of virtual keyboards. For example, there are various types of virtual keyboards, such as a nine-square grid mode, a full keyboard mode, or other modes. For different virtual keyboard types, the arrangement of each character in the virtual keyboard is also different. In this case, it is necessary to customize different input fault tolerance methods for different types of virtual keyboards.

因此,这里应用程序首先确定虚拟键盘的类型,根据虚拟键盘的类型确定与当前的输入场景相对应的目标字符。然后对应当前的虚拟键盘类型,找到每一目标字符的相邻字符,将相邻字符确定为容错字符。Therefore, the application here first determines the type of the virtual keyboard, and determines the target character corresponding to the current input scene according to the type of the virtual keyboard. Then, corresponding to the current virtual keyboard type, the adjacent characters of each target character are found, and the adjacent characters are determined as fault-tolerant characters.

为了解决虚拟键盘容易造成误触的问题,本发明实施例提供了一种输入方法。应用于输入手机号码时,应用程序可以通过终端获取本机手机号,或者通过用户自行输入,记录用户本机手机号,进而根据记录的用户本机手机号,针对不同的输入键盘,如全键盘或九宫格键盘,分别设置用户本机手机号的容错数字。当用户使用该应用程序进行手机号码的输入时,应用程序在确定用户当前所使用的输入键盘后,即可确定在该键盘模式下与用户本机号码对应的容错字符。在输入过程中,当检测到用户触碰到容错字符时,则可以弹出正确号码提示,并可以根据用户的选择操作,自动将输入错误的号码替换为正确的号码,从而极大地提高了用户号码输入的正确率,避免了由于号码输入错误而导致无法快速接收到验证码的问题。In order to solve the problem that the virtual keyboard easily causes false touches, an embodiment of the present invention provides an input method. When applied to input mobile phone number, the application can obtain the mobile phone number of the local machine through the terminal, or input it by the user, record the local mobile phone number of the user, and then according to the recorded local mobile phone number of the user, for different input keyboards, such as the full keyboard Or the nine-square-grid keyboard, respectively set the error-tolerant digits of the user's mobile phone number. When the user uses the application program to input the mobile phone number, after the application program determines the input keyboard currently used by the user, the error-tolerant character corresponding to the user's own phone number in the keyboard mode can be determined. During the input process, when it is detected that the user touches the error-tolerant character, the correct number prompt can pop up, and according to the user's selection operation, the incorrectly entered number can be automatically replaced with the correct number, thus greatly improving the number of users. The correct rate of input avoids the problem that the verification code cannot be quickly received due to the wrong number input.

本发明实施例提供一种输入方法,如图3A所示,该方法包括:An embodiment of the present invention provides an input method, as shown in FIG. 3A, the method includes:

步骤S301、获取并保存终端本机的手机号码;Step S301, obtaining and saving the mobile phone number of the terminal;

这里,终端的应用程序可以通过调用系统接口,访问手机上的SIM卡,进而通过SIM卡获取到本机的手机号码。除此之外,应用程序也可以在用户首次使用时,通过弹出引导信息的方式,引导用户输入自己本机的手机号码。Here, the application program of the terminal can access the SIM card on the mobile phone by calling the system interface, and then obtain the mobile phone number of the device through the SIM card. In addition, the application can also guide the user to enter his own mobile phone number by popping up a guide message when the user uses it for the first time.

步骤S302、对手机号码分别设置不同输入键盘模式下的容错字符;Step S302, setting error-tolerant characters under different input keyboard modes for the mobile phone number respectively;

针对不同的输入键盘,分别为通过执行步骤S301获取到的本机手机号码设置容错字符;其中,不同的输入键盘是指如数字九宫格键盘,如图3B所示,或全键盘,如图3C所示。For different input keyboards, set error-tolerant characters for the local mobile phone number obtained by executing step S301 respectively; wherein, different input keyboards refer to a number nine-square keyboard, as shown in FIG. 3B, or a full keyboard, as shown in FIG. 3C Show.

在实际应用中,用户在通过手机虚拟键盘输入数字时,可能会由于误触而按压到期望输入数字的周围,而导致输入错误。在本实施例中,应用程序可以将在键盘上位于期望数字周围的数字作为该期望输入数字的容错数字。且由于在不同输入键盘上,同一个数字周围的数字往往是不同的,因而在本方案中往往需要针对不同类型的输入键盘分别设置本机号码的容错字符。In practical applications, when the user inputs numbers through the virtual keyboard of the mobile phone, the user may press around the desired number due to accidental touch, resulting in an input error. In this embodiment, the application may use the numbers around the expected number on the keyboard as the error-tolerant number of the expected input number. And because on different input keyboards, the numbers around the same number are often different, so in this solution, it is often necessary to set the error-tolerant characters of the local number for different types of input keyboards.

以输入键盘分别为数字九宫格键盘和全键盘为例,在数字九宫格键盘中,与数字“1”相邻的数字分别为“2”和“4”,与数字“5”相邻的数字分别为:“2”、“4”、“6”、“8”。而在权键盘中,与数字“1”相邻的数字只有数字“2”;与数字“5”相邻的数字为“4”和“6”。Take the input keyboard as an example of the number nine-square keyboard and the full keyboard. In the digital nine-square keyboard, the numbers adjacent to the number "1" are "2" and "4" respectively, and the numbers adjacent to the number "5" are : "2", "4", "6", "8". In the right keyboard, the numbers adjacent to the number "1" are only the number "2"; the numbers adjacent to the number "5" are "4" and "6".

当应用程序按照上述规则,针对不同键盘分别为本机号码设置容错字符。例如,通过执行步骤S301确定本机的手机号码为“1548”,则通过执行步骤S302,可以确定该手机号码的容错字符分别为:When the application follows the above rules, set error-tolerant characters for the local number for different keyboards. For example, by executing step S301, it is determined that the mobile phone number of the machine is "1548", then by executing step S302, it can be determined that the error-tolerant characters of the mobile phone number are:

九宫格键盘模式下的容错字符分别为:The error-tolerant characters in Jiugongge keyboard mode are:

数字1对应的容错字符:“2、4”;Error-tolerant characters corresponding to number 1: "2, 4";

数字5对应的容错字符:“2、4、6、8”;Error-tolerant characters corresponding to number 5: "2, 4, 6, 8";

数字4对应的容错字符:“1、5、7”;Error-tolerant characters corresponding to number 4: "1, 5, 7";

数字8对应的容错字符:“5、7、9、0”。Error-tolerant characters corresponding to the number 8: "5, 7, 9, 0".

全键盘模式下容错字符分别为:The fault-tolerant characters in full keyboard mode are:

数字1对应的容错字符:“2”;Error-tolerant character corresponding to number 1: "2";

数字5对应的容错字符:“4、6”;Error-tolerant characters corresponding to number 5: "4, 6";

数字4对应的容错字符:“3、5”;Error-tolerant characters corresponding to number 4: "3, 5";

数字8对应的容错字符:“7、9”。Error-tolerant characters corresponding to the number 8: "7, 9".

在实际应用中,手机号码中出现的每一位数字都可能是不同的,而不同的数字对应的容错字符往往也是不同的。在本实施例中,为了避免由于不区分号码的顺序位置,而导致容错字符的混淆,在应用程序确定本机号码所对应的容错字符后,还需要根据本机号码各数字在本机手机号码中的顺序,按照该顺序对本机号码中各个数字所对应的容错字符进行保存。In practical applications, each digit that appears in a mobile phone number may be different, and the error-tolerant characters corresponding to different digits are often different. In this embodiment, in order to avoid the confusion of error-tolerant characters due to the indistinguishable sequence position of numbers, after the application program determines the error-tolerant characters corresponding to the phone number, it is also necessary to use the digits of the phone number in the phone number of the phone. In the order in which the error-tolerant characters corresponding to each number in the own number are stored in this order.

例如,仍以通过执行步骤S301确定本机号码为“1548”为例,在全键盘模式下确定该手机号码所对应的容错字符分别为:“2”、“4、6”、“3、5”、“7、9”,则按照本机号码的排列顺序,可以记录该号码的容错字符为:For example, still taking the determination of the phone number as "1548" by performing step S301 as an example, in the full keyboard mode, the error-tolerant characters corresponding to the phone number are determined as: "2", "4, 6", "3, 5" ", "7, 9", according to the order of the number of the phone, the error-tolerant characters that can be recorded for the number are:

第一位:“2”,第二位“4、6”,第三位“3、5”,第四位“7、9”。The first digit: "2", the second digit "4, 6", the third digit "3, 5", and the fourth digit "7, 9".

步骤S303、根据输入字符和当前键盘模式加载容错字符;Step S303, loading fault-tolerant characters according to the input characters and the current keyboard mode;

当检测到用户通过应用程序调用键盘进行手机号码输入时,应用程序根据当前键盘类型,加载预先设置的容错字符。应用程序通过调用系统相关接口,可以确定操作系统当前调用的键盘类型,确定与该键盘类型对应的本机号码的容错字符。When it is detected that the user invokes the keyboard to input the mobile phone number through the application, the application loads the preset error-tolerant characters according to the current keyboard type. The application program can determine the keyboard type currently called by the operating system by calling the system-related interface, and determine the error-tolerant character of the local number corresponding to the keyboard type.

在实际应用中,有多重场景需要用户调用数字键盘进行数字输入,如,输入金额、账号以及密码等,而不仅限于输入手机号码这一种场景。在其他应用场景中,可以不需要使用容错字符对用户的输入数字进行判断。在本实施例中,在应用程序确定容错字符之前,还需要首先确定应用场景,以判断是否为手机号输入场景。In practical applications, there are multiple scenarios that require the user to call the numeric keypad for numeric input, such as inputting an amount, account number, and password, and not limited to the scenario of entering a mobile phone number. In other application scenarios, it may not be necessary to use error-tolerant characters to judge the numbers input by the user. In this embodiment, before the application program determines the error-tolerant character, it is also necessary to first determine the application scenario, so as to determine whether it is the scenario of inputting the mobile phone number.

例如,应用程序可以根据当前界面上显示的状态,如根据“输入账号”,“输入密码”“重复密码”以及“输入手机号”等界面,可以判断当前是否是输入手机号的场景。For example, the application can judge whether it is currently the scene of entering a mobile phone number according to the status displayed on the current interface, such as "enter account number", "enter password", "repeat password" and "enter mobile phone number".

步骤S304、根据检测到的输入字符,发出错误提示,并根据用户的选择指令,将输入字符替换为正确的字符。Step S304, issue an error prompt according to the detected input characters, and replace the input characters with correct characters according to the user's selection instruction.

应用程序检测用户输入是否为容错字符,应用程序发出输入错误提示,并可基于用户的选择,自动将用户输入的容错字符替换为对应的正确字符;The application program detects whether the user input is a fault-tolerant character, the application program issues an input error prompt, and can automatically replace the fault-tolerant character input by the user with the corresponding correct character based on the user's choice;

例如,仍以本机号码为“1548”为例,终端当前调用的虚拟键盘为九宫格数字键盘,用户在使用键盘进行数字输入时,前两位数字均输入正确,而在输入第三位数字时,用户误触到了数字“7”。而通过预先确定的容错字符可知,第三位数字所对应的容错字符为:“1”、“5”和“7”。此时,应用程序可以确定用户输入的字符错误,根据输入的位置弹出正确的字符“4”以提示用户,如图3D所示,图中,输入场景提示框11提示输入手机号,输入框12显示用户输入内容,容错提示框13用于当检测到输入框内为容错字符时,在容错提示框13显示正确的字符,图中虚拟键盘14为数字九宫格键盘,用户输入期望的正确字符按键15时,误触容错字符按键16。如图3E所示,在用户点击容错提示框13中的字符后,将输入框12中的容错字符替换为对应的容错提示框13中的正确字符。For example, still taking the phone number "1548" as an example, the virtual keyboard currently invoked by the terminal is the nine-square numeric keyboard. When the user uses the keyboard to input numbers, the first two digits are entered correctly, but when the third digit is entered , the user touched the number "7" by mistake. It can be known from the predetermined error-tolerant characters that the error-tolerant characters corresponding to the third digit are: "1", "5" and "7". At this time, the application can determine that the character entered by the user is wrong, and pop up the correct character "4" according to the input position to prompt the user, as shown in Figure 3D, in the figure, the input sceneprompt box 11 prompts the input of a mobile phone number, and theinput box 12 Display the user input content, the fault-tolerant prompt box 13 is used to display the correct character in the fault-tolerant prompt box 13 when it is detected that the input box is a fault-tolerant character, thevirtual keyboard 14 in the figure is a digital nine-square keyboard, and the user inputs the desiredcorrect character button 15 , touch the error-tolerant character button 16 by mistake. As shown in FIG. 3E , after the user clicks the characters in the error-tolerant prompt box 13 , the error-tolerant characters in theinput box 12 are replaced with the correct characters in the corresponding error-tolerant prompt box 13 .

采用本实施例提供的输入方法,应用程序可以通过终端或用户输入来获取本机手机号,并保存。根据保存的本机手机号,针对不同的输入键盘分别设置用户本机手机号的容错字符。当用户使用应用程序进行手机号码输入时,应用程序在确定用户当前所使用的输入键盘后,即可确定该键盘模式下与用户本机号码对应的容错字符。在输入过程中,当检测到用户触碰到容错字符时,则可以显示正确字符的提示,并可以根据用户的选择操作,将输入错误的字符替换为正确的字符。通过上述方法,极大地提高了用户输入的正确率,避免了由于号码输入错误而导致无法快速接收验证码的问题。With the input method provided in this embodiment, the application program can acquire the mobile phone number of the local machine through input from the terminal or the user, and save it. According to the saved local mobile phone number, the error-tolerant characters of the user's local mobile phone number are respectively set for different input keyboards. When the user uses the application program to input the mobile phone number, after the application program determines the input keyboard currently used by the user, the error-tolerant character corresponding to the user's own phone number in the keyboard mode can be determined. During the input process, when it is detected that the user touches the error-tolerant character, a prompt of the correct character can be displayed, and the incorrectly inputted character can be replaced with the correct character according to the user's selection operation. Through the above method, the correct rate of user input is greatly improved, and the problem that the verification code cannot be quickly received due to incorrect number input is avoided.

基于前述的实施例,本发明实施例提供一种输入装置,该装置包括所包括的各单元、以及各单元所包括的各模块,可以通过终端中的处理器来实现;当然也可通过具体的逻辑电路实现;在实施的过程中,处理器可以为中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等。Based on the foregoing embodiments, an embodiment of the present invention provides an input device, which includes each unit included and each module included in each unit, which can be implemented by a processor in a terminal; of course, it can also be implemented by a specific Logic circuit implementation; in the implementation process, the processor may be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), a field programmable gate array (FPGA), or the like.

图4为本发明实施例的一种输入装置的组成结构示意图,如图4所示,该装置400包括:FIG. 4 is a schematic structural diagram of an input device according to an embodiment of the present invention. As shown in FIG. 4 , thedevice 400 includes:

第一确定单元401,配置为调用虚拟键盘时,确定当前的输入场景;The first determining unit 401 is configured to determine the current input scene when invoking the virtual keyboard;

第二确定单元402,配置为在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符;The second determining unit 402 is configured to determine, in the virtual keyboard, a target character corresponding to the input scene and an error-tolerant character corresponding to the target character;

第三确定单元403,配置为基于检测到的输入操作,确定待输入字符;The third determination unit 403 is configured to determine the character to be input based on the detected input operation;

第四确定单元404,配置为根据所述待输入字符、所述目标字符和所述容错字符,确定输入字符。The fourth determining unit 404 is configured to determine the input character according to the to-be-input character, the target character and the error-tolerant character.

在一实施例中,所述第四确定单元,包括:In one embodiment, the fourth determining unit includes:

第一确定模块,配置为当所述待输入字符与所述目标字符相同时,将所述目标字符确定为所述输入字符;a first determining module, configured to determine the target character as the input character when the character to be input is the same as the target character;

第二确定模块,配置为当所述待输入字符与所述容错字符相同时,将与所述容错字符对应的目标字符确定为所述输入字符;a second determining module, configured to determine a target character corresponding to the error-tolerant character as the input character when the to-be-input character is the same as the error-tolerant character;

第三确定模块,配置为当所述待输入字符与所述目标字符不同时,且所述待输入字符与所述容错字符不同,将所述待输入字符确定为所述输入字符。A third determining module is configured to determine the to-be-input character as the input character when the to-be-input character is different from the target character and the to-be-input character is different from the error-tolerant character.

在另一实施例中,所述第二确定模块,包括:In another embodiment, the second determining module includes:

输出子模块,配置为当所述待输入字符与所述容错字符相同时,输出选择提示;其中,所述选择提示用于提示是否将所述待输入字符替换为与所述容错字符对应的目标字符;An output submodule, configured to output a selection prompt when the to-be-input character is the same as the fault-tolerant character; wherein the selection prompt is used to prompt whether to replace the to-be-input character with a target corresponding to the fault-tolerant character character;

确定子模块,配置为当接收到根据所述选择提示输入的选择结果为是时,则将所述目标字符确定输入字符。The determining sub-module is configured to determine the input character of the target character when the selection result input according to the selection prompt is yes.

在另一实施例中,所述装置还包括:In another embodiment, the apparatus further includes:

第五确定单元,配置为确定所述输入场景是否为预设的指定场景;a fifth determination unit, configured to determine whether the input scene is a preset designated scene;

若是,所述第二确定单元在虚拟键盘中确定与所述输入场景对应的目标字符和与所述目标字符对应的容错字符。If so, the second determining unit determines, in the virtual keyboard, a target character corresponding to the input scene and an error-tolerant character corresponding to the target character.

在另一实施例中,所述第一确定单元,包括:In another embodiment, the first determining unit includes:

第四确定模块,配置为当调用虚拟键盘的显示界面上的显示内容包括输入手机号码的提示时,确定当前输入场景为输入手机号码;a fourth determining module, configured to determine that the current input scene is inputting a mobile phone number when the displayed content on the display interface for calling the virtual keyboard includes a prompt for inputting a mobile phone number;

第五确定模块,配置为当调用虚拟键盘的显示界面上的显示内容包括输入邮箱地址的提示时,确定当前输入场景为输入邮箱地址;a fifth determining module, configured to determine that the current input scene is inputting an email address when the displayed content on the display interface for calling the virtual keyboard includes a prompt for inputting an email address;

第六确定模块,配置为当调用虚拟键盘的显示界面上的显示内容包括输入网址的提示时,确定当前输入场景为输入网址。The sixth determination module is configured to determine that the current input scene is inputting a web address when the displayed content on the display interface for invoking the virtual keyboard includes a prompt for inputting a web address.

在另一实施例中,所述第二确定单元,包括:In another embodiment, the second determining unit includes:

第一获取模块,配置为当所述输入场景为输入手机号码时,获取本机的手机号码;所述第二确定单元将所述手机号码对应虚拟键盘中的每一按键对应的数字字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符;或者,The first obtaining module is configured to obtain the mobile phone number of the local machine when the input scene is inputting a mobile phone number; the second determining unit determines the number character corresponding to each key in the virtual keyboard corresponding to the mobile phone number as the target character, and determine the character adjacent to each target character as the error-tolerant character; or,

第二获取模块,配置为当所述输入场景为输入邮箱地址时,获取已登录邮箱的邮箱地址;所述第二确定单元将所述邮箱地址在虚拟键盘中的数字字符或字母字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符;或者,The second obtaining module is configured to obtain the email address of the registered mailbox when the input scenario is inputting an email address; the second determining unit determines the numeric characters or alphabetic characters of the email address in the virtual keyboard as all the email addresses. Describe the target character, and determine the character adjacent to each target character as the error-tolerant character; or,

第三获取模块,配置为当所述输入场景为输入网址时,获取预设网址;将所述预设网址在虚拟键盘中的数字字符或字母字符确定为所述目标字符,并将每一所述目标字符相邻的字符确定为所述容错字符。The third acquiring module is configured to acquire a preset web address when the input scene is an input web address; determine the numeric character or alphabetic character of the preset web address in the virtual keyboard as the target character, and assign each A character adjacent to the target character is determined as the error-tolerant character.

在另一实施例中,所述在第二确定单元还包括:In another embodiment, the second determining unit further includes:

第七确定模块,配置为确定所述虚拟键盘的类型;a seventh determining module, configured to determine the type of the virtual keyboard;

第八确定模块,配置为在所述虚拟键盘中确定与所述输入场景对应的目标字符;an eighth determination module, configured to determine a target character corresponding to the input scene in the virtual keyboard;

第九确定模块,配置为根据所述虚拟键盘的类型和所述目标字符,在所述虚拟键盘中将所述目标字符的相邻字符确定为所述容错字符。A ninth determination module is configured to determine, in the virtual keyboard, an adjacent character of the target character as the error-tolerant character according to the type of the virtual keyboard and the target character.

所以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明装置实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。Therefore, the description of the above apparatus embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the apparatus embodiments of the present invention, please refer to the description of the method embodiments of the present invention to understand.

需要说明的是,本发明实施例中,如果以软件功能模块的形式实现上述的输入方法,并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台智能终端(可以是个人计算机、手机、平板电脑等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。这样,本发明实施例不限制于任何特定的硬件和软件结合。It should be noted that, in the embodiment of the present invention, if the above input method is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art. The computer software products are stored in a storage medium and include several instructions for A smart terminal (which may be a personal computer, a mobile phone, a tablet computer, etc.) is made to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: a U disk, a removable hard disk, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk and other mediums that can store program codes. As such, embodiments of the present invention are not limited to any particular combination of hardware and software.

对应地,本发明实施例提供一种终端,包括存储器和处理器,所述存储器存储有可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述实施例中提供的输入方法。Correspondingly, an embodiment of the present invention provides a terminal, including a memory and a processor, the memory stores a computer program that can be run on the processor, and the processor implements the input provided in the above embodiments when the processor executes the program method.

对应地,本发明实施例提供一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现上述实施例中提供的输入方法中的步骤。Correspondingly, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps in the input method provided in the foregoing embodiment are implemented.

这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本发明存储介质和设备实施例中未披露的技术细节,请参照本发明方法实施例的描述而理解。It should be pointed out here that the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects to the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.

需要说明的是,图5为本发明实施例中实现上述输入方法的终端的一种硬件实体示意图,如图5所示,该终端500的硬件实体包括:处理器501、通信接口502和存储器503,其中It should be noted that FIG. 5 is a schematic diagram of a hardware entity of a terminal implementing the above input method in an embodiment of the present invention. As shown in FIG. 5 , the hardware entity of the terminal 500 includes: aprocessor 501 , acommunication interface 502 and a memory 503 ,in

处理器501通常控制终端500的总体操作。Theprocessor 501 generally controls the overall operation of the terminal 500 .

通信接口502可以使终端通过网络与其他终端或服务器通信。Thecommunication interface 502 enables the terminal to communicate with other terminals or servers through a network.

存储器503配置为存储由处理器501可执行的指令和应用,还可以缓存待处理器501以及终端500中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random Access Memory,RAM)实现。The memory 503 is configured to store instructions and applications executable by theprocessor 501, and can also cache data to be processed or processed by theprocessor 501 and each module in the terminal 500 (for example, image data, audio data, voice communication data and video data). communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM).

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本发明的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present invention. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, rather than the embodiments of the present invention. implementation constitutes any limitation. The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. 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 may be combined, or Can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The unit described above as a separate component may or may not be physically separated, and the component displayed as a unit may or may not be a physical unit; it may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may all be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integration The unit can be implemented either in the form of hardware or in the form of hardware plus software functional units.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by program instructions related to hardware, the aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, the execution includes: The steps of the above method embodiments; and the aforementioned storage medium includes: a removable storage device, a read only memory (Read Only Memory, ROM), a magnetic disk or an optical disk and other media that can store program codes.

或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台智能终端(可以是个人计算机、智能手机、平板电脑设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of software products in essence or the parts that make contributions to the prior art. The computer software products are stored in a storage medium and include several instructions for A smart terminal (which may be a personal computer, a smart phone, a tablet computer device, etc.) is made to execute all or part of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.

以上所述,仅为本发明的实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only the embodiments of the present invention, but the protection scope of the present invention is not limited to this. Any person skilled in the art who is familiar with the technical scope disclosed by the present invention can easily think of changes or substitutions. Included within the scope of protection of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (9)

CN201811145603.5A2018-09-292018-09-29 Input method and device, terminal and storage mediumActiveCN109521889B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201811145603.5ACN109521889B (en)2018-09-292018-09-29 Input method and device, terminal and storage medium
PCT/CN2019/107363WO2020063548A1 (en)2018-09-292019-09-23Input method and device, terminal, and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811145603.5ACN109521889B (en)2018-09-292018-09-29 Input method and device, terminal and storage medium

Publications (2)

Publication NumberPublication Date
CN109521889A CN109521889A (en)2019-03-26
CN109521889Btrue CN109521889B (en)2021-02-09

Family

ID=65772000

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811145603.5AActiveCN109521889B (en)2018-09-292018-09-29 Input method and device, terminal and storage medium

Country Status (2)

CountryLink
CN (1)CN109521889B (en)
WO (1)WO2020063548A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109521889B (en)*2018-09-292021-02-09咪咕音乐有限公司 Input method and device, terminal and storage medium
CN110221708A (en)*2019-03-292019-09-10北京理工大学A kind of adaptive key assignments display input system for virtual reality
CN110597712B (en)*2019-08-272023-09-05北京奇艺世纪科技有限公司Component attribute verification method, device, terminal and storage medium
CN118862033B (en)*2024-07-032025-03-28深圳市鑫云安开发科技有限公司 Information security analysis method and system based on big data

Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104298672A (en)*2013-07-162015-01-21北京搜狗科技发展有限公司Error correction method and device for input

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7030863B2 (en)*2000-05-262006-04-18America Online, IncorporatedVirtual keyboard system with automatic correction
US9552155B2 (en)*2008-02-042017-01-24Microsoft Technology Liecsnsing, LLCDynamic soft keyboard
CN101266520B (en)*2008-04-182013-03-27上海触乐信息科技有限公司 A system for flexible keyboard layouts
CN101788855B (en)*2010-03-092013-04-17华为终端有限公司Method, device and communication terminal for obtaining user input information
CN102207816B (en)*2010-07-162017-04-19北京搜狗科技发展有限公司Method for performing adaptive input based on input environment, and input method system
CN103257886B (en)*2012-02-152017-03-01联想(北京)有限公司 A method for calling an information input program and an electronic device
US8819574B2 (en)*2012-10-222014-08-26Google Inc.Space prediction for text input
US8887103B1 (en)*2013-04-222014-11-11Google Inc.Dynamically-positioned character string suggestions for gesture typing
CN105446516A (en)*2014-08-272016-03-30阿里巴巴集团控股有限公司Information input method and device
CN105404401A (en)*2015-11-232016-03-16小米科技有限责任公司Input processing method, apparatus and device
CN105511796A (en)*2015-12-302016-04-20努比亚技术有限公司Method and device for information inputting of adaptive-switching input method interface
CN107102746B (en)*2016-02-192023-03-24北京搜狗科技发展有限公司Candidate word generation method and device and candidate word generation device
CN107562222A (en)*2017-09-252018-01-09联想(北京)有限公司A kind of data processing method and system
CN109521889B (en)*2018-09-292021-02-09咪咕音乐有限公司 Input method and device, terminal and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104298672A (en)*2013-07-162015-01-21北京搜狗科技发展有限公司Error correction method and device for input

Also Published As

Publication numberPublication date
CN109521889A (en)2019-03-26
WO2020063548A1 (en)2020-04-02

Similar Documents

PublicationPublication DateTitle
CN109521889B (en) Input method and device, terminal and storage medium
WO2018107832A1 (en)Method and electronic device for preventing touch button from being false triggered
CN104808983B (en)A kind of method for pushing and server of application program
US10075430B2 (en)Method and system for efficient password input
CN106775282A (en)Operate the method and device of terminal
CN105100449B (en)A kind of picture sharing method and mobile terminal
CN106330458A (en) A verification code processing method and device
JP7142961B2 (en) multilingual keyboard system
WO2017156983A1 (en)List callup method and device
US20180349580A1 (en)Information processing method and device, and electronic equipment
WO2016112796A1 (en)Processing method and device for pushing information
CN106534200A (en)Identity authentication method and mobile terminal
CN106210231A (en)A kind of method of information processing and mobile terminal
CN106033355B (en) A language setting method and mobile terminal
CN107329586A (en)A kind of data inputting method, mobile terminal and computer-readable recording medium
CN107562262B (en)Method for responding touch operation, terminal and computer readable storage medium
CN107577933B (en)Application login method and device, computer equipment and computer readable storage medium
CN107133514B (en) A kind of password prompting method and mobile terminal
KR20170118799A (en) Fingerprint event handling method, device, and terminal
US10572693B2 (en)Method for hiding personal information on call screen, and device
CN106792711B (en) A method and device for preventing telecommunication fraud
CN116301402A (en)Password input method and device
CN108600084A (en)Information transmission method, device, storage medium and mobile terminal
CN106599642A (en)Information leakage prevention method and electronic terminal
CN106648539B (en)Unlocking method and electronic terminal

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp