Summary of the invention
In view of this, the technical problem to be solved in the present invention is, a kind of keyboard error correction method and device are provided, and can reduce the probability of happening of keystroke mis-operation.
For this reason, the embodiment of the present invention adopts following technical scheme:
The embodiment of the present invention provides a kind of keyboard error correction method, comprising:
The key assignments that scanning user pushes button, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments;
According in key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments after described normal key assignments the position relationship between corresponding button, determine whether the key assignments that the time that is scanned is positioned at after described normal key assignments is user misoperation key assignments, described according in key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments after described normal key assignments the position relationship between corresponding button, determine whether the key assignments that the time that is scanned is arranged in after described normal key assignments is that user misoperation key assignments is specially: judge whether the up-to-date corresponding button of key assignments of normal key assignments that is confirmed as of described key assignments sequence is adjacent in position with the rear corresponding button of key assignments of this normal key assignments, if, a rear key assignments of determining described normal key assignments is user misoperation key assignments, if not, a rear key assignments of determining described normal key assignments is normal key assignments,
Abandon described user misoperation key assignments.
The embodiment of the present invention also provides a kind of keyboard error correction method, comprising:
The key assignments that scanning user pushes button, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments;
According to the up-to-date time interval between the time that is scanned that is confirmed as the key assignments of normal key assignments and the key assignments after described normal key assignments in key assignments sequence, determine that the time that is scanned is positioned at whether described normal key assignments key assignments is afterwards user misoperation key assignments, described according to the up-to-date time interval between the time that is scanned that is confirmed as the key assignments of normal key assignments and the key assignments after described normal key assignments in key assignments sequence, determine whether the key assignments that the time that is scanned is arranged in after described normal key assignments is that user misoperation key assignments is specially: judge whether the time that is scanned of a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments of described key assignments sequence and the time interval being scanned between the time of described normal key assignments are not more than Preset Time interval, if, a rear key assignments of determining the up-to-date key assignments that is confirmed as normal key assignments is user misoperation key assignments, if not, a rear key assignments of determining the up-to-date key assignments that is confirmed as normal key assignments is normal key assignments,
Abandon described user misoperation key assignments.
The embodiment of the present invention provides a kind of keyboard error correction device, comprising:
Scanning element, the key assignments pushing button for scanning user, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments;
Judging unit, for according to key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments described normal key assignments after the position relationship between corresponding button, be definitely scanned the time and be positioned at whether described normal key assignments key assignments is afterwards user misoperation key assignments; Described judging unit specifically for: judge in described key assignments sequence, whether the up-to-date corresponding button of key assignments of normal key assignments that is confirmed as adjacent in position with the rear corresponding button of key assignments of this normal key assignments, if, a rear key assignments of determining described normal key assignments is user misoperation key assignments, if not, determine that a described rear key assignments is normal key assignments;
Discarding unit, for abandoning described user misoperation key assignments.
The embodiment of the present invention also provides a kind of keyboard error correction device, comprising:
Scanning element, the key assignments pushing button for scanning user, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments;
Judging unit, for according to the up-to-date time interval between the time that is scanned that is confirmed as the key assignments of normal key assignments and the key assignments after described normal key assignments of key assignments sequence, determine that the time that is scanned is positioned at whether described normal key assignments key assignments is afterwards user misoperation key assignments; Described judging unit specifically for: judge whether the time that is scanned of a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments and the time interval being scanned between the time of described normal key assignments are not more than Preset Time interval, if, a rear key assignments of determining the up-to-date key assignments that is confirmed as normal key assignments is user misoperation key assignments, if not, determine that a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments is normal key assignments;
Discarding unit, for abandoning described user misoperation key assignments.
Technique effect for technique scheme is analyzed as follows:
According in key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments after described normal key assignments be scanned time interval between the time and/or described key assignments the position relationship between corresponding button, determine user misoperation key assignments and abandon, thereby using the up-to-date key assignments that is confirmed as normal key assignments as judgment standard, according between key assignments, be scanned the time the time interval and/or the position relationship between corresponding button determine user misoperation key assignments, thereby the key assignments that can identify user misoperation button abandons, reduce the probability of happening of user key-press misoperation.
Embodiment
At present, be mostly the object by the optimal design of keyboard structure being reached to reduction keystroke mis-operation probability of happening.But, because needing the volume of the electronic equipment of keyboard, mobile phone etc. constantly reduces, and the size of keyboard also needs constantly to dwindle accordingly.Thus, under the restriction of keyboard size, the optimal design of keyboard structure can not well reduce the probability of happening of keystroke mis-operation.
Accordingly, the embodiment of the present invention provides a kind of keyboard error correction method and device, reduces the probability of happening of keystroke mis-operation with software mode.
Below, be described with reference to the accompanying drawings the realization of embodiment of the present invention keyboard error correction method and device.
Fig. 2 is embodiment of the present invention keyboard error correction method schematic flow sheet, as shown in Figure 2, comprising:
Step 201: the key assignments that scanning user pushes button, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments.
Wherein, the method for the key assignments of scanning user key-press can be used the method for scanning button value of the prior art to realize, and does not repeat here.
For scanning key assignments, the key of any " simultaneously pressing " is all free sequencing, corresponding, also corresponding different time being scanned all, described in time of being scanned be called below time that is scanned of this key assignments.The time that is scanned of key assignments can be differentiated out by scan method, and concrete scan method can be by driving code to realize.General, the scanning of carrying out key assignments is driving layer to complete, the corresponding information of key assignments of the button scanning generally sends to application layer to carry out subsequent treatment, such as follow-up step 202 and 203 etc., because if may affect press key response speed by driving layer to carry out the operations such as follow-up judgement.
Step 202: according in key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments after described normal key assignments be scanned time interval between the time and/or key assignments the position relationship between corresponding button, determine whether the key assignments that the time that is scanned is positioned at after described normal key assignments is user misoperation key assignments.
Step 203: abandon described user misoperation key assignments.
Embodiment of the present invention keyboard error correction method shown in Fig. 2, using the up-to-date key assignments that is confirmed as normal key assignments as judgment standard, according to key assignments be scanned time interval between the time and/or key assignments the position relationship between corresponding button, determine user misoperation key assignments and abandon, thereby having reduced the probability of happening of user key-press misoperation.
Fig. 3 is the another kind of keyboard error correction method schematic flow sheet of the embodiment of the present invention, as shown in Figure 3, comprising:
Step 301: the key assignments that scanning user pushes button, sequence obtains key assignments sequence to key assignments according to the time that is scanned of key assignments.
This step can refer step 201, does not repeat here.
Step 302: judge in described key assignments sequence, whether the up-to-date corresponding button of key assignments of normal key assignments that is confirmed as is adjacent in position with the rear corresponding button of key assignments of this normal key assignments, if so, execution step 303; Otherwise, execution step 305.
Wherein, in the time that user starts to carry out button operation, first key assignments in the key assignments sequence obtaining can be defined as the normal key assignments that user's normal running obtains, and this normal key assignments is to be the judgment standard for normal key assignments or misoperation key assignments as being positioned at key assignments after this normal key assignments.
In this step, judge when whether two key assignments are adjacent in position, as shown in Figure 3 a, can judge in the corresponding button of described two key assignments institute, button whether be positioned at the upper of another button under or on left or right maximum 4 positions (as the button of the button surrounding on limit may only have three, also may only have two etc.).Or, in this step, as shown in Figure 3 b, also can judge in two corresponding buttons of key assignments, whether a button is positioned at the upper of another button, or under, or left, or right, or upper left, or lower-left, or upper right, or (same on maximum 8 positions, bottom right, the key number of the button surrounding on keyboard limit not necessarily), but judge that whether two buttons are in 8 kinds of position relationships listed above, may exert an influence to the response speed of button, and generally speaking, around the possibility of four button generation misoperations outside four buttons is also lower up and down for the desired target button of pressing for user, therefore, in general this step, judge whether a button is positioned at four positions up and down of another button, like this, with respect to 8 position relationships that judge between two buttons, only judge that 4 position relationships between two buttons can reduce the impact for press key response speed of decision operation in this step greatly.
In position described in specific implementation when whether adjacent judgement, can set in advance the corresponding adjacent key of button that a table carrys out likely to exist on storage keyboard misoperation, wherein, can not be arranged in this table for the very low button of some misoperation possibilities, not limit here.
Step 303: whether the time interval being scanned between the time that judges described two key assignments is not more than Preset Time interval, if so, execution step 304, otherwise, execution step 305.
Wherein, the concrete numerical value at described Preset Time interval can specifically be set according to practical application, can not be excessive or too small, the key assignments of user's normal button may be mistaken for to user misoperation key assignments and abandon because the numerical value in the time interval is excessive, the numerical value in the time interval is crossed young pathbreaker cannot play the effect that judges user misoperation key assignments, therefore, in the time arranging, need consider specifically to arrange according to user's key scroll.In actual applications, can provide standard for user, by the autonomous concrete numerical value of setting the described time interval of user; Or, also can in device, set in advance concrete time interval numerical value.Preferably, special statistic unit can be set, user's key scroll is added up, thereby calculate time interval of suitable user, so that the described keyboard error correction method of the embodiment of the present invention can be adaptive to each different user, concrete statistical method repeats no more here.
Step 304: abandon a rear key assignments of described normal key assignments, return to step 302 and continue to judge taking this normal key assignments as benchmark next key assignments in key assignments sequence.
Wherein, if the result judging described in step 303 is when being, can determine that in described two key assignments, a rear key assignments is user misoperation key assignments, thereby user misoperation key assignments abandons (being a rear key assignments), return to afterwards step 302 and continue to judge next key assignments.For example, key assignments sequence is A, B, C, tetra-key assignments of D, and A is up-to-date definite normal key assignments, is judgment standard; Two key assignments that judge in current step 302 are A, B, and B is confirmed as user misoperation key assignments, abandons B, return to afterwards step 302 and continue to judge taking A as benchmark whether C is user misoperation key assignments.
Step 305: a rear key assignments of determining described normal key assignments is normal key assignments, and return to step 302 and judge taking the current up-to-date key assignments that is defined as normal key assignments as benchmark in key assignments sequence, whether next key assignments is user misoperation key assignments.
For example, key assignments sequence is A, B, C, tetra-key assignments of D, and two key assignments that judge in current step 302 are A, B, and normal key assignments A is judgment standard; In this step, show A to user, and abandon B, return to afterwards step 302 and continue to judge taking A as benchmark whether C is user misoperation key assignments.
If judged result described in step 303 is no, can determine that a described rear key assignments is user's normal running key assignments, it is normal key assignments, therefore, while returning to step 302, be judged as normal key assignments according to up-to-date again, i.e. a described rear key assignments, judges whether the next key assignments of a rear key assignments described in key assignments sequence is misoperation key assignments.So circulation, until last key assignments in key assignments sequence.For example, key assignments sequence is A, B, C, tetra-key assignments of D, and A is up-to-date definite normal key assignments, is judgment standard; Two key assignments that judge in current step 302 are A, B, and B is confirmed as normal key assignments, return to afterwards step 302 and continue to judge taking B as benchmark whether C is user misoperation key assignments.
In specific implementation, to show screen display normal key assignments, and corresponding key assignments in can corresponding delete key value sequence, thereby reduce the quantity of key assignments in key assignments sequence, and then reduce the resource occupation to keyboard error correction device, improve the data-handling efficiency of keyboard error correction device.
In the embodiment of the present invention shown in Fig. 3, first according to key assignments position relationship between corresponding button judge, afterwards, the time interval being scanned between the time according to key assignments again judges, obtain user misoperation key assignments according to judged result and abandon, reduced the probability of happening of user key-press misoperation.
In the embodiment of the present invention shown in Fig. 3, also can not perform step 303, now, the judged result of step 302 when being, directly performs step 304; When judged result is no, directly perform step 305; Now, can complete equally determining for user misoperation button, but, with respect to being scanned time interval between the time and key assignments institute correspondence position relation and determining the method for user misoperation button according to key assignments shown in Fig. 3, determine that the accuracy of user misoperation button is lower.
Fig. 4 is the another kind of keyboard error correction method schematic flow sheet of the embodiment of the present invention, as described in Figure 4, comprising:
Step 401: the key assignments that scanning user pushes button, sequence obtains key assignments sequence to key assignments according to the time that is scanned of key assignments.
This step can refer step 201, does not repeat here.
Step 402: judge whether the time that is scanned of a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments and the time interval being scanned between the time of described normal key assignments are not more than Preset Time interval, if, execution step 403, otherwise, execution step 405.
Wherein, be describedly up-to-dately confirmed as normal key assignments and be divided into two kinds of situations: the user's that user detects while initially carrying out button operation the corresponding key assignments of first button is normal key assignments; Or, the normal key assignments being obtained by step 404 or step 405 judged result in cycle criterion process.In the present embodiment, this key assignments is generally in key assignments sequence, do not show to user, be scanned the most forward key assignments of time.
Step 403: judge whether the described time interval is not more than the corresponding button of key assignments at Preset Time interval adjacent in position with the up-to-date corresponding button of key assignments that is confirmed as normal key assignments, if so, execution step 404; Otherwise, execution step 405.
Step 404: determine that a described rear key assignments is user misoperation key assignments, abandon this user misoperation key assignments, return to step 402, taking described normal key assignments as benchmark, judge next key assignments in key assignments sequence.
Wherein, if the result judging described in step 403 is when being, can determine the described time interval be not more than Preset Time interval and corresponding button and described normal key assignments the adjacent described key assignments of corresponding button be user misoperation key assignments, thereby abandon described user misoperation key assignments.
Step 405: determine that a described rear key assignments is normal key assignments, and return to step 402, taking the current up-to-date key assignments that is defined as normal key assignments as benchmark, judge in key assignments sequence, whether next key assignments is user misoperation key assignments.
Wherein, if when the result judging described in step 403 is no, can determine and not have the misoperation key assignments relevant to described normal key assignments, therefore, determine that a described rear key assignments is normal key assignments, continue taking the up-to-date key assignments (being a described rear key assignments) that is confirmed as normal key assignments as benchmark, judge whether next key assignments is user misoperation key assignments, so circulation, until last key assignments in sequence.
In specific implementation, to show screen display normal key assignments, and corresponding key assignments in can corresponding delete key value sequence, thereby reduce the quantity of key assignments in key assignments sequence, and then reduce the resource occupation to keyboard error correction device, improve the data-handling efficiency of keyboard error correction device.
In embodiment of the present invention keyboard error correction method shown in Fig. 4, the time interval being first scanned between the time according to key assignments judges, afterwards, again according to key assignments position relationship between corresponding button judge, obtain user misoperation key assignments according to judged result and abandon, reduced the probability of happening of user key-press misoperation.
In the embodiment of the present invention shown in Fig. 4, also can not perform step 403, now, the judged result of step 402 when being, directly performs step 404; When judged result is no, directly perform step 405; Now, can complete equally determining for user misoperation button, but, with respect to being scanned time interval between the time and key assignments institute correspondence position relation and determining the method for user misoperation button according to key assignments shown in Fig. 4, determine that the accuracy of user misoperation button is lower.
In the embodiment of the present invention keyboard error correction method shown in Fig. 3 and Fig. 4, according to key assignments be scanned time interval between the time and key assignments the position relationship between corresponding button determine the key assignments of user misoperation, the result that at this moment obtains user misoperation key assignments is comparatively accurate; When less demanding to user misoperation judged result accuracy, also can according to key assignments be scanned time interval between the time or key assignments the position relationship between corresponding button determine and the key assignments of user misoperation repeat no more here.
Fig. 5 is a kind of keyboard error correction device of embodiment of the present invention structural representation, as shown in Figure 5, comprising:
Scanning element 510, the key assignments pushing button for scanning user, and to key assignments, sequence obtains key assignments sequence according to the time that is scanned of key assignments;
Judging unit 520, for according to key assignments sequence up-to-date be confirmed as the key assignments of normal key assignments and key assignments described normal key assignments after be scanned time interval between the time and/or key assignments the position relationship between corresponding button, it is definite that whether what be scanned that the time is positioned at described normal key assignments key assignments afterwards be user misoperation key assignments;
Discarding unit 530, for abandoning described user misoperation key assignments.
Further, as shown in Figure 5 a, described keyboard error correction device can also comprise: display unit 540, and for showing normal key assignments.
Wherein, described judging unit 520 can be only according to key assignments the position relationship of corresponding button determine user misoperation key assignments, now, judging unit 520 specifically can be for:
Judge in described key assignments sequence, whether the up-to-date corresponding button of key assignments of normal key assignments that is confirmed as is adjacent in position with the rear corresponding button of key assignments of this normal key assignments, if so a rear key assignments of, determining described normal key assignments is user misoperation key assignments; If not, determine that a described rear key assignments is normal key assignments.
Further, described judging unit 520 judge key assignments on the basis of position relationship of corresponding button, the time interval that can also be scanned between the time according to two key assignments further judges whether key assignments is misoperation key assignments, now, judging unit 520 can also be further used for: judge adjacent on described two key assignments positions after, judge whether the up-to-date time interval being scanned between the time that is confirmed as the key assignments of normal key assignments and a rear key assignments of this normal key assignments is not more than Preset Time interval, if, carry out the operation of described definite user misoperation key assignments, if not, determine that a described rear key assignments is normal key assignments.
Or described judging unit 520 can also be only judge whether described key assignments is misoperation key assignments according to the time interval being scanned between the time that is scanned two adjacent key assignments of time, now, judging unit 520 specifically can be for:
Whether the time that is scanned of a rear key assignments and the time interval being scanned between the time of described normal key assignments that judge the up-to-date key assignments that is confirmed as normal key assignments are not more than Preset Time interval, if, a rear key assignments of determining the up-to-date key assignments that is confirmed as normal key assignments is user misoperation key assignments, if not, determine that a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments is normal key assignments.
Further, described judging unit 520 can also judge whether key assignments is on the basis of misoperation key assignments in the time interval being scanned between the time according to two key assignments, again according to two key assignments position relationship between corresponding button further judge whether key assignments is misoperation key assignments, now, judging unit 520 further can be for:
Described judgement exists the time that is scanned and described normal key assignments to be scanned after time interval between the time is not more than the key assignments at Preset Time interval, whether a rear corresponding button of key assignments that judges the described up-to-date key assignments that is confirmed as normal key assignments is adjacent in position with a described normal key assignments corresponding button, if, carrying out a described rear key assignments of determining the up-to-date key assignments that is confirmed as normal key assignments is the operation of user misoperation key assignments, if not, determine that a rear key assignments of the up-to-date key assignments that is confirmed as normal key assignments is normal key assignments.
Embodiment of the present invention keyboard error correction device shown in Fig. 5 and Fig. 5 a, according to described key assignments be scanned time interval between the time and/or key assignments the position relationship between corresponding button, determine user misoperation key assignments and abandon, thereby having reduced the probability of happening of user key-press misoperation.
Described in the embodiment of the present invention, keyboard error correction method and device go for all equipment with keyboard, for example, with terminals such as the mobile phone of keyboard, computer, factory's industrial computers, do not limit here.
One of ordinary skill in the art will appreciate that, the process that realizes above-described embodiment keyboard error correction method can complete by the relevant hardware of program command, described program can be stored in read/write memory medium, and this program is carried out the corresponding step in said method in the time carrying out.Described storage medium can be as: ROM/RAM, magnetic disc, CD etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.