Embodiment
Technical solution of the present invention is described in further detail with specific embodiment below in conjunction with the accompanying drawings, so that this area
Technical staff can be better understood from the present invention and can be practiced, but illustrated embodiment is not as a limitation of the invention.
The word of the present invention can be character string or single character comprising punctuate, for example, can be single middle word
Symbol, or the word being made up of multiple Chinese characters, can also be single English alphabet, English word, by English alphabet
The domain names constituted with punctuation mark, or the network address being made up of Arabic numerals and punctuation mark.Certainly, this hair
Bright word also includes other forms, and to literal definition, the present invention is not limited.
Fig. 1 is a kind of flow chart of embodiment of character input method of the present invention.
In the present embodiment, during word is inputted, due to falsely dropping word or leading word misspelling
Cause the word of upper screen not meet expection, if not done by other operations, and directly press rollback key defined in the present invention,
The word that expected upper screen is not met before will selecting the scene shielded on word, corrigendum can be returned to.Text will be selected
The scene shielded on word refers to that user inputs on the candidate window that Input Method Editor is provided and finished, and starts in candidate
State during inputted word is selected on window.Specifically, the character input method in the present embodiment, including following step
Suddenly:
Step S101, candidate word is generated according to input, is shielded on the word that will be selected from the candidate word of generation.
Step S102, preserves the contextual information (Context) of the word of upper screen.Specifically, by pressing space bar
Either after candidate window selection word, character input method of the present invention will preserve what this word above shielded was included
Contextual information, the contextual information is included in the information that candidate window inputted and the information of upper screen word.Such as, when
When the word of upper screen is Chinese, the contextual information is included in the phonetic inputted in candidate window, and upper screen middle word
The number of symbol;When, the upper word shielded is English alphabet, English word, domain names, or during network address, the contextual information
Be included in the English alphabet and punctuate inputted in candidate window, and upper screen English alphabet and the number of punctuate.
Step S103, detects the information for pressing rollback key.Rollback key in the present embodiment can be single key, can also
Be Macintosh, such as can be the combination of Ctrl and PageUp keys, or Ctrl and Backspace keys combination.For
Facilitate memory, the present embodiment is preferably the combination of Ctrl and Backspace keys, because Ctrl is to use more function
Key, and Backspace push-tos are usually used in cursor being moved rearwards by or deleted the previous character at cursor.Certainly, rollback key
Combination also can self-defining, as long as not with other shortcut key collisions, the present invention is not limited this.
Step S104, according to the contextual information of the word of the upper screen of preservation, generates candidate character again.It is specific and
Speech, after rollback key is pressed, by the way that the contextual information of the word of the upper screen preserved in step S101 is generated into time again
Selection word, so that the scene shielded on word will be selected by returning to.In character input method of the present invention, by the way that screen will be gone up
The contextual information of word is transmitted to input method kernel as parameter, generates candidate character again by input method kernel and is shown in marquis
Select in window, the process is the equal of progress identical input, and obtain identical candidate character again, but speed is than again
The speed of secondary input is fast.
Step S105, by the word selected from the candidate character generated again again upper screen.
The application process of character input method of the present invention will be illustrated by specific example below:
Such as, user wants to input " I am very honest " four words originally, is then inputted in the interface of input method in Fig. 2 (a)
" cheng ' shi ", the word that screen is gone up desired by it was " honesty " originally, but erroneous input " space bar " or selection
1 so that the word of upper screen is turned into " city ", input results are " I very city " in Fig. 2 (b).Above shield when discovery
Word is not met after expection, can directly be pressed the combination of Ctrl and Backspace keys, be returned to will select in Fig. 2 (c)
Determine the scene shielded on word, after the selection 2 in Fig. 2 (c), input results can be corrected as can be in Fig. 2 (d) " I am very sincere
It is real ".
For another example, user wants to input " www.baihe.com " this network address originally, then input method circle in Fig. 3 (a)
" www.bai " is have input in face, now input method is occurred in that after carrying out Auto-matching in candidate window
" www.baidu.com ", " www.baigoogledu.com " and " www.baihe.com " these three network address, desired by it will on
The word of screen was " www.baihe.com " originally, but erroneous input " space bar " or selection 1 so that the text of upper screen
Word is turned into " www.baidu.com ", and input results are " www.baidu.com " in Fig. 3 (b).When the text for finding upper screen
Word is not met after expection, can directly be pressed the combination of Ctrl and Backspace keys, be returned to will select in Fig. 3 (c)
The scene shielded on word, after the selection 2 in Fig. 3 (c), can be corrected as input results can be in Fig. 3 (d)
“www.baihe.com”。
Therefore, compared with existing character input method, the character input method that the present embodiment is provided passes through
The contextual information of the word of upper screen is preserved, and after the information for pressing rollback key is detected, text will be selected by returning to
The word of expected upper screen is not met before the scene shielded on word, corrigendum, input efficiency is improved.
Fig. 4 is the flow chart of another embodiment of character input method of the present invention.
In the present embodiment, when during word is inputted, due to falsely dropping word either by word misspelling
The word of upper screen is caused not meet expection, and after having carried out the operation of switching input pattern with cursor, then press the present invention
Defined rollback key, now because the strategy of the selection word between different input patterns is different, in order to avoid to normally making
With interference is produced, then the present embodiment will be without rollback operation.Specifically, the character input method in the present embodiment, including
Following steps:
Step S401, candidate word is generated according to input, is shielded on the word that will be selected from the candidate word of generation.
Step S402, preserves the contextual information of the word of upper screen.
Step S403, detects whether to switch input pattern by cursor.If switching input pattern by cursor, enter
Step S404;Otherwise, into step S405.In the present embodiment, switching input pattern can be switching input method or switch
Input language, such as be switched to five-stroke input method, or switch in spelling input method from Chinese character coding input method from spelling input method
To English input method.
Step S404, is handled according to normal key-press input.In the present embodiment, handle and refer to directly according to normal key-press input
Detect the information of user input and candidate word is shown on candidate window according to the information of user input, without according to preservation
The contextual information of the word of upper screen generates candidate character again.
Step S405, detects whether to press rollback key.If pressing rollback key, into step S406;Otherwise, into step
Rapid S404.
Step S406, selectes the word of the upper screen of this input error.It is by simulating keyboard message in the present embodiment
Select the word of the upper screen of this input error.Such as, when wanting corresponding to " www.baihe.com " in simulation drawing 3 (d)
, can be after the combination of Ctrl and Backspace keys to be pressed during Keyboard Message, simulation first is pressed the keyboard of shift key and disappeared
Breath, then the Keyboard Message that 13 times (11 English alphabets and the punctuates of 2 times) press Backspace keys is simulated, finally simulation is unclamped
The Keyboard Message of shift key;Then above-mentioned Keyboard Message is sent to operating system, final realize selectes this input error
The word above shielded.
Step S407, according to the contextual information of the word of the upper screen of preservation, generates candidate character again.
Step S408, while by the word selected from the candidate character generated again again upper screen, covers this defeated
Enter the word of the upper screen of mistake.
In addition, after input pattern is switched by cursor, if not carrying out other input operations, and directly pressing
Rollback key, can also perform rollback operation.Meanwhile, in the present embodiment, step S406 is optional step, when press rollback key it
Afterwards, the word of the upper screen of this input error can not be automatically selected, the input effect of existing input method equally can be also improved
Rate.
Therefore, compared with the character input method in Fig. 1, the character input method that the present embodiment is provided is not only
Can be by detecting whether that having carried out switching input pattern with cursor operates, it is to avoid to normal using producing interference;But also
The word of the upper screen of this input error can be selected, further to improve input efficiency.
Fig. 5 is the flow chart of another embodiment of character input method of the present invention.
In the present embodiment, when during word is inputted, due to falsely dropping word either by word misspelling
Cause the word of upper screen not meet expection, and press non-rollback key, then press rollback key defined in the present invention, now for
Avoid to normal using interference is produced, then the present embodiment will be without rollback operation.Specifically, the word in the present embodiment
Input method, comprises the following steps:
Step S501, candidate word is generated according to input, is shielded on the word that will be selected from the candidate word of generation.
Step S502, preserves the contextual information of the word of upper screen.
Step S503, detects whether to press non-rollback key.If pressing non-rollback key, into step S504;Otherwise, enter
Enter step S505.In the present embodiment, non-rollback key refers to other keys in addition to defined rollback key, such as works as definition
Ctrl is combined as after rollback key with Backspace keys, then except the group of Ctrl, Ctrl and Backspace keys
Close, it is other to be non-rollback key.It is usually first to press Ctrl that the reason for Ctrl not being defined as into non-rollback key herein, which is,
Backspace keys are pressed again, finally rollback could be realized, so if Ctrl is defined as into non-combined key can cause erroneous judgement.
Meanwhile, it can detect whether to press non-rollback key by setting state flag bit corresponding with non-rollback key.Such as, shape can be first set
The original value of state flag bit is " 0 ", and after non-rollback key is pressed, the value of state flag bit is changed into " 1 ", when detecting state mark
When the value of will position is changed into " 1 " from " 0 ", i.e., explanation presses non-rollback key.In addition, state flag bit can be also set to other
Arabic numerals either English alphabet, the present invention is not limited this.
Step S504, is handled according to normal key-press input.In the present embodiment, handle and refer to directly according to normal key-press input
Detect the information of user input and candidate word is shown on candidate window according to the information of user input, without according to preservation
The contextual information of the word of upper screen generates candidate character again.
Step S505, detects whether to press rollback key.If pressing rollback key, into step S506;Otherwise, into step
Rapid S504.
Step S506, selectes the word of the upper screen of this input error.In the present embodiment, when the non-rollback key pressed
When there is the key for deleting function for Backspace keys or Delete keys etc., the word that step S506 is selected can be caused with needing
The word for carrying out rollback operation is differed, it is therefore desirable to carry out detecting whether to press non-rollback key in advance in step S503.
Step S507, according to the contextual information of the word of the upper screen of preservation, generates candidate character again.
Step S508, while by the word selected from the candidate character generated again again upper screen, covers this defeated
Enter the word of the upper screen of mistake.
Equally, in the present embodiment, step S506 is also optional step, after rollback key is pressed, can not be selected automatically
The word of the upper screen of this input error is selected, the input efficiency of existing input method equally can be also improved.
Therefore, compared with the character input method in Fig. 1, the character input method that the present embodiment is provided is not only
Can be by detecting whether to press non-rollback key, it is to avoid use generation interference to normal;But also this input can be selected
The word of the upper screen of mistake, and the word of this input error is covered, without manually deleting, inputted with further improve
Efficiency.
Fig. 6 is a kind of module map of embodiment of character input system of the present invention.
In the present embodiment, when during word is inputted, due to falsely dropping word either by word misspelling
Cause the word of upper screen not meet expection, if not done by other operations, and directly press and retracted defined in the present invention
Key, you can return to the word that expected upper screen is not met before will selecting the scene shielded on word, corrigendum.It is specific and
Character input system 60 in speech, the present embodiment, including preserving module 601, detection module 602, candidate character generation module 603
With upper panel module 604.Preserving module 601 is used to preserve the contextual information of the word of upper screen.Detection module 602 is used to detect
Press the information of rollback key.Candidate character generation module 603 is used to generate candidate word according to input, and according to preservation
The contextual information of the word of upper screen, generates candidate character again.Upper panel module 604 is used to select from the candidate word of generation
Shield on fixed word, the candidate word of the generation includes the candidate word generated first and the candidate word generated again.
The present invention also provides the character input method system 60 of another embodiment, and in this embodiment, detection module 602 is also used
In after the contextual information that preserving module 601 preserves the word shielded on, detecting whether to switch input pattern by cursor.
After detecting by cursor switching input pattern, if rollback key is pressed again, without rollback operation.So can be
It is pre- due to falsely dropping word or causing word misspelling the word above shielded not meet during inputting word
Phase, and after having carried out the operation of switching input pattern with cursor, then press rollback key defined in the present invention, it is to avoid due to
The strategy of selection word between different input patterns is different, and interference is produced to normal use.
The present invention also provides the character input method system 60 of another embodiment, and in this embodiment, detection module 602 is also used
In after the contextual information for preserving the word shielded on, detect whether to press non-rollback key.Non- rollback is pressed when detecting
After the information of key, if rollback key is pressed again, without rollback operation.So can input word during, by
In falsely dropping word or caused word misspelling the word of upper screen not meet expection, and press non-rollback key it
Afterwards, then rollback key is pressed, and to normal using producing interference.
Fig. 7 is the module map of another embodiment of character input system of the present invention.
Compared with the character input method system 60 of above-described embodiment, in this embodiment, character input method system
70 also include word selecting module 605 and overlay module 606.Word selecting module 605 is used to detect the letter for pressing rollback key
After breath, the word of the upper screen of this input error is selected.Overlay module 606 is used for will be from secondary again in upper panel module 604
Into candidate character in the word selected again it is upper shield while, cover the word of the upper screen of this input error.So may be used
With the word for the upper screen that this input error is selected by word selecting module 605, then by overlay module 606 by this
The word covering of input error, without manually deleting, further to improve input efficiency.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills
Art field, is included within the scope of the present invention.