CN111949139B - Input method and device - Google Patents
Input method and device Download PDFInfo
- Publication number
- CN111949139B CN111949139B CN201910411680.9A CN201910411680A CN111949139B CN 111949139 B CN111949139 B CN 111949139B CN 201910411680 A CN201910411680 A CN 201910411680A CN 111949139 B CN111949139 B CN 111949139B
- Authority
- CN
- China
- Prior art keywords
- input string
- key
- input
- string
- matching degree
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000003825 pressing Methods 0.000 claims abstract description 13
- 238000009826 distribution Methods 0.000 claims description 17
- 238000012545 processing Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 230000009471 action Effects 0.000 description 6
- 238000003860 storage Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 5
- 238000012937 correction Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 210000003813 thumb Anatomy 0.000 description 1
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
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)
- User Interface Of Digital Computer (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
The embodiment of the application provides an input method and device, wherein the method comprises the following steps: obtaining a key input string input by a user, determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for a set number of times, the number of times of continuously appearing the same key in the target input string is inconsistent with the set number of times, modifying the key input string to enable the number of times of continuously appearing the same key in the target input string to be consistent with the set number of times, generating a first candidate item corresponding to the modified key input string to display, automatically modifying the key input string to correct errors when the number of times of continuously pressing the same key is wrong, then obtaining a first candidate item corresponding to the corrected key input string, avoiding the problem that a user is required to carry out correct key again, reducing the number of times of keys of the user, and improving the input efficiency.
Description
Technical Field
The present disclosure relates to the field of input methods, and in particular, to an input method, an input device, and an input device.
Background
In the existing input method, under the condition of a nine-key keyboard, each key can correspond to a plurality of letters, for example, the nine-square lattice keyboard is used for putting the letters into 3X 3 lattices in groups, the large-square lattice keyboard suitable for thumb input is more comfortable and natural to touch, words are obtained through associative combination, and compared with the full-keyboard Chinese character input, the method is convenient and rapid.
The applicant has found that when the user inputs a certain key, the user is likely to press a certain key continuously for a plurality of times, and when the user presses the key quickly, the user is easy to input errors due to one more press or one less press, and the user is required to press the key correctly again. For example, when the user wants to input the pinyin "zhong", the number on the nine-key keyboard corresponding to the correct input string is "94664", if the user presses "946664" or "9464", the pinyin corresponding to "946664" includes "ying" or "ying", and the pinyin corresponding to "9464" includes "xing" or "ying", and can be corresponding to other pinyin, so that the input method will not perform error correction. Therefore, when a certain key is continuously pressed for many times during input, error input is easy to occur, the user is required to correct the key correctly again, the key pressing times of the user are increased, and the input efficiency is low.
Disclosure of Invention
In view of the above problems, an embodiment of the present application provides an input method, an input device and an input device for overcoming the above problems or at least partially solving the above problems, which can solve the problems that when a certain key needs to be continuously pressed multiple times, a user is required to correctly key again to correct a key error, the number of times of key pressing of the user is increased, and the input efficiency is low.
In order to solve the above problems, the present application discloses an input method, including:
acquiring a key input string input by a user;
determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the continuous occurrence times of the same key in the target input string are inconsistent with the set times;
and modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
Optionally, the matching degree includes a sequential matching degree and/or a similar matching degree, and the determining that the key input string includes the target input string includes:
Determining the sequential matching degree and/or the similar matching degree of a first input string in the key input strings and the set input strings continuously pressed for the same key set times;
and if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input string comprises a target input string.
Optionally, before the determining that the key input string includes the target input string, the method further includes:
acquiring historical input data of a user;
counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the historical input data of the user;
and selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
Optionally, generating the first candidate item corresponding to the modified key input string for presentation includes:
and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
Optionally, before the modifying the key input string to make the number of times that the same key appears continuously in the target input string consistent with the set number of times, the method further includes:
Generating a corresponding second candidate item according to the key input string input by the user;
the generating the first candidate item corresponding to the modified key input string for presentation includes:
and displaying the first candidate item and the second candidate item together.
The embodiment of the application also discloses an input device, which comprises:
the input string acquisition module is used for acquiring a key input string input by a user;
the input string determining module is used for determining that the key input string comprises a target input string, the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the times of continuously appearing the same key in the target input string are inconsistent with the set times;
and the candidate item display module is used for modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for display.
Optionally, the matching degree includes a sequential matching degree and/or a similarity matching degree, and the input string determining module includes:
a matching degree determining submodule, configured to determine a sequential matching degree and/or a similar matching degree of a first input string in the key input strings and the set input string that is continuously pressed for the same key set number of times;
And the input string determination submodule is used for determining that the key input string comprises a target input string if the sequential matching degree and/or the similarity matching degree accords with the set matching degree.
Optionally, the apparatus further comprises:
the data acquisition module is used for acquiring user history input data before the key input string is determined to comprise a target input string;
the distribution statistics module is used for counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the user history input data;
and the input string selecting module is used for selecting the input strings with the conditional probability larger than the set threshold value and determining the input strings as the set input strings.
Optionally, the candidate presentation module includes:
and the position determining submodule is used for determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
Optionally, the apparatus further comprises:
the second candidate generating module is configured to generate a corresponding second candidate according to the key input string input by the user before the first candidate corresponding to the modified key input string is displayed in the manner that the number of times of continuously generating the same key in the target input string is consistent with the set number of times by modifying the key input string;
The candidate item presentation module comprises:
and the display sub-module is used for displaying the first candidate item and the second candidate item together.
The embodiment of the application also discloses a device for inputting, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory, and are configured to be executed by one or more processors, and the one or more programs comprise instructions for:
acquiring a key input string input by a user;
determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the continuous occurrence times of the same key in the target input string are inconsistent with the set times;
and modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
Optionally, the matching degree includes a sequential matching degree and/or a similar matching degree, and the determining that the key input string includes the target input string includes:
Determining the sequential matching degree and/or the similar matching degree of a first input string in the key input strings and the set input strings continuously pressed for the same key set times;
and if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input string comprises a target input string.
Optionally, before the determining that the key input string includes the target input string, the method further includes:
acquiring historical input data of a user;
counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the historical input data of the user;
and selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
Optionally, generating the first candidate item corresponding to the modified key input string for presentation includes:
and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
Optionally, before the modifying the key input string to make the number of times that the same key appears continuously in the target input string consistent with the set number of times, the method further includes:
Generating a corresponding second candidate item according to the key input string input by the user;
the generating the first candidate item corresponding to the modified key input string for presentation includes:
and displaying the first candidate item and the second candidate item together.
Also disclosed are machine-readable media having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform an input method as described above.
Embodiments of the present application include the following advantages:
in summary, according to the embodiment of the present application, by acquiring the key input string input by the user, it is determined that the key input string includes the target input string, where the target input string has a set matching degree with the set input string that continuously presses the same key for a set number of times, and the number of times that the same key continuously appears in the target input string is inconsistent with the set number of times, modifying the key input string to make the number of times that the same key continuously appears in the target input string consistent with the set number of times, and generating the first candidate item corresponding to the modified key input string to display, so that when the number of times that the same key is continuously pressed is wrong, the key input string is automatically modified to correct the error, and then the first candidate item corresponding to the corrected key input string is obtained, thereby avoiding the problem that the user is required to re-perform the correct key, reducing the number of times of keys of the user, and improving the input efficiency.
Drawings
FIG. 1 is a flowchart showing steps of a first embodiment of an input method of the present application;
FIG. 2 is a flow chart showing the steps of a second embodiment of an input method of the present application;
FIG. 3 shows a block diagram of an embodiment of an input device of the present application;
fig. 4 is a block diagram illustrating an apparatus for input according to an exemplary embodiment.
Detailed Description
In order that the above-recited objects, features and advantages of the present application will become more readily apparent, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
The embodiment of the application can be applied to various terminals, such as mobile phones, PDAs (Personal Digital Assistant, personal digital assistants), computers and the like, and the embodiment of the application does not limit the specific types of the terminals.
Referring to fig. 1, a flowchart illustrating steps of a first embodiment of an input method of the present application may specifically include the following steps:
step 101, obtaining a key input string input by a user.
The embodiment of the application can be applied to various input method programs for inputting through key input strings, such as Chinese, japanese, korean or any other input method program applicable to languages, and can convert the key input strings input by a user into candidates of the corresponding languages.
In the embodiment of the application, after the user inputs the key input string, for example, after inputting the pinyin character string (i.e., the key input string), the input method may display a plurality of Chinese characters or phrases matched with the pinyin character string, so that after the user selects a certain Chinese character or phrase, the Chinese character or phrase is displayed on the screen.
For example, when the input method is used in a nine-key keyboard, the pinyin character string "zhong" is input, and the key numbers corresponding to the pinyin character string "94664" in the nine-key keyboard are easily input by a user if the user inputs the pinyin character string "9464" or "946664" quickly.
Step 102, determining that the key input string includes a target input string, where the target input string has a set matching degree with a set input string in which the same key is continuously pressed for a set number of times, and the number of times that the same key continuously appears in the target input string is inconsistent with the set number of times.
The input string that the user needs to continuously press the same key for the set times is a set input string, which is recorded as the set input string. When it is determined that the target input string is included in the key input string inputted by the user, that is, it is determined that the target input string is matched with the setting input string, if such target input string is present, it is considered that the user may need to continuously press the same key for the set number of times.
The matching degree between the target input string and the set input string may include various determining manners, for example, comparing the target input string and the set input string, calculating a ratio of the number of characters in the target input string, which is the same as the set input string, to the total number of characters in the set input string, as the matching degree, or dividing the matching degree into two dimensions, namely, sequential matching degree and/or similar matching degree, and comparing the two input strings to determine sequential matching degree and/or similar matching degree, which may specifically include any other applicable implementation manner, and the embodiment of the present application is not limited thereto.
For example, the key input string includes an input string "9464", 4 characters in the input string "9464" are the same as the set input string "94664", and the appearance sequence of the 4 characters is the same as the set input string "94664", that is, the matching degree is determined to be 4 times as high as 5 minutes, and the matching degree is the same as the set matching degree, so the input string "9464" is the target input string, and the key input string is determined to include the target input string.
In this embodiment of the present application, the set input string is predetermined, and may count a conditional probability distribution of various input strings when the user continuously presses the same key in the historical input data, select an input string with a conditional probability greater than a set threshold, determine the set input string, or may determine the set input string by collecting an input string with a greater error when the user historically presses the same key for a set number of times, or manually select some input strings according to experience, determine the set input string, and specifically may determine the set input string by adopting any applicable condition.
In the embodiment of the application, it is determined that not only the key input string includes the target input string, but also the number of times that the same key in the target input string continuously appears is inconsistent with the set number of times. The number of settings corresponds to the target input string, and for example, the number of settings for the setting input string "94664" corresponding to the continuous pressing of "6" in the above example is 2. The key input string includes a target input string, which indicates that the user may need to continuously press the same key for a set number of times, and the number of times that the same key continuously appears in the target input string '9464' is 1 and is inconsistent with the set number of times, which indicates that the user may not press the same key for the correct number of times, may press the same key for a small number of times, and may press the same key for a large number of times.
And step 103, modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
In order to automatically correct errors input by a user, the key input string is modified according to the set times, so that the times of continuous occurrence of the same key in the target input string are consistent with the set times. Modifications may include, but are not limited to, additions, deletions, and the like. If the number of times of the continuous occurrence of the same key in the target input string is smaller than the set number of times, adding the same key in the target input string to enable the number of times of the continuous occurrence of the same key in the target input string to be consistent with the set number of times, and if the number of times of the continuous occurrence of the same key in the target input string is larger than the set number of times, deleting the same key in the target input string to enable the number of times of the continuous occurrence of the same key in the target input string to be consistent with the set number of times.
In the embodiment of the application, after the key input string is modified, a corresponding first candidate item is generated according to the modified key input string and displayed. For example, the key input string input by the user is "9464", and since the key input string includes the target input string "9464", and the number of occurrences of "6" that needs to be continuously pressed in the target input string "9464" is 1 and inconsistent with the set number of occurrences of 2, 1 "6" is added in the target input string "9464", so as to obtain the key input string "94664", and a corresponding first candidate item is generated according to "94664", and then when the candidate item is provided for the user, not only the second candidate item corresponding to the key input string "9464" input by the user is displayed, but also the first candidate item corresponding to the corrected key input string "94664" is displayed, so that the user can select the truly required candidate item for screen display.
In summary, according to the embodiment of the present application, by acquiring the key input string input by the user, it is determined that the key input string includes the target input string, where the target input string has a set matching degree with the set input string that continuously presses the same key for a set number of times, and the number of times that the same key continuously appears in the target input string is inconsistent with the set number of times, modifying the key input string to make the number of times that the same key continuously appears in the target input string consistent with the set number of times, and generating the first candidate item corresponding to the modified key input string to display, it is possible to automatically modify the key input string to correct the error when the number of times that the same key is continuously pressed is wrong, and then obtain the first candidate item corresponding to the corrected key input string, thereby avoiding the problem that the user needs to re-perform the correct key, reducing the number of times of keys of the user, and improving the input efficiency.
Referring to fig. 2, a flowchart illustrating steps of a second embodiment of an input method of the present application may specifically include the following steps:
step 201, obtaining user history input data.
In the embodiment of the application, the target input string can be determined according to the history statistics, and therefore, user history input data needs to be acquired, including input strings input by a user for a period of time in history.
Step 202, counting the conditional probability distribution of various input strings in the user history input data under the condition that the same key needs to be continuously pressed.
In the embodiment of the present application, in the user history input data, various input strings in which the same key needs to be continuously pressed are searched, and the conditional probability distribution of the various input strings is counted, that is, in the case that the input string "a" is input, the conditional probability distribution of the key "B" needs to be continuously pressed, for example, in the case that the input string "946" is input, the probability of "6" is continuously pressed 2 times.
And 203, selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
In the embodiment of the application, after the conditional probability distribution of various input strings occurs in the historical input data of the user under the condition that the same key needs to be continuously pressed, the input string with the conditional probability being larger than the set threshold value is selected and determined as the set input string. The setting threshold may be set according to actual needs, which is not limited in the embodiment of the present application.
Step 204, obtaining a key input string input by a user.
In the embodiments of the present application, the specific implementation manner of this step may refer to the description in the foregoing embodiments, which is not repeated herein.
Step 205, determining the sequential matching degree and/or the similarity matching degree between the first input string in the key input strings and the set input string which is continuously pressed for the same key set times.
In this embodiment of the present application, the first input string is any one of the key input strings, for example, all possible input strings in the key input strings are extracted individually by an exhaustion method, and as the first input string, the first input string may be obtained in any suitable manner.
In the embodiment of the application, the matching degree includes sequential matching degree and/or similarity matching degree. The sequence matching degree is used for representing the matching degree of characters between two input strings in terms of sequence, and can be in the form of characters, numbers, symbols and the like, which is not limited in the embodiment of the application. The similarity matching degree is used to represent the matching degree of characters between two input strings in terms of similarity, and may take the form of characters, numbers, symbols, and the like, which is not limited in the embodiment of the present application.
For example, a numerical value of 0 to 1 is used to represent the sequential matching degree and the similarity matching degree, respectively, and a set input string "94664" exists. The key input string … … 5489449464 … … includes a first input string 9464, wherein the order of the 4 characters of 9, 4, 6 and 4 in the two input strings is the same, the number of the characters 4 in the same order is divided by the number of the characters 5 in the set input string to obtain the order matching degree of 4/5, and the number of the 4 characters of 9, 4, 6 and 4 in the two input strings is the same, the number of the characters 4 in the same character is divided by the number of the characters 5 in the set input string to obtain the similarity matching degree of 4/5; the key input string "… … 5489449465 … …" includes the first input string "9465", and the 3 characters of "9", "4" and "6" in the two input strings are identical in sequence, and the number of characters 3 in the identical sequence is divided by the number of characters 5 in the set input string to obtain the sequence matching degree of 3/5, and the 3 characters of "9", "4" and "6" in the two input strings are identical, and the number of characters 3 in the same character is divided by the number of characters 5 in the set input string to obtain the similarity matching degree of 3/5.
Step 206, if the sequential matching degree and/or the similarity matching degree accords with the set matching degree, determining that the key input string includes the target input string.
In the embodiment of the present application, in order to determine that the key input string includes the target input string, the sequential matching degree may be adopted alone, the similarity matching degree may be adopted alone, or the sequential matching degree and the similarity matching degree may also be adopted simultaneously. The set matching degree may be set according to a set input string, and different set input strings may correspond to different set matching degrees, for example, the set matching degree corresponding to the set input string "94664" is: the sequence matching degree is 4/5 or 5/5, and the similarity matching degree is 4/5 or 5/5.
In the embodiment of the application, if the sequential matching degree accords with the set sequential matching degree, or the similar matching degree accords with the set similar matching degree, or the sequential matching degree accords with the set sequential matching degree and the similar matching degree accords with the set similar matching degree, determining that the key input string comprises the target input string.
Step 207, generating a corresponding second candidate item according to the key input string input by the user.
In the embodiment of the present application, there is a possibility that the key input string input by the user does not have an input error, so that the corresponding second candidate item is generated according to the key input string input by the user.
And step 208, modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, generating a first candidate item corresponding to the modified key input string, and displaying the first candidate item and the second candidate item together.
In the embodiment of the application, the corresponding first candidate item is generated according to the modified key input string, and then the first candidate item and the second candidate item can be displayed together. Of course, only the first candidate may be displayed, and may be specifically set according to the actual situation, which is not limited in the embodiment of the present application. The presentation order of the first candidate item and the second candidate item may be preset, for example, the second candidate item is fixedly placed at the first position of the presentation order, and the first candidate item is placed at the second position of the presentation order. Or the order of presentation of the first candidate item and the second candidate item may be determined based on the conditional probability of the set input string that the target input string matches. The display order may be specifically determined in any suitable manner, which is not limited in the embodiments of the present application.
In an embodiment of the present application, optionally, one implementation manner of generating the corresponding first candidate for presentation may include: and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
When the set input strings are determined, each set input string has a corresponding conditional probability, the higher the conditional probability is, the higher the probability of user input errors when the target input string is included in the key input string is, and therefore the more needs to be automatically corrected, namely the more likely that the first candidate corresponding to the modified key input string is a candidate which meets the real needs of the user, and therefore the display position of the first candidate can be determined according to the conditional probability. In particular, it is only necessary to follow a rule that the greater the conditional probability is, the more forward the display position of the first candidate is, for example, when the conditional probability of the input string is set to be greater than 0.7 and not greater than 0.8, the display position of the first candidate is at the second position, and when the conditional probability of the input string is set to be greater than 0.8, the display position of the first candidate is at the first position. Any suitable implementation manner may be specifically adopted, and the embodiment of the present application is not limited to this.
In summary, according to the embodiment of the present application, by acquiring the key input strings input by the user, determining the sequential matching degree and/or the similar matching degree of the first input string in the key input strings and the set input string that continuously presses the same key for a set number of times, if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input strings include the target input string, modifying the key input strings to make the number of times of continuously appearing the same key in the target input strings consistent with the set number of times, generating the first candidate item corresponding to the modified key input strings, and displaying the first candidate item and the second candidate item together, so that when the number of times of continuously pressing the same key is wrong, automatically modifying the key input strings to correct the error can be achieved, and then the first candidate item corresponding to the corrected key input string is obtained, so that the problem that the user is required to re-perform the correct key is avoided, the number of times of continuously appearing the same key is reduced, and the input efficiency is improved.
Further, through obtaining user history input data, statistics is carried out on the conditional probability distribution of various input strings under the condition that the same key is required to be continuously pressed in the user history input data, the input strings with the conditional probability being larger than a set threshold value are selected and are determined to be the set input strings, so that the determined set input strings are more in line with the input habit of a user, automatic error correction can be carried out according to the input habit of the user, and the accuracy of automatic error correction is improved.
Further, by determining the display position of the first candidate item according to the conditional probability of the target input string included in the key input string, the more likely the user input error is, the more front the display position of the first candidate item generated after error correction is, the easier the user can find the first candidate item to select, and input efficiency is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of combinations of motion actions, but those skilled in the art should appreciate that the embodiments are not limited by the order of motion actions described, as some steps may be performed in other orders or simultaneously according to the embodiments of the present application. Further, it should be understood by those skilled in the art that the embodiments described in the specification are all preferred embodiments and that the movement involved is not necessarily required by the embodiments of the present application.
Referring to fig. 3, a block diagram of an embodiment of an input device of the present application is shown, which may specifically include:
an input string acquisition module 301, configured to acquire a key input string input by a user;
an input string determining module 302, configured to determine that the key input string includes a target input string, where the target input string has a set matching degree with a set input string that continuously presses the same key for a set number of times, and the number of times that the same key in the target input string continuously appears is inconsistent with the set number of times;
and a candidate display module 303, configured to modify the key input string to make the number of times that the same key in the target input string continuously appears consistent with the set number of times, and generate a first candidate corresponding to the modified key input string for display.
Optionally, the matching degree includes a sequential matching degree and/or a similarity matching degree, and the input string determining module includes:
a matching degree determining submodule, configured to determine a sequential matching degree and/or a similar matching degree of a first input string in the key input strings and the set input string that is continuously pressed for the same key set number of times;
and the input string determination submodule is used for determining that the key input string comprises a target input string if the sequential matching degree and/or the similarity matching degree accords with the set matching degree.
Optionally, the apparatus further comprises:
the data acquisition module is used for acquiring user history input data before the key input string is determined to comprise a target input string;
the distribution statistics module is used for counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the user history input data;
and the input string selecting module is used for selecting the input strings with the conditional probability larger than the set threshold value and determining the input strings as the set input strings.
Optionally, the candidate presentation module includes:
and the position determining submodule is used for determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
Optionally, the apparatus further comprises:
the second candidate generating module is used for generating a corresponding second candidate according to the key input string input by the user before the first candidate corresponding to the modified key input string is generated and displayed by modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times;
the candidate item presentation module comprises:
And the display sub-module is used for displaying the first candidate item and the second candidate item together.
In summary, according to the embodiment of the present application, by acquiring the key input string input by the user, it is determined that the key input string includes the target input string, where the target input string has a set matching degree with the set input string that continuously presses the same key for a set number of times, and the number of times that the same key continuously appears in the target input string is inconsistent with the set number of times, modifying the key input string to make the number of times that the same key continuously appears in the target input string consistent with the set number of times, and generating the first candidate item corresponding to the modified key input string to display, so that when the number of times that the same key is continuously pressed is wrong, the key input string is automatically modified to correct the error, and then the first candidate item corresponding to the corrected key input string is obtained, thereby avoiding the problem that the user is required to re-perform the correct key, reducing the number of times of keys of the user, and improving the input efficiency.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
Fig. 4 is a block diagram illustrating an apparatus 400 for input according to an example embodiment. For example, apparatus 400 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, or the like.
Referring to fig. 4, apparatus 400 may include one or more of the following components: a processing component 402, a memory 404, a power supply component 406, a multimedia component 408, an audio component 410, an input/output (I/O) interface 412, a sensor component 414, and a communication component 416.
The processing component 402 generally controls the overall operation of the apparatus 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 520 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
Memory 404 is configured to store various types of data to support operations at device 400. Examples of such data include instructions for any application or method operating on the apparatus 400, contact data, phonebook data, messages, pictures, videos, and the like. The memory 404 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 406 provides power to the various components of the apparatus 400. The power supply components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 400.
The multimedia component 408 includes a screen between the device 400 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 408 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the device 400 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 further includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 414 includes one or more sensors for providing status assessment of various aspects of the apparatus 400. For example, the sensor assembly 414 may detect the on/off state of the device 400, the relative positioning of the components, such as the display and keypad of the apparatus 400, the sensor assembly 414 may also detect the change in position of the apparatus 400 or one component of the apparatus 400, the presence or absence of user contact with the apparatus 400, the orientation or acceleration/deceleration of the apparatus 400, and the change in temperature of the apparatus 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate communication between the apparatus 400 and other devices in a wired or wireless manner. The apparatus 400 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication part 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as memory 404, including instructions executable by processor 520 of apparatus 400 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus (smart terminal or server) causes the apparatus to perform an input method, the method comprising:
acquiring a key input string input by a user;
determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the continuous occurrence times of the same key in the target input string are inconsistent with the set times;
and modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
Optionally, the matching degree includes a sequential matching degree and/or a similar matching degree, and the determining that the key input string includes the target input string includes:
determining the sequential matching degree and/or the similar matching degree of a first input string in the key input strings and the set input strings continuously pressed for the same key set times;
and if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input string comprises a target input string.
Optionally, before the determining that the key input string includes the target input string, the method further includes:
acquiring historical input data of a user;
counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the historical input data of the user;
and selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
Optionally, generating the first candidate item corresponding to the modified key input string for presentation includes:
and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
Optionally, before the modifying the key input string to make the number of times that the same key appears continuously in the target input string consistent with the set number of times, the method further includes:
generating a corresponding second candidate item according to the key input string input by the user;
the generating the first candidate item corresponding to the modified key input string for presentation includes:
and displaying the first candidate item and the second candidate item together.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present embodiments have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the present application.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The foregoing has outlined a detailed description of an input method, an input device and a device for inputting, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided only to assist in understanding the method and core ideas of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.
Claims (16)
1. An input method, comprising:
acquiring a key input string input by a user;
determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the continuous occurrence times of the same key in the target input string are inconsistent with the set times;
and modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
2. The method of claim 1, wherein the matching degree comprises a sequential matching degree and/or a similar matching degree, and wherein determining that the key input string comprises a target input string comprises:
determining the sequential matching degree and/or the similar matching degree of a first input string in the key input strings and the set input strings continuously pressed for the same key set times;
and if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input string comprises a target input string.
3. The method of claim 1, wherein prior to the determining that the key input string includes a target input string, the method further comprises:
Acquiring historical input data of a user;
counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the historical input data of the user;
and selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
4. The method of claim 3, wherein generating a first candidate for presentation for the modified key input string comprises:
and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
5. The method of claim 1, wherein before said modifying the key input string to cause the number of consecutive occurrences of the same key in the target input string to coincide with the set number of times, generating a first candidate for presentation for the modified key input string, the method further comprises:
generating a corresponding second candidate item according to the key input string input by the user;
the generating the first candidate item corresponding to the modified key input string for presentation includes:
and displaying the first candidate item and the second candidate item together.
6. An input device, comprising:
The input string acquisition module is used for acquiring a key input string input by a user;
the input string determining module is used for determining that the key input string comprises a target input string, the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the times of continuously appearing the same key in the target input string are inconsistent with the set times;
and the candidate item display module is used for modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for display.
7. The apparatus of claim 6, wherein the match degree comprises a sequential match degree and/or a similarity match degree, and wherein the input string determination module comprises:
a matching degree determining submodule, configured to determine a sequential matching degree and/or a similar matching degree of a first input string in the key input strings and the set input string that is continuously pressed for the same key set number of times;
and the input string determination submodule is used for determining that the key input string comprises a target input string if the sequential matching degree and/or the similarity matching degree accords with the set matching degree.
8. The apparatus of claim 6, wherein the apparatus further comprises:
the data acquisition module is used for acquiring user history input data before the key input string is determined to comprise a target input string;
the distribution statistics module is used for counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the user history input data;
and the input string selecting module is used for selecting the input strings with the conditional probability larger than the set threshold value and determining the input strings as the set input strings.
9. The apparatus of claim 8, wherein the candidate presentation module comprises:
and the position determining submodule is used for determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
10. The apparatus of claim 6, wherein the apparatus further comprises:
the second candidate generating module is used for generating a corresponding second candidate according to the key input string input by the user before the first candidate corresponding to the modified key input string is generated and displayed by modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times;
The candidate item presentation module comprises:
and the display sub-module is used for displaying the first candidate item and the second candidate item together.
11. An apparatus for input comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, the one or more programs comprising instructions for:
acquiring a key input string input by a user;
determining that the key input string comprises a target input string, wherein the target input string has a set matching degree with a set input string for continuously pressing the same key for set times, and the continuous occurrence times of the same key in the target input string are inconsistent with the set times;
and modifying the key input string to enable the continuous occurrence times of the same key in the target input string to be consistent with the set times, and generating a first candidate item corresponding to the modified key input string for displaying.
12. The apparatus of claim 11, wherein the match degree comprises a sequential match degree and/or a similar match degree, and wherein the determining that the key input string comprises a target input string comprises:
Determining the sequential matching degree and/or the similar matching degree of a first input string in the key input strings and the set input strings continuously pressed for the same key set times;
and if the sequential matching degree and/or the similar matching degree accords with the set matching degree, determining that the key input string comprises a target input string.
13. The apparatus of claim 11, further comprising, prior to said determining that the key input string includes a target input string:
acquiring historical input data of a user;
counting the conditional probability distribution of various input strings under the condition that the same key needs to be continuously pressed in the historical input data of the user;
and selecting an input string with the conditional probability larger than a set threshold value, and determining the input string as the set input string.
14. The apparatus of claim 13, wherein generating a first candidate for presentation for the modified key input string comprises:
and determining the display position of the first candidate item according to the conditional probability of the set input string matched with the target input string.
15. The apparatus of claim 11, wherein before the modifying the key input string to cause the number of consecutive occurrences of the same key in the target input string to coincide with the set number of times, generating a first candidate for presentation corresponding to the modified key input string further comprises:
Generating a corresponding second candidate item according to the key input string input by the user;
the generating the first candidate item corresponding to the modified key input string for presentation includes:
and displaying the first candidate item and the second candidate item together.
16. A machine readable medium having instructions stored thereon, which when executed by one or more processors, cause an apparatus to perform the input method of one or more of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411680.9A CN111949139B (en) | 2019-05-16 | 2019-05-16 | Input method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910411680.9A CN111949139B (en) | 2019-05-16 | 2019-05-16 | Input method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111949139A CN111949139A (en) | 2020-11-17 |
CN111949139B true CN111949139B (en) | 2024-03-08 |
Family
ID=73336406
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910411680.9A Active CN111949139B (en) | 2019-05-16 | 2019-05-16 | Input method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111949139B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010097444A (en) * | 2008-10-17 | 2010-04-30 | Sharp Corp | Character input device |
WO2016107316A1 (en) * | 2014-12-30 | 2016-07-07 | 北京奇虎科技有限公司 | Method and device for input method cursor operation |
CN107229348A (en) * | 2016-03-23 | 2017-10-03 | 北京搜狗科技发展有限公司 | A kind of input error correction method, device and the device for inputting error correction |
-
2019
- 2019-05-16 CN CN201910411680.9A patent/CN111949139B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010097444A (en) * | 2008-10-17 | 2010-04-30 | Sharp Corp | Character input device |
WO2016107316A1 (en) * | 2014-12-30 | 2016-07-07 | 北京奇虎科技有限公司 | Method and device for input method cursor operation |
CN107229348A (en) * | 2016-03-23 | 2017-10-03 | 北京搜狗科技发展有限公司 | A kind of input error correction method, device and the device for inputting error correction |
Non-Patent Citations (1)
Title |
---|
一种改进的应用于多模式串匹配的KR算法;董志鑫;李馨梅;;智能计算机与应用(第01期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111949139A (en) | 2020-11-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107688399B (en) | Input method and device and input device | |
CN109144285B (en) | Input method and device | |
CN110941727B (en) | Resource recommendation method and device, electronic equipment and storage medium | |
CN105653276A (en) | Method and apparatus for language setting | |
CN106372204A (en) | Push message processing method and device | |
RU2609033C1 (en) | Input method and input system | |
CN109255128B (en) | Multi-level label generation method, device and storage medium | |
JP6609266B2 (en) | Fingerprint identification method, apparatus, program, and recording medium | |
CN113807253B (en) | Face recognition method and device, electronic device and storage medium | |
CN108803892B (en) | Method and device for calling third party application program in input method | |
CN110795014B (en) | Data processing method and device and data processing device | |
CN112948704A (en) | Model training method and device for information recommendation, electronic equipment and medium | |
CN112306251B (en) | Input method, device and device for input | |
CN112331194B (en) | Input method and device and electronic equipment | |
CN115484471B (en) | Method and device for recommending anchor | |
CN110297678B (en) | Input method interface processing method and device | |
CN111949139B (en) | Input method and device | |
CN108108356A (en) | A kind of character translation method, apparatus and equipment | |
CN113741783B (en) | Key identification method and device for identifying keys | |
CN112905023B (en) | Input error correction method, device and device for input error correction | |
CN116091654A (en) | Font library generation method, training method and training device for character image generation model | |
CN104317480B (en) | Character keys display methods, device and terminal | |
CN113918029A (en) | Input method and device | |
CN114594862B (en) | Recommendation method, device and electronic device | |
CN108037875B (en) | Method, device and storage medium for switching input modes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |