WO2016107317A1 - 输入法光标操作方法和装置 - Google Patents

输入法光标操作方法和装置 Download PDF

Info

Publication number
WO2016107317A1
WO2016107317A1 PCT/CN2015/094842 CN2015094842W WO2016107317A1 WO 2016107317 A1 WO2016107317 A1 WO 2016107317A1 CN 2015094842 W CN2015094842 W CN 2015094842W WO 2016107317 A1 WO2016107317 A1 WO 2016107317A1
Authority
WO
WIPO (PCT)
Prior art keywords
cursor
candidate
sliding
mode
sequence
Prior art date
Application number
PCT/CN2015/094842
Other languages
English (en)
French (fr)
Inventor
符钧
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Priority to US15/541,070 priority Critical patent/US20180011549A1/en
Publication of WO2016107317A1 publication Critical patent/WO2016107317A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements 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/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/018Input/output arrangements for oriental characters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text

Definitions

  • the present invention relates to the field of input method technologies, and in particular, to an input method cursor operation method and apparatus.
  • the default input language is a character in English.
  • English input can be entered by directly selecting a letter.
  • the input of other languages is more troublesome.
  • the Chinese language has tens of thousands of characters. It is impossible to input directly through the buttons.
  • the Chinese characters are encoded according to the pronunciation characteristics of Chinese characters (corresponding to the Pinyin input method).
  • the glyph characteristics of Chinese characters such as strokes and radicals
  • the Chinese characters are encoded (corresponding to the font input method), etc., and each key combination can be associated with the Chinese character encoding, so that the Chinese characters can be input.
  • the candidate method is displayed in the candidate column according to the edit string, if the user wants to select more candidates, the user needs to click the expand button to expand the candidate interface for selection, but the candidate interface will overwrite the input method keyboard. It is not possible to display new candidates directly in the candidate bar by the cursor of the candidate bar.
  • the present invention has been made in order to provide an input method cursor operating device and a corresponding input method cursor operation method that overcome the above problems or at least partially solve the above problems.
  • an input method cursor operation method including:
  • the listener receives a sliding event
  • the cursor is controlled to move in the editing string according to the sliding event
  • the current edit string cursor sliding mode is switched to the candidate cursor sliding mode
  • the cursor is controlled to move in the candidate according to the sliding event
  • the current candidate cursor sliding mode is switched to the edit string cursor sliding mode.
  • the present invention also discloses an input method cursor operating device, including:
  • the sliding monitoring module is adapted to monitor whether a sliding event is received in a regular text candidate mode of the input method
  • a type determining module configured to determine, if a sliding event is received, a preset mode bar that is satisfied by the sliding event Type of piece;
  • the cursor mode execution module is adapted to enter the edit string cursor sliding mode if the sliding event satisfies the first type preset mode condition, and determine whether the sliding event is continued for the sliding event that is continuously received in the edit string cursor sliding mode Satisfying the first switching condition; if the sliding event that continues to be received does not satisfy the first switching condition, enters the editing cursor movement module; if the sliding event that continues to be received satisfies the first switching condition, enters the first cursor mode switching module;
  • Editing a cursor movement module adapted to control the movement of the cursor in the edit string according to the sliding event
  • a first cursor mode switching module adapted to switch a current edit string cursor sliding mode to a candidate cursor sliding mode
  • a candidate cursor mode execution module configured to enter a candidate cursor sliding mode if the sliding event satisfies a second type preset mode condition, and determine whether the sliding event is continued for a sliding event that continues to be received in the candidate cursor sliding mode Satisfying the second switching condition; if the sliding event that continues to be received does not satisfy the second switching condition, entering the candidate cursor moving module; if the sliding event that continues to be received satisfies the second switching condition, entering the second cursor mode switching module;
  • Selecting a cursor movement module adapted to control the cursor to move in the candidate according to the sliding event
  • the second cursor mode switching module is adapted to switch the current candidate cursor sliding mode to the edit string cursor sliding mode.
  • a computer program comprising computer readable code causing the terminal device to perform any of the input method cursor operations described above when the computer readable code is run on a terminal device method.
  • a computer readable medium storing a computer program for performing any of the input method cursor operation methods described above.
  • the input method cursor operation method according to the present invention can be switched to the edit string cursor sliding mode or the candidate column cursor sliding mode in the interface of the input method regular character candidate mode, and enter the edit string cursor sliding mode or enter the candidate column cursor sliding mode. After that, the two can switch between each other.
  • the position of the cursor in the edit string can be swiped by the sliding operation of the input area, and the edit string can be edited, etc.
  • the slide operation of the area can be input to slide the cursor In the position in the candidate string, it is solved that if the user wants to input a cursor in the edit string to modify the edit string, the user needs to click on a certain position in the edit string, and the user touches the screen due to the narrow display area of the edit string. It is difficult to accurately click on the desired position, and the user clicks on the action to block the edit string, which further affects the accuracy of the user's operation. If the user wants to select more candidates, the user needs to click the expand button to expand the candidate interface.
  • the candidate interface will overwrite the input method keyboard, which cannot display the new candidate directly in the candidate column by the cursor of the candidate column, and obtains a cursor for controlling the input method according to the sliding operation in the input method. Enter the edit string and move it in the edit string without affecting the user's line of sight.
  • the user can more accurately locate the beneficial effect of the cursor, and obtains a convenient user to control the input method cursor to enter the candidate column according to the sliding operation in the input method, and moves in the candidate, does not affect the user's line of sight, so that the user can Convenient choice of candidate benefits.
  • the present invention determines whether the received sliding event satisfies the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode after entering the edit string cursor sliding mode or the candidate cursor sliding mode; The sliding event to reach between the edit string cursor sliding mode and the candidate cursor sliding mode The mode switching condition switches from the current cursor sliding mode to another cursor sliding mode. It can directly switch between editing the string cursor sliding mode and the candidate cursor sliding mode, improving the flexibility of mode switching, and facilitating the user to switch the cursor sliding mode more quickly to select candidates or edit strings. edit.
  • FIG. 1 is a flow chart showing an operation method of an input method cursor according to an embodiment of the present invention
  • FIG. 1A illustrates an example of a conventional text candidate mode in accordance with one embodiment of the present invention
  • FIG. 1B illustrates an example of an edit string cursor sliding mode in accordance with one embodiment of the present invention
  • FIG. 1C shows an example of a candidate cursor sliding mode obtained by FIG. 1B;
  • FIG. 1D shows an example of the edit string cursor sliding mode obtained by FIG. 1B;
  • FIG. 2 is a flow chart showing an operation method of an input method cursor according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an input method cursor operation device according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an input method cursor operation device according to an embodiment of the present invention.
  • Figure 5 shows a block diagram of a terminal device for performing the method according to the invention
  • Figure 6 shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • One of the core ideas of the present invention is: in the conventional character candidate mode of the input method, in the text candidate interface of the input method, receiving a triggered sliding event, and triggering to enter the editing string cursor sliding mode or the candidate cursor sliding according to the sliding event mode. Then, after entering the edit string cursor sliding mode or the candidate cursor sliding mode, determining whether the received sliding event satisfies the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode, if the switching condition is met, Switch from the current cursor swipe mode to another cursor swipe mode.
  • the present invention firstly facilitates the user to accurately position the cursor in the edit string, or facilitates the user to select the candidate displayed in the candidate column; secondly, the cursor sliding mode can be directly switched between, instead of each time In the sliding mode, after the text candidate mode needs to be returned, another sliding event can be entered into another sliding mode, thereby improving the flexibility of mode switching, and facilitating the user to switch the cursor sliding mode more quickly to select candidates or Edit the edit string.
  • FIG. 1 it is a schematic flowchart of an input method cursor operation method of the present invention, which may specifically include:
  • Step 110 In the regular text candidate mode of the input method, monitor whether a sliding event is received;
  • the mobile terminal uses a pinyin input method of a nine-key keyboard, such as a nine-key keyboard as follows: 1 key corresponds to: participle, 2 key corresponds: abc, 3 key corresponds: def, 4 key corresponds: ghi, 5 Key correspondence: jkl, 6 keys correspond to: mno, 7 keys correspond to: pqrs, 8 keys correspond to: tuv, 9 keys correspond to: wxyz.
  • a nine-key keyboard such as a nine-key keyboard as follows: 1 key corresponds to: participle, 2 key corresponds: abc, 3 key corresponds: def, 4 key corresponds: ghi, 5 Key correspondence: jkl, 6 keys correspond to: mno, 7 keys correspond to: pqrs, 8 keys correspond to: tuv, 9 keys correspond to: wxyz.
  • the user can click the keyboard 524482 of the nine-key, then the input rule firstly recognizes the key sequence 524482 according to the recognition logic of the pinyin input method, and obtains the default pinyin string as "kai'gua".
  • the state is the input method.
  • Normal regular text candidate mode is an input method for identifying a key sequence obtained by a user, and identifying the edit string, and then obtaining a screen candidate from the vocabulary based on the edit string, and displaying the top screen candidate in the candidate column in the candidate column.
  • the conventional text candidate mode for other types of keyboards is similar to the above example.
  • the conventional text candidate mode of other types of input methods is similar to the above example.
  • the stroke input method after the user clicks the key sequence, the input method converts the key sequence into a stroke string, and according to the stroke string, the upper screen candidate is obtained from the thesaurus, and the ranking is determined by The previous upper screen candidate is displayed in the candidate column, and the current situation is the regular text candidate mode.
  • the input keyboard area may be an area below the input method candidate column. As shown in Figure 1A, areas such as “flowering” are in the area below the candidate column.
  • the preferred input keyboard area can be selected as the input interface where the 1-9 key is located, and of course, the interface area where the keys such as "character", "", "space", and "word” are located.
  • a sliding event is triggered. Then, after receiving the sliding event in the input method interface area, the embodiment of the present invention determines the sliding event.
  • the sliding event may be determined by the down event+move event on the touch screen, and the up event may be used to determine the end of the user operation.
  • Step 112 if a sliding event is received, determining a preset mode condition type that the sliding event is satisfied; if the sliding event satisfies the first type preset mode condition, proceeding to step 114; if the sliding event satisfies the second Type preset mode condition, then proceeds to step 120;
  • two types of preset mode conditions may be preset, corresponding to the edit string cursor sliding mode and the candidate cursor sliding mode, respectively.
  • setting the first type preset mode condition is: taking the vertical direction and the horizontal direction of the touch screen as a reference (as shown in FIG. 1A), the end point of the sliding event sliding is on the left side of the starting point (as shown in FIG. 1A corresponding to the vertical direction). , lower, and corresponding horizontal direction left and right); the angle between the sliding direction and the horizontal direction is less than the threshold, such as 60 degrees; the distance from the starting point to the end point in the horizontal direction reaches a threshold, such as 3 (the left and right direction of Figure 1); Then, if the sliding event satisfies the above condition, it is judged that it satisfies the first type preset mode condition.
  • setting the second type preset mode condition is: taking the vertical direction and the horizontal direction of the touch screen as a reference (as shown in FIG. 1A), the end point of the sliding event sliding is on the right side of the starting point; the angle between the sliding direction and the horizontal direction is less than the threshold value, For example, 60 degrees; the distance from the start point to the end point in the horizontal direction reaches a threshold value, such as 3; if the sliding event satisfies the above condition, it is judged that it satisfies the second type preset mode condition.
  • the initial focus coordinate of the user after pressing the touch screen is (10, 10).
  • the coordinates of the touch focus change, for example, sliding to (7, 10), then the focus coordinate after the sliding is at the start.
  • the left side of the focus coordinate, then the sliding event is sliding to the left, the angle between the sliding direction and the horizontal direction is 0, and the horizontal sliding distance.
  • the threshold value 3 it is determined that the sliding event satisfies the first type preset mode condition.
  • the initial focus coordinate of the user after pressing the touch screen is (7, 5).
  • the coordinates of the touch focus change, for example, sliding to (10, 5), then the focus coordinate after the sliding is at the start.
  • Preset mode conditions for example, sliding to (10, 5)
  • the angle between the sliding direction and the horizontal direction can be calculated by an inverse trigonometric function, such as the arccos function, assuming that the starting point coordinates are (x 1 , y 1 ), the ending point coordinates are (x 2 , y 2 ), and the sliding direction is horizontally clipped.
  • the angle is A, then the vector between the coordinates (x 1 , y 1 ) and the origin is (x 1 , y 1 ), then the vector between the coordinates (x 2 , y 2 ) and the origin is (x 2 , y 2 ) ), then In this way, the angle between the sliding direction and the horizontal direction of the user on the touch screen can be obtained.
  • determining the preset mode condition type that the sliding event is satisfied includes:
  • Sub-step 1121 when it is determined that the sliding event is a sliding operation in a direction of a head end of an editing string in an input method keyboard area, determining that the sliding event satisfies a first type preset mode condition;
  • the embodiment of the present invention determines whether the sliding event is a sliding operation in the direction of the head end of the editing string in the keyboard area of the input method, with the vertical direction and the horizontal direction of the touch screen as reference (as shown in FIG. 1A ), and the end point of the sliding event sliding is at the starting point.
  • the distance threshold of the sliding start point to the end point in the horizontal direction is x, and when the angle with the horizontal direction is less than the threshold value y, it is determined that the sliding event satisfies the first type preset mode condition .
  • Sub-step 1122 when it is determined that the sliding event is a sliding operation in the direction of the candidate tail in the input method keyboard area, it is determined that the sliding event satisfies the second type preset mode condition.
  • the embodiment of the present invention determines whether the sliding event is a sliding operation in the direction of the head end of the editing string in the keyboard area of the input method, with the vertical direction and the horizontal direction of the touch screen as reference (as shown in FIG. 1A ), and the end point of the sliding event sliding is at the starting point.
  • the distance threshold of the sliding starting point to the ending point in the horizontal direction is x, and when the angle with the horizontal direction is less than the threshold y, it is determined that the sliding event satisfies the first type preset mode condition .
  • the present invention also presets two types of switching conditions, and determines that the current edit string cursor sliding mode is switched to the candidate cursor sliding mode by the first switching condition, and determines the current candidate cursor sliding mode by the second switching condition. Switch to the edit string cursor slide mode.
  • setting the first switching condition is: taking the vertical direction and the horizontal direction of the touch screen as a reference (as shown in FIG. 1A), the end point of the sliding event sliding is on the lower side of the starting point (as shown in FIG. 1A corresponding to the vertical direction, Lower, and corresponding horizontal direction left and right); the angle between the sliding direction and the vertical direction is less than the threshold, such as 30 degrees; the distance from the starting point to the ending point in the vertical direction reaches the threshold, such as 3 (left and right direction of Figure 1) Then, if the sliding event satisfies the above condition, it is judged that it satisfies the first switching condition.
  • setting the second switching condition is: taking the vertical direction and the horizontal direction of the touch screen as a reference (as shown in FIG. 1A), the end point of the sliding event sliding is on the upper side of the starting point; the angle between the sliding direction and the vertical direction is less than the threshold, such as 30. Degree; the distance from the starting point to the end point in the vertical direction reaches a threshold value, such as 3; then if the sliding event satisfies the above condition, it is judged that it satisfies the second switching condition.
  • the initial focus coordinate of the user after pressing the touch screen is (10, 10).
  • the coordinates of the touch focus change, for example, sliding to (10, 7), then the focus coordinate after the sliding is at the start.
  • the lower side of the focus coordinate, then the sliding event is sliding downward, the angle between the sliding direction and the vertical direction is 0, and the horizontal sliding distance.
  • the threshold value 3 it is determined that the sliding event satisfies the first switching condition.
  • the starting focus coordinate of the user pressing the touch screen is (7, 5).
  • the coordinates of the touch focus change, for example, sliding to (7, 8), then the focus coordinate after sliding is at the beginning.
  • the upper side of the focus coordinate, then the sliding event is upward sliding, the angle between the sliding direction and the vertical direction is 0, and the horizontal sliding distance is 3, and when the aforementioned threshold value 3 is reached, it is determined that the sliding event satisfies the second switching. condition.
  • the angle B between the sliding direction and the vertical direction can also be calculated by the similar inverse cosine function described above.
  • the angle A between the sliding direction and the horizontal direction can be calculated, and the sliding direction can be obtained by 90-A. The angle with the vertical direction.
  • the present invention is not limited to the inverse cosine function, and any other method that can calculate the aforementioned angle can be used.
  • the first switching condition includes that the sliding event slides downward if the angle between the vertical direction is less than the threshold; and the second switching condition is that the angle with the vertical direction is less than the threshold. Swipe up and down.
  • the regular character candidate mode of the input method first, it is determined whether the sliding event is satisfied by the preset mode condition type, without determining whether it satisfies the first switching condition or satisfies the second switching condition.
  • the edit string cursor sliding mode In the regular text candidate mode of the input method, if the sliding event satisfies the first type preset mode condition, the edit string cursor sliding mode is entered; then, the current regular text candidate mode can be switched to the edit string cursor sliding The mode, as shown in Figure 1B, then controls the cursor to move through the edit string based on the sliding event. If the sliding event satisfies the second type preset mode condition, the candidate cursor sliding mode is entered. That is, as shown in FIG. 1C, the cursor can then be moved in the candidate according to the sliding event.
  • the initial focus coordinate of the user after pressing the touch screen is (10, 10)
  • the coordinates of the touch focus change, for example, sliding to (10, 7)
  • the focal coordinate after sliding is a downward sliding
  • the sliding direction of the sliding direction is 0 with the vertical direction
  • the horizontal sliding distance is 3, and the aforementioned threshold value 3 is reached, and the sliding event is determined.
  • the coordinates of the starting focus after the user presses the touch screen are (7, 5).
  • the coordinates of the touch focus change, for example, sliding to (10, 5), then the focus coordinate after sliding is at the starting focus.
  • the sliding event is sliding to the left, the angle between the sliding direction and the horizontal direction is 0, and the horizontal sliding distance is 3, and reaching the aforementioned threshold 3, it is determined that the sliding event satisfies the second type of pre- Set the mode condition to enter the candidate cursor slide mode.
  • the sliding event satisfies the first type of preset mode condition, enter an edit string cursor sliding mode, and determine whether the sliding event satisfies the first switching condition for the sliding event that is continuously received in the edit string cursor sliding mode.
  • Sub-step 1123 if the sliding event satisfies the first preset mode condition type, modifying the first state identifier that is the current text candidate mode to the second state identifier of the edit string cursor sliding mode;
  • Sub-step 1124 after continuing to receive the sliding event, determining whether the status identifier of the current input method is the second status identifier;
  • Sub-step 1125 if the status identifier of the current input method is the second status identifier, then the edit string cursor is slid The sliding event continues to be received in the active mode to determine whether the sliding event satisfies the first switching condition.
  • the operation of entering the judgment cursor sliding mode is triggered every time, and the present invention maintains the first state identifier of the regular character candidate mode.
  • the second state identifier of the string cursor sliding mode In the appropriate mode, the corresponding status ID is enabled.
  • the above is the input method for identifying the key sequence obtained by the user, performing the recognition of the edit string, and then obtaining the upper screen candidate from the vocabulary based on the edit string, and displaying the upper-ranked candidate on the candidate list in the candidate column is normal.
  • the text candidate mode when the first state identifier is enabled, and then enters the edit string cursor sliding mode, the first state identifier that is currently the regular text candidate mode is modified to the second state identifier of the edit string cursor sliding mode.
  • the sliding event when the sliding event is continuously received, it is determined which state the current input method is identified, and if it is the first state identifier, the sliding event that continues to be received in the edit string cursor sliding mode is continued, and the sliding event is determined. Whether the first switching condition is satisfied; if the sliding event that continues to be received does not satisfy the first switching condition.
  • the sliding event satisfies the second type preset mode condition, entering the candidate cursor sliding mode, and determining whether the sliding event satisfies the second switching condition for the sliding event continuously received in the candidate cursor sliding mode include:
  • Sub-step 1126 if the sliding event satisfies the second preset mode condition, the first state identifier that is currently the regular text candidate mode is modified to the third state identifier of the candidate cursor sliding mode;
  • Sub-step 1127 after continuing to receive the sliding event, determining whether the status identifier of the current input method is the third status identifier;
  • Sub-step 1128 if the status identifier of the current input method is the third status identifier, determine whether the sliding event satisfies the second switching condition for the sliding event that continues to be received in the candidate cursor sliding mode.
  • the operation of entering the judgment cursor sliding mode is triggered every time, and the present invention maintains the first state identifier of the regular character candidate mode.
  • the third state identifier of the candidate cursor sliding mode In the appropriate mode, the corresponding status ID is enabled.
  • the above is the input method for identifying the key sequence obtained by the user, performing the recognition of the edit string, and then obtaining the upper screen candidate from the vocabulary based on the edit string, and displaying the upper-ranked candidate on the candidate list in the candidate column is normal.
  • the text candidate mode when the first state identifier is enabled, and then enters the candidate cursor sliding mode, the first state identifier that is currently the regular text candidate mode is modified to the third state identifier of the edit string cursor sliding mode.
  • the sliding event when the sliding event is continuously received, it is determined which state the current input method is identified, and if it is the third state identifier, the sliding event continues to be received in the candidate cursor sliding mode, and the sliding event is determined. Whether the second switching condition is satisfied; if the sliding event that continues to be received does not satisfy the second switching condition.
  • Step 114 Enter an edit string cursor sliding mode, and determine whether the sliding event satisfies the first switching condition for the sliding event that is continuously received in the edit string cursor sliding mode; if the sliding event that continues to be received does not satisfy the first switching condition, Then proceeds to step 116; if the continually received sliding event satisfies the first switching condition, then proceeds to step 118;
  • the input method may continue to determine whether the received sliding event satisfies the first switching condition, and if the continuing sliding event does not satisfy the first switching condition, proceed to step 116; if it continues to receive The sliding event satisfies the first switching condition, and then proceeds to step 118.
  • the initial focus coordinate of the user after pressing the touch screen is (10, 10), and the user slides.
  • the coordinates of the touch focus change, for example, sliding to (10, 7), then the focus coordinate after the sliding is on the lower side of the starting focus coordinate, then the sliding event is sliding downward, and the sliding direction and the vertical direction are The angle of the sliding is 0, and the horizontal sliding distance is 3, and when the aforementioned threshold 3 is reached, it is determined that the sliding event satisfies the first switching condition.
  • Step 116 controlling the cursor to move in the edit string according to the sliding event
  • the cursor is moved in the editing string according to the sliding event.
  • Sub-step 1161 controls the position of the cursor in the edit string in the same direction according to the sliding direction and the moving distance.
  • the moving direction of the cursor in the editing string coincides with the horizontal sliding direction, that is, when the user slides to the left, the cursor slides to the left, as shown in FIG. 1D, which is a sliding view from FIG. 1B to the right.
  • FIG. 1D which is a sliding view from FIG. 1B to the right.
  • the cursor slides to the right.
  • the left slide moves the cursor to the left, but the cursor does not respond to the left slide at the leftmost position of the edit string (ie, the edit string head end position).
  • the cursor moves to the right, and the rightmost edge of the edit string (that is, the last position of the edit string) does not respond to the right slider.
  • the user can exit the edit string cursor slide mode and then receive the slide event again and proceed to the process of step 112.
  • the method further includes:
  • Step 1182 when the cursor is at the end of the edit string, if the character sequence input by the user is received again, the edit string cursor sliding mode is exited.
  • the user when the cursor is at a position other than the end of the edit string, the user may need to modify the edit string, or need to adjust the pinyin string, etc., and the character input by the user is inserted into the cursor position, such as a picture.
  • the user continues to input the character u, and then u is inserted into k, and the edit string "ku ⁇ ai'gua" is obtained.
  • the edit string cursor sliding mode is not exited.
  • the cursor is at the end of the editing string, as shown in the cursor position of FIG. 1B, when the user inputs a button to input a character, the edit string cursor sliding mode is exited and the conventional character candidate mode is restored.
  • the button can be clicked to input characters, such as one or more of a-z.
  • Step 118 Switch the current edit string cursor sliding mode to the candidate cursor sliding mode
  • the current edit string cursor sliding mode is switched to the candidate cursor sliding mode, for example, switching to the mode as shown in FIG. 1C The choice of item. Then it is equivalent to proceed to step 120.
  • Step 120 Enter a candidate cursor sliding mode, and determine, for the sliding event that continues to be received in the candidate cursor sliding mode, whether the sliding event satisfies the second switching condition; if the sliding event that continues to be received does not satisfy the second switching condition, Then proceeds to step 122; if the continually received sliding event satisfies the second switching condition, then proceeds to step 124;
  • the input method may continue to determine whether the received sliding event satisfies the first switching condition. If the sliding event that continues to be received does not satisfy the first switching condition, proceed to step 122; if it continues to receive The sliding event satisfies the first switching condition, and then proceeds to step 124.
  • the starting focus coordinate is (7, 5).
  • the coordinates of the touch focus change, for example, sliding to (7, 8), then the focus coordinate after sliding is at the beginning.
  • the upper side of the focus coordinate, then the sliding event is upward sliding, the angle between the sliding direction and the vertical direction is 0, and the horizontal sliding distance is 3, and when the aforementioned threshold value 3 is reached, it is determined that the sliding event satisfies the second switching. condition.
  • Step 122 Control the cursor to move in the candidate according to the sliding event
  • the cursor is moved in the editing string according to the sliding event.
  • controlling the movement of the cursor in the candidate according to the sliding event comprises:
  • Sub-step 1221 controls the movement of the cursor in the candidate in the same direction according to the sliding direction and the moving distance.
  • the moving direction of the cursor in the candidate column coincides with the horizontal sliding direction, that is, when the user slides to the right, the cursor slides to the right, as shown in FIG. 1C, which is a schematic diagram of the cursor moving to the right in the candidate.
  • FIG. 1C is a schematic diagram of the cursor moving to the right in the candidate.
  • the left sliding moves the cursor to the left, but the cursor has no action in the leftmost position of the candidate column, but moves the candidate.
  • you slide right the cursor moves to the right, and there is no action at the far right of the candidate column, but the candidate is moved.
  • the user can exit the candidate cursor sliding mode and then receive the sliding event again and proceed to the process of step 112.
  • the method further includes:
  • Sub-step S1221 if the character sequence input by the user is received again, the candidate cursor sliding mode is exited.
  • the character input by the user is continued to be received. For example, if u is input in the pinyin input method, the edit string is changed, and the corresponding candidate also changes, and the candidate cursor can be exited. Sliding mode.
  • the third state identifier of the edit string cursor sliding mode is modified to be the first of the regular character candidate mode.
  • Status identifier if the character sequence input by the user is received again, the third state identifier of the edit string cursor sliding mode is modified to be the first of the regular character candidate mode.
  • controlling the movement of the cursor in the candidate according to the sliding event comprises:
  • Sub-step S1122 when the cursor moves to the last candidate displayed in the candidate column, if the sliding event to the end of the candidate is continuously received, it is determined whether the last candidate displayed in the candidate column is the last candidate;
  • Sub-step S1123 if the last candidate displayed in the candidate column is not the last candidate, the candidates displayed in the candidate column are moved to the head end;
  • candidates for simultaneous display in the subsequent columns are limited. For example, only four or so candidates can be displayed in FIG. 1C, and actually the number of candidates corresponding to one edit string or the user-entered key sequence. It is generally far more than the number of candidates that can be displayed in the candidate bar. Then, when the cursor moves to the last candidate displayed in the candidate column, as shown in "Kaihua" in Figure 1C, then it is judged whether "Kaihua" is the last candidate for all sorting, if it is "Kaihua" It is not the last candidate. For the right sliding event, you need to match the cursor to the candidate after the current candidate.
  • FIG. 1C “Kaiser” is obtained by moving all the candidates to the left after moving the cursor to the right in FIG. 1A. If “Kaihua” is the last candidate, it will not respond to right-sliding.
  • Sub-step S1124 when the cursor moves to the first candidate displayed in the candidate column, if the sliding event to the candidate head end is continuously received, it is determined whether the first candidate displayed in the candidate column is the first candidate item;
  • Sub-step S1125 if the first candidate displayed in the candidate column is not the first candidate, the candidates displayed in the candidate column are skipped to the tail end.
  • the method further includes:
  • Sub-step S1126 correcting the corresponding edit string according to the candidate corresponding to the position where the cursor moves.
  • each candidate corresponding to each edit string corresponding to the key sequence may be selected according to the key sequence, such as the key sequence “524482” in the foregoing example, which corresponds to at least two Pinyin strings.
  • the key sequence such as the key sequence “524482” in the foregoing example, which corresponds to at least two Pinyin strings.
  • the initial Pinyin string is “kai'gua”, then after entering the candidate cursor sliding mode, after moving the cursor to the right to “Kaihua”, the Pinyin string is adjusted according to “Kaihua”. For "kai'hua”.
  • step 124 the current candidate cursor sliding mode is switched to the edit string cursor sliding mode.
  • the current candidate cursor sliding mode is switched to the edited string sliding mode, for example, to the mode as shown in FIG. 1A. Then it is equivalent to proceed to step 114.
  • the input method cursor operation method can monitor the sliding event received in the input method area in the interface of the input method regular character candidate mode, determine whether the received sliding event satisfies the preset mode condition, and enter the edit string cursor sliding.
  • the mode determines whether the sliding event satisfies the first switching condition in the sliding event that is continuously received in the edit string cursor sliding mode, thereby solving the problem that if the user wants to input a cursor in the editing string to modify the editing string, the user needs to click edit.
  • the cursor of the control input method enters the edit string and moves in the edit string without affecting the user's line of sight, so that the user can more accurately locate the beneficial effect of the cursor.
  • the input method cursor operation method can monitor the sliding event received in the input method area in the interface of the input method regular character candidate mode, and determine whether the received sliding event satisfies the preset mode bar. If the sliding event satisfies the second type preset mode condition, enter a candidate cursor sliding mode, and determine, for the sliding event that continues to be received in the candidate cursor sliding mode, whether the sliding event satisfies the second switching condition, Therefore, the candidate for the input method according to the edit string is displayed in the candidate column. If the user wants to select more candidates, the user needs to click the expand button to expand the candidate interface for selection, but the candidate interface will overwrite the input method keyboard.
  • the present invention determines whether the received sliding event satisfies the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode after entering the edit string cursor sliding mode or the candidate cursor sliding mode; When the sliding event reaches the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode, the current cursor sliding mode is switched to another cursor sliding mode. It can directly switch between editing the string cursor sliding mode and the candidate cursor sliding mode, improving the flexibility of mode switching, and facilitating the user to switch the cursor sliding mode more quickly to select candidates or edit strings. edit.
  • the slide operation of the area can be input to slide the cursor In the position in the candidate string, it is solved that if the user wants to input a cursor in the edit string to modify the edit string, the user needs to click on a certain position in the edit string, and the user touches the screen due to the narrow display area of the edit string. It is difficult to accurately click on the desired position, and the user clicks on the action to block the edit string, which further affects the accuracy of the user's operation. If the user wants to select more candidates, the user needs to click the expand button to expand the candidate interface.
  • the candidate interface will overwrite the input method keyboard, which cannot display the new candidate directly in the candidate column by the cursor of the candidate column, and obtains a cursor for controlling the input method according to the sliding operation in the input method. Enter the edit string and move it in the edit string without affecting the user's line of sight.
  • the user can more accurately locate the beneficial effect of the cursor, and obtains a convenient user to control the input method cursor to enter the candidate column according to the sliding operation in the input method, and moves in the candidate, does not affect the user's line of sight, so that the user can Convenient choice of candidate benefits.
  • the present invention determines whether the received sliding event satisfies the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode after entering the edit string cursor sliding mode or the candidate cursor sliding mode; When the sliding event reaches the mode switching condition between the edit string cursor sliding mode and the candidate cursor sliding mode, the current cursor sliding mode is switched to another cursor sliding mode. It can directly switch between editing the string cursor sliding mode and the candidate cursor sliding mode, improving the flexibility of mode switching, and facilitating the user to switch the cursor sliding mode more quickly to select candidates or edit strings. edit.
  • FIG. 2 it is a schematic flowchart of an input method cursor operation method of the present invention, which may specifically include:
  • Step 210 In the regular text candidate mode of the input method, monitor whether a sliding event is received;
  • Step 212 if a sliding event is received, determining a preset mode condition type that the sliding event is satisfied; if the sliding event meets the first type preset mode condition, proceeding to step 214; if the sliding event satisfies the second Type preset mode condition, then proceeds to step 228;
  • Step 214 Enter an edit string cursor sliding mode, and determine whether the sliding event satisfies the first switching condition for the sliding event that is continuously received in the edit string cursor sliding mode; if the sliding event that continues to be received does not satisfy the first switching condition, Then proceeds to step 216; if the continually received sliding event satisfies the first switching condition, then proceeds to step 226;
  • Step 216 controlling the cursor to move in the edit string according to the sliding event
  • the stroke filtering mode is also triggered, and the stroke input interface is generated to receive the filtered stroke sequence input by the user.
  • the stroke input interface is generated to receive the filtered stroke sequence input by the user.
  • the Chinese character strokes are divided into examples by “horizontal and vertical folding”.
  • the user can click the five buttons to input strokes.
  • the method further includes:
  • Step 218, determining a button subsequence corresponding to the cursor
  • the positioning cursor can be passed through ⁇ " position locates the corresponding key subsequence in 524482, such as the key sequence of the first pinyin substring after the cursor is positioned, after the positioning cursor of "kai' ⁇ gua” or "kai ⁇ 'gua”
  • a pinyin substring has a corresponding button subsequence of 482.
  • the pinyin substring in which the cursor is located is gua, and the corresponding button subsequence is also 482.
  • Step 220 Receive a sequence of filtered strokes input by a user
  • the input rule receives a sequence of filtered strokes "a glimpse”.
  • Step 222 Match the filtered stroke sequence to the first stroke sequence of each initial candidate corresponding to the button subsequence;
  • the corresponding Pinyin string may have multiple forms, and the corresponding words and/or words may have different types.
  • the corresponding pinyin substring may include “gua”, “hua”, etc., and each pinyin substring corresponds to a series of initial candidates in the thesaurus, and the present invention may use the foregoing screening stroke sequence with these The first stroke sequence of the initial candidate is matched, and for the initial candidate on the match, step 370 is entered.
  • the pin subsequence needs to obtain each pinyin substring that can be composed of the button subsequence, and then the corresponding initial candidates are extracted from the lexicon by each pinyin substring, and then The initial candidates of the individual Pinyin substrings are combined into an initial candidate corresponding to the button subsequence.
  • the initial candidate that can be combined with other Pinyin strings as a word/sentence is preferentially matched.
  • the above “kai ⁇ 'gua”, Pinyin kai does not deal with it, the latter 482, its corresponding "gua”, “hua”, then prefer “kai'gua”, “"kai'hua” and other pinyin
  • the words in the words corresponding to the string combination such as the words “open”, “flowering”, “opening” and other words in the word "kai”, and then select other words that cannot be combined into words to match.
  • Step 224 Correct the piny substring corresponding to the button subsequence and the subsequent button subsequence according to the matched initial candidates, and correct the corresponding upper screen candidate.
  • the determining the button subsequence corresponding to the cursor comprises:
  • Sub-step 2181 the cursor is at a first position in the Pinyin string, and determining whether the first position is in a Pinyin substring that conforms to the Pinyin rule;
  • Sub-step 2182 if the first position is not in the pinyin substring that conforms to the pinyin rule, starting from the first pinyin substring corresponding to the pinyin rule after the first position, selecting the corresponding button subsequence as the The button subsequence corresponding to the cursor;
  • Sub-step 2183 if the first position is in the pinyin substring that conforms to the pinyin rule, starting from the pinyin substring corresponding to the pinyin rule where the first position is located, selecting the corresponding button subsequence as the button corresponding to the cursor sequence.
  • a key sequence of only one pinyin substring matching the pinyin rule may be selected as the button subsequence corresponding to the positioning cursor, or a key sequence specifying a plurality of pinyin substrings conforming to the pinyin rule may be used as The button subsequence corresponding to the positioning cursor.
  • the input method recognizes the default pinyin string "yi'xian'tian", and the default upper screen candidate includes "first-line day” and the like. If only one key sequence that matches a Pinyin substring conforming to the Pinyin rule is specified as the key subsequence corresponding to the positioning cursor:
  • the button sub-sequence 94 corresponding to yi is used as the button sub-sequence corresponding to the positioning cursor.
  • the positioning cursor When the user inputs the positioning cursor in "y i' ⁇ xian'tian", since the positioning cursor " ⁇ " is before x, according to the pinyin rule of Chinese Pinyin, the positioning cursor is not in a certain pinyin substring, behind it The first pinyin substring is xian, then the button sequence 9426 corresponding to xian is used as the button subsequence corresponding to the positioning cursor.
  • the key sequence 9426 serves as a key sub-sequence corresponding to the positioning cursor.
  • the positioning cursor When the user inputs the positioning cursor in "y i'xian' ⁇ tian", since the positioning cursor " ⁇ " is before the next i, the positioning cursor is not in a certain pinyin substring according to the pinyin rule of Chinese Pinyin, followed by The first pinyin substring is tian, then the button sequence 8426 corresponding to tian is used as the button subsequence corresponding to the positioning cursor.
  • buttons subsequence corresponding to the positioning cursor such as the aforementioned “yi'xi ⁇ an'tian”, “9426” and “8426” may be used as the button corresponding to the positioning cursor.
  • the sequence, the subsequent stroke selection sequence can simultaneously filter the words and/or words corresponding to the two button subsequences. Other cases and so on.
  • the first position of the positioning cursor in the Pinyin string it is determined whether there is a Pinyin substring that conforms to the Pinyin rule before the first position; if the first position has a Pinyin substring that conforms to the Pinyin rule And the button subsequence after the pinyin substring corresponding to the pinyin rule is used as the button subsequence corresponding to the positioning cursor; if the first position does not match the pinyin substring of the pinyin rule, the first button is The initial button subsequence is used as the button subsequence corresponding to the positioning cursor.
  • the matching, by the screening stroke sequence, the first stroke sequence of each initial candidate corresponding to the button subsequence includes:
  • Sub-step 2221 searching for various pinyin sub-strings corresponding to the button sub-sequence
  • Sub-step 2222 obtaining corresponding words and/or words from each Pinyin string to obtain initial candidates
  • Sub-step 2223 the screening stroke sequence is matched with the stroke sequence of each initial candidate.
  • step 224 is incorporated.
  • the foregoing examples are exemplified herein.
  • the user inputs 9494268426, and the input method recognizes the default pinyin string "yi'xian'tian”.
  • the default screen selection options include "first-line day” and the like.
  • Case 1 The user inputs the positioning cursor to obtain "yi' ⁇ xian'tian", then according to the foregoing steps, it can be determined that the button subsequence corresponding to the positioning cursor is 94.
  • the “West” is selected for each word corresponding to 94, then the yi in the default “yi'xian'tian” can be changed to xi, of course yi
  • the following Pinyin substrings can also be modified accordingly or not. For example, for the case of no modification, it can be "xi'xian'tian", the first word on the screen candidate is west, and the others can be based on the following pinyin. Substrings are looked up from the thesaurus.
  • the third word can be a word that can be combined with the second word as a word, such as days.
  • Other upper-screen candidates can be looked up from the thesaurus based on the subsequent pinyin substrings.
  • Case 3 The user inputs the positioning cursor to obtain "y i' ⁇ xian'tian", then according to the foregoing steps, it can be determined that the key subsequence corresponding to the positioning cursor is 94268426.
  • the strokes of the plurality of words since it is possible to match the strokes of the plurality of words, it may be predetermined to match the first stroke sequence composed of at least the first stroke of the plurality of words. Take the first stroke of each word as an example. When the user inputs the screening stroke sequence " ⁇ ", then through the foregoing steps, "small days" are selected for each word corresponding to 94246826. Of course, if there are multiple words/words matching the strokes, they can also be selected according to the frequency of use, and the frequency of use is preferred.
  • the xian’tian in the default “yi’xian’tian” can be changed to xiao’tian, and the first word on the screen candidate is still one, and the second and third words are small days.
  • Other upper-screen candidates can be looked up from the thesaurus based on the subsequent pinyin substrings.
  • the screening stroke sequence is matched with the stroke sequence of each initial candidate corresponding to the button subsequence, including:
  • Sub-step B2241 matching the sequence of filtered strokes input by the user with the first sequence of strokes consisting of at least the first stroke of each word of each initial candidate.
  • the button subsequence corresponding to the positioning cursor can correspond to several pinyin strings, and each pinyin string corresponds to multiple initial candidates. Therefore, each button subsequence corresponds to more initials through its corresponding pinyin string.
  • Candidate For example, in the step, a plurality of pinyin substrings corresponding to the pinyin rules of the first position corresponding to the first position corresponding to the positioning cursor are obtained, and the plurality of button subsequences corresponding to the plurality of pinyin substrings are used as the button subsequence corresponding to the positioning cursor. Then, the sequence of key words may correspond to words.
  • 94268426 in the second embodiment may correspond to "xia o 'tian” and “xian'tian”, and each of these pinyin strings corresponds to two words, or may be understood as one corresponding to one. word.
  • the invention can then match a stroke sequence to match multiple words of an initial candidate.
  • the matching the sequence of the filtered strokes input by the user with the first stroke sequence consisting of at least the first stroke of each word of each initial candidate comprises:
  • Sub-step B2242 matching the screening stroke sequence with a first stroke sequence consisting of a complete stroke sequence of each initial candidate word
  • the complete strokes of each word of each initial screen candidate can be extracted to form a first stroke sequence, such as “Asia”, and the complete stroke sequence of “Asia” is “one by one”.
  • the complete stroke sequence of "Zhou” is " ⁇ "
  • the first stroke sequence composed is " ⁇ ”
  • the sequence of screening strokes can be The first stroke sequence is matched.
  • sub-step B2243 matching the filtered stroke sequence with a first stroke sequence consisting of the first stroke of each word of each initial candidate.
  • the complete strokes of each word of each initial screen candidate can be extracted to form a first stroke sequence, such as the aforementioned "Asia", the first stroke of "Asia” is "one”, “continental” The first stroke of the stroke is " ⁇ ”, then the first stroke sequence composed is " ⁇ ”, and the sequence of the filtered strokes can be matched with the first stroke sequence.
  • the method before the matching the sequence of the stroke stroke input by the user with the first stroke sequence consisting of at least the first stroke of each word of each initial candidate, the method further comprises:
  • Sub-step B2244 for each initial candidate, obtain a first stroke sequence for each initial candidate from the thesaurus.
  • the stroke of each word can be saved in the vocabulary in advance, and the vocabulary can be installed in the specified path of the system with the client at the time of installation.
  • the first stroke sequence of each initial upper screen candidate may be extracted from the thesaurus before, during or after the process of receiving the user input screening stroke sequence.
  • a first stroke sequence composed of at least a first stroke of each word of each initial upper screen candidate may be extracted.
  • the matching the sequence of the filtered strokes input by the user with the first stroke sequence consisting of at least the first stroke of each word of each initial candidate further comprises:
  • Sub-step B2245 when the screening stroke sequence does not completely match the first stroke sequence of the initial candidate, using a stroke-based error correction model to determine the stroke sequence input by the user and the first candidate The probability of matching stroke sequences;
  • an error may be input.
  • the "one, ⁇ , ⁇ , ⁇ , and B" of the five-stroke input method is taken as an example.
  • the correct stroke order should be “ ⁇ ”, and the input next to the vertical is easy to make mistakes, such as “ ⁇ ”, then the wrong input can be judged by the stroke-based error correction model to judge the stroke sequence input by the user.
  • the probability of matching the first stroke sequence of the initial upper screen candidate is taken as an example.
  • Sub-step B2246 when the probability of the matching is greater than the threshold, determining that the screening stroke sequence matches the first stroke sequence of the initial candidate.
  • the screening stroke sequence and the initial may be considered The first stroke sequence of the upper screen candidate matches; otherwise, it is considered that there is no match.
  • the method further includes:
  • Sub-step B2247 constructing the stroke-based error correction model by using a binary or multivariate relationship of words in a phrase and/or a sentence;
  • the binary relationship is used to indicate the probability that two elements appear successively, that is, P(B
  • Multivariate relationships are derived from binary relationships.
  • the probability of occurrence of the stroke can be determined according to the strokes of the pre-statistical phrase and the word, according to the direct binary or multi-dimensional relationship of the direct word of the phrase or the sentence.
  • the sequence of happy strokes is “ ⁇ ”
  • the probability of corresponding happiness is “90% by ⁇ ”
  • “ ⁇ The probability that ⁇ ” corresponds to happiness is 79%, and so on, thus constructing a stroke-based error correction model.
  • the matching probability of the stroke selection sequence and each initial upper screen candidate may be determined according to the stroke-based error correction model. If it is greater than the threshold, for example, greater than 60%, It can be considered that the initial screen candidate is matched.
  • sub-step B2248 constructing the stroke-based error correction model using binary or multivariate relationships between the strokes that make up each word.
  • the stroke of "fast” is “ ⁇ "
  • the probability that the stroke sequence " ⁇ " corresponds to "fast” is 90%
  • the stroke sequence is " ⁇ ”
  • the probability of corresponding "fast” word is 80%, and similar principles can construct a correction model based on strokes.
  • the matching probability of the stroke selection sequence and each initial upper screen candidate may also be determined according to the above-described stroke-based error correction model. If it is greater than the threshold, for example, greater than 60%, the initial upper screen candidate may be considered to be matched.
  • the receiving a sequence of screening strokes input by a user comprises:
  • Sub-step B2249 determining whether there is a delimiter in the screening stroke sequence; if there is a delimiter, separating the filtering stroke sequence input by the user into each screening stroke sub-sequence according to the delimiter.
  • the matching the sequence of the filtered strokes input by the user with the first stroke sequence consisting of at least the first stroke of each word of each initial candidate comprises:
  • Sub-step B2250 in the unit of filtering the stroke sub-sequence, sequentially matching the screening stroke sub-sequence with the target stroke sub-sequence of the word in the corresponding order in each initial candidate.
  • the separator identification rule may be set in advance, for example, "," or “;” is set as a separator, and the user may input a separator between the input filter strokes, and separate the filter stroke sequence into the filter strokes. Sequence, each of the filtered stroke subsequences may correspond to a sequence of filtered strokes of one word.
  • the filtered stroke sequence can be matched in sequence with the first stroke sequence consisting of at least the first stroke of each word of each initial upper screen candidate.
  • the filter stroke subsequence between the two separators corresponds to the initial match.
  • the word at the corresponding position of the screen For example, there are two separators.
  • the filter stroke subsequence before the first separator corresponds to the first word matching the initial screen candidate, and the filter stroke subsequence between the first separator and the second separator corresponds to Match initial screen
  • the second word of the option, the filtered stroke subsequence after the second delimiter corresponds to the third word that matches the initial upper screen candidate.
  • Sub-step B2249 and sub-step B2250 can be used when matching the first stroke sequence composed of at least the first two strokes of each word of the initial candidate, which can improve the recognition speed of the screening stroke sequence and improve the matching efficiency.
  • Step 228, entering a candidate cursor sliding mode, for the sliding event continued to be received in the candidate cursor sliding mode, determining whether the sliding event satisfies the second switching condition; if the continuing sliding event does not satisfy the second switching condition Go to step 230; if the sliding event that continues to be received satisfies the second switching condition, then proceeds to step 232;
  • Step 230 controlling the cursor to move in the candidate according to the sliding event
  • Step 232 Switch the current candidate cursor sliding mode to the edit string cursor sliding mode.
  • two cursor sliding modes are provided, that is, an edited string cursor sliding mode and a candidate cursor sliding mode, and the user can enter a certain character from the regular text candidate mode according to a predetermined user-triggered predetermined sliding event.
  • the cursor sliding mode is convenient for the user to select the edit string and the candidate, and to facilitate the user to select the candidate in the case of having the candidate field of view.
  • the various stroke sequences corresponding to the key sequence can be directly selected according to the corresponding key sequence of the position of the positioning cursor.
  • Corresponding various words and/or words ie, initial candidates
  • the pinyin substrings of the key sequence corresponding to the positioning cursor are corrected according to the screening result, and the upper screen candidate is not determined after the pinyin is determined first, and the stroke can be filtered.
  • the sequence determines the upper screen candidate and corrects the corresponding pinyin substring.
  • the method for determining candidate Chinese characters needs to be determined after pinyin determination, and the operation process is many, and further filtering is not performed, which affects the input efficiency of the user, improves the flexibility of the user to use the positioning cursor, and further filters the candidate on the screen. To improve user input efficiency.
  • multiple words of the initial candidate can be filtered by a plurality of strokes, which is not limited to single word filtering, and the screening efficiency is high, and the input efficiency is further improved.
  • the cursor sliding mode can be directly switched between the two cursor sliding modes, and it is not necessary to return to the text candidate mode after each sliding mode, and then another sliding event can be entered into another sliding mode to improve the mode switching.
  • the flexibility allows the user to switch the cursor slide mode more quickly to select candidates or edit edit strings.
  • FIG. 3 it is a schematic structural diagram of an input method cursor operation device of the present invention, which may specifically include:
  • the sliding monitoring module 310 is adapted to monitor whether a sliding event is received in a regular text candidate mode of the input method
  • the type judging module 312 is adapted to determine a preset mode condition type that the sliding event is satisfied if a sliding event is received, and enter an edit cursor mode to execute if the sliding event satisfies the first type preset mode condition.
  • the module 314 is adapted to enter the candidate cursor mode execution module 320 if the sliding event satisfies the second type preset mode condition;
  • the edit cursor movement module 316 is adapted to control the cursor to move in the edit string according to the sliding event
  • the first cursor mode switching module 318 is adapted to switch the current edit string cursor sliding mode to the candidate cursor sliding mode
  • the candidate cursor mode execution module 320 enters the candidate cursor sliding mode, and determines whether the sliding event satisfies the second switching condition for the sliding event that is continuously received in the candidate cursor sliding mode; if the sliding event that continues to be received does not satisfy the first 2 switching conditions, then enter the candidate cursor movement module 322; if the continued sliding event meets the second switching condition, enter the second cursor mode switching module 324;
  • the cursor selection module 322 is adapted to control the cursor to move in the candidate according to the sliding event
  • the second cursor mode switching module 324 is adapted to switch the current candidate cursor sliding mode to the edit string cursor sliding mode.
  • the first switching condition includes the sliding event sliding downward if the angle between the vertical direction is less than the threshold; and the second switching condition is sliding upward if the angle with the vertical direction is less than the threshold .
  • the editing cursor mode execution module comprises:
  • a first state identifier switching module configured to modify the first state identifier that is the current text candidate mode to the second state identifier of the edit string cursor sliding mode, if the sliding event satisfies the first preset mode condition type
  • the first state identifier determining module is configured to determine, after continuing to receive the sliding event, whether the state identifier of the current input method is the second state identifier;
  • the first cursor movement module is adapted to determine whether the sliding event satisfies the first switching condition for the sliding event that continues to be received in the edit string cursor sliding mode if the state identifier of the current input method is the second state identifier.
  • the candidate cursor mode execution module includes:
  • a second state identifier switching module configured to: if the sliding event meets the second preset mode condition, modify the first state identifier that is the current text candidate mode to be the third state identifier of the candidate cursor sliding mode;
  • a second status identifier determining module configured to determine, after continuing to receive the sliding event, whether the status identifier of the current input method is a third status identifier
  • the second cursor movement module is adapted to determine whether the sliding event satisfies the second switching condition for the sliding event that continues to be received in the candidate cursor sliding mode if the status identifier of the current input method is the third status identifier.
  • the type judging module comprises:
  • the head end judging module is adapted to determine that the sliding event satisfies a first type of preset mode condition when determining that the sliding event is a sliding operation in a direction of a head end of the editing string in an input method keyboard area;
  • the tail end judging module is adapted to determine that the sliding event satisfies the second type preset mode condition when it is determined that the sliding event is a sliding operation in the input method keyboard area to the candidate tail end direction.
  • the editing cursor mode execution module comprises:
  • the first co-moving module is adapted to control the position of the cursor in the edit string in the same direction according to the sliding direction and the moving distance.
  • the method further includes:
  • the edit string cursor slide mode exit module is adapted to exit the edit string cursor slide mode if the character sequence input by the user is received again when the cursor is at the end of the edit string.
  • the candidate cursor mode execution module includes:
  • the second synchronous movement module is adapted to control the movement of the cursor in the candidate in the same direction according to the sliding direction and the moving distance.
  • the method further includes:
  • the candidate cursor slide mode exit module is adapted to exit the candidate cursor slide mode if the character sequence input by the user is received again.
  • the candidate cursor mode execution module includes:
  • the first candidate movement judging module is adapted to determine, when the cursor moves to the last candidate displayed in the candidate column, if the sliding event to the end of the candidate is continued, determining the last candidate displayed in the candidate column Whether it is the last candidate; if the last candidate displayed in the candidate column is not the last candidate, the candidates displayed in the candidate column are moved to the leading end;
  • the second candidate movement judging module determines, when the cursor moves to the first candidate displayed in the candidate column, if the sliding event to the candidate head end is continuously received, determining the first candidate displayed in the candidate column Whether it is the first candidate; if the first candidate displayed in the candidate column is not the first candidate, the candidates displayed in the candidate column are skipped to the end.
  • the candidate cursor mode execution module includes:
  • the highlight module is adapted to highlight the candidate corresponding to the cursor.
  • the method further includes:
  • the edit string correction module is adapted to correct the corresponding edit string according to the candidate corresponding to the position where the cursor moves.
  • FIG. 3 it is a schematic structural diagram of an input method cursor operation device of the present invention, which may specifically include:
  • the sliding monitoring module 410 is adapted to monitor whether a sliding event is received in a regular text candidate mode of the input method
  • the type judging module 412 is adapted to determine, if the sliding event is received, a preset mode condition type that the sliding event is satisfied; if it is adapted to enter the editing cursor mode if the sliding event satisfies the first type preset mode condition Module 414; adapted to enter the candidate cursor mode execution module 428 if the sliding event satisfies the second type of preset mode condition;
  • the edit cursor mode execution module 414 enters the edit string cursor sliding mode, and determines whether the sliding event satisfies the first switching condition for the sliding event continuously received in the edit string cursor sliding mode; if the sliding event continues to be received does not satisfy the first a switching condition, enter the edit cursor movement module 416; if the continued sliding event meets the first switching condition, enter the first cursor mode switching module 426;
  • the edit cursor movement module 416 is adapted to control the movement of the cursor in the edit string according to the sliding event; and is connected to the cursor determination module 418;
  • the cursor determining module 418 is adapted to determine a button subsequence corresponding to the cursor
  • the screening sequence receiving module 420 is adapted to receive a sequence of screening strokes input by the user;
  • a screening matching module 422, adapted to: the screening stroke sequence, each initial candidate corresponding to the button subsequence The first stroke sequence of the item is matched;
  • the adjusting module 424 is adapted to correct the pin sub-sequence and the pinyin sub-string corresponding to the subsequent button sub-sequence according to the matched initial candidates, and correct the corresponding upper-screen candidate.
  • the first cursor mode switching module 426 is adapted to switch the current edit string cursor sliding mode to the candidate cursor sliding mode
  • the candidate cursor mode execution module 428 enters the candidate cursor sliding mode, and determines whether the sliding event satisfies the second switching condition for the sliding event that is continuously received in the candidate cursor sliding mode; if the sliding event that continues to be received does not satisfy the first
  • the second cursor mode switching module 432 is entered into the candidate cursor movement module 430; if the continually received sliding event satisfies the second switching condition, the second cursor mode switching module 432 is entered;
  • the cursor selection module 430 is adapted to control the cursor to move in the candidate according to the sliding event
  • the second cursor mode switching module 432 is adapted to switch the current candidate cursor sliding mode to the edit string cursor sliding mode.
  • the cursor determination module comprises:
  • the cursor position determining module is adapted to determine, according to the first position of the cursor in the Pinyin string, whether the first position is in a Pinyin substring that conforms to the Pinyin rule;
  • a first button determining module if the first position is not in the pinyin substring that conforms to the pinyin rule, starting from the first pinyin substring corresponding to the pinyin rule after the first position, selecting a corresponding button a subsequence is used as a button subsequence corresponding to the cursor;
  • a second button determining module configured to select a corresponding button subsequence as the cursor if the first position is in a pinyin substring that conforms to a pinyin rule, starting from a pinyin substring corresponding to the pinyin rule in the first position Corresponding button subsequence.
  • the screening matching module includes:
  • the Pinyin string search module is adapted to find various Pinyin substrings corresponding to the button subsequence;
  • An initial candidate obtaining module is adapted to obtain corresponding words and/or words from each Pinyin string to obtain initial candidates
  • a matching module is adapted to match the sequence of filtered strokes with the sequence of strokes of each initial candidate.
  • the screening matching module includes:
  • the first screening matching module is adapted to match the sequence of the filtered strokes input by the user with the first sequence of strokes consisting of at least the first stroke of each word of each initial candidate.
  • the first screening matching module includes:
  • a complete matching module adapted to match the filtered stroke sequence with a first stroke sequence consisting of a complete stroke sequence of each initial candidate word
  • a first matching module adapted to match the sequence of screening strokes with a first sequence of strokes consisting of the first stroke of each word of each initial candidate.
  • the method further includes:
  • the first stroke sequence acquisition module is adapted to obtain a first stroke sequence of each initial candidate from the thesaurus for each initial candidate.
  • the first screening matching module further includes:
  • An error correction module configured to determine, by using a stroke-based error correction model, a stroke sequence of the user input and the initial candidate when the screening stroke sequence does not completely match the first stroke sequence of the initial candidate First The probability of drawing a sequence match; when the probability of the match is greater than the threshold, determining that the filter stroke sequence matches the first stroke sequence of the initial candidate.
  • the method further includes:
  • a first error correction model building module is adapted to construct the stroke-based error correction model by using a binary or multi-dimensional relationship of words in a phrase and/or a sentence;
  • a second error correction model building module is adapted to construct the stroke-based error correction model by using a binary or multi-dimensional relationship between the strokes constituting each word.
  • the screening sequence receiving module comprises:
  • the delimiter receiving module is adapted to determine whether a delimiter exists in the sequence of the filtered strokes; if there is a delimiter, the sequence of the filtered strokes input by the user is separated into the sub-sequences of the selected strokes according to the delimiters.
  • the first screening matching module includes:
  • the separation matching module is adapted to match the screening stroke subsequence with the target stroke subsequence of the word in the corresponding order in each initial candidate in units of the screening stroke subsequence.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the input cursor operating device in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 5 illustrates a terminal device that can implement an input method cursor operation in accordance with the present invention.
  • the terminal device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a memory 520.
  • the memory 520 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 520 has a memory space 530 for program code 531 for performing any of the method steps described above.
  • storage space 530 for program code may include various program code 531 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such computer program products are typically portable or fixed storage units as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the storage 520 in the terminal device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit comprises computer readable code 531 'is a code readable by a processor, such as 510, which when executed by the terminal device causes the terminal device to perform each of the methods described above step.

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)
  • Position Input By Displaying (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本发明公开了一种输入法光标操作方法和装置,涉及输入法技术领域。根据本发明的输入法光标操作方法可以在输入法常规文字候选模式的界面中,可以切换至编辑串光标滑动模式或者候选栏光标滑动模式,而进入编辑串光标滑动模式或者进入候选栏光标滑动模式后,两者之间可以相互切换。在编辑串光标滑动模式中,可以通过输入区域的滑动操作滑动光标在编辑串中的位置,并且可以对编辑串进行编辑等操作,在候选项光标滑动模式中,可以输入区域的滑动操作滑动光标在候选项串中的位置,取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入候选栏,并在候选项中移动,不影响用户的视线,使用户可以更方便的选择候选项的有益效果。

Description

输入法光标操作方法和装置 技术领域
本发明涉及输入法技术领域,具体涉及一种输入法光标操作方法和装置。
背景技术
在各种计算机***中,默认的输入语言是英语中的字符。英语输入可以直接选择字母即可进行输入。而其他语言的输入则较为麻烦,比如中文语言有上万个字符,完全无法简单的通过按键直接进行输入,需要对汉字进行编码,比如按照汉字的发音特性对汉字进行编码(对应拼音输入法),按照汉字的字形特性(如笔画和偏旁部首)对汉字进行编码(对应字型输入法)等等,各个按键组合则可与汉字编码进行对应,从而可进行汉字的输入。
但是,目前移动终端的输入法中,对于用户点击按键序列转换得到的编辑串,如果用户要在编辑串中输入光标以修改编辑串,需要用户点击编辑串中某个位置,而由于编辑串的展示区域狭小,用户的触屏点击动作很难精准点击到想要的位置,并且,用户点击动作会遮挡编辑串,更影响用户操作的精确性。
另外,对于输入法根据编辑串得到的候选项展示在候选栏中,如果用户要选择更多的候选项,需要用户点击展开按钮,展开候选界面进行选择,但是候选界面会覆盖输入法键盘,其无法通过候选栏的光标直接在候选栏中展示新的候选项。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的输入法光标操作装置和相应的输入法光标操作方法。
依据本发明的一个方面,提供了一种输入法光标操作方法,包括:
在输入法的常规文字候选模式,监听是否接收到滑动事件;
如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;
如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;
如果继续接收到的滑动事件不满足第一切换条件,则根据滑动事件控制光标在编辑串中移动;
如果继续接收到的滑动事件满足第一切换条件,则将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;
如果继续接收到的滑动事件不满足第二切换条件,则根据滑动事件控制光标在候选项中移动;
如果继续接收到的滑动事件满足第二切换条件,则将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
依据本发明的另外一个方面,本发明还公开了一种输入法光标操作装置,包括:
滑动监听模块,适于在输入法的常规文字候选模式,监听是否接收到滑动事件;
类型判断模块,适于如果接收到滑动事件,则判断所述滑动事件满足的预设模式条 件类型;
编辑光标模式执行模块,适于如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件,则进入编辑光标移动模块;如果继续接收到的滑动事件满足第一切换条件,进入第一光标模式切换模块;
编辑光标移动模块,适于根据滑动事件控制光标在编辑串中移动;
第一光标模式切换模块,适于将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
候选光标模式执行模块,适于如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入候选光标移动模块;如果继续接收到的滑动事件满足第二切换条件,进入第二光标模式切换模块;
选光标移动模块,适于根据滑动事件控制光标在候选项中移动;
第二光标模式切换模块,适于将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行上述的任一个输入法光标操作方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了执行上述的任一个输入法光标操作方法的计算机程序。
根据本发明的输入法光标操作方法可以在输入法常规文字候选模式的界面中,可以切换至编辑串光标滑动模式或者候选栏光标滑动模式,而进入编辑串光标滑动模式或者进入候选栏光标滑动模式后,两者之间可以相互切换。在编辑串光标滑动模式中,可以通过输入区域的滑动操作滑动光标在编辑串中的位置,并且可以对编辑串进行编辑等操作,在候选项光标滑动模式中,可以输入区域的滑动操作滑动光标在候选项串中的位置,由此解决了如果用户要在编辑串中输入光标以修改编辑串,需要用户点击编辑串中某个位置,而由于编辑串的展示区域狭小,用户的触屏点击动作很难精准点击到想要的位置,并且用户点击动作会遮挡编辑串,更影响用户操作的精确性的问题,以及如果用户要选择更多的候选项,需要用户点击展开按钮,展开候选界面进行选择,但是候选界面会覆盖输入法键盘,其无法通过候选栏的光标直接在候选栏中展示新的候选项的问题,取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入编辑串,并在编辑串中移动,不影响用户的视线,使用户可以更精确的定位光标的有益效果,以及取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入候选栏,并在候选项中移动,不影响用户的视线,使用户可以更方便的选择候选项的有益效果。
并且,本发明在在进入编辑串光标滑动模式或者候选项光标滑动模式后,判断接收到的滑动事件是否满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件;如果满足接收到的滑动事件满足编辑串光标滑动模与者候选项光标滑动模式之间的 模式切换条件,则从当前光标滑动模式切换到另一种光标滑动模式。其可以在编辑串光标滑动模与者候选项光标滑动模式两者之间直接切换,提高模式转换的灵活度,方便用户更快速的切换光标滑动模式,以对候选项进行选择或者对编辑串进行编辑。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的一种输入法光标操作方法的流程示意图;
图1A示出了根据本发明一个实施例的常规文字候选模式示例;
图1B示出了根据本发明一个实施例的编辑串光标滑动模式示例;
图1C示出了由图1B得到的候选项光标滑动模式示例;
图1D示出了由图1B得到的编辑串光标滑动模式示例;
图2示出了根据本发明一个实施例的一种输入法光标操作方法的流程示意图;
图3示出了根据本发明一个实施例的一种输入法光标操作装置的结构示意图;
图4示出了根据本发明一个实施例的一种输入法光标操作装置的结构示意图;
图5示出了用于执行根据本发明的方法的终端设备的框图;
图6示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
本发明的核心思想之一是:在输入法的常规文字候选模式中,在输入法的文字候选界面中,接收触发的滑动事件,根据该滑动事件触发进入编辑串光标滑动模式或者候选项光标滑动模式。然后,在进入编辑串光标滑动模式或者候选项光标滑动模式后,判断接收到的滑动事件是否满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件,如果满足切换条件,则从当前光标滑动模式切换到另一种光标滑动模式。因此,本发明首先方便用户精确定位光标在编辑串中的位置,或者方便用户选择在候选栏中展示的候选项;其次,可以使两种光标滑动模式之间直接的进行切换,不用每次某种滑动模式下,需要退回文字候选模式后,才能通过另一种滑动事件进入另一种滑动模式,提高模式转换的灵活度,方便用户更快速的切换光标滑动模式,以对候选项进行选择或者对编辑串进行编辑。
实施例一
参照图1,其示出了本发明的一种输入法光标操作方法的流程示意图,具体可以包括:
步骤110,在输入法的常规文字候选模式,监听是否接收到滑动事件;
在本发明实施例中,比如移动终端使用九键键盘的拼音输入法,比如九键键盘如下:1键对应:分词,2键对应:abc,3键对应:def,4键对应:ghi,5键对应:jkl,6键对应:mno,7键对应:pqrs,8键对应:tuv,9键对应:wxyz。
用户可以点击九键的键盘524482,那么输入法则首先按照拼音输入法的识别逻辑,首先识别按键序列524482,得到默认拼音串为“kai’gua”,通过该拼音串,该种状态即为输入法正常的常规文字候选模式。该常规文字候选模式即为输入法对于用户点击得到的按键序列,进行编辑串的识别,然后基于编辑串从词库得到上屏候选项,将排序靠前的上屏候选项展示在候选栏的情况。以九键输入法为例,如图1A,其示出输入法的常规文字候选模式。
当然,对于其他类型的键盘,比如全键盘的输入法和其他类型的输入法的常规文字候选模式类似上述例子。其他类型输入法的常规文字候选模式也类似上述例子,比如笔画输入法,用户点击按键序列后,输入法将按键序列转换为笔画串,根据笔画串从词库得到上屏候选项,将排序靠前的上屏候选项展示在候选栏,此刻的情况即为常规文字候选模式。
那么在常规文字候选模式下,在输入法的输入键盘区域接收用户在屏幕上的滑动事件。在本发明实施例中,输入键盘区域可以为输入法候选栏之下的区域。输如图1A中,比如“开花”等字所在候选栏之下的区域。当然,优选的输入键盘区域可以选择为1-9键所在的输入界面,当然还可以包括“符”、“’”“空格”、“词字”等按键所在界面区域。
那么用户在输入法的输入键盘区域进行滑动操作时,会触发滑动事件,然后本发明实施例在输入法界面区域接收到滑动事件之后,则会对该滑动事件进行判断。
当然本发明实施例中,可以通过触摸屏上的down事件+move事件判断出现滑动事件,通过up事件判断用户的操作结束。
步骤112,如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;如果所述滑动事件满足第一类型预设模式条件,则进入步骤114;如果所述滑动事件满足第二类型预设模式条件,则进入步骤120;
在本发明中,可以预设两种类型的预设模式条件,分别对应编辑串光标滑动模式和候选项光标滑动模式。
比如设置第一类型预设模式条件为:以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的左侧(如图1A所示对应竖直方向的上、下,和对应水平方向左、右);滑动方向与水平方向的夹角小于阈值,如60度;滑动起点到终点在水平方向的距离达到阈值,如3(如图1的左右方向);则如果滑动事件满足上述条件则判断其满足第一类型预设模式条件。
比如设置第二类型预设模式条件为:以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的右侧;滑动方向与水平方向的夹角小于阈值,如60度;滑动起点到终点在水平方向的距离达到阈值,如3;则如果滑动事件满足上述条件则判断其满足第二类型预设模式条件。
那么比如用户按下触摸屏后的起始焦点坐标为(10,10),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(7,10),那么其滑动后的焦点坐标在起始焦点坐标的左侧,那么滑动事件为向左滑动,其滑动方向与水平方向的夹角为0,其水平滑动的距离 则为3,达到前述的阈值3,则判断该滑动事件满足第一类型预设模式条件。
那么比如用户按下触摸屏后的起始焦点坐标为(7,5),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(10,5),那么其滑动后的焦点坐标在起始焦点坐标的左侧,那么滑动事件为向左滑动,其滑动方向与水平方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第二类型预设模式条件。
其滑动方向与水平方向的夹角可以通过反三角函数计算,比如arccos函数,假设起点坐标为(x1,y1),终点坐标为(x2,y2),滑动方向与水平方向的夹角为A,那么坐标(x1,y1)与原点之间的向量为(x1,y1),那么坐标(x2,y2)与原点之间的向量为(x2,y2),那么
Figure PCTCN2015094842-appb-000001
如此即可得到用户在触摸屏上的滑动方向和水平方向的夹角。
优选的,判断所述滑动事件满足的预设模式条件类型包括:
子步骤1121,当判断所述滑动事件为输入法键盘区域中向编辑串首端方向的滑动操作,则判断所述滑动事件满足第一类型预设模式条件;
本发明实施例判断所述滑动事件是否为输入法键盘区域中向编辑串首端方向的滑动操作,以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的左侧,即向编辑串首端方向滑动,滑动起点到终点在水平方向的距离阈值为x,并且与水平方向夹角小于阈值y时,判断所述滑动事件满足第一类型预设模式条件。
子步骤1122,当判断所述滑动事件为输入法键盘区域中向候选项尾端方向的滑动操作,则判断所述滑动事件满足第二类型预设模式条件。
本发明实施例判断所述滑动事件是否为输入法键盘区域中向编辑串首端方向的滑动操作,以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的右侧,即向候选项尾端方向滑动,滑动起点到终点在水平方向的距离阈值为x,并且与水平方向夹角小于阈值y时,判断所述滑动事件满足第一类型预设模式条件。
另外,本发明还预设两种类型的切换条件,以第一切换条件判断将当前的编辑串光标滑动模式切换到候选项光标滑动模式,以第二切换条件判断将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
比如,比如设置第一切换条件为:以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的下侧(如图1A所示对应竖直方向的上、下,和对应水平方向左、右);滑动方向与竖直方向的夹角小于阈值,如30度;滑动起点到终点在竖直方向的距离达到阈值,如3(如图1的左右方向);则如果滑动事件满足上述条件则判断其满足第一切换条件。
比如设置第二切换条件为:以触摸屏的竖直方向和水平方向为参考(如图1A),滑动事件滑动的终点在起点的上侧;滑动方向与竖直方向的夹角小于阈值,如30度;滑动起点到终点在竖直方向的距离达到阈值,如3;则如果滑动事件满足上述条件则判断其满足第二切换条件。
那么比如用户按下触摸屏后的起始焦点坐标为(10,10),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(10,7),那么其滑动后的焦点坐标在起始焦点坐标的下侧,那么滑动事件为向下滑动,其滑动方向与竖直方向的夹角为0,其水平滑动的距离 则为3,达到前述的阈值3,则判断该滑动事件满足第一切换条件。
那么比如用户按下触摸屏后的起始焦点坐标为(7,5),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(7,8),那么其滑动后的焦点坐标在起始焦点坐标的上侧,那么滑动事件为向上滑动,其滑动方向与竖直方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第二切换条件。
当然滑动方向与竖直方向的夹角B也可通过前述类似的反余弦函数计算,在本发明实施例中可以计算了滑动方向与水平方向的夹角A后,可以通过90-A得到滑动方向与竖直方向的夹角。
当然,本发明中不限定与反余弦函数,其他可以计算前述夹角的任意方法均可。
本发明实施例中,如前述例子,可以根据up事件、down事件+move事件这些事件对应的坐标位置和坐标间的相对位置及距离,识别滑动事件满足哪一种类型的预设模式条件,还是都不满足。
即奔赴实施例中,所述第一切换条件包括所述滑动事件为与竖直方向夹角小于阈值的情况下向下滑动;所述第二切换条件为与竖直方向夹角小于阈值的情况下向上滑动。
在本发明实施例中,在输入法的常规文字候选模式下,首先是判断滑动事件是否满足的预设模式条件类型,而不判断其是否满足第一切换条件或者满足第二切换条件。
在输入法的常规文字候选模式下,如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式;然后,即可将当前的常规文字候选模式,切换到编辑串光标滑动模式,即如图1B,然后即可根据滑动事件控制光标在编辑串中移动。如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式。即如图1C,然后即可根据滑动事件控制光标在候选项中移动。
如前述例子中比如用户按下触摸屏后的起始焦点坐标为(10,10),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(10,7),那么其滑动后的焦点坐标在起始焦点坐标的下侧,那么滑动事件为向下滑动,其滑动方向与竖直方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第一切换条件,进入编辑串光标滑动模式。
那么用户按下触摸屏后的起始焦点坐标为(7,5),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(10,5),那么其滑动后的焦点坐标在起始焦点坐标的左侧,那么滑动事件为向左滑动,其滑动方向与水平方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式。
优选的,如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件包括:
子步骤1123,如果所述滑动事件满足第一预设模式条件类型,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第二状态标识;
子步骤1124,当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第二状态标识;
子步骤1125,如果当前输入法的状态标识为第二状态标识,则对于编辑串光标滑 动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件。
在本发明实施例中,为了保证不使每次滑动都判断其是否满足前述预设模式条件,每次都触发进入判断光标滑动模式的操作,本发明维护了常规文字候选模式的第一状态标识和编辑串光标滑动模式的第二状态标识。在相应模式下,则启用相应的状态标识。比如前述即为输入法对于用户点击得到的按键序列,进行编辑串的识别,然后基于编辑串从词库得到上屏候选项,将排序靠前的上屏候选项展示在候选栏时即为常规文字候选模式,此时启用第一状态标识,然后进入编辑串光标滑动模式时,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第二状态标识。
那么当继续接收到滑动事件后,则判断当前输入法的状态标识为哪一种,如果为第一状态标识,会继续对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件。
优选的,如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件包括:
子步骤1126,如果所述滑动事件满足第二预设模式条件,则将当前为常规文字候选模式的第一状态标识,修改为候选项光标滑动模式的第三状态标识;
子步骤1127,当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第三状态标识;
子步骤1128,如果当前输入法的状态标识为第三状态标识,则对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件。
在本发明实施例中,为了保证不使每次滑动都判断其是否满足前述预设模式条件,每次都触发进入判断光标滑动模式的操作,本发明维护了常规文字候选模式的第一状态标识和候选项光标滑动模式的第三状态标识。在相应模式下,则启用相应的状态标识。比如前述即为输入法对于用户点击得到的按键序列,进行编辑串的识别,然后基于编辑串从词库得到上屏候选项,将排序靠前的上屏候选项展示在候选栏时即为常规文字候选模式,此时启用第一状态标识,然后进入候选项光标滑动模式时,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第三状态标识。
那么当继续接收到滑动事件后,则判断当前输入法的状态标识为哪一种,如果为第三状态标识,会继续对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件。
步骤114,进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件,则进入步骤116;如果继续接收到的滑动事件满足第一切换条件,则进入步骤118;
在本发明实施例中,对于第一切换条件的判断,存在进入编辑串光标滑动模式的前提。那么输入法在进入编辑串光标滑动模式之后,可以继续判断接收到的滑动事件是否满足第一切换条件,如果继续接收到的滑动事件不满足第一切换条件,则进入步骤116;如果继续接收到的滑动事件满足第一切换条件,则进入步骤118。
那么比如前述例子中,用户按下触摸屏后的起始焦点坐标为(10,10),用户滑动 后,触摸焦点的坐标随着变化,比如滑动到(10,7),那么其滑动后的焦点坐标在起始焦点坐标的下侧,那么滑动事件为向下滑动,其滑动方向与竖直方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第一切换条件。
步骤116,根据滑动事件控制光标在编辑串中移动;
如果编辑串光标滑动模式中的滑动事件不满足第一切换条件,则根据滑动事件控制光标在编辑串中移动。
当然,用户在不移动后,可以点击按键输入字符,比如a-z中的一个或者多个。
在本发明实施例中,当用户的某个滑动操作触发进入编辑串光标滑动模式,然后如果用户前述滑动操作并未结束,继续滑动,则可以根据继续滑动的方向和距离判断其是否满足第二切换条件,如果不满足控制光标在编辑串中移动,如果满足则切换到候选项光标滑动模式。当用户上述滑动操作结束,再次接收滑动操作时,由于是在编辑串光标滑动模式中接收的滑动事件,则直接根据滑动事件的方向和距离判断其是否满足第二切换条件,如果不满足控制光标在编辑串中移动,如果满足则切换到候选项光标滑动模式。
子步骤1161,根据滑动方向以及移动距离,同向控制所述光标在编辑串中的位置。
在本发明中光标在编辑串中的移动方向跟前述水平滑动方向一致,即用户向左滑动操作时,光标向左滑动,如图1D,是从图1B向右滑动得到的示意图。用户向右滑动操作时,光标向右滑动。在本发明实施例中编辑串光标滑动模式下,左滑则向左移动光标,但是光标在编辑串最左边位置(即编辑串首端位置)则不响应左滑。右滑则光标向右移动,在编辑串最右边(即编辑串最末尾位置)不响应右滑。
另外,用户可以退出编辑串光标滑动模式,然后再次接收到滑动事件后则进入步骤112的过程。
优选的,根据滑动事件控制光标在编辑串中移动之后,还包括:
步骤1182,当所述光标在编辑串尾端时,如果再次接收到用户输入的字符序列,则退出所述编辑串光标滑动模式。
在本发明实施例中,光标在编辑串尾端之外的其他位置时,说明用户可能需要修改编辑串,或者需要调整拼音串等操作,接收用户输入的字符则会***光标所在位置,比如图1D中用户继续输入字符u,则会将u***k之后,得到编辑串“ku丨ai’gua”,光标在u之后,并不退出编辑串光标滑动模式。但是如果光标在编辑串尾端时,如图1B的光标位置,用户输入点击按键输入字符时,则退出所述编辑串光标滑动模式,恢复到前述的常规文字候选模式。
当然,当所述光标不在编辑串尾端时,可以点击按键输入字符,比如a-z中的一个或者多个。
在前述子步骤1123-1125的基础上,在本发明实施例中,当所述光标在编辑串尾端时,如果再次接收到用户输入的字符序列,则将编辑串光标滑动模式的第二状态标识,修改为常规文字候选模式的第一状态标识。
步骤118,将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
若编辑串光标滑动模式中接收到的滑动事件满足第二切换条件,则将当前的编辑串光标滑动模式切换到候选项光标滑动模式,比如切换到如图1C的模式中,进行候选 项的选择。则相当于进入步骤120。
步骤120,进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入步骤122;如果继续接收到的滑动事件满足第二切换条件,则进入步骤124;
在本发明实施例中,对于第二切换条件的判断,存在进入候选项光标滑动模式的前提。那么输入法在进入候选项光标滑动模式之后,可以继续判断接收到的滑动事件是否满足第一切换条件,如果继续接收到的滑动事件不满足第一切换条件,则进入步骤122;如果继续接收到的滑动事件满足第一切换条件,则进入步骤124。
又比如用户按下触摸屏后的起始焦点坐标为(7,5),用户滑动后,触摸焦点的坐标随着变化,比如滑动到(7,8),那么其滑动后的焦点坐标在起始焦点坐标的上侧,那么滑动事件为向上滑动,其滑动方向与竖直方向的夹角为0,其水平滑动的距离则为3,达到前述的阈值3,则判断该滑动事件满足第二切换条件。
步骤122,根据滑动事件控制光标在候选项中移动;
如果候选项光标滑动模式中的滑动事件不满足第二切换条件,则根据滑动事件控制光标在编辑串中移动。
优选的,所述根据滑动事件控制光标在候选项中移动包括:
子步骤1221,根据滑动方向以及移动距离,同向控制光标在候选项中的移动。
在本发明中光标在候选栏中的移动方向跟前述水平滑动方向一致,即用户向右滑动操作时,光标向右滑动,如图1C,是光标在候选项中向右移动后的示意图。用户向右滑动操作时,光标向右滑动。在本发明实施例中候选项光标滑动模式下,左滑则向左移动光标,但是光标在候选栏最左边位置则无动作,而是移动候选项。右滑则光标向右移动,在候选栏最右边无动作,而是移动候选项。
另外,用户可以退出候选项光标滑动模式,然后再次接收到滑动事件后则进入步骤112的过程。
优选的,根据滑动事件控制光标在候选项中移动之后,还包括:
子步骤S1221,如果再次接收到用户输入的字符序列,则退出所述候选项光标滑动模式。
在本发明实施例中,在候选项光标滑动模式继续接收用户输入的字符,比如在拼音输入法中输入u,则意味的编辑串变化,那么对应的候选项也变化,则可以退出候选项光标滑动模式。
在前述子步骤1126-1128的基础上,在本发明实施例中,如果再次接收到用户输入的字符序列,则将编辑串光标滑动模式的第三状态标识,修改为常规文字候选模式的第一状态标识。
优选的,根据滑动事件控制光标在候选项中移动包括:
子步骤S1122,当光标移动至候选栏中显示的最后一个候选项时,如果继续接收到向候选项尾端的滑动事件,则判断所述候选栏中显示的最后一个候选项是否为末尾候选项;
子步骤S1123,如果所述候选栏中显示的最后一个候选项不为末尾候选项,则将候选栏中展示的各候选项向首端顺移;
在本发明实施例中,后续栏同时展示的候选项有限定,比如图1C中只能展示4个左右的候选项,而实际上一个编辑串或者说用户输入的按键序列对应的候选项个数一般都远远多于候选栏可以展示的候选项的个数。那么光标在移动至候选栏中展示的最后一个候选项时,如图1C中的“凯华”,那么则会判断“凯华”是不是所有排序最后的一个候选项,如果是“凯华”不是最后的一个候选项,那么对于向右的滑动事件,需要将光标对应当前候选项的后面的候选项,则需要将所有候选项按序向首端顺移,以保证处于候选栏尾端的光标能够对应到相应候选项。在本发明实施例中,图1C“凯华”即是通过图1A中的光标向右移动后,所有候选项向左移动得到的。如果是“凯华”是最后的一个候选项,则不响应右滑。
子步骤S1124,当光标移动至候选栏中显示的第一个候选项时,如果继续接收到向候选项首端的滑动事件,则判断所述候选栏中显示的第一个候选项是否为首位候选项;
子步骤S1125,如果所述候选栏中显示的第一个候选项不为首位候选项,则将候选栏中展示的各候选项向尾端顺移。
如前述逻辑,如果光标移动至候选栏第一个候选项的位置时,比如移动至图1A中的“开挂”上时,需要判断“开挂”是否为所有候选项中排序第一的候选项,如果“开挂”不是所有候选项中排序第一的候选项,那么对于向左滑动事件,则将所有候选项向右顺移。如果“开挂”是所有候选项中排序第一的候选项,则不响应左滑。
优选的,根据滑动事件控制光标在候选项中移动之后还包括:
子步骤S1126,根据光标移动后所在位置对应的候选项,修正对应的编辑串。
在本发明实施例中,对于候选项,可以按照按键序列,选择按键序列对应的各种编辑串对应的各个候选项,比如前述例子中的按键序列“524482”,其至少对应两个拼音串,比如“kai’hua”,“kai’gua”,那么候选项中可以把这些拼音串的各个字和/或词均作为候选项。那么以图1A和图1C为例中初始的拼音串为“kai’gua”,那么在进入候选项光标滑动模式后,向右移动光标到“凯华”后,根据“凯华”调整拼音串为“kai’hua”。
步骤124,将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
若候选项光标滑动模式中接收到的滑动事件满足第二切换条件,则将当前的候选项光标滑动模式切换到候编辑串标滑动模式,比如切换到如图1A的模式中。则相当于进入步骤114。
根据本发明的输入法光标操作方法可以在输入法常规文字候选模式的界面中,监听输入法区域中接收到的滑动事件,判断接收到的滑动事件是否满足预设模式条件,进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件,由此解决了如果用户要在编辑串中输入光标以修改编辑串,需要用户点击编辑串中某个位置,而由于编辑串的展示区域狭小,用户的触屏点击动作很难精准点击到想要的位置,并且,用户点击动作会遮挡编辑串,更影响用户操作的精确性的问题,取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入编辑串,并在编辑串中移动,不影响用户的视线,使用户可以更精确的定位光标的有益效果。
另外,根据本发明的输入法光标操作方法可以在输入法常规文字候选模式的界面中,监听输入法区域中接收到的滑动事件,判断接收到的滑动事件是否满足预设模式条 件,如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件,由此解决了对于输入法根据编辑串得到的候选项展示在候选栏中,如果用户要选择更多的候选项,需要用户点击展开按钮,展开候选界面进行选择,但是候选界面会覆盖输入法键盘,其无法通过候选栏的光标直接在候选栏中展示新的候选项的问题,取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入候选栏,并在候选项中移动,不影响用户的视线,使用户可以更方便的选择候选项的有益效果。
并且,本发明在在进入编辑串光标滑动模式或者候选项光标滑动模式后,判断接收到的滑动事件是否满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件;如果满足接收到的滑动事件满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件,则从当前光标滑动模式切换到另一种光标滑动模式。其可以在编辑串光标滑动模与者候选项光标滑动模式两者之间直接切换,提高模式转换的灵活度,方便用户更快速的切换光标滑动模式,以对候选项进行选择或者对编辑串进行编辑。
可以在输入法常规文字候选模式的界面中,可以切换至编辑串光标滑动模式或者候选栏光标滑动模式,而进入编辑串光标滑动模式或者进入候选栏光标滑动模式后,两者之间可以相互切换。在编辑串光标滑动模式中,可以通过输入区域的滑动操作滑动光标在编辑串中的位置,并且可以对编辑串进行编辑等操作,在候选项光标滑动模式中,可以输入区域的滑动操作滑动光标在候选项串中的位置,由此解决了如果用户要在编辑串中输入光标以修改编辑串,需要用户点击编辑串中某个位置,而由于编辑串的展示区域狭小,用户的触屏点击动作很难精准点击到想要的位置,并且用户点击动作会遮挡编辑串,更影响用户操作的精确性的问题,以及如果用户要选择更多的候选项,需要用户点击展开按钮,展开候选界面进行选择,但是候选界面会覆盖输入法键盘,其无法通过候选栏的光标直接在候选栏中展示新的候选项的问题,取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入编辑串,并在编辑串中移动,不影响用户的视线,使用户可以更精确的定位光标的有益效果,以及取得了方便用户根据在输入法中的滑动操作,控制输入法的光标进入候选栏,并在候选项中移动,不影响用户的视线,使用户可以更方便的选择候选项的有益效果。
并且,本发明在在进入编辑串光标滑动模式或者候选项光标滑动模式后,判断接收到的滑动事件是否满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件;如果满足接收到的滑动事件满足编辑串光标滑动模与者候选项光标滑动模式之间的模式切换条件,则从当前光标滑动模式切换到另一种光标滑动模式。其可以在编辑串光标滑动模与者候选项光标滑动模式两者之间直接切换,提高模式转换的灵活度,方便用户更快速的切换光标滑动模式,以对候选项进行选择或者对编辑串进行编辑。
实施例二
参照图2,其示出了本发明的一种输入法光标操作方法的流程示意图,具体可以包括:
步骤210,在输入法的常规文字候选模式,监听是否接收到滑动事件;
步骤212,如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;如果所述滑动事件满足第一类型预设模式条件,则进入步骤214;如果所述滑动事件满足第二类型预设模式条件,则进入步骤228;
步骤214,进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件,则进入步骤216;如果继续接收到的滑动事件满足第一切换条件,则进入步骤226;
步骤216,根据滑动事件控制光标在编辑串中移动;
在本发明进入编辑串光标滑动模式之后,还会触发笔画筛选模式,生成笔画输入界面,以接收用户输入的筛选笔画序列。比如“横竖竖”,以“横竖撇捺折”对汉字笔画进行切分为例,具体如“一丨丿丶乙”,那么用户可以点击这5个按键进行笔画输入。如图1B中的“一丨丿丶乙”所在界面。
那么根据滑动事件控制光标在编辑串中移动之后,还包括:
步骤218,确定所述光标对应的按键子序列;
在本发明移动编辑串中的光标之后,比如移动后的情况如“kai’丨gua”,或者“kai丨’gua”,或者“kai’gu丨a”,那么则可通过所述定位光标“丨”的位置定位524482中对应的按键子序列,比如定位光标之后的第一个拼音子串的按键序列,对于“kai’丨gua”或者“kai丨’gua”其定位的定位光标之后的第一个拼音子串,其对应的按键子序列为482,对于“kai’gu丨a”,定位光标所在的拼音子串为gua,那么其对应的按键子序列也为482。
步骤220,接收用户输入的筛选笔画序列;
比如用户输入“一丨丨”,那么输入法则接收到筛选笔画序列“一丨丨”。
步骤222,将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的第一笔画序列进行匹配;
在输入法中,对于某个按键子序列,其对应的拼音串可能有多种形式,其对应的字和/或词也会有不同的类型。比如前述482,其对应的拼音子串可以包括“gua”、“hua”等,每个拼音子串在词库中又对应一系列的初始候选项,那么本发明可将前述筛选笔画序列与这些初始候选项的第一笔画序列进行匹配,对于匹配上的初始候选项则进入步骤370。
可以理解,本步骤在匹配之前,需要通过所述按键子序列,获取可以由所述按键子序列组成的各拼音子串,然后由各个拼音子串从词库中提取对应的初始候选项,然后将各个拼音子串的初始候选项组合为对应所述按键子序列的初始候选项。
当然在本发明实施例中,对于初始候选项的选择,优先将能与其他拼音串组合为词/句的初始候选项进行匹配。比如前述“kai丨’gua”,拼音串kai没有对其进行处理,后面的482,其对应的“gua”、“hua”,则优先选择“kai’gua”,““kai’hua”等拼音串组合对应的词中的字,比如“开挂”、“开花”、“开化”等词中“kai”后面的字,然后才会选择其他不能组合为词的单字进行匹配。
那么对于前述例子中的筛选笔画序列“一丨丨”,则与482的各初始候选项中匹配到“花”。
步骤224,根据匹配到的各初始候选项,修正所述按键子序列以及之后的按键子序列对应的拼音子串,以及修正对应的上屏候选项。
对于前述例子中,对于上屏的拼音串“kai’gua”,其上屏候选项为“开挂”等,那么由于前述步骤对于482的初始候选项进行了过滤,得到“花”,而花的拼音串为 “hua”,那么将上屏的拼音串修正为“kai’hua”,同时将“开挂”等上屏候选项撤销,修改为“kai’hua”的上屏候选项,即排序第一的为“开花”,“开化”等。
优选的,步骤218中,所述确定所述光标对应的按键子序列包括:
子步骤2181,所述光标在拼音串中的第一位置,判断所述第一位置是否在符合拼音规则的拼音子串中;
子步骤2182,如果所述第一位置没在符合拼音规则的拼音子串中,则从所述第一位置之后的第一个符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列;
子步骤2183,如果所述第一位置在符合拼音规则的拼音子串中,则从第一位置所在的符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列。
当然,本发明实施例中可以规定只选择一个符合拼音规则的拼音子串的按键序列作为所述定位光标对应的按键子序列,也可以是规定多个符合拼音规则的拼音子串的按键序列作为所述定位光标对应的按键子序列。
以前述九键盘为例,当用户输入了9494268426,输入法识别为默认拼音串“yi’xian’tian”,默认上屏候选项包括“一线天”等。如果只规定选择一个符合拼音规则的拼音子串的按键序列作为所述定位光标对应的按键子序列:
那么当用户在“y丨i’xian’tian”输入定位光标,那么由于定位光标“丨”在第一个i之前,按照汉语拼音的拼音规则,该定位光标在拼音子串yi中,那么将yi对应的按键子序列94作为所述定位光标对应的按键子序列。
当用户在“y i’丨xian’tian”输入定位光标,那么由于定位光标“丨”在x之前,按照汉语拼音的拼音规则,该定位光标没有在某个拼音子串之中,其后面的第一个拼音子串为xian,那么将xian对应的按键序列9426作为所述定位光标对应的按键子序列。
当用户在“y i’xi丨an’tian”输入定位光标,那么由于定位光标“丨”在a之前,按照汉语拼音的拼音规则,该定位光标在拼音子串xian中,,那么将xian对应的按键序列9426作为所述定位光标对应的按键子序列。
当用户在“y i’xian’丨tian”输入定位光标,那么由于定位光标“丨”在后面一个i之前,按照汉语拼音的拼音规则该定位光标没有在某个拼音子串之中,其后面的第一个拼音子串为tian,那么将tian对应的按键序列8426作为所述定位光标对应的按键子序列。
当然,如果选择多个拼音子串作为所述定位光标对应的按键子序列,比如前述“yi’xi丨an’tian”,可以将“9426”和“8426”作为所述定位光标对应的按键子序列,后续笔画筛选序列可以同时筛选这两个按键子序列对应的字和/或词。其他情况以此类推。
当然,还可以根据所述定位光标在拼音串中的第一位置,判断所述第一位置之前是否有符合拼音规则的拼音子串;如果所述第一位置之前有符合拼音规则的拼音子串,则将所述符合拼音规则的拼音子串之后的按键子序列作为所述定位光标对应的按键子序列;如果所述第一位置之前没符合拼音规则的拼音子串,则将第一个按键开始的按键子序列作为所述定位光标对应的按键子序列。
优选的,步骤222中,所述将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的第一笔画序列进行匹配包括:
子步骤2221,查找与所述按键子序列对应的各种拼音子串;
子步骤2222,由各拼音串获取相应的字和/或词,得到各初始候选项;
子步骤2223,将所述筛选笔画序列,与各初始候选项的笔画序列进行匹配。
以前述“y i’丨xian’tian”对应的按键序列9426为例,其可对应“xian”、“xiao”、“zhao”等拼音子串,这些拼音子串对应一系列的字,那么可将这些字作为初始候选项,以筛选笔画序列进行筛选。
基于子步骤B2221-步骤B2223,结合到步骤224。为了更方便的理解本发明实施例,在此以前述的例子进行举例说明。比如用户输入9494268426,输入法识别为默认拼音串“yi’xian’tian”,默认上屏候选项包括“一线天”等。
情况1:用户输入定位光标得到,“yi’丨xian’tian”,那么根据前述步骤,可确定定位光标对应的按键子序列为94。当用户输入筛选笔画序列“一丨乙”,那么通过前述步骤,对于94对应的各字中筛选得到“西”,那么可将默认“yi’xian’tian”中的yi修改为xi,当然yi后面的拼音子串也可以相应修改,也可以不修改,比如对于不修改的情况可为“xi’xian’tian”,其上屏候选项第一个字为西,其他的可根据后面的拼音子串从词库中查找。
情况2:用户输入定位光标得到,“y i’丨xian’tian”,那么根据前述步骤,可确定定位光标对应的按键子序列为9426。当用户输入筛选笔画序列“丨丿丶”,那么通过前述步骤,对于9426对应的各字中筛选得到“小”,那么可将默认“yi’xian’tian”中的xian修改为xiao,当然xian后面的拼音子串也可以相应修改,也可以不修改,比如对于不修改的情况可为“xi’xiao’tian”,其上屏候选项第一个字为依然为一,第二个字则为小,第三个字可为与第二个字能组合为词的字,比如天。其他的上屏候选项可根据后面的拼音子串从词库中查找。
情况3:用户输入定位光标得到,“y i’丨xian’tian”,那么根据前述步骤,可确定定位光标对应的按键子序列为94268426。
在本种情况中,由于可能对多个字的笔画进行匹配,可以预先规定是对多个字的至少第一个笔画所组成的第一笔画序列进行匹配。以各字的首笔进行匹配为例。当用户输入筛选笔画序列“丿一”,那么通过前述步骤,对于94268426对应的各字中筛选得到“小天”。当然对于笔画匹配的字/词如果有多个,也可以按照使用频率进行选择,优先选择使用频率高的。
那么可将默认“yi’xian’tian”中的xian’tian修改为xiao’tian,其上屏候选项第一个字为依然为一,第二、三个字则为小天。其他的上屏候选项可根据后面的拼音子串从词库中查找。
优选的,步骤222中,将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的笔画序列进行匹配,包括:
子步骤B2241,将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配。
在本发明实施例中,定位光标对应的按键子序列能对应几个拼音串,而每个拼音串对应多个初始候选项,因此,各按键子序列通过其对应的拼音串对应更多的初始候选 项。比如步骤中规定获得定位光标对应的第一位置当前或者之后的多个符合拼音规则的拼音子串,将该多个拼音子串对应的多个按键子序列作为所述定位光标对应的按键子序列,那么该按键字序列可能对应词,比如实施例二中94268426可对应“xiao’tian”、“xian’tian”,这些拼音串均每个都对应两个字,或者可以理解为其对应一个词。那么本发明可以通过筛选笔画序列同时匹配一个初始候选项的多个字。
优选的,所述将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配包括:
子步骤B2242,将所述筛选笔画序列与由每个初始候选项各字的完整笔画序列组成的第一笔画序列进行匹配;
在本发明实施例中可将各初始上屏候选项的各字的完整笔画提取出来,组成第一笔画序列,比如“亚洲”,“亚”的完整笔画序列为“一丨丨丿丶一”,“洲”的完整笔画序列为“丶丶一丶丿丶丨丶丨”,那么组成的第一笔画序列为“一丨丨丿丶一丶丶一丶丿丶丨丶丨”,所述筛选笔画序列可与该第一笔画序列进行匹配。
和/或,子步骤B2243,将所述筛选笔画序列与由每个初始候选项的各字的首个笔画组成的第一笔画序列相匹配。
在本发明实施例中可将各初始上屏候选项的各字的完整笔画提取出来,组成第一笔画序列,比如前述“亚洲”,“亚”的首个笔画为“一”,“洲”的首个笔画为“丶”,那么组成的第一笔画序列为“一丶”,所述筛选笔画序列可与该第一笔画序列进行匹配。
优选的,在将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配之前还包括:
子步骤B2244,针对每个初始候选项,从词库中获取每个初始候选项的第一笔画序列。
在本发明实施例中,可预先在词库中保存每个字的笔画,该词库可在安装时随客户端安装在***的指定路径下。
本发明实施例中,在接收用户输入筛选笔画序列的过程之前、之中或者之后,均可从词库中提取每个初始上屏候选项的第一笔画序列。当然如实施例一所述,可以提取每个初始上屏候选项的各字的至少第一个笔画所组成的第一笔画序列。
优选的,所述将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配还包括:
子步骤B2245,当所述筛选笔画序列与所述初始候选项的第一笔画序列不完全匹配时,利用基于笔画的纠错模型判断所述用户输入的笔画序列与所述初始候选项的第一笔画序列匹配的概率;
在实际应用中,用户输入筛选笔画序列时,可能会输入错误,比如输入“快”字时,以五笔输入法的“一、丨、丿、丶、乙”为例,正确的笔画顺序应该为“丶丶丨乙一丿丶”,而对于竖心旁的输入则容易出错,比如“丨丶丶”,那么该种错误输入则可通过基于笔画的纠错模型对其进行判断,判断用户输入的笔画序列与初始上屏候选项的第一笔画序列匹配的概率。
子步骤B2246,当所述匹配的概率大于阈值时,则判断所述筛选笔画序列与所述初始候选项的第一笔画序列匹配上。
当通过基于笔画的纠错模型判断所述用户输入的笔画序列与所述初始上屏候选项的第一笔画序列匹配的概率大于一定的阈值时,则可认为所述筛选笔画序列与所述初始上屏候选项的第一笔画序列匹配上;反之,则认为没有匹配上。
优选的,还包括:
子步骤B2247,利用词组和/或句子中字词的二元或多元关系,构建所述基于笔画的纠错模型;
二元关系,用于表示两个元素相继出现的概率,即P(B|A),表示A出现的条件下,B出现的概率。多元关系由二元关系衍生而来。
在本发明实施例中,可以根据预先统计词组和字词的笔画,根据词组或者句子直接的字直接的二元或者多元关系确定笔画出现的概率。比如快乐的笔画序列为“丶丶丨乙一丿丶丿乙丨丿丶”,通过统计得到“丶丨丶乙一丿丶丿乙丨丿丶”对应快乐的概率为90%,“丨丶丶乙一丿丶丿乙丨丿丶”对应快乐的概率为79%,以此类推,从而构建基于笔画的纠错模型。如此,对于未匹配上初始上屏候选项的笔画筛选序列,可以根据上述基于笔画的纠错模型判断笔画筛选序列与各初始上屏候选项的匹配概率,如果大于阈值,比如大于60%,则可认为初始上屏候选项被匹配上。
和/或,子步骤B2248,利用组成每个字的笔画之间的二元或者多元关系,构建所述基于笔画的纠错模型。
比如“快”字的笔画“丶丶丨乙一丿丶”为,统计可得到笔画序列“丶丨丶乙一丿丶”对应“快”字的概率为为90%,笔画序列“丨丶丶乙一丿丶”对应“快”字的概率为80%,类似原理可以构建基于笔画的纠错模型。也可以根据上述基于笔画的纠错模型判断笔画筛选序列与各初始上屏候选项的匹配概率,如果大于阈值,比如大于60%,则可认为初始上屏候选项被匹配上。
优选的,所述接收用户输入的筛选笔画序列,包括:
子步骤B2249,判断所述筛选笔画序列中是否存在分隔符;如果存在分隔符,则根据所述分隔符将用户输入的筛选笔画序列分隔为各筛选笔画子序列。
进一步的,所述将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配包括:
子步骤B2250,以筛选笔画子序列为单位,按序将所述筛选笔画子序列与每个初始候选项中相应顺序上的字的目标笔画子序列进行匹配。
在本发明实施例中,可以在预先设置分隔符识别规则,比如设置“、”或者“;”为分隔符,用户可以在输入筛选笔画之间输入分隔符,将筛选笔画序列分隔为筛选笔画子序列,每个筛选笔画子序列可以对应一个字的筛选笔画序列。
如果没有分隔符,则可按序将筛选笔画序列与由每个初始上屏候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配。
比如用户输入“一丨”后输入分隔符“;”,那么即可确定“一丨”为筛选初始上屏候选项第一个字的筛选笔画子序列,用户在输入分隔符之后,继续输入“丶丶”,那么可以将该“丶丶”作为为筛选初始上屏候选项第二个字的筛选笔画子序列,如果还有分隔符,那么两个分隔符之间的筛选笔画子序列对应匹配初始上屏候选项相应位置的字。比如有两个分隔符,第一个分隔符之前的筛选笔画子序列对应匹配初始上屏候选项的第一个字,第一个分隔符和第二个分隔符之间的筛选笔画子序列对应匹配初始上屏候 选项的第二个字,第二个分隔符之后的筛选笔画子序列对应匹配初始上屏候选项的第三个字。
子步骤B2249和子步骤B2250可以为在对初始候选项各个字的至少前两笔组成的第一笔画序列进行匹配时使用,可以提高对筛选笔画序列的识别速度,提高匹配效率。
步骤226,将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
步骤228,,进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入步骤230;如果继续接收到的滑动事件满足第二切换条件,则进入步骤232;
步骤230,根据滑动事件控制光标在候选项中移动;
步骤232,将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
在本发明实施例中,首先,提供了两种光标滑动模式,即编辑串光标滑动模式和候选项光标滑动模式,用户可以根据预定的用户触发的预定滑动事件,从常规文字候选模式,进入某个光标滑动模式,方便用户对编辑串的编辑和候选项的选择,以及方便用户在具备候选项视野的情况下,方便的进行候选项的选择。
其次,本发明实施例中,特别是在编辑串的光标滑动模式下,可以直接根据定位光标位置的对应的按键序列,以用户再次输入的筛选笔画序列,对该按键序列对应的各种拼音串对应的各种字和/词(即初始候选项)进行筛选,并且根据筛选结果修正定位光标对应的按键序列的拼音子串,不需要先确定拼音后再确定上屏候选项,可以通过筛选笔画序列确定上屏候选项,同时更正相应的拼音子串。解决了确定候选汉字的过程需要拼音确定之后才能获得候选,操作过程多,并且不能进行进一步过滤,影响用户的输入效率的问题,提高用户使用定位光标的灵活性,进一步对上屏候选项进行筛选,以提高用户的输入效率。并且,本发明实施例中,可以通过多个笔画对初始候选项的多个字进行筛选,不局限于单字的过滤,筛选效率高,进一步提高了输入效率。
再者,可以使两种光标滑动模式之间直接的进行切换,不用每次某种滑动模式下,需要退回文字候选模式后,才能通过另一种滑动事件进入另一种滑动模式,提高模式转换的灵活度,方便用户更快速的切换光标滑动模式,以对候选项进行选择或者对编辑串进行编辑。
实施例三
参照图3,其示出了本发明的一种输入法光标操作装置的结构示意图,具体可以包括:
滑动监听模块310,适于在输入法的常规文字候选模式,监听是否接收到滑动事件;
类型判断模块312,适于如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;如果适于如果所述滑动事件满足第一类型预设模式条件,则进入编辑光标模式执行模块314;适于如果所述滑动事件满足第二类型预设模式条件,则进入候选光标模式执行模块320;
编辑光标模式执行模块314,进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到 的滑动事件不满足第一切换条件,则进入编辑光标移动模块316;如果继续接收到的滑动事件满足第一切换条件,进入第一光标模式切换模块318;
编辑光标移动模块316,适于根据滑动事件控制光标在编辑串中移动;
第一光标模式切换模块318,适于将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
候选光标模式执行模块320,进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入候选光标移动模块322;如果继续接收到的滑动事件满足第二切换条件,进入第二光标模式切换模块324;
选光标移动模块322,适于根据滑动事件控制光标在候选项中移动;
第二光标模式切换模块324,适于将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
优选的,所述第一切换条件包括所述滑动事件为与竖直方向夹角小于阈值的情况下向下滑动;所述第二切换条件为与竖直方向夹角小于阈值的情况下向上滑动。
优选的,所述编辑光标模式执行模块包括:
第一状态标识切换模块,适于如果所述滑动事件满足第一预设模式条件类型,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第二状态标识
第一状态标识判断模块,适于当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第二状态标识;
第一光标移动模块,适于如果当前输入法的状态标识为第二状态标识,则对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件。
优选的,所述候选光标模式执行模块包括:
第二状态标识切换模块,适于如果所述滑动事件满足第二预设模式条件,则将当前为常规文字候选模式的第一状态标识,修改为候选项光标滑动模式的第三状态标识;
第二状态标识判断模块,适于当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第三状态标识;
第二光标移动模块,适于如果当前输入法的状态标识为第三状态标识,则对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件。
优选的,所述类型判断模块包括:
首端判断模块,适于当判断所述滑动事件为输入法键盘区域中向编辑串首端方向的滑动操作,则判断所述滑动事件满足第一类型预设模式条件;
尾端判断模块,适于当判断所述滑动事件为输入法键盘区域中向候选项尾端方向的滑动操作,则判断所述滑动事件满足第二类型预设模式条件。
优选的,所述编辑光标模式执行模块包括:
第一同向移动模块,适于根据滑动方向以及移动距离,同向控制所述光标在编辑串中的位置。
优选的,所述编辑光标模式执行模块之后,还包括:
编辑串光标滑动模式退出模块,适于当所述光标在编辑串尾端时,如果再次接收到用户输入的字符序列,则退出所述编辑串光标滑动模式。
优选的,所述候选光标模式执行模块包括:
第二同步移动模块,适于根据滑动方向以及移动距离,同向控制光标在候选项中的移动。
优选的,所述候选光标模式执行模块之后,还包括:
候选项光标滑动模式退出模块,适于如果再次接收到用户输入的字符序列,则退出所述候选项光标滑动模式。
优选的,所述候选光标模式执行模块包括:
第一候选项移动判断模块,适于当光标移动至候选栏中显示的最后一个候选项时,如果继续接收到向候选项尾端的滑动事件,则判断所述候选栏中显示的最后一个候选项是否为末尾候选项;如果所述候选栏中显示的最后一个候选项不为末尾候选项,则将候选栏中展示的各候选项向首端顺移;
第二候选项移动判断模块,当光标移动至候选栏中显示的第一个候选项时,如果继续接收到向候选项首端的滑动事件,则判断所述候选栏中显示的第一个候选项是否为首位候选项;如果所述候选栏中显示的第一个候选项不为首位候选项,则将候选栏中展示的各候选项向尾端顺移。
优选的,所述候选光标模式执行模块包括:
高亮显示模块,适于将光标对应的候选项进行高亮显示。
优选的,所述光标移动模块之后还包括:
编辑串修正模块,适于根据光标移动后所在位置对应的候选项,修正对应的编辑串。
实施例四
参照图3,其示出了本发明的一种输入法光标操作装置的结构示意图,具体可以包括:
滑动监听模块410,适于在输入法的常规文字候选模式,监听是否接收到滑动事件;
类型判断模块412,适于如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;如果适于如果所述滑动事件满足第一类型预设模式条件,则进入编辑光标模式执行模块414;适于如果所述滑动事件满足第二类型预设模式条件,则进入候选光标模式执行模块428;
编辑光标模式执行模块414,进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件,则进入编辑光标移动模块416;如果继续接收到的滑动事件满足第一切换条件,进入第一光标模式切换模块426;
编辑光标移动模块416,适于根据滑动事件控制光标在编辑串中移动;与光标确定模块418连接;
光标确定模块418,适于确定所述光标对应的按键子序列;
筛选序列接收模块420,适于接收用户输入的筛选笔画序列;
筛选匹配模块,422适于将所述筛选笔画序列,与所述按键子序列对应的各初始候选 项的第一笔画序列进行匹配;
调整模块424,适于根据匹配到的各初始候选项,修正所述按键子序列以及之后的按键子序列对应的拼音子串,以及修正对应的上屏候选项。
第一光标模式切换模块426,适于将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
候选光标模式执行模块428,进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入候选光标移动模块430;如果继续接收到的滑动事件满足第二切换条件,进入第二光标模式切换模块432;
选光标移动模块430,适于根据滑动事件控制光标在候选项中移动;
第二光标模式切换模块432,适于将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
优选的,所述光标确定模块包括:
光标位置判断模块,适于根据所述光标在拼音串中的第一位置,判断所述第一位置是否在符合拼音规则的拼音子串中;
第一按键确定模块,适于如果所述第一位置没在符合拼音规则的拼音子串中,则从所述第一位置之后的第一个符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列;
第二按键确定模块,适于如果所述第一位置在符合拼音规则的拼音子串中,则从第一位置所在的符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列。
优选的,所述筛选匹配模块包括:
拼音串查找模块,适于查找与所述按键子序列对应的各种拼音子串;
初始候选项获取模块,适于由各拼音串获取相应的字和/或词,得到各初始候选项;
匹配模块,适于将所述筛选笔画序列,与各初始候选项的笔画序列进行匹配。
优选的,所述筛选匹配模块包括:
第一筛选匹配模块,适于将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配。
优选的,所述第一筛选匹配模块包括:
完整匹配模块,适于将所述筛选笔画序列与由每个初始候选项各字的完整笔画序列组成的第一笔画序列进行匹配;
和/或,首笔匹配模块,适于将所述筛选笔画序列与由每个初始候选项的各字的首个笔画组成的第一笔画序列相匹配。
优选的,在第一筛选匹配模块之前还包括:
第一笔画序列获取模块,适于针对每个初始候选项,从词库中获取每个初始候选项的第一笔画序列。
优选的,所述第一筛选匹配模块还包括:
纠错模块,适于当所述筛选笔画序列与所述初始候选项的第一笔画序列不完全匹配时,利用基于笔画的纠错模型判断所述用户输入的笔画序列与所述初始候选项的第一笔 画序列匹配的概率;当所述匹配的概率大于阈值时,则判断所述筛选笔画序列与所述初始候选项的第一笔画序列匹配上。
优选的,还包括:
第一纠错模型构建模块,适于利用词组和/或句子中字词的二元或多元关系,构建所述基于笔画的纠错模型;
和/或,第二纠错模型构建模块,适于利用组成每个字的笔画之间的二元或者多元关系,构建所述基于笔画的纠错模型。
优选的,所述筛选序列接收模块包括:
分隔符接收模块,适于判断所述筛选笔画序列中是否存在分隔符;如果存在分隔符,则根据所述分隔符将用户输入的筛选笔画序列分隔为各筛选笔画子序列。
优选的,所述第一筛选匹配模块包括:
分隔匹配模块,适于以筛选笔画子序列为单位,按序将所述筛选笔画子序列与每个初始候选项中相应顺序上的字的目标笔画子序列进行匹配。
在此提供的算法和显示不与任何特定计算机、虚拟***或者其它设备固有相关。各种通用***也可以与基于在此的示教一起使用。根据上面的描述,构造这类***所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例 的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的种输入法光标操作设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图5示出了可以实现根据本发明的一种输入法光标操作的终端设备。该终端设备传统上包括处理器510和以存储器520形式的计算机程序产品或者计算机可读介质。存储器520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器520具有用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,用于程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图6所述的便携式或者固定存储单元。该存储单元可以具有与图5的终端设备中的存储器520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码531’,即可以由例如诸如510之类的处理器读取的代码,这些代码当由终端设备运行时,导致该终端设备执行上面所描述的方法中的各个步骤。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (46)

  1. 一种输入法光标操作方法,包括:
    在输入法的常规文字候选模式,监听是否接收到滑动事件;
    如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;
    如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;
    如果继续接收到的滑动事件不满足第一切换条件,则根据滑动事件控制光标在编辑串中移动;
    如果继续接收到的滑动事件满足第一切换条件,则将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
    如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;
    如果继续接收到的滑动事件不满足第二切换条件,则根据滑动事件控制光标在候选项中移动;
    如果继续接收到的滑动事件满足第二切换条件,则将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
  2. 如权利要求1所述的方法,其特征在于,所述第一切换条件包括所述滑动事件为与竖直方向夹角小于阈值的情况下向下滑动;所述第二切换条件为与竖直方向夹角小于阈值的情况下向上滑动。
  3. 如权利要求1所述的方法,其特征在于,如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件包括:
    如果所述滑动事件满足第一预设模式条件类型,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第二状态标识;
    当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第二 状态标识;
    如果当前输入法的状态标识为第二状态标识,则对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件。
  4. 如权利要求1所述的方法,其特征在于,如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件包括:
    如果所述滑动事件满足第二预设模式条件,则将当前为常规文字候选模式的第一状态标识,修改为候选项光标滑动模式的第三状态标识;
    当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第三状态标识;
    如果当前输入法的状态标识为第三状态标识,则对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件。
  5. 如权利要求1所述的方法,其特征在于,判断所述滑动事件满足的预设模式条件类型包括:
    当判断所述滑动事件为输入法键盘区域中向编辑串首端方向的滑动操作,则判断所述滑动事件满足第一类型预设模式条件;
    当判断所述滑动事件为输入法键盘区域中向候选项尾端方向的滑动操作,则判断所述滑动事件满足第二类型预设模式条件。
  6. 如权利要求1所述的方法,其特征在于,所述根据滑动事件控制光标在编辑串中移动包括:
    根据滑动方向以及移动距离,同向控制所述光标在编辑串中的位置。
  7. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在编辑串中移动之后,还包括:
    当所述光标在编辑串尾端时,如果再次接收到用户输入的字符序列,则退出所述编辑串光标滑动模式。
  8. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在编辑串中移动之后,还包括:
    确定所述光标对应的按键子序列;
    接收用户输入的筛选笔画序列;
    将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的第一笔画序列进行匹配;
    根据匹配到的各初始候选项,修正所述按键子序列以及之后的按键子序列对应的拼音子串,以及修正对应的上屏候选项。
  9. 如权利要求8所述的方法,其特征在于,所述确定所述光标对应的按键子序列包括:
    根据所述光标在拼音串中的第一位置,判断所述第一位置是否在符合拼音规则的拼音子串中;
    如果所述第一位置没在符合拼音规则的拼音子串中,则从所述第一位置之后的第一个符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列;
    如果所述第一位置在符合拼音规则的拼音子串中,则从第一位置所在的符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列。
  10. 如权利要求8所述的方法,其特征在于,所述将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的第一笔画序列进行匹配包括:
    查找与所述按键子序列对应的各种拼音子串;
    由各拼音串获取相应的字和/或词,得到各初始候选项;
    将所述筛选笔画序列,与各初始候选项的笔画序列进行匹配。
  11. 如权利要求8所述的方法,其特征在于,将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的笔画序列进行匹配,包括:
    将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配。
  12. 如权利要11所述的方法,其特征在于,所述将用户输入的筛选笔 画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配包括:
    将所述筛选笔画序列与由每个初始候选项各字的完整笔画序列组成的第一笔画序列进行匹配;
    和/或,将所述筛选笔画序列与由每个初始候选项的各字的首个笔画组成的第一笔画序列相匹配。
  13. 如权利要求11所述的方法,其特征在于,在将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配之前还包括:
    针对每个初始候选项,从词库中获取每个初始候选项的第一笔画序列。
  14. 如权利要求11所述的方法,其特征在于,所述将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配还包括:
    当所述筛选笔画序列与所述初始候选项的第一笔画序列不完全匹配时,利用基于笔画的纠错模型判断所述用户输入的笔画序列与所述初始候选项的第一笔画序列匹配的概率;
    当所述匹配的概率大于阈值时,则判断所述筛选笔画序列与所述初始候选项的第一笔画序列匹配上。
  15. 如权利要求14所述的方法,其特征在于,还包括:
    利用词组和/或句子中字词的二元或多元关系,构建所述基于笔画的纠错模型;
    和/或,利用组成每个字的笔画之间的二元或者多元关系,构建所述基于笔画的纠错模型。
  16. 如权利要求14所述的方法,其特征在于,所述接收用户输入的筛选笔画序列,包括:
    判断所述筛选笔画序列中是否存在分隔符;如果存在分隔符,则根据所述分隔符将用户输入的筛选笔画序列分隔为各筛选笔画子序列。
  17. 如权利要求16所述的方法,其特征在于,所述将用户输入的筛选 笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配包括:
    以筛选笔画子序列为单位,按序将所述筛选笔画子序列与每个初始候选项中相应顺序上的字的目标笔画子序列进行匹配。
  18. 如权利要求1所述的方法,其特征在于,所述根据滑动事件控制光标在候选项中移动包括:
    根据滑动方向以及移动距离,同向控制光标在候选项中的移动。
  19. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在候选项中移动之后,还包括:
    如果再次接收到用户输入的字符序列,则退出所述候选项光标滑动模式。
  20. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在候选项中移动包括:
    当光标移动至候选栏中显示的最后一个候选项时,如果继续接收到向候选项尾端的滑动事件,则判断所述候选栏中显示的最后一个候选项是否为末尾候选项;
    如果所述候选栏中显示的最后一个候选项不为末尾候选项,则将候选栏中展示的各候选项向首端顺移;
    当光标移动至候选栏中显示的第一个候选项时,如果继续接收到向候选项首端的滑动事件,则判断所述候选栏中显示的第一个候选项是否为首位候选项;
    如果所述候选栏中显示的第一个候选项不为首位候选项,则将候选栏中展示的各候选项向尾端顺移。
  21. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在候选项中移动包括:
    将光标对应的候选项进行高亮显示。
  22. 如权利要求1所述的方法,其特征在于,根据滑动事件控制光标在候选项中移动之后还包括:
    根据光标移动后所在位置对应的候选项,修正对应的编辑串。
  23. 一种输入法光标操作装置,包括:
    滑动监听模块,适于在输入法的常规文字候选模式,监听是否接收到滑动事件;
    类型判断模块,适于如果接收到滑动事件,则判断所述滑动事件满足的预设模式条件类型;
    编辑光标模式执行模块,适于如果所述滑动事件满足第一类型预设模式条件,则进入编辑串光标滑动模式,对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件;如果继续接收到的滑动事件不满足第一切换条件,则进入编辑光标移动模块;如果继续接收到的滑动事件满足第一切换条件,进入第一光标模式切换模块;
    编辑光标移动模块,适于根据滑动事件控制光标在编辑串中移动;
    第一光标模式切换模块,适于将当前的编辑串光标滑动模式切换到候选项光标滑动模式;
    候选光标模式执行模块,适于如果所述滑动事件满足第二类型预设模式条件,则进入候选项光标滑动模式,对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件;如果继续接收到的滑动事件不满足第二切换条件,则进入候选光标移动模块;如果继续接收到的滑动事件满足第二切换条件,进入第二光标模式切换模块;
    选光标移动模块,适于根据滑动事件控制光标在候选项中移动;
    第二光标模式切换模块,适于将当前的候选项光标滑动模式切换到编辑串光标滑动模式。
  24. 如权利要求23所述的装置,其特征在于,所述第一切换条件包括所述滑动事件为与竖直方向夹角小于阈值的情况下向下滑动;所述第二切换条件为与竖直方向夹角小于阈值的情况下向上滑动。
  25. 如权利要求23所述的装置,其特征在于,所述编辑光标模式执行模块包括:
    第一状态标识切换模块,适于如果所述滑动事件满足第一预设模式条 件类型,则将当前为常规文字候选模式的第一状态标识,修改为编辑串光标滑动模式的第二状态标识
    第一状态标识判断模块,适于当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第二状态标识;
    第一光标移动模块,适于如果当前输入法的状态标识为第二状态标识,则对于编辑串光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第一切换条件。
  26. 如权利要求23所述的装置,其特征在于,所述候选光标模式执行模块包括:
    第二状态标识切换模块,适于如果所述滑动事件满足第二预设模式条件,则将当前为常规文字候选模式的第一状态标识,修改为候选项光标滑动模式的第三状态标识;
    第二状态标识判断模块,适于当继续接收到滑动事件之后,判断当前输入法的状态标识是否为第三状态标识;
    第二光标移动模块,适于如果当前输入法的状态标识为第三状态标识,则对于候选项光标滑动模式中继续接收到的滑动事件,判断所述滑动事件是否满足第二切换条件。
  27. 如权利要求23所述的装置,其特征在于,所述类型判断模块包括:
    首端判断模块,适于当判断所述滑动事件为输入法键盘区域中向编辑串首端方向的滑动操作,则判断所述滑动事件满足第一类型预设模式条件;
    尾端判断模块,适于当判断所述滑动事件为输入法键盘区域中向候选项尾端方向的滑动操作,则判断所述滑动事件满足第二类型预设模式条件。
  28. 如权利要求23所述的装置,其特征在于,所述编辑光标模式执行模块包括:
    第一同向移动模块,适于根据滑动方向以及移动距离,同向控制所述 光标在编辑串中的位置。
  29. 如权利要求23所述的装置,其特征在于,所述编辑光标模式执行模块之后,还包括:
    编辑串光标滑动模式退出模块,适于当所述光标在编辑串尾端时,如果再次接收到用户输入的字符序列,则退出所述编辑串光标滑动模式。
  30. 如权利要求23所述的装置,其特征在于,所述编辑光标模式执行模块之后,还包括:
    光标确定模块,适于确定所述光标对应的按键子序列;
    筛选序列接收模块,适于接收用户输入的筛选笔画序列;
    筛选匹配模块,适于将所述筛选笔画序列,与所述按键子序列对应的各初始候选项的第一笔画序列进行匹配;
    调整模块,适于根据匹配到的各初始候选项,修正所述按键子序列以及之后的按键子序列对应的拼音子串,以及修正对应的上屏候选项。
  31. 如权利要求30所述的装置,其特征在于,所述光标确定模块包括:
    光标位置判断模块,适于根据所述光标在拼音串中的第一位置,判断所述第一位置是否在符合拼音规则的拼音子串中;
    第一按键确定模块,适于如果所述第一位置没在符合拼音规则的拼音子串中,则从所述第一位置之后的第一个符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列;
    第二按键确定模块,适于如果所述第一位置在符合拼音规则的拼音子串中,则从第一位置所在的符合拼音规则的拼音子串开始,选择对应的按键子序列作为所述光标对应的按键子序列。
  32. 如权利要求30所述的装置,其特征在于,所述筛选匹配模块包括:
    拼音串查找模块,适于查找与所述按键子序列对应的各种拼音子串;
    初始候选项获取模块,适于由各拼音串获取相应的字和/或词,得到各初始候选项;
    匹配模块,适于将所述筛选笔画序列,与各初始候选项的笔画序列进行匹配。
  33. 如权利要求30所述的装置,其特征在于,所述筛选匹配模块包括:
    第一筛选匹配模块,适于将用户输入的筛选笔画序列,与由每个初始候选项的各字的至少第一个笔画所组成的第一笔画序列进行匹配。
  34. 如权利要求33所述的装置,其特征在于,所述第一筛选匹配模块包括:
    完整匹配模块,适于将所述筛选笔画序列与由每个初始候选项各字的完整笔画序列组成的第一笔画序列进行匹配;
    和/或,首笔匹配模块,适于将所述筛选笔画序列与由每个初始候选项的各字的首个笔画组成的第一笔画序列相匹配。
  35. 如权利要求33所述的装置,其特征在于,在第一筛选匹配模块之前还包括:
    第一笔画序列获取模块,适于针对每个初始候选项,从词库中获取每个初始候选项的第一笔画序列。
  36. 如权利要求33所述的装置,其特征在于,所述第一筛选匹配模块还包括:
    纠错模块,适于当所述筛选笔画序列与所述初始候选项的第一笔画序列不完全匹配时,利用基于笔画的纠错模型判断所述用户输入的笔画序列与所述初始候选项的第一笔画序列匹配的概率;当所述匹配的概率大于阈值时,则判断所述筛选笔画序列与所述初始候选项的第一笔画序列匹配上。
  37. 如权利要求36所述的装置,其特征在于,还包括:
    第一纠错模型构建模块,适于利用词组和/或句子中字词的二元或多元关系,构建所述基于笔画的纠错模型;
    和/或,第二纠错模型构建模块,适于利用组成每个字的笔画之间的二元或者多元关系,构建所述基于笔画的纠错模型。
  38. 如权利要求33所述的装置,其特征在于,所述筛选序列接收模块 包括:
    分隔符接收模块,适于判断所述筛选笔画序列中是否存在分隔符;如果存在分隔符,则根据所述分隔符将用户输入的筛选笔画序列分隔为各筛选笔画子序列。
  39. 如权利要求38所述的装置,其特征在于,所述第一筛选匹配模块包括:
    分隔匹配模块,适于以筛选笔画子序列为单位,按序将所述筛选笔画子序列与每个初始候选项中相应顺序上的字的目标笔画子序列进行匹配。
  40. 如权利要求23所述的装置,其特征在于,所述候选光标模式执行模块包括:
    第二同步移动模块,适于根据滑动方向以及移动距离,同向控制光标在候选项中的移动。
  41. 如权利要求23所述的装置,其特征在于,所述候选光标模式执行模块之后,还包括:
    候选项光标滑动模式退出模块,适于如果再次接收到用户输入的字符序列,则退出所述候选项光标滑动模式。
  42. 如权利要求23所述的装置,其特征在于,所述候选光标模式执行模块包括:
    第一候选项移动判断模块,适于当光标移动至候选栏中显示的最后一个候选项时,如果继续接收到向候选项尾端的滑动事件,则判断所述候选栏中显示的最后一个候选项是否为末尾候选项;如果所述候选栏中显示的最后一个候选项不为末尾候选项,则将候选栏中展示的各候选项向首端顺移;
    第二候选项移动判断模块,当光标移动至候选栏中显示的第一个候选项时,如果继续接收到向候选项首端的滑动事件,则判断所述候选栏中显示的第一个候选项是否为首位候选项;如果所述候选栏中显示的第一个候选项不为首位候选项,则将候选栏中展示的各候选项向尾端顺移。
  43. 如权利要求23所述的装置,其特征在于,所述候选光标模式执行 模块包括:
    高亮显示模块,适于将光标对应的候选项进行高亮显示。
  44. 如权利要求23所述的装置,其特征在于,所述光标移动模块之后还包括:
    编辑串修正模块,适于根据光标移动后所在位置对应的候选项,修正对应的编辑串。
  45. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在终端设备上运行时,导致所述终端设备执行根据权利要求1-22中的任一个所述的输入法光标操作方法。
  46. 一种计算机可读介质,其中存储了如权利要求45所述的计算机程序。
PCT/CN2015/094842 2014-12-30 2015-11-17 输入法光标操作方法和装置 WO2016107317A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/541,070 US20180011549A1 (en) 2014-12-30 2015-11-17 Cursor operation method and device for input method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410849840.5 2014-12-30
CN201410849840.5A CN104571585B (zh) 2014-12-30 2014-12-30 输入法光标操作方法和装置

Publications (1)

Publication Number Publication Date
WO2016107317A1 true WO2016107317A1 (zh) 2016-07-07

Family

ID=53087858

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094842 WO2016107317A1 (zh) 2014-12-30 2015-11-17 输入法光标操作方法和装置

Country Status (3)

Country Link
US (1) US20180011549A1 (zh)
CN (1) CN104571585B (zh)
WO (1) WO2016107317A1 (zh)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104571585B (zh) * 2014-12-30 2017-07-28 北京奇虎科技有限公司 输入法光标操作方法和装置
CN104809102B (zh) * 2015-04-01 2018-10-16 北京奇虎科技有限公司 一种基于输入的显示候选词的方法和装置
CN106557248A (zh) * 2015-09-22 2017-04-05 阿里巴巴集团控股有限公司 内容输入方法及装置
CN106855796A (zh) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 一种数据处理方法、装置和智能终端
CN106406566B (zh) * 2016-10-21 2019-03-19 北京百度网讯科技有限公司 显示文字输入过程中向用户推荐的候选词的方法和装置
TWI694340B (zh) * 2017-01-19 2020-05-21 香港商阿里巴巴集團服務有限公司 內容輸入方法及裝置
CN106980461A (zh) * 2017-02-23 2017-07-25 北京小牛互联科技有限公司 在键盘的文字输入面板快速定位输入文字位置的方法和装置
CN108319378B (zh) * 2018-02-24 2021-08-10 林敬钏 一种用于智能便携设备的输入法的候选词纠错方法
CN111158502B (zh) * 2019-12-27 2023-07-14 上海金仕达软件科技股份有限公司 一种基于快搜键盘的输入方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6836759B1 (en) * 2000-08-22 2004-12-28 Microsoft Corporation Method and system of handling the selection of alternates for recognized words
CN102541421A (zh) * 2010-12-31 2012-07-04 上海量明科技发展有限公司 输入法中光标移动的方法及***
CN103049204A (zh) * 2012-12-17 2013-04-17 上海海知信息技术有限公司 在笔迹图像上移动光标的方法、输入法以及输入***
CN104571585A (zh) * 2014-12-30 2015-04-29 北京奇虎科技有限公司 输入法光标操作方法和装置

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7098896B2 (en) * 2003-01-16 2006-08-29 Forword Input Inc. System and method for continuous stroke word-based text input
US8884872B2 (en) * 2009-11-20 2014-11-11 Nuance Communications, Inc. Gesture-based repetition of key activations on a virtual keyboard
EP2641146A4 (en) * 2010-11-20 2017-05-03 Nuance Communications, Inc. Performing actions on a computing device using a contextual keyboard
CN102541410A (zh) * 2010-12-26 2012-07-04 上海量明科技发展有限公司 滑动型输入操作界面的实现方法及***
US10275153B2 (en) * 2011-05-19 2019-04-30 Will John Temple Multidirectional button, key, and keyboard
US20160132119A1 (en) * 2014-11-12 2016-05-12 Will John Temple Multidirectional button, key, and keyboard
US10082950B2 (en) * 2011-11-09 2018-09-25 Joseph T. LAPP Finger-mapped character entry systems
US8667414B2 (en) * 2012-03-23 2014-03-04 Google Inc. Gestural input at a virtual keyboard
US9021380B2 (en) * 2012-10-05 2015-04-28 Google Inc. Incremental multi-touch gesture recognition
US8843845B2 (en) * 2012-10-16 2014-09-23 Google Inc. Multi-gesture text input prediction
US8612213B1 (en) * 2012-10-16 2013-12-17 Google Inc. Correction of errors in character strings that include a word delimiter
US8832589B2 (en) * 2013-01-15 2014-09-09 Google Inc. Touch keyboard using language and spatial models
US8887103B1 (en) * 2013-04-22 2014-11-11 Google Inc. Dynamically-positioned character string suggestions for gesture typing
CN103645829A (zh) * 2013-12-18 2014-03-19 天津三星通信技术研究有限公司 字符删除方法及应用此的便携式终端
US9940016B2 (en) * 2014-09-13 2018-04-10 Microsoft Technology Licensing, Llc Disambiguation of keyboard input
US9996258B2 (en) * 2015-03-12 2018-06-12 Google Llc Suggestion selection during continuous gesture input

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6836759B1 (en) * 2000-08-22 2004-12-28 Microsoft Corporation Method and system of handling the selection of alternates for recognized words
CN102541421A (zh) * 2010-12-31 2012-07-04 上海量明科技发展有限公司 输入法中光标移动的方法及***
CN103049204A (zh) * 2012-12-17 2013-04-17 上海海知信息技术有限公司 在笔迹图像上移动光标的方法、输入法以及输入***
CN104571585A (zh) * 2014-12-30 2015-04-29 北京奇虎科技有限公司 输入法光标操作方法和装置

Also Published As

Publication number Publication date
US20180011549A1 (en) 2018-01-11
CN104571585B (zh) 2017-07-28
CN104571585A (zh) 2015-04-29

Similar Documents

Publication Publication Date Title
WO2016107317A1 (zh) 输入法光标操作方法和装置
US20210406578A1 (en) Handwriting-based predictive population of partial virtual keyboards
WO2016107316A1 (zh) 输入法光标操作方法和装置
WO2016107344A1 (zh) 对输入法的上屏候选项进行筛选的方法和装置
US10489508B2 (en) Incremental multi-word recognition
US9026428B2 (en) Text/character input system, such as for use with touch screens on mobile phones
US8850350B2 (en) Partial gesture text entry
EP2386984A2 (en) Method and apparatus for inputting characters traced on top of each other
US10884613B2 (en) Method and device for input with candidate split mode
US20150186347A1 (en) Information processing device, information processing method, and computer program product
JP2013206141A (ja) 文字入力装置、文字入力方法、及び文字入力プログラム
EP3260955A1 (en) Slide input method and apparatus
CN107422921B (zh) 一种输入方法、装置、电子设备以及存储介质
CN104571584B (zh) 文字输入方法和装置
CN105843414A (zh) 输入法的输入修正方法和输入法装置
US20150278176A1 (en) Providing for text entry by a user of a computing device
KR101651909B1 (ko) 음성 인식 텍스트 수정 방법 및 이 방법을 구현한 장치
US20180165001A1 (en) Sliding input method and device
US20240212674A1 (en) System, method and device for multimodal text editing
US20220261092A1 (en) Method and device for inputting text on a keyboard
WO2013145505A1 (ja) 情報提示装置、情報提示方法、及び情報提示用プログラム
KR101727953B1 (ko) 문자를 번역하는 방법 및 그 장치
KR20150061543A (ko) 영어 자소 입력 장치 및 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15874997

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15541070

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15874997

Country of ref document: EP

Kind code of ref document: A1