WO2015100574A1 - 一种字符串输入控制方法,及装置 - Google Patents

一种字符串输入控制方法,及装置 Download PDF

Info

Publication number
WO2015100574A1
WO2015100574A1 PCT/CN2013/091004 CN2013091004W WO2015100574A1 WO 2015100574 A1 WO2015100574 A1 WO 2015100574A1 CN 2013091004 W CN2013091004 W CN 2013091004W WO 2015100574 A1 WO2015100574 A1 WO 2015100574A1
Authority
WO
WIPO (PCT)
Prior art keywords
character
string
input
character string
substring
Prior art date
Application number
PCT/CN2013/091004
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 CN201380015027.1A priority Critical patent/CN104246663A/zh
Priority to EP13900740.5A priority patent/EP3001284A4/en
Priority to PCT/CN2013/091004 priority patent/WO2015100574A1/zh
Publication of WO2015100574A1 publication Critical patent/WO2015100574A1/zh
Priority to US14/984,368 priority patent/US20160110332A1/en

Links

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
    • 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
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/232Orthographic correction, e.g. spell checking or vowelisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/048Fuzzy inferencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/70Details of telephonic subscriber devices methods for entering alphabetical characters, e.g. multi-tap or dictionary disambiguation

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a string input control method and apparatus. Background technique
  • the string input by the user can be various strings, such as: English, symbols, Chinese characters, and the like.
  • Embodiments of the present invention provide a string input control method and apparatus for conveniently moving a cursor to a desired position, thereby improving the efficiency of modifying errors.
  • An embodiment of the present invention provides a string input control method, including:
  • Identifying the first character string determining whether the first character string has a substring matching the second character string, and if yes, identifying the substring by using a block identifier After receiving the instruction to select the block identifier, move the cursor to the corresponding position of the selected block identifier.
  • the receiving the input first string and the second string include:
  • the input character Receiving the input character, and obtaining an input time interval between the currently input character and the previous character of the current character. If the input time interval is greater than a predetermined threshold, the character input before the current character is used as the The first character string, the current character and the subsequent input character are used as Said second string; or,
  • the input character is obtained. If the input character has a space character, the character input before the space character is used as the first character string, and the character input after the space character is used as the second character string.
  • the predetermined threshold of the input time interval is 800 to 1000 milliseconds.
  • the determining, by the third possible implementation, whether the first string has a substring matching the second string includes:
  • the method further includes:
  • a replacement instruction input by the user is received, and the substring is replaced with the second character string according to the replacement instruction.
  • the receiving a replacement instruction input by a user, and replacing the substring with the second character according to the replacement instruction The string includes: if the user selects the block identifier and the dwell time exceeds a predetermined time, and the second character string is different from the character of the substring, determining that the user inputs a replacement instruction, and the sub The string is replaced with the second string.
  • the moving the cursor to the selected block identifier corresponding location includes:
  • a second embodiment of the present invention provides a string input control apparatus, including:
  • a character receiving unit configured to receive the input first character string and the second character string, where the first character string is input before the second character string;
  • a character recognition unit configured to recognize the first character string received by the character receiving unit And determining whether the first character string has a substring matching the second character string; and the character identifier unit is configured to: if the character recognition unit determines that the result is yes, the block identifier is used to identify The substring is identified;
  • An instruction receiving unit configured to receive an instruction for selecting a block identifier
  • a cursor control unit configured to: after the instruction receiving unit receives the instruction for selecting the block identifier, move the cursor to the corresponding position of the selected block identifier.
  • the character receiving unit includes: a character receiving subunit and a string segmentation unit;
  • the character receiving subunit is configured to receive the input character, and obtain an input time interval between the currently input character and the previous character of the current character;
  • the string segmentation unit is configured to: if the input time interval acquired by the character receiving subunit is greater than a predetermined threshold, use the character input before the current character as the first character string, and the current character And the character input as the second character string; or, if the character received by the character receiving subunit has a space character, the character input before the space character is used as the first character string, the space The character entered after the character is used as the second character string.
  • the string segmentation unit is configured to: if the character receiving subunit obtains the input time interval is greater than a predetermined threshold, The character input before the current character is used as the first character string, and the current character and the subsequently input character are used as the second character string; the predetermined threshold is 800 to 1000 milliseconds.
  • the character recognition unit is configured to perform fuzzy mode matching on the first character string by using the second character string, if the first If the consecutive characters in the string have the same character set, the same length, and the same number of occurrences of the same character, the continuous character is determined to be the second and the second character string. The substring of the string match.
  • the instruction receiving unit is further configured to receive a replacement of the user input.
  • the character string input control device further includes: a replacement control unit, configured to: if the instruction receiving unit receives the replacement instruction input by a user, replace the substring according to the replacement instruction Change to the second string.
  • a replacement control unit configured to: if the instruction receiving unit receives the replacement instruction input by a user, replace the substring according to the replacement instruction Change to the second string.
  • the command receiving unit is further configured to determine whether the user selects whether the block identifier stays longer than a predetermined time
  • the replacement control unit is configured to: if the instruction receiving unit determines that the user selects the block identifier and the dwell time exceeds a predetermined time, and the second character string is different from the character of the substring, determining to receive The user enters a replacement instruction and replaces the substring with the second string.
  • the cursor control unit is configured to: if the instruction receiving unit determines that the user selects the block identifier and the dwell time exceeds a predetermined time , moves the cursor before the substring that was replaced.
  • the embodiment of the present invention has the following advantages: after the user inputs the second character string, the second character string can be automatically matched in the first character string; that is, if the user needs to locate the cursor, The automatic positioning can be realized only by inputting the character corresponding to the position to be located; and the positioning is performed in a block mode, and the user can conveniently move the cursor to the desired position, thereby improving the efficiency of the modification error.
  • FIG. 1 is a schematic flowchart of a method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a character string input control apparatus according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a string input control device according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a string input control apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a string input control device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a mobile phone according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a string input control method. As shown in FIG. 1 , the method includes: 101: receiving an input first character string and a second character string, where the first character string is input before the second character string. ;
  • the first string and the second string are both strings.
  • the use of "first” and “second” is only for the purpose of distinguishing between two logically different strings and should not be construed as other limiting meanings.
  • the length of the string increases, the string is segmented, and the segmentation of each string can be considered as a separate string.
  • the embodiment of the present invention provides two examples of the segmentation scheme of the character string. It should be noted that the segmentation scheme of the character string may be many. The following examples are not to be construed as limiting the embodiment of the present invention.
  • the receiving the input first character string and the second character string include: receiving the input character, and obtaining between the currently input character and the previous character of the current character If the input time interval is greater than a predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequently input character are used as the second character string; or, the input is obtained. If the character entered has a space character, the character input before the space character is used as the first character string, and the character input after the space character is used as the second character string.
  • the input pause is habitually generated.
  • the solution is based on the design of the input time interval to determine whether the input is incorrect, so that the automatic detection function can be realized without the user.
  • Enter another command to indicate segmentation or indicate an input error saving modification time and increasing input efficiency.
  • the space character is used to indicate the segmentation of the string. In fact, it can be any other default command, for example: Press the shift key twice, or ctrl+G. Combination keys are all possible.
  • the use of space characters to indicate segmentation of a character string is not to be construed as limiting the uniqueness of the embodiments of the present invention.
  • the embodiment of the present invention further gives a more detailed example, as follows:
  • the predetermined threshold is 800 ⁇ 1000 milliseconds.
  • the time of each character input may be recorded, and the input between adjacent characters is calculated as a time interval, and the long integer variable is used to record the input time interval between adjacent characters, and then passed.
  • the long integer variable is compared to a predetermined threshold to determine if segmentation is required.
  • the variable used for recording the input time does not have to be a long integer, and may be an integer or other variable, as long as it can be used for accurate recording time; the above predetermined threshold is used to control segmentation. Referring to the time, this embodiment gives a reference value of 800 to 1000 milliseconds. This threshold may vary depending on the input habits of different people, so this threshold may also be set by the user.
  • Identify the first character string determine whether the first character string has a substring matching the second character string, and if yes, identify the substring with a block identifier
  • the rules for matching the substring with the second string may be set according to different matching algorithms, for example: the substring is identical to the second string, that is, the number of characters is the same, the character set is the same, And the order of each character is the same; it can also be a fuzzy matching of the substring and the second string, that is, the number of characters is the same, the character set is the same, the number of each character is the same, and the order of each character is not necessarily the same.
  • the specific matching rule is not limited by the embodiment of the present invention.
  • determining whether the first character string has a substring matching the second character string includes: performing fuzzy mode matching on the first character string by using the second character string, if the first string is If the consecutive characters have the same character set, the same length, and the same number of occurrences of the same character, the continuous character is determined to be a sub-character having the second character string in the first character string. string.
  • the user does not have to input the same input as the previous error input to determine where the previous input error is, making positioning easier.
  • convenient conditions are provided for erroneous modifications, which will be explained in more detail in subsequent embodiments.
  • the second character string after the user inputs the second character string, the second character string can be automatically matched in the first character string; that is, if the user needs to locate the cursor, only the character corresponding to the position to be located can be input. Automatic positioning is realized; and positioning is performed in a block mode, and the user can conveniently move the cursor to a desired position, thereby improving the efficiency of modifying errors.
  • the embodiment of the present invention further provides a more preferable implementation solution of the modification error, which is specifically as follows: Further, identifying the substring by using a block identifier Thereafter, the method further includes: receiving a replacement instruction input by the user, and replacing the substring with the second character string according to the replacement instruction.
  • the user finds an input error, the user can input the correct character and select the position to be modified, and the modification of the input error can be completed, which can further improve the efficiency of the error modification.
  • the replacement instruction may be explicit or implicit.
  • the explicit instruction may be an input replacement command
  • the implied one may be a predefined operation mode, for example: When the user selects the block identification and the dwell time exceeds the predetermined time, the user is considered to have entered the replacement instruction.
  • the receiving the replacement instruction input by the user, and replacing the substring with the second character string according to the replacement instruction includes: if the user selects the block identifier and the dwell time exceeds a predetermined time, and the second character If the string is different from the character of the above substring, it is determined that the replacement instruction is received by the user, and the substring is replaced with the second character string.
  • the user selects the block identifier and the dwell time exceeds the predetermined time to determine that the user needs to perform character replacement.
  • the scheme can be compatible with the scheme of using a short click to locate the cursor.
  • the user can input the correct character and select the position to be modified, and then the modification of the input error can be completed, and the cursor is positioned to the position corresponding to the wrong character.
  • the error modification is realized by one input, but since the cursor has moved to the corresponding position of the error character, in addition to the error modification, the operation of adding characters to the error position can be performed without having to perform character positioning again.
  • the above embodiment provides an example of a scheme and a cursor positioning scheme that have an input error that needs to be replaced.
  • the embodiment of the present invention also provides a scheme in which an input error does not need to be replaced, for example: only need to add characters without
  • the solution in the case of replacing characters is as follows:
  • the moving the cursor to the corresponding position of the selected block identifier includes: moving the cursor to the replaced sub-character Before the string.
  • a and B are equal in length, that is, characters with the same number; 2.
  • a and B character sets (not Case-sensitive) is equal, that is, every character B in A, and there is also every character A in B; 3.
  • the same number of characters (not case-sensitive) in A and B are the same. For example: aabc and baca, aacb, Bcaa i.
  • the input character string is logically segmented according to the user input time interval, and the specific scheme is as follows: For a string of input strings, the time interval between input actions of two adjacent characters before and after detection is as before When the time interval between the moment of one character input and the moment of the latter character input is greater than a predetermined threshold (such as 800 milliseconds or 1000 milliseconds), the string is logically segmented between the two characters, and the previous character is logically At the end of the previous paragraph, the next character is used as the starting point for the logical subsequent segment.
  • a predetermined threshold such as 800 milliseconds or 1000 milliseconds
  • the input string is ab
  • ab if the input time of a and the input time interval of b are less than or equal to the predetermined threshold, then ab is considered as continuous input
  • a and b belong to two different input time periods, a belongs to the first character string, and b belongs to the second character string. Based on this, an entire string of characters input by the user can be divided into different fields according to the input time interval between consecutive characters.
  • the length of the input interval is represented by a connector: a-b-c-d-e-f-g-h-i-j can be logically divided into three segments according to the input time interval abed, efg, hij, which will have three segments of the string.
  • Positioning/Error Correction String refers to the last logical segment in the user-entered string after the logical segmentation of the user-entered string according to the input time interval, in order from beginning to end.
  • the length of the input interval is represented by a connector.
  • the user input string is abcd-efg-hij, which is logically divided into three segments: abc, efg, hij, then hij is recognized as a positioning/correction string. That is: the second character string referred to in the foregoing embodiment.
  • the positioning/correction string is identified as described above, and the role is to help the user locate the character in the input string and use fuzzy pattern matching. The location you want to correct.
  • the method provided by the embodiment of the present invention is as shown in FIG. 2, and includes the following steps:
  • the specified threshold such as 800 milliseconds or 1000 milliseconds
  • a character string at the end of the input character string without moving the cursor.
  • This character string will be recognized as "positioning/correction character string" according to the definition of the embodiment of the present invention.
  • the input part of the "positioning/correction string” is subjected to the fuzzy pattern matching with the previously input string, and all of the previously entered strings are
  • the matching substring is marked with a block identifier (for example, marked with a semi-transparent highlight block); it should be noted that the block identifier of the fuzzy pattern matching may have one, or more than one, and is not limited to only one .
  • the receiving user After the user stops inputting, the receiving user long presses the substring corresponding to the selected block identifier from all the block identifiers;
  • the replacement action uses a long press instead of a short click, in order to enable the user to click a line between two characters by using a short click method, and move the cursor between the two characters (that is, the click position). Therefore, the user can correct the error by replacing the selected block with the "positioning/correction string", or the error can be corrected by the traditional method of moving the cursor, thereby achieving technical compatibility.
  • the error segment is represented by a block identifier. Compared with the user positioning cursor, you need to click the line between the two characters. Now click on the block identifier, which is equal to changing from the selected line to the selected surface. , improved handling ease.
  • the pattern matching algorithm is fuzzy pattern matching. It only requires the character set (allowing character repetition) to be the same and the same length, and the character order is not required to be completely consistent. User-friendly input, especially for the wrong modification of the reverse input class.
  • the positioning/correction string has the dual function of positioning and replacement.
  • the cursor jumps to the front of the clicked block identifier instead of the back.
  • This detail is mainly designed to facilitate the deletion of characters. If the cursor jumps behind the clicked block mark, then moving the cursor can only delete the characters in the block mark; if the cursor jumps to the front of the clicked block mark, Then moving the cursor can only delete the characters in front of the block identifier without affecting the clicked block identifier.
  • an embodiment of the present invention provides an example of five possible application scenarios, specifically: 3 ⁇ 4:
  • the matching segment is identified by a box, and the color block can also be used for coloring. In this example, there will be two color blocks.
  • the cursor moves between dau and n, which requires 3;
  • the cursor is back to the end, which requires 1 and a total of 4.
  • the embodiment of the present invention further provides a string input control device, as shown in FIG. 3, including: a character receiving unit 301, configured to receive an input first character string and a second character string, where the first character string is in the foregoing Enter before the second string;
  • the character recognition unit 302 is configured to identify the first character string received by the character receiving unit 301, and determine whether the first character string has a sub-character string matching the second character string;
  • a character identifier unit 303 configured to: if the result of the character recognition unit 302 determines that the result is YES, identify the substring by using a block identifier;
  • the instruction receiving unit 304 is configured to receive an instruction for selecting a block identifier
  • the cursor control unit 305 is configured to: after the instruction receiving unit 304 receives the instruction for selecting the block identifier, move the cursor to the corresponding position of the selected block identifier.
  • the second character string can be automatically matched in the first character string; that is, if the user needs to locate the cursor, only the character corresponding to the position to be located can be input. Automatic positioning is realized; and positioning is performed in a block mode, and the user can conveniently move the cursor to a desired position, thereby improving the efficiency of modifying errors.
  • the first string and the second string are both strings. The use of "first" and "second” is only to distinguish two logically different strings and should not be construed as other limited meanings. When the user enters a character, the length of the string will increase, the string will be segmented, and the segmentation of each string can be considered as a separate string.
  • the embodiment of the present invention provides two examples of the segmentation scheme of the character string. It should be noted that the segmentation scheme of the character string may be many. The following examples are not to be construed as limiting the embodiment of the present invention.
  • the string segmentation scheme provided is as follows:
  • the character receiving unit 301 includes: a character receiving subunit 401 and a string segmentation unit 402;
  • the character receiving subunit 401 is configured to receive the input character, and obtain an input time interval between the currently input character and the previous character of the current character;
  • the string segmentation unit 402 is configured to: if the input time interval acquired by the character receiving subunit 401 is greater than a predetermined threshold, use the character input before the current character as the first character string, and use the current character and the subsequent input.
  • the character is the second character string; or, if the character received by the character receiving subunit 401 has a space character, the character input before the space character is used as the first character string, and the character input after the space character is used as the above The second string.
  • the input pause is habitually generated.
  • the solution is based on the design of the input time interval to determine whether the input is incorrect, so that the automatic detection function can be realized without the user.
  • Enter another command to indicate segmentation or indicate an input error saving modification time and increasing input efficiency.
  • the space character is used to indicate the segmentation of the string. In fact, it can be any other default command, for example: Press the shift key twice, or ctrl+G. Combination keys are all possible.
  • the use of space characters to indicate segmentation of a character string is not to be construed as limiting the uniqueness of the embodiments of the present invention.
  • the character receiving subunit 401 can record the time of each character input, calculate the input time between adjacent characters as a time interval, and record the input time between adjacent characters using a long integer variable. Interval; then the string segmentation unit 402 compares the predetermined threshold with the long integer variable described above to determine if segmentation is required.
  • the variables used to record the input time do not have to be long-formed, or they can be integers or other variables, as long as they can be used for accurate recording time.
  • the embodiment of the present invention further provides a more detailed example, as follows:
  • the string segmentation unit 402 is configured to When the input sub-unit 401 obtains that the input time interval is greater than a predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequently input character are used as the second character string; the predetermined threshold value is 800 ⁇ 1000 milliseconds.
  • the predetermined threshold is used to control the reference time of the segment. In this embodiment, a reference value of 800 to 1000 milliseconds is given.
  • the threshold may vary depending on the input habits of different people. Therefore, the threshold may also be set by the user.
  • the character recognition unit 303 is configured to use the second string pair.
  • the first character string is subjected to fuzzy pattern matching. If the consecutive characters in the first character string and the second character string have the same character set, the same length, and the same number of occurrences of the same character, the continuous character is determined as the foregoing A substring in a string that matches the second string above.
  • the user does not have to input the same input as the previous error input to determine where the previous input error is, making positioning easier.
  • convenient conditions are provided for erroneous modifications, which will be explained in more detail in subsequent embodiments.
  • the embodiment of the present invention further provides a more preferable implementation solution of the modification error, which is specifically as follows:
  • the foregoing instruction receiving unit 304 also for receiving a replacement instruction input by the user;
  • the character string input control device further includes: a replacement control unit 501, configured to: if the instruction receiving unit 304 receives the replacement instruction input by the user, replace the substring with the second character string according to the replacement instruction.
  • a replacement control unit 501 configured to: if the instruction receiving unit 304 receives the replacement instruction input by the user, replace the substring with the second character string according to the replacement instruction.
  • the user can input the correct character and select the position to be modified, and the modification of the input error can be completed, which can further improve the efficiency of the error modification.
  • the replacement instruction may be explicit or implicit.
  • the explicit instruction may be an input replacement command, and the implied one may be a predefined operation mode, for example: When the user selects the block identification and the dwell time exceeds the predetermined time, the user is considered to have entered the replacement instruction.
  • the instruction receiving unit 304 is further configured to determine whether the user selects whether the block identifier has a stay time exceeding a predetermined time;
  • the above replacement control unit 501 is configured to: if the instruction receiving unit 304 determines that the user selects the above The block identifier and the dwell time exceeds the predetermined time, and the second character string is different from the character of the substring, and it is determined that the user inputs the replacement command, and replaces the substring with the second character string.
  • the user selects the block identifier and the dwell time exceeds the predetermined time to determine that the user needs to perform character replacement.
  • the scheme can be compatible with the scheme of using a short click to locate the cursor.
  • the user can input the correct character and select the position to be modified, and then the modification of the input error can be completed, and the cursor is positioned to the position corresponding to the wrong character.
  • the error modification is realized by one input, but since the cursor has moved to the corresponding position of the error character, in addition to the error modification, the operation of adding characters to the error position can be performed without having to perform character positioning again.
  • the instruction receiving unit 304 is configured to determine whether the user selects whether the block identifier has a stay time exceeding a predetermined time;
  • the cursor control unit 305 is configured to move the cursor to the replaced substring before the instruction receiving unit 304 determines that the user selects the block identifier and the dwell time exceeds a predetermined time.
  • the embodiment of the present invention further provides a string input control device, as shown in FIG. 6, comprising: a receiver 601, a transmitter 602, a processor 603, and a memory 604;
  • the processor 603 is configured to receive the input first character string and the second character string, where the first character string is input before the second character string, and the first character string is identified to determine the first Whether the string has a substring matching the second string, if yes, the substring is identified by a block identifier; after receiving the instruction to select the block identifier, moving the cursor to the selected The block identifier corresponds to the location.
  • the second character string after the user inputs the second character string, the second character string can be automatically matched in the first character string; that is, if the user needs to locate the cursor, only the position pair to be located needs to be input.
  • the characters can be automatically positioned; and the positioning is performed in a block mode, and the user can conveniently move the cursor to the desired position, thereby improving the efficiency of the modification error.
  • the first string and the second string are both strings.
  • the use of "first” and “second” is only for the purpose of distinguishing between two logically different strings and should not be construed as other limiting meanings.
  • the length of the string increases, the string is segmented, and the segmentation of each string can be considered as a separate string.
  • the embodiment of the present invention provides two examples of the segmentation scheme of the character string. It should be noted that the segmentation scheme of the character string may be many. The following examples are not to be construed as limiting the embodiment of the present invention.
  • the processor 603, configured to receive the input first character string and the second character string include: receiving the input character, and acquiring the currently input character and the current character The input time interval between the previous characters, if the input time interval is greater than a predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequently input character are used as the second character String; or, the input character is obtained. If the input character has a space character, the character input before the space character is used as the first character string, and the character input after the space character is used as the second character string.
  • the input pause is habitually generated.
  • the solution is based on the design of the input time interval to determine whether the input is incorrect, so that the automatic detection function can be realized without the user.
  • Enter another command to indicate segmentation or indicate an input error saving modification time and increasing input efficiency.
  • the space character is used to indicate the segmentation of the string. In fact, it can be any other default command, for example: Press the shift key twice, or ctrl+G. Combination keys are all possible.
  • the use of space characters to indicate segmentation of a character string is not to be construed as limiting the uniqueness of the embodiments of the present invention.
  • the embodiment of the present invention further provides a more detailed example, as follows:
  • the processor 603 is configured to receive the input character and obtain the current input.
  • the input time interval between the character and the previous character of the current character if the input time interval is greater than a predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequent input are The character is the second character string; the predetermined threshold value of the input time interval is 800 to 1000 milliseconds.
  • the time of each character input may be recorded, and the input between adjacent characters is calculated as a time interval, and the long integer is used.
  • the type variable records the input time interval between adjacent characters, and then compares the predetermined long value with the predetermined threshold to determine whether segmentation is required.
  • the variable used for recording the input time does not have to be a long integer, and may be an integer or other variable, as long as it can be used for accurate recording time; the above predetermined threshold is used to control the segmentation. Referring to the time, this embodiment gives a reference value of 800-1000 milliseconds. This threshold may vary depending on the input habits of different people, so this threshold can also be set by the user.
  • the processor 603, configured to determine whether the first character string has a substring matching the second character string includes: performing fuzzy mode matching on the first character string by using the second character string, If the consecutive character in the first character string has the same character set and the same length as the second character string, and the same character appears in the same number of times, determining that the continuous character is the second character in the first character string and the second character The substring of the string match.
  • the user does not have to input the same input as the previous error input to determine where the previous input error is, making positioning easier.
  • convenient conditions are provided for erroneous modifications, which will be explained in more detail in subsequent embodiments.
  • the embodiment of the present invention further provides a more preferable implementation solution of the modification error, which is specifically as follows: Further, the processor 603 is further configured to receive user input. The instruction is replaced, and the above substring is replaced with the second string according to the above replacement instruction.
  • the user can input the correct character and select the position to be modified, and the modification of the input error can be completed, which can further improve the efficiency of the error modification.
  • the replacement instruction may be explicit or implicit.
  • the explicit instruction may be an input replacement command
  • the implied one may be a predefined operation mode, for example: When the user selects the block identification and the dwell time exceeds the predetermined time, the user is considered to have entered the replacement instruction.
  • the processor 603 is configured to receive a replacement instruction input by the user, and replace the substring with the second character string according to the replacement instruction, including: if the user selects the block identifier and stays longer than a predetermined time And the second character string is different from the character of the substring Then it is determined that the user receives the replacement instruction, and replaces the substring with the second character string.
  • the user selects the block identifier and the dwell time exceeds the predetermined time to determine that the user needs to perform character replacement.
  • the scheme can be compatible with the scheme of using a short click to locate the cursor.
  • the user can input the correct character and select the position to be modified, and then the modification of the input error can be completed, and the cursor is positioned to the position corresponding to the wrong character.
  • the error modification is realized by one input, but since the cursor has moved to the corresponding position of the error character, in addition to the error modification, the operation of adding characters to the error position can be performed without having to perform character positioning again.
  • the above embodiment provides an example of a scheme and a cursor positioning scheme that have an input error that needs to be replaced.
  • the embodiment of the present invention also provides a scheme in which an input error does not need to be replaced, for example: only need to add characters without
  • the solution in the case of replacing characters is as follows:
  • the processor 603 is configured to move the cursor to the selected block identifier corresponding position, including: moving the cursor before the replaced substring.
  • the embodiment of the present invention further provides another character string input control device.
  • FIG. 7 for the convenience of description, only parts related to the embodiment of the present invention are shown. Without specific details, please refer to the present invention.
  • the terminal can be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), an in-vehicle computer, and the terminal is a mobile phone as an example:
  • FIG. 7 is a block diagram showing a partial structure of a mobile phone related to a terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, and a processor 780. , and power supply 790 and other components.
  • RF radio frequency
  • the structure of the handset shown in Figure 7 does not constitute a limitation to the handset, and may include more or fewer components than those illustrated, or some components may be combined, or different components may be arranged.
  • the RF circuit 710 can be used for transmitting and receiving information or during a call, receiving and transmitting signals, in particular, After the downlink information of the base station is received, it is processed by the processor 780; in addition, the data designed for the uplink is transmitted to the base station.
  • RF circuit 710 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • the RF circuit 710 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), and code division multiple access ( Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • E-mail Short Messaging Service
  • the memory 720 can be used to store software programs and modules, and the processor 780 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 720.
  • the memory 720 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored according to Data created by the use of the mobile phone (such as audio data, phone book, etc.).
  • memory 720 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state memory device.
  • the input unit 730 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 730 can include a touch panel 731 and other input devices 732.
  • the touch panel 731 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 731 or near the touch panel 731. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 731 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 780 is provided and can receive commands from the processor 780 and execute them.
  • the touch panel 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 730 may also include other input devices 732.
  • other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 740 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 740 can include a display panel 741.
  • the display panel 741 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 731 can cover the display panel 741. When the touch panel 731 detects a touch operation on or near the touch panel 731, it transmits to the processor 780 to determine the type of the touch event, and then the processor 780 according to the touch event. The type provides a corresponding visual output on display panel 741.
  • the touch panel 731 and the display panel 741 function as two separate components to implement input and input functions of the mobile phone, in some embodiments, the touch panel 731 can be integrated with the display panel 741. Realize the input and output functions of the phone.
  • the handset can also include at least one type of sensor 750, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may close the display panel 741 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the acceleration of each direction (usually three axes), and the magnitude and direction of gravity can be detected at rest.
  • An audio circuit 760, a speaker 761, and a microphone 762 provide an audio interface between the user and the handset.
  • the audio circuit 760 can transmit the converted electrical data of the received audio data to the speaker 761 for conversion to the sound signal output by the speaker 761; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, and the audio circuit 760 After receiving, it is converted into audio data, and then processed by the audio data output processor 780, sent to the other mobile phone via the RF circuit 710, or outputted to the memory 720 for further processing.
  • WiFi is a short-range wireless transmission technology.
  • the WiFi module 770 can help users to send and receive emails, browse web pages and access streaming media, etc. It provides users with wireless broadband Internet access.
  • FIG. 7 shows the WiFi module 770, it can be understood that it does not belong to the mobile phone. It must be constructed and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 780 is the control center of the handset, and connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 720, and invoking data stored in the memory 720, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 780 may include one or more processing units.
  • the processor 780 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 780.
  • the handset also includes a power supply 790 (such as a battery) that powers the various components.
  • a power supply 790 (such as a battery) that powers the various components.
  • the power supply can be logically coupled to the processor 780 through a power management system to manage charging, discharging, and power management functions through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the processor 780 included in the terminal further has the following functions: the processor 780 is configured to receive the input first character string and the second character string; identify the first character string, and determine Positioning the second character string in the first character string, and identifying the position in a block shape; after receiving the instruction to select the block identifier, moving the cursor to the corresponding position of the selected block identifier.
  • the second character string after the user inputs the second character string, the second character string can be automatically matched in the first character string; that is, if the user needs to locate the cursor, only the character corresponding to the position to be located can be input. Automatic positioning is realized; and positioning is performed in a block mode, and the user can conveniently move the cursor to a desired position, thereby improving the efficiency of modifying errors.
  • the first string and the second string are both strings.
  • the use of "first” and “second” is only to distinguish two logically different strings and should not be construed as other limited meanings.
  • the length of the string will increase, the string will be segmented, and the segmentation of each string can be considered as a separate string.
  • the embodiment of the present invention provides two examples of the segmentation scheme of the character string. It should be noted that the segmentation scheme of the character string may be many. The following examples are not to be construed as limiting the embodiment of the present invention.
  • the processor 780 configured to receive the input first character string and the second character string, includes: receiving the input character, and acquiring the currently input character and the current character The input time interval between the previous characters, if the above input If the entry time interval is greater than the predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequently input character are used as the second character string; or, the input character is obtained, if the input character When a space character appears, the character input before the space character is used as the first character string, and the character input after the space character is used as the second character string.
  • the input pause is habitually generated.
  • the solution is based on the design of the input time interval to determine whether the input is incorrect, so that the automatic detection function can be realized without the user.
  • Enter another command to indicate segmentation or indicate an input error saving modification time and increasing input efficiency.
  • the space character is used to indicate the segmentation of the string. In fact, it can be any other default command, for example: Press the shift key twice, or ctrl+G. Combination keys are all possible.
  • the use of space characters to indicate segmentation of a character string is not to be construed as limiting the uniqueness of the embodiments of the present invention.
  • the embodiment of the present invention further provides a more detailed example, as follows:
  • the processor 780 is configured to receive the input character and obtain the current input.
  • the input time interval between the character and the previous character of the current character if the input time interval is greater than a predetermined threshold, the character input before the current character is used as the first character string, and the current character and the subsequent input are The character is the second character string; the predetermined threshold value of the input time interval is 800 to 1000 milliseconds.
  • the time of each character input may be recorded, and the input between adjacent characters is calculated as a time interval, and the long integer variable is used to record the input time interval between adjacent characters, and then passed.
  • the long integer variable is compared to a predetermined threshold to determine if segmentation is required.
  • the variable used for recording the input time does not have to be a long integer, and may be an integer or other variable, as long as it can be used for accurate recording time; the above predetermined threshold is used to control the segmentation. Referring to the time, this embodiment gives a reference value of 800-1000 milliseconds. This threshold may vary depending on the input habits of different people, so this threshold can also be set by the user.
  • the processor 780 is configured to determine whether the first string has the foregoing
  • the substring matching the two strings includes: performing fuzzy pattern matching on the first string by using the second string, if the consecutive characters in the first string have the same character set and the same as the second string If the length of the same character and the number of occurrences of the same character are the same, it is determined that the continuous character is a substring having the second character string matching the first character string.
  • the user does not have to input the same input as the previous error input to determine where the previous input error is, making positioning easier.
  • convenient conditions are provided for erroneous modifications, which will be explained in more detail in subsequent embodiments.
  • the embodiment of the present invention further provides a more preferable implementation solution of the modification error, which is specifically as follows: Further, the processor 780 is further configured to receive user input. The instruction is replaced, and the above substring is replaced with the second string according to the above replacement instruction.
  • the user can input the correct character and select the position to be modified, and the modification of the input error can be completed, which can further improve the efficiency of the error modification.
  • the replacement instruction may be explicit or implicit.
  • the explicit instruction may be an input replacement command
  • the implied one may be a predefined operation mode, for example: When the user selects the block identification and the dwell time exceeds the predetermined time, the user is considered to have entered the replacement instruction.
  • the processor 780 is configured to receive a replacement instruction input by the user, and replace the substring with the second character string according to the replacement instruction, including: if the user selects the block identifier and stays longer than a predetermined time And the second character string is different from the character of the substring, and it is determined that the user inputs the replacement instruction, and replaces the substring with the second character string.
  • the user selects the block identifier and the dwell time exceeds the predetermined time to determine that the user needs to perform character replacement.
  • the scheme can be compatible with the scheme of using a short click to locate the cursor.
  • the user can input the correct character and select the position to be modified, and then the modification of the input error can be completed, and the cursor is positioned to the position corresponding to the wrong character.
  • the error modification is realized by one input, but since the cursor has moved to the corresponding position of the error character, in addition to the error modification, the operation of adding characters to the error position can be performed without having to perform character positioning again.
  • the above embodiment shows a scheme and a cursor positioning scheme that have an input error that needs to be replaced.
  • the embodiment of the present invention further provides a solution in a case where an input error does not need to be replaced, for example, a scenario in which only characters need to be added without replacing characters, as follows:
  • the foregoing processor 780 The corresponding position for moving the cursor to the selected block identifier includes: Moving the cursor before the substring to be replaced.
  • the storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

 一种字符串输入控制方法,及装置,其中方法的实现包括:接收输入的第一字符串和第二字符串,所述第一字符串在所述第二字符串之前输入;对所述第一字符串进行识别,确定所述第一字符串中是否具有与所述第二字符串匹配的子字符串,若具有,则以块状标识对所述子字符串进行标识;在接收到选择块状标识的指令后,将光标移动到选择的块状标识对应位置。用户输入第二字符串以后,可以自动在第一字符串中匹配到第二字符串;也即是说,若用户需要定位光标,只需要输入需要定位的位置对应的字符就可以实现自动定位;并且定位采用的是块状方式进行标识,用户可以方便的将光标移动到想要的位置,因此可以提高修改错误的效率。

Description

一种字符串输入控制方法, 及装置
技术领域
本发明涉及计算机技术领域,特別涉及一种字符串输入控制方法,及装置。 背景技术
在字符输入过程中, 用户输入一串字符串后, 若发现已输入字符串中间夹 杂有少数错误, 在用户发现错误以后需要进行修改。 在计算机技术领域, 用户 输入的字符串可以是各种字符串, 例如: 英文、 符号、 汉字等。
目前用户在发现输入的字符串出现错误以后,需要将输入光标移动到准备 修改的精确位置, 即: 两个字符之间的间隔处。 由于字符串的各字符之间的间 隔很小, 不论用户是手指触点选定还是使用 back (回退)键删除回退, 都不 易操作。 所以用户移动光标到想要的位置会比较困难, 修改输入错误效率低。 发明内容
本发明实施例提供了一种字符串输入控制方法,及装置, 用于方便的将光 标移动到想要的位置, 提高修改错误的效率。
本发明实施例一方面提供了一种字符串输入控制方法, 包括:
接收输入的第一字符串和第二字符串,所述第一字符串在所述第二字符串 之前输入;
对所述第一字符串进行识別,确定所述第一字符串中是否具有与所述第二 字符串匹配的子字符串, 若具有, 则以块状标识对所述子字符串进行标识; 在接收到选择块状标识的指令后, 将光标移动到选择的块状标识对应位 置。
结合一方面的实现方式,在第一种可能的实现方式中, 所述接收输入的第 一字符串和第二字符串包括:
接收输入的字符,并获取当前输入的字符与所述当前字符的前一字符之间 的输入时间间隔, 若所述输入时间间隔大于预定阈值, 则将所述当前字符之前 输入的字符作为所述第一字符串,将所述当前字符以及后续输入的字符作为所 述第二字符串; 或者,
获取输入的字符, 若输入的字符出现空格字符, 则将所述空格字符前输入 的字符作为所述第一字符串,所述空格字符之后输入的字符作为所述第二字符 串。
结合一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述 输入时间间隔的所述预定阈值为 800~1000毫秒。
结合一方面的实现方式,在第三种可能的实现方式中, 所述确定所述第一 字符串中是否具有与所述第二字符串匹配的子字符串包括:
使用所述第二字符串对所述第一字符串进行模糊模式匹配,若所述第一字 符串中存在连续字符与所述第二字符串具有相同的字符集、相同的长度且同一 字符出现次数相同,则确定所述连续字符为所述第一字符串中的具有与所述第 二字符串匹配的子字符串。
结合一方面的实现方式、一方面的第一种、第二种或第三种可能的实现方 式,在第四种可能的实现方式中,在以块状标识对所述子字符串进行标识之后, 所述方法还包括:
接收用户输入的替换指令,并根据所述替换指令将所述子字符串替换为所 述第二字符串。
结合一方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述 接收用户输入的替换指令,并根据所述替换指令将所述子字符串替换为所述第 二字符串包括: 若用户选择所述块状标识并且停留时间超过预定时间,且所述 第二字符串与所述子字符串的字符不同, 则确定接收到用户输入了替换指令, 并将所述子字符串替换为所述第二字符串。
结合一方面的第四种可能的实现方式, 在第六种可能的实现方式中, 所述 将光标移动到选择的块状标识对应位置包括:
将光标移动到被替换的所述子字符串之前。
本发明实施例二方面提供了一种字符串输入控制装置, 包括:
字符接收单元, 用于接收输入的第一字符串和第二字符串, 所述第一字符 串在所述第二字符串之前输入;
字符识別单元,用于对所述字符接收单元接收到的所述第一字符串进行识 別, 确定所述第一字符串中是否具有与所述第二字符串匹配的子字符串; 字符标识单元, 用于若所述字符识別单元确定结果为是, 则以块状标识对 所述子字符串进行标识;
指令接收单元, 用于接收选择块状标识的指令;
光标控制单元,用于在所述指令接收单元接收到所述选择块状标识的指令 后, 将光标移动到选择的块状标识对应位置。
结合二方面的实现方式,在第一种可能的实现方式中, 所述字符接收单元 包括: 字符接收子单元和字符串分段单元;
所述字符接收子单元, 用于接收输入的字符, 并获取当前输入的字符与所 述当前字符的前一字符之间的输入时间间隔;
所述字符串分段单元,用于若字符接收子单元获取到的所述输入时间间隔 大于预定阈值, 则将所述当前字符之前输入的字符作为所述第一字符串,将所 述当前字符以及后续输入的字符作为所述第二字符串; 或者, 若所述字符接收 子单元接收的字符出现空格字符,则将所述空格字符前输入的字符作为所述第 一字符串, 所述空格字符之后输入的字符作为所述第二字符串。
结合二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述 字符串分段单元,用于若字符接收子单元获取到所述输入时间间隔大于预定阈 值, 则将所述当前字符之前输入的字符作为所述第一字符串,将所述当前字符 以及后续输入的字符作为所述第二字符串; 所述预定阈值为 800~1000毫秒。
结合二方面的实现方式,在第三种可能的实现方式中,所述字符识別单元, 用于使用所述第二字符串对所述第一字符串进行模糊模式匹配,若所述第一字 符串中存在连续字符与所述第二字符串具有相同的字符集、相同的长度且同一 字符出现次数相同,则确定所述连续字符为所述第一字符串中的具有与所述第 二字符串匹配的子字符串。
结合二方面的实现方式、二方面的第一种、第二种或第三种可能的实现方 式, 在第四种可能的实现方式中, 所述指令接收单元, 还用于接收用户输入的 替换指令;
所述字符串输入控制装置, 还包括: 替换控制单元, 用于若所述指令接收 单元接收到用户输入的所述替换指令,则根据所述替换指令将所述子字符串替 换为所述第二字符串。
结合二方面的第四种可能的实现方式, 在第五种可能的实现方式中, 所述 指令接收单元, 还用于确定用户选择所述块状标识是否停留时间超过预定时 间;
所述替换控制单元,用于若所述指令接收单元确定用户选择所述块状标识 并且停留时间超过预定时间, 且所述第二字符串与所述子字符串的字符不同, 则确定接收到用户输入了替换指令, 并将所述子字符串替换为所述第二字符 串。
结合二方面的第四种可能的实现方式, 在第六种可能的实现方式中, 所述 光标控制单元,用于若所述指令接收单元确定用户选择所述块状标识并且停留 时间超过预定时间, 则将光标移动到被替换的所述子字符串之前。
从以上技术方案可以看出, 本发明实施例具有以下优点: 用户输入第二字 符串以后, 可以自动在第一字符串中匹配到第二字符串; 也即是说, 若用户需 要定位光标, 只需要输入需要定位的位置对应的字符就可以实现自动定位; 并 且定位采用的是块状方式进行标识, 用户可以方便的将光标移动到想要的位 置, 因此可以提高修改错误的效率。 附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作筒要介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提 下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例方法流程示意图;
图 2为本发明实施例方法流程示意图;
图 3为本发明实施例字符串输入控制装置结构示意图;
图 4为本发明实施例串输入控制装置结构示意图;
图 5为本发明实施例串输入控制装置结构示意图;
图 6为本发明实施例串输入控制装置结构示意图;
图 7为本发明实施例手机结构示意图。 具体实施方式
为了使本发明的目的、技术方案和优点更加清楚, 下面将结合附图对本发 明作进一步地详细描述, 显然, 所描述的实施例仅仅是本发明一部份实施例, 而不是全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的范围。
本发明实施例提供了一种字符串输入控制方法, 如图 1所示, 包括: 101 : 接收输入的第一字符串和第二字符串, 上述第一字符串在上述第二 字符串之前输入;
第一字符串和第二字符串都是字符串, 使用 "第一" 和 "第二"仅是为了 区分逻辑上不同的两个字符串, 不应理解为其它的限定意义。用户在输入字符 的时候字符串长度会增加, 字符串会分段,每一个字符串的分段可以认为是一 个独立的字符串。本发明实施例给出了字符串的分段方案中的两个举例, 需要 说明的是字符串的分段方案可以有很多,以下举例不应理解为对本发明实施例 的限定, 本发明实施例提供的字符串分段方案举例如下: 可选地, 上述接收输 入的第一字符串和第二字符串包括: 接收输入的字符, 并获取当前输入的字符 与上述当前字符的前一字符之间的输入时间间隔,若上述输入时间间隔大于预 定阈值, 则将上述当前字符之前输入的字符作为上述第一字符串,将上述当前 字符以及后续输入的字符作为上述第二字符串; 或者, 获取输入的字符, 若输 入的字符出现空格字符, 则将上述空格字符前输入的字符作为上述第一字符 串, 上述空格字符之后输入的字符作为上述第二字符串。
一般来说, 用户发现输入错误的时候会习惯性的发生输入停顿的现象, 该 方案正是基于此来设计采用输入时间间隔的方式来确定是否输入错误,这样可 以实现自动检测功能,而不必用户再输入一个用于指示进行分段或者指示输入 错误的指令, 从而节省修改时间并提高输入效率。 另需说明的是, 以上分段的 举例中,使用空格字符来指示进行字符串分段, 实际上还可以是任意其他默认 的指令, 例如: 两次按 shift键, 或者 ctrl+G这类的组合键, 都是可以的, 以 上使用空格字符来指示进行字符串的分段,不应理解为对本发明实施例的唯一 性限定。 对于使用输入时间间隔来确定分段的方案,本发明实施例还给出了更为详 细的举例说明, 具体如下: 可选地, 上述预定阈值为 800~1000毫秒。 在本发 明实施例中, 可以记录输入的每个字符的时间, 并计算相邻字符之间的输入是 时间间隔, 并使用长整型变量记录相邻字符之间的输入时间间隔, 然后再通过 上述长整型变量与预定阈值进行比较, 确定是否需要分段。 需要说明的是, 记 录输入时间使用的变量并不一定必须是长整型的, 还可以是整型或者其他变 量, 只要能用于准确记录时间就可以; 上述预定阈值是用来控制分段的参考时 间, 本实施例给出了 800~1000毫秒的参考值, 依据不同人的输入习惯这个阈 值可能变化的, 因此这个阈值也可以由用户设定。
102: 对上述第一字符串进行识別, 确定上述第一字符串中是否具有与上 述第二字符串匹配的子字符串, 若具有, 则以块状标识对上述子字符串进行标 识;
本发明实施例中,子字符串与第二字符串匹配的规则可以依据不同的匹配 算法进行设定, 例如: 子字符串与第二字符串完全相同, 即: 字符数相同、 字 符集相同、并且各字符的顺序也相同; 也可以是子字符串与第二字符串的模糊 匹配, 即: 字符数相同、 字符集相同、 各字符的数量相同, 各字符的顺序不必 相同。 具体的匹配规则本发明实施例不作唯一性限定。
上述对第一字符串进行识別的方案,可以参考字符识別的各种算法本发明 实施例对此不予限定。本发明实施例提供了另外一种在本发方案中的优选实现 方案, 即: 模糊模式匹配的方案, 具体如下:
可选地,上述确定上述第一字符串中是否具有与上述第二字符串匹配的子 字符串包括: 使用上述第二字符串对上述第一字符串进行模糊模式匹配, 若上 述第一字符串中存在连续字符与上述第二字符串具有相同的字符集、相同的长 度且同一字符出现次数相同,则确定上述连续字符为上述第一字符串中的具有 与上述第二字符串匹配的子字符串。
使用以上模糊模式匹配的方案,用户不必输入与前次的错误输入完全相同 的输入来确定前次输入的错误在哪儿, 使定位更加便捷。 另外, 也为错误的修 改提供了便捷条件, 对此将会在后续实施例中有更详细说明。
103: 在接收到选择块状标识的指令后, 将光标移动到选择的块状标识对 应位置。
以上实施例, 用户输入第二字符串以后, 可以自动在第一字符串中匹配到 第二字符串; 也即是说, 若用户需要定位光标, 只需要输入需要定位的位置对 应的字符就可以实现自动定位; 并且定位采用的是块状方式进行标识, 用户可 以方便的将光标移动到想要的位置, 因此可以提高修改错误的效率。
基于本发明实施例采用的模糊模式匹配的方案,本发明实施例还进一步提 供了更为优选的修改错误的可实现方案, 具体如下: 进一步地, 在以块状标识 对上述子字符串进行标识之后,上述方法,还包括:接收用户输入的替换指令, 并根据上述替换指令将上述子字符串替换为上述第二字符串。 以上方案, 若用 户发现了输入错误, 用户只要输入一次正确的字符并选择要修改的位置, 就可 以完成对输入错误的修改, 可以进一步提高错误修改效率。
在本发明实施例中,替换指令可以是显式的也可以是隐含的,显式的指令 可以是输入的替换命令, 隐含的则可以是某种预定义的操作方式, 例如: 可以 是用户选择块状标识并且停留时间超过预定时间, 则认为用户输入了替换指 令。 可选地, 上述接收用户输入的替换指令, 并根据上述替换指令将上述子字 符串替换为上述第二字符串包括:若用户选择上述块状标识并且停留时间超过 预定时间,且上述第二字符串与上述子字符串的字符不同, 则确定接收到用户 输入了替换指令, 并将上述子字符串替换为上述第二字符串。
本实施例采用用户选择块状标识并且停留时间超过预定时间来确定用户 需要进行字符替换, 该方案可以与采用短点击定位光标的方案兼容。 另外, 本 实施例方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择要 修改的位置, 就可以完成对输入错误的修改, 并且将光标定位到错误字符对应 的位置。 另外, 不仅通过一次输入实现对错误修改, 由于光标已经移动到了错 误字符的对应的位置, 那么除了进行错误修改以外,还可以对错误位置进行增 加字符的操作而不必再次进行字符定位。
以上实施例给出的是有输入错误需要进行替换的方案与光标定位方案的 举例,本发明实施例还提供了输入错误不需要进行替换的情形下的方案,例如: 仅需要增加字符而不需替换字符的情形下的方案, 具体如下: 可选地, 上述将 光标移动到选择的块状标识对应位置包括:将光标移动到被替换的上述子字符 串之前。 以上方案, 由于第二字符串与定位位置的子字符串是相同的, 因此不 必进行替换的操作, 仅移动光标就可以了。
以下实施例将就本发明实施例的方案进行更详细的举例说明。
以下介绍以下实施例将会涉及到的几个技术术语进行介绍如下:
一、 模糊模式匹配: 是指两个字符串 A和 B的模糊模式匹配满足如下三 个条件: 1、 A与 B长度相等, 即具有相同个数的字符; 2、 A与 B字符集(不 区分大小写)相等, 即 A中每一个字符 B中都有, 且 B中每一个字符 A中也 有; 3、 A与 B中同一字符(不区分大小写)出现次数相同。例如: aabc与 baca、 aacb、 Bcaa i匀匹酉己。
二、字符串的逻辑分段。本实施例中采用根据用户输入时间间隔对已输入 字符串进行逻辑分段, 具体方案如下: 对一串输入的字符串, 探测前后相邻两 个字符的输入动作之间的时间间隔,如前一字符输入的时刻与后一字符输入的 时刻之间的时间间隔大于预定阀值(比如 800毫秒或 1000毫秒 ), 则在这两字 符间对字符串逻辑分段,将前一个字符作为逻辑上前一段的终点,后一个字符 作为逻辑上后一段的起点。
例如: 输入字符串为 ab, 假如 a的输入时刻与 b的输入时刻间隔小于等 于预定阀值, 则认为 ab是连续输入; 假如 a的输入时刻与 b的输入时刻间隔 大于预定阀值,则认为 a与 b分属两个不同的输入时间段, a属于第一字符串, b属于第二字符串。 基于此, 用户输入的一整条字符串, 可以按照位置连续的 字符之间的输入时间间隔, 划分为不同的字段。 例如: 以连接符表示输入间隔 时间长短: a-b-c-d一- e-f-g一- h-i-j可按照输入时间间隔在逻辑上分为三段 abed, efg、 hij , 这将会有三个字符串的分段。
上述逻辑分段可以体现在字符串外观上, 也可以只体现在代码逻辑上。 三. 定位 /纠错字符串:是指对用户已输入字符串根据输入时间间隔进行逻 辑分段后, 处于用户已输入字符串中、 按从头到尾顺序的最后一个逻辑分段。 以连接符表示输入间隔时间长短, 举例假设用户输入字符串为 a-b-c-d一- e-f-g一- h-i-j , 在逻辑上分为三段: abc、 efg、 hij , 则 hij被识別为定 位 /纠错字符串, 即: 前述实施例所称的第二字符串。 定位 /纠错字符串被按上 述方式识別出来,作用是在已输入字符串中、利用模糊模式匹配帮助用户定位 想要纠错的位置。
本发明实施例提供的方法如图 2所示, 包括如下步骤:
201 : 根据用户输入各字符的时间间隔对已输入字符串进行逻辑分段; 进行逻辑分段的具体的实现办法可以如下: 保存一个长整型变量,在用户 每次输入字符时,记录当前字符输入的时间,如果等待下一个字符输入的时间 超过指定阀值(比如 800毫秒或 1000毫秒 ), 则认为当前字符是一段的结尾, 以后再输入的字符属于下一段。
202: 接收定位 /纠错字符串;
如用户发现已输入字符串中包含错误, 用户会暂緩一个短暂时间 (比如 >=1000毫秒), 用户发现错误而暂停是一种输入操作的自然反应。 这样就可以 无需挪动光标,在已输入字符串尾部接着输入一个字符串, 这个字符串按照本 发明实施例的定义将会被识別为 "定位 /纠错字符串 "。
203: 在用户输入 "定位 /纠错字符串" 的过程中, 将 "定位 /纠错字符串" 已输入部分与前面已输入字符串进行模糊模式匹配,将前面已输入的字符串中 的所有匹配的子字符串用块状标识标出 (例如采用半透明高亮色块标出); 需要说明的是,模糊模式匹配得到的块状标识可以有一个,或者一个以上, 并不仅限于仅有一个。
204: 在用户停止输入后, 接收用户从所有块状标识中长按选择的块状标 识对应的子字符串;
205: 使用 "定位 /纠错字符串" 替换被选定的块状标识对应的子字符串, 同时将光标跳至被替换掉的子字符串的前面。
本发明实施例中,替换动作使用长按而不是短点击, 目的是为了使用户能 够使用短点击的方法来点击两字符之间的线,把光标移动到这两字符之间(也 就是点击位置), 从而使用户既可以用 "定位 /纠错字符串" 替换被选定块的方 法来纠错, 也可以用移动光标的传统方法来纠错, 从而实现技术兼容。
本发明实施例, 至少具有带来了如下技术效果:
1、 选取用户输入的按时间间隔逻辑分段的最后一段作为 "定位 /纠错字符 串"。 这一设计从两方面符合用户使用行为: 第一、 用户发现输错后会回头检 查出错位置, 自然地会暂停当前输入, 从而出现明显的输入时间间隔; 第二、 用户最省力的操作是跟着当前输入的末尾继续输入, 因此以 "尾段"作为 "定 位替换字符串" 可方便用户操作。
2、 在定位已输入字符串出错位置后, 出错段以块状标识表示, 相比用户 定位光标需要点击两字符之间的线,现在点击块状标识, 等于从选定线变成选 定面, 提高了操作筒易性。
3、 模式匹配算法是模糊模式匹配, 只要求字符集(允许字符重复)相同 和长度相同, 不要求字符顺序完全一致。 方便用户输入, 特別是为倒序输入类 的错误修改提供了便利。
4、 定位 /纠错字符串有定位和替换的双重作用。 当用户点击块状标识来进 行子字符串的替换时, 无需删除旧有出错字符串, 并再次输入正确的字符串, 减少输入操作。
5、 当用户点击块状标识来进行子字符串来进行定位和替换时, 光标跳到 被点击的块状标识的前面而非后面。 这个细节设计主要是为了方便删除字符, 假如光标跳到被点击的块状标识的后面,那么不移动光标只能删除块状标识中 的字符;假如光标跳到被点击的块状标识的前面, 那么不移动光标只能删除块 状标识前面的字符, 而不影响被点击的块状标识。
基于本发明实施例的方案,本发明实施例给出了五个可能的应用场景的举 例, 具体: ¾口下:
一、 改: 设有已输入字符串 huaweizhongdaun auto, 明显 duan中的 ua写 成了 au。
在此种情况下执行本发明实施例操作如下:
1、用户输入间隔超过预定阀值后, 在 huaweizhongdaun auto尾部输入 ua。 当前输入框中显示 h weizhongd n autoua, 软件根据输入时间间隔识別出当 前 "定位 /纠错字符串" ua。
2、 h@weizhong(¾n @to与 ua模糊模式匹配, 匹配段用方框标识, 还 可以采用色块进行染色, 本例中将会有两个色块。
3、 用户长按想替换的那个 au (点击一个方框比点击两字符之间的空隙要 容易得多 ), "定位 /纠错字符串" ua将从当前字符串尾部消失并替换到用户点 击方框对应的子字符串, 已输入字符串变为 huaweizhongd | uan auto, 输入光 标停在 d与 ua之间, 即以及该被替换的那个 au之前。
4、 如果用户点击已输入字符串尾部空白区域任何一点, 光标回尾部则可 以继续下一步输入。
特別的, 如果用户输入 "定位 /纠错字符串" 后不长按任何匹配方框就进 一步输入, 则当前 "定位 /纠错字符串" 就被当做常规输入的一部分, 已输入 字符串的逻辑分段的最后一段会自动被识別为新的 "定位 /纠错字符串"。 因此 "定位 /纠错字符串" 的输入只被蕴含在常规输入中, 不影响常规输入。
二、 改且增:
设已输入字符串 h@weizhong0n, 需要把 au换为 ua并在前面增加 d。 此时情形与改类似, 用户在尾部输入 "定位 /纠错字符串" ua, 长按上述 字符串中的第二个方框, 用它替换掉第二个方框对应的字符串 au后光标停在 改好后的 ua之前, 用户无需调整光标位置就可以新增字符 d。
三、 改且删:
设已输入字符串 h|ua|weizhongdxy^u|n , 希望改成 huaweizhongduan。 用户 在尾部输入 "定位 /纠错字符串" ua, 长按上述字符串中的第二个方框, 用 ua 替换掉第二个方框中的 au后光标停在改好后的 ua之前,用户无需调整光标位 置就可以删除前面的多余字符 xy。
四、 单纯增二
此时 "定位替换字符串" 只发挥定位的作用。
设已输入字符串 h^eizhong^n, 用户在尾部输入 "定位替换字符串" ua。 用户长按 huaweizhonguan中的方框 ua, "定位替换字符串 " ua消失, 光标 移到 g 与 ua之间, 用户无需调整光标位置就可以新增字符。
五、 单纯删:
单纯删与单纯增类似, "定位替换字符串" 只发挥定位的作用。
通过以上举例, 可以确定采用本发明实施例方案, 可以筒化用户操作, 提 高易用性。 具体如下:
用户纠错成本比较:
假设用户点击软键盘上一个键一次(或者点击一个方框)定为成本 1 , 用 户用手指点击把光标移到两字符之间, 定为成本 3 (包括对准和按下, 没对准 而按下的话还得重新操作)。
举例如下:
把 huaweizhongdaun auto改成 huaweizhongduan auto;
常规操作的最小成本是:
光标移到 dau与 n之间, 需 3;
删除 dau的 au, 两次删除键, 需 2;
输入 ua, 两次输入, 需 2;
光标回尾部, 需 1。 共计 8。
本方式实施例的方案的最小成本是:
在已输入字符串尾部输入 ua, 需 2;
点击 (长按)所需块状标识, 需 1 ;
光标回尾部, 需 1 , 共计 4。
因此, 采用本发明实施例, 用户输入字符串时, 若发现已输入字符串中间 夹杂倒序、 缺字符、 多余字符等等问题时, 纠错动作成本将会大幅降低。
本发明实施例还提供了一种字符串输入控制装置, 如图 3所示, 包括: 字符接收单元 301 , 用于接收输入的第一字符串和第二字符串, 上述第一 字符串在上述第二字符串之前输入;
字符识别单元 302, 用于对上述字符接收单元 301接收到的上述第一字符 串进行识别,确定上述第一字符串中是否具有与上述第二字符串匹配的子字符 串;
字符标识单元 303 , 用于若上述字符识别单元 302确定结果为是, 则以块 状标识对上述子字符串进行标识;
指令接收单元 304, 用于接收选择块状标识的指令;
光标控制单元 305 , 用于在上述指令接收单元 304接收到上述选择块状标 识的指令后, 将光标移动到选择的块状标识对应位置。
以上实施例, 用户输入第二字符串以后, 可以自动在第一字符串中匹配到 第二字符串; 也即是说, 若用户需要定位光标, 只需要输入需要定位的位置对 应的字符就可以实现自动定位; 并且定位采用的是块状方式进行标识, 用户可 以方便的将光标移动到想要的位置, 因此可以提高修改错误的效率。 第一字符串和第二字符串都是字符串, 使用 "第一" 和 "第二"仅是为了 区分逻辑上不同的两个字符串, 不应理解为其它的限定意义。用户在输入字符 的时候字符串长度会增加, 字符串会分段,每一个字符串的分段可以认为是一 个独立的字符串。本发明实施例给出了字符串的分段方案中的两个举例, 需要 说明的是字符串的分段方案可以有很多,以下举例不应理解为对本发明实施例 的限定,本发明实施例提供的字符串分段方案举例如下:可选地,如图 4所示, 上述字符接收单元 301包括: 字符接收子单元 401和字符串分段单元 402;
上述字符接收子单元 401 , 用于接收输入的字符, 并获取当前输入的字符 与上述当前字符的前一字符之间的输入时间间隔;
上述字符串分段单元 402, 用于若字符接收子单元 401获取到的上述输入 时间间隔大于预定阈值,则将上述当前字符之前输入的字符作为上述第一字符 串, 将上述当前字符以及后续输入的字符作为上述第二字符串; 或者, 若上述 字符接收子单元 401接收的字符出现空格字符,则将上述空格字符前输入的字 符作为上述第一字符串, 上述空格字符之后输入的字符作为上述第二字符串。
一般来说, 用户发现输入错误的时候会习惯性的发生输入停顿的现象, 该 方案正是基于此来设计采用输入时间间隔的方式来确定是否输入错误,这样可 以实现自动检测功能,而不必用户再输入一个用于指示进行分段或者指示输入 错误的指令, 从而节省修改时间并提高输入效率。 另需说明的是, 以上分段的 举例中,使用空格字符来指示进行字符串分段, 实际上还可以是任意其他默认 的指令, 例如: 两次按 shift键, 或者 ctrl+G这类的组合键, 都是可以的, 以 上使用空格字符来指示进行字符串的分段,不应理解为对本发明实施例的唯一 性限定。在本发明实施例中, 字符接收子单元 401可以记录输入的每个字符的 时间, 并计算相邻字符之间的输入是时间间隔, 并使用长整型变量记录相邻字 符之间的输入时间间隔;然后字符串分段单元 402再通过上述长整型变量与预 定阈值进行比较, 确定是否需要分段。 需要说明的是, 记录输入时间使用的变 量并不一定必须是长整型的,还可以是整型或者其他变量, 只要能用于准确记 录时间就可以。
对于使用输入时间间隔来确定分段的方案,本发明实施例还给出了更为详 细的举例说明, 具体如下: 可选地, 上述字符串分段单元 402, 用于若字符接 收子单元 401获取到上述输入时间间隔大于预定阈值,则将上述当前字符之前 输入的字符作为上述第一字符串,将上述当前字符以及后续输入的字符作为上 述第二字符串; 上述预定阈值为 800~1000毫秒。 上述预定阈值是用来控制分 段的参考时间, 本实施例给出了 800~1000毫秒的参考值, 依据不同人的输入 习惯这个阈值可能变化的, 因此这个阈值也可以由用户设定。
上述对第一字符串进行识別的方案,可以参考字符识別的各种算法本发明 实施例对此不予限定。本发明实施例提供了另外一种在本发方案中的优选实现 方案, 即: 模糊模式匹配的方案, 具体如下: 可选地, 上述字符识別单元 303 , 用于使用上述第二字符串对上述第一字符串进行模糊模式匹配,若上述第一字 符串中存在连续字符与上述第二字符串具有相同的字符集、相同的长度且同一 字符出现次数相同,则确定上述连续字符为上述第一字符串中的具有与上述第 二字符串匹配的子字符串。
使用以上模糊模式匹配的方案,用户不必输入与前次的错误输入完全相同 的输入来确定前次输入的错误在哪儿, 使定位更加便捷。 另外, 也为错误的修 改提供了便捷条件, 对此将会在后续实施例中有更详细说明。
基于本发明实施例采用的模糊模式匹配的方案,本发明实施例还进一步提 供了更为优选的修改错误的可实现方案, 具体如下: 可选地, 如图 5所示, 上 述指令接收单元 304, 还用于接收用户输入的替换指令;
上述字符串输入控制装置, 还包括: 替换控制单元 501 , 用于若上述指令 接收单元 304接收到用户输入的上述替换指令,则根据上述替换指令将上述子 字符串替换为上述第二字符串。
以上方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择 要修改的位置,就可以完成对输入错误的修改,可以进一步提高错误修改效率。
在本发明实施例中,替换指令可以是显式的也可以是隐含的,显式的指令 可以是输入的替换命令, 隐含的则可以是某种预定义的操作方式, 例如: 可以 是用户选择块状标识并且停留时间超过预定时间, 则认为用户输入了替换指 令。 可选地, 上述指令接收单元 304, 还用于确定用户选择上述块状标识是否 停留时间超过预定时间;
上述替换控制单元 501 , 用于若上述指令接收单元 304确定用户选择上述 块状标识并且停留时间超过预定时间,且上述第二字符串与上述子字符串的字 符不同, 则确定接收到用户输入了替换指令, 并将上述子字符串替换为上述第 二字符串。
本实施例采用用户选择块状标识并且停留时间超过预定时间来确定用户 需要进行字符替换, 该方案可以与采用短点击定位光标的方案兼容。 另外, 本 实施例方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择要 修改的位置, 就可以完成对输入错误的修改, 并且将光标定位到错误字符对应 的位置。 另外, 不仅通过一次输入实现对错误修改, 由于光标已经移动到了错 误字符的对应的位置, 那么除了进行错误修改以外,还可以对错误位置进行增 加字符的操作而不必再次进行字符定位。
以上实施例给出的是有输入错误需要进行替换的方案与光标定位方案的 举例,本发明实施例还提供了输入错误不需要进行替换的情形下的方案,例如: 仅需要增加字符而不需替换字符的情形下的方案, 具体如下: 可选地, 上述指 令接收单元 304, 用于确定用户选择上述块状标识是否停留时间超过预定时 间;
上述光标控制单元 305 , 用于若上述指令接收单元 304确定用户选择上述 块状标识并且停留时间超过预定时间,则将光标移动到被替换的上述子字符串 之前。
以上方案, 由于第二字符串与定位位置的子字符串是相同的, 因此不必进 行替换的操作, 仅移动光标就可以了。
本发明实施例还提供了一种字符串输入控制装置, 如图 6所示, 包括: 接 收器 601、 发射器 602、 处理器 603以及存储器 604;
其中, 上述处理器 603 , 用于接收输入的第一字符串和第二字符串, 上述 第一字符串在上述第二字符串之前输入; 对上述第一字符串进行识別,确定上 述第一字符串中是否具有与上述第二字符串匹配的子字符串, 若具有, 则以块 状标识对上述子字符串进行标识; 在接收到选择块状标识的指令后,将光标移 动到选择的块状标识对应位置。
以上实施例, 用户输入第二字符串以后, 可以自动在第一字符串中匹配到 第二字符串; 也即是说, 若用户需要定位光标, 只需要输入需要定位的位置对 应的字符就可以实现自动定位; 并且定位采用的是块状方式进行标识, 用户可 以方便的将光标移动到想要的位置, 因此可以提高修改错误的效率。
第一字符串和第二字符串都是字符串, 使用 "第一" 和 "第二"仅是为了 区分逻辑上不同的两个字符串, 不应理解为其它的限定意义。用户在输入字符 的时候字符串长度会增加, 字符串会分段,每一个字符串的分段可以认为是一 个独立的字符串。本发明实施例给出了字符串的分段方案中的两个举例, 需要 说明的是字符串的分段方案可以有很多,以下举例不应理解为对本发明实施例 的限定, 本发明实施例提供的字符串分段方案举例如下: 可选地, 上述处理器 603 , 用于接收输入的第一字符串和第二字符串包括: 接收输入的字符, 并获 取当前输入的字符与上述当前字符的前一字符之间的输入时间间隔,若上述输 入时间间隔大于预定阈值,则将上述当前字符之前输入的字符作为上述第一字 符串, 将上述当前字符以及后续输入的字符作为上述第二字符串; 或者, 获取 输入的字符, 若输入的字符出现空格字符, 则将上述空格字符前输入的字符作 为上述第一字符串, 上述空格字符之后输入的字符作为上述第二字符串。
一般来说, 用户发现输入错误的时候会习惯性的发生输入停顿的现象, 该 方案正是基于此来设计采用输入时间间隔的方式来确定是否输入错误,这样可 以实现自动检测功能,而不必用户再输入一个用于指示进行分段或者指示输入 错误的指令, 从而节省修改时间并提高输入效率。 另需说明的是, 以上分段的 举例中,使用空格字符来指示进行字符串分段, 实际上还可以是任意其他默认 的指令, 例如: 两次按 shift键, 或者 ctrl+G这类的组合键, 都是可以的, 以 上使用空格字符来指示进行字符串的分段,不应理解为对本发明实施例的唯一 性限定。
对于使用输入时间间隔来确定分段的方案,本发明实施例还给出了更为详 细的举例说明, 具体如下: 可选地, 上述处理器 603 , 用于接收输入的字符, 并获取当前输入的字符与上述当前字符的前一字符之间的输入时间间隔,若上 述输入时间间隔大于预定阈值,则将上述当前字符之前输入的字符作为上述第 一字符串,将上述当前字符以及后续输入的字符作为上述第二字符串; 上述输 入时间间隔的上述预定阈值为 800~1000毫秒。 在本发明实施例中, 可以记录 输入的每个字符的时间, 并计算相邻字符之间的输入是时间间隔, 并使用长整 型变量记录相邻字符之间的输入时间间隔,然后再通过上述长整型变量与预定 阈值进行比较, 确定是否需要分段。 需要说明的是, 记录输入时间使用的变量 并不一定必须是长整型的,还可以是整型或者其他变量, 只要能用于准确记录 时间就可以; 上述预定阈值是用来控制分段的参考时间, 本实施例给出了 800-1000 毫秒的参考值, 依据不同人的输入习惯这个阈值可能变化的, 因此 这个阈值也可以由用户设定。
上述对第一字符串进行识別的方案,可以参考字符识別的各种算法本发明 实施例对此不予限定。本发明实施例提供了另外一种在本发方案中的优选实现 方案, 即: 模糊模式匹配的方案, 具体如下:
可选地, 上述处理器 603 , 用于确定上述第一字符串中是否具有与上述第 二字符串匹配的子字符串包括:使用上述第二字符串对上述第一字符串进行模 糊模式匹配,若上述第一字符串中存在连续字符与上述第二字符串具有相同的 字符集、相同的长度且同一字符出现次数相同, 则确定上述连续字符为上述第 一字符串中的具有与上述第二字符串匹配的子字符串。
使用以上模糊模式匹配的方案,用户不必输入与前次的错误输入完全相同 的输入来确定前次输入的错误在哪儿, 使定位更加便捷。 另外, 也为错误的修 改提供了便捷条件, 对此将会在后续实施例中有更详细说明。
基于本发明实施例采用的模糊模式匹配的方案,本发明实施例还进一步提 供了更为优选的修改错误的可实现方案, 具体如下: 进一步地, 上述处理器 603 , 还用于接收用户输入的替换指令, 并根据上述替换指令将上述子字符串 替换为上述第二字符串。
以上方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择 要修改的位置,就可以完成对输入错误的修改,可以进一步提高错误修改效率。
在本发明实施例中,替换指令可以是显式的也可以是隐含的,显式的指令 可以是输入的替换命令, 隐含的则可以是某种预定义的操作方式, 例如: 可以 是用户选择块状标识并且停留时间超过预定时间, 则认为用户输入了替换指 令。 可选地, 上述处理器 603 , 用于接收用户输入的替换指令, 并根据上述替 换指令将上述子字符串替换为上述第二字符串包括:若用户选择上述块状标识 并且停留时间超过预定时间, 且上述第二字符串与上述子字符串的字符不同, 则确定接收到用户输入了替换指令, 并将上述子字符串替换为上述第二字符 串。
本实施例采用用户选择块状标识并且停留时间超过预定时间来确定用户 需要进行字符替换, 该方案可以与采用短点击定位光标的方案兼容。 另外, 本 实施例方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择要 修改的位置, 就可以完成对输入错误的修改, 并且将光标定位到错误字符对应 的位置。 另外, 不仅通过一次输入实现对错误修改, 由于光标已经移动到了错 误字符的对应的位置, 那么除了进行错误修改以外,还可以对错误位置进行增 加字符的操作而不必再次进行字符定位。
以上实施例给出的是有输入错误需要进行替换的方案与光标定位方案的 举例,本发明实施例还提供了输入错误不需要进行替换的情形下的方案,例如: 仅需要增加字符而不需替换字符的情形下的方案, 具体如下: 可选地, 上述处 理器 603 , 用于将光标移动到选择的块状标识对应位置包括: 将光标移动到被 替换的上述子字符串之前。
以上方案, 由于第二字符串与定位位置的子字符串是相同的, 因此不必进 行替换的操作, 仅移动光标就可以了。
本发明实施例还提供了另一种字符串输入控制装置,如图 7所示, 为了便 于说明, 仅示出了与本发明实施例相关的部分, 具体技术细节未揭示的, 请参 照本发明实施例方法部分。该终端可以为包括手机、平板电脑、 PDA ( Personal Digital Assistant , 个人数字助理 )、 POS ( Point of Sales , 销售终端)、 车载电脑 等任意终端设备, 以终端为手机为例:
图 7示出的是与本发明实施例提供的终端相关的手机的部分结构的框图。 参考图 7, 手机包括: 射频(Radio Frequency, RF ) 电路 710、 存储器 720、 输入单元 730、 显示单元 740、 传感器 750、 音频电路 760、 无线保真( wireless fidelity, WiFi )模块 770、 处理器 780、 以及电源 790等部件。 本领域技术人 员可以理解, 图 7中示出的手机结构并不构成对手机的限定, 可以包括比图示 更多或更少的部件, 或者组合某些部件, 或者不同的部件布置。
下面结合图 7对手机的各个构成部件进行具体的介绍:
RF电路 710可用于收发信息或通话过程中,信号的接收和发送, 特別地, 将基站的下行信息接收后, 给处理器 780处理; 另外, 将设计上行的数据发送 给基站。 通常, RF电路 710包括但不限于天线、 至少一个放大器、 收发信机、 耦合器、 低噪声放大器(Low Noise Amplifier, LNA )、 双工器等。 此外, RF 电路 710还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用 任一通信标准或协议, 包括但不限于全球移动通讯系统 ( Global System of Mobile communication , GSM )、 通用分组无线月良务 ( General Packet Radio Service, GPRS )、 码分多址( Code Division Multiple Access, CDMA ), 宽带码 分多址( Wideband Code Division Multiple Access, WCDMA )、长期演进 ( Long Term Evolution, LTE )、电子邮件、短消息服务( Short Messaging Service, SMS ) 等。
存储器 720可用于存储软件程序以及模块,处理器 780通过运行存储在存 储器 720的软件程序以及模块, 从而执行手机的各种功能应用以及数据处理。 存储器 720可主要包括存储程序区和存储数据区, 其中,存储程序区可存储操 作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等) 等; 存储数据区可存储根据手机的使用所创建的数据(比如音频数据、 电话本 等)等。 此外, 存储器 720可以包括高速随机存取存储器, 还可以包括非易失 性存储器, 例如至少一个磁盘存储器件、 闪存器件、 或其他易失性固态存储器 件。
输入单元 730可用于接收输入的数字或字符信息,以及产生与手机的用户 设置以及功能控制有关的键信号输入。 具体地,输入单元 730可包括触控面板 731 以及其他输入设备 732。 触控面板 731 , 也称为触摸屏, 可收集用户在其 上或附近的触摸操作 (比如用户使用手指、触笔等任何适合的物体或附件在触 控面板 731上或在触控面板 731附近的操作 ), 并根据预先设定的程式驱动相 应的连接装置。可选的,触控面板 731可包括触摸检测装置和触摸控制器两个 部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号, 将信号传送给触摸控制器; 触摸控制器从触摸检测装置上接收触摸信息, 并将 它转换成触点坐标, 再送给处理器 780, 并能接收处理器 780发来的命令并加 以执行。 此外, 可以采用电阻式、 电容式、 红外线以及表面声波等多种类型实 现触控面板 731。 除了触控面板 731 , 输入单元 730还可以包括其他输入设备 732。 具体地, 其他输入设备 732可以包括但不限于物理键盘、 功能键(比如 音量控制按键、 开关按键等)、 轨迹球、 鼠标、 操作杆等中的一种或多种。
显示单元 740 可用于显示由用户输入的信息或提供给用户的信息以及手 机的各种菜单。 显示单元 740可包括显示面板 741 , 可选的, 可以采用液晶显 示器 ( Liquid Crystal Display, LCD )、 有机发光二极管 ( Organic Light-Emitting Diode, OLED )等形式来配置显示面板 741。 进一步的, 触控面板 731可覆盖 显示面板 741 , 当触控面板 731检测到在其上或附近的触摸操作后, 传送给处 理器 780以确定触摸事件的类型,随后处理器 780根据触摸事件的类型在显示 面板 741上提供相应的视觉输出。 虽然在图 7中, 触控面板 731与显示面板 741是作为两个独立的部件来实现手机的输入和输入功能, 但是在某些实施例 中, 可以将触控面板 731与显示面板 741集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器 750, 比如光传感器、 运动传感器以及其他 传感器。 具体地, 光传感器可包括环境光传感器及接近传感器, 其中, 环境光 传感器可根据环境光线的明暗来调节显示面板 741的亮度,接近传感器可在手 机移动到耳边时, 关闭显示面板 741 和 /或背光。 作为运动传感器的一种, 加 速计传感器可检测各个方向上(一般为三轴)加速度的大小, 静止时可检测出 重力的大小及方向,可用于识別手机姿态的应用(比如横竖屏切换、相关游戏、 磁力计姿态校准)、 振动识別相关功能(比如计步器、 敲击)等; 至于手机还 可配置的陀螺仪、 气压计、 湿度计、 温度计、 红外线传感器等其他传感器, 在 此不再赘述。
音频电路 760、 扬声器 761 , 传声器 762可提供用户与手机之间的音频接 口。音频电路 760可将接收到的音频数据转换后的电信号,传输到扬声器 761 , 由扬声器 761转换为声音信号输出; 另一方面,传声器 762将收集的声音信号 转换为电信号, 由音频电路 760接收后转换为音频数据,再将音频数据输出处 理器 780处理后, 经 RF电路 710以发送给比如另一手机, 或者将音频数据输 出至存储器 720以便进一步处理。
WiFi属于短距离无线传输技术, 手机通过 WiFi模块 770可以帮助用户收 发电子邮件、浏览网页和访问流式媒体等, 它为用户提供了无线的宽带互联网 访问。 虽然图 7示出了 WiFi模块 770, 但是可以理解的是, 其并不属于手机 的必须构成, 完全可以根据需要在不改变发明的本质的范围内而省略。
处理器 780是手机的控制中心,利用各种接口和线路连接整个手机的各个 部分, 通过运行或执行存储在存储器 720 内的软件程序和 /或模块, 以及调用 存储在存储器 720内的数据,执行手机的各种功能和处理数据,从而对手机进 行整体监控。 可选的, 处理器 780可包括一个或多个处理单元; 优选的, 处理 器 780可集成应用处理器和调制解调处理器, 其中,应用处理器主要处理操作 系统、 用户界面和应用程序等, 调制解调处理器主要处理无线通信。 可以理解 的是, 上述调制解调处理器也可以不集成到处理器 780中。
手机还包括给各个部件供电的电源 790 (比如电池), 优选的, 电源可以 通过电源管理系统与处理器 780逻辑相连,从而通过电源管理系统实现管理充 电、 放电、 以及功耗管理等功能。
尽管未示出, 手机还可以包括摄像头、 蓝牙模块等, 在此不再赘述。 在本发明实施例中, 该终端所包括的处理器 780还具有以下功能: 上述处理器 780, 用于接收输入的第一字符串和第二字符串; 对第一字符 串进行识別,确定上述第二字符串在上述第一字符串中的位置, 并以块状标识 上述位置; 在接收到选择块状标识的指令后, 将光标移动到选择的块状标识对 应位置。
以上实施例, 用户输入第二字符串以后, 可以自动在第一字符串中匹配到 第二字符串; 也即是说, 若用户需要定位光标, 只需要输入需要定位的位置对 应的字符就可以实现自动定位; 并且定位采用的是块状方式进行标识, 用户可 以方便的将光标移动到想要的位置, 因此可以提高修改错误的效率。
第一字符串和第二字符串都是字符串, 使用 "第一" 和 "第二"仅是为了 区分逻辑上不同的两个字符串, 不应理解为其它的限定意义。用户在输入字符 的时候字符串长度会增加, 字符串会分段,每一个字符串的分段可以认为是一 个独立的字符串。本发明实施例给出了字符串的分段方案中的两个举例, 需要 说明的是字符串的分段方案可以有很多,以下举例不应理解为对本发明实施例 的限定, 本发明实施例提供的字符串分段方案举例如下: 可选地, 上述处理器 780, 用于接收输入的第一字符串和第二字符串包括: 接收输入的字符, 并获 取当前输入的字符与上述当前字符的前一字符之间的输入时间间隔,若上述输 入时间间隔大于预定阈值,则将上述当前字符之前输入的字符作为上述第一字 符串, 将上述当前字符以及后续输入的字符作为上述第二字符串; 或者, 获取 输入的字符, 若输入的字符出现空格字符, 则将上述空格字符前输入的字符作 为上述第一字符串, 上述空格字符之后输入的字符作为上述第二字符串。
一般来说, 用户发现输入错误的时候会习惯性的发生输入停顿的现象, 该 方案正是基于此来设计采用输入时间间隔的方式来确定是否输入错误,这样可 以实现自动检测功能,而不必用户再输入一个用于指示进行分段或者指示输入 错误的指令, 从而节省修改时间并提高输入效率。 另需说明的是, 以上分段的 举例中,使用空格字符来指示进行字符串分段, 实际上还可以是任意其他默认 的指令, 例如: 两次按 shift键, 或者 ctrl+G这类的组合键, 都是可以的, 以 上使用空格字符来指示进行字符串的分段,不应理解为对本发明实施例的唯一 性限定。
对于使用输入时间间隔来确定分段的方案,本发明实施例还给出了更为详 细的举例说明, 具体如下: 可选地, 上述处理器 780, 用于接收输入的字符, 并获取当前输入的字符与上述当前字符的前一字符之间的输入时间间隔,若上 述输入时间间隔大于预定阈值,则将上述当前字符之前输入的字符作为上述第 一字符串,将上述当前字符以及后续输入的字符作为上述第二字符串; 上述输 入时间间隔的上述预定阈值为 800~1000毫秒。 在本发明实施例中, 可以记录 输入的每个字符的时间, 并计算相邻字符之间的输入是时间间隔, 并使用长整 型变量记录相邻字符之间的输入时间间隔,然后再通过上述长整型变量与预定 阈值进行比较, 确定是否需要分段。 需要说明的是, 记录输入时间使用的变量 并不一定必须是长整型的,还可以是整型或者其他变量, 只要能用于准确记录 时间就可以; 上述预定阈值是用来控制分段的参考时间, 本实施例给出了 800-1000 毫秒的参考值, 依据不同人的输入习惯这个阈值可能变化的, 因此 这个阈值也可以由用户设定。
上述对第一字符串进行识別的方案,可以参考字符识別的各种算法本发明 实施例对此不予限定。本发明实施例提供了另外一种在本发方案中的优选实现 方案, 即: 模糊模式匹配的方案, 具体如下:
可选地, 上述处理器 780, 用于确定上述第一字符串中是否具有与上述第 二字符串匹配的子字符串包括:使用上述第二字符串对上述第一字符串进行模 糊模式匹配,若上述第一字符串中存在连续字符与上述第二字符串具有相同的 字符集、相同的长度且同一字符出现次数相同, 则确定上述连续字符为上述第 一字符串中的具有与上述第二字符串匹配的子字符串。
使用以上模糊模式匹配的方案,用户不必输入与前次的错误输入完全相同 的输入来确定前次输入的错误在哪儿, 使定位更加便捷。 另外, 也为错误的修 改提供了便捷条件, 对此将会在后续实施例中有更详细说明。
基于本发明实施例采用的模糊模式匹配的方案,本发明实施例还进一步提 供了更为优选的修改错误的可实现方案, 具体如下: 进一步地, 上述处理器 780, 还用于接收用户输入的替换指令, 并根据上述替换指令将上述子字符串 替换为上述第二字符串。
以上方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择 要修改的位置,就可以完成对输入错误的修改,可以进一步提高错误修改效率。
在本发明实施例中,替换指令可以是显式的也可以是隐含的,显式的指令 可以是输入的替换命令, 隐含的则可以是某种预定义的操作方式, 例如: 可以 是用户选择块状标识并且停留时间超过预定时间, 则认为用户输入了替换指 令。 可选地, 上述处理器 780, 用于接收用户输入的替换指令, 并根据上述替 换指令将上述子字符串替换为上述第二字符串包括:若用户选择上述块状标识 并且停留时间超过预定时间, 且上述第二字符串与上述子字符串的字符不同, 则确定接收到用户输入了替换指令, 并将上述子字符串替换为上述第二字符 串。
本实施例采用用户选择块状标识并且停留时间超过预定时间来确定用户 需要进行字符替换, 该方案可以与采用短点击定位光标的方案兼容。 另外, 本 实施例方案, 若用户发现了输入错误, 用户只要输入一次正确的字符并选择要 修改的位置, 就可以完成对输入错误的修改, 并且将光标定位到错误字符对应 的位置。 另外, 不仅通过一次输入实现对错误修改, 由于光标已经移动到了错 误字符的对应的位置, 那么除了进行错误修改以外,还可以对错误位置进行增 加字符的操作而不必再次进行字符定位。
以上实施例给出的是有输入错误需要进行替换的方案与光标定位方案的 举例,本发明实施例还提供了输入错误不需要进行替换的情形下的方案,例如: 仅需要增加字符而不需替换字符的情形下的方案, 具体如下: 可选地, 上述处 理器 780, 用于将光标移动到选择的块状标识对应位置包括: 将光标移动到被 替换的上述子字符串之前。
以上方案, 由于第二字符串与定位位置的子字符串是相同的, 因此不必进 行替换的操作, 仅移动光标就可以了。
值得注意的是, 上述装置只是按照功能逻辑进行划分的,但并不局限于上 述的划分, 只要能够实现相应的功能即可; 另外, 各功能单元的具体名称也只 是为了便于相互区分, 并不用于限制本发明的保护范围。
另外,本领域普通技术人员可以理解实现上述各方法实施例中的全部或部 分步骤是可以通过程序来指令相关的硬件完成,相应的程序可以存储于一种计 算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于 此,任何熟悉本技术领域的技术人员在本发明实施例揭露的技术范围内, 可轻 易想到的变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保 护范围应该以权利要求的保护范围为准。

Claims

权 利 要 求
1、 一种字符串输入控制方法, 其特征在于, 包括:
接收输入的第一字符串和第二字符串,所述第一字符串在所述第二字符串 之前输入;
对所述第一字符串进行识別,确定所述第一字符串中是否具有与所述第二 字符串匹配的子字符串, 若具有, 则以块状标识对所述子字符串进行标识; 在接收到选择块状标识的指令后, 将光标移动到选择的块状标识对应位 置。
2、 根据权利要求 1所述方法, 其特征在于, 所述接收输入的第一字符串 和第二字符串包括:
接收输入的字符,并获取当前输入的字符与所述当前字符的前一字符之间 的输入时间间隔, 若所述输入时间间隔大于预定阈值, 则将所述当前字符之前 输入的字符作为所述第一字符串,将所述当前字符以及后续输入的字符作为所 述第二字符串; 或者,
获取输入的字符, 若输入的字符出现空格字符, 则将所述空格字符前输入 的字符作为所述第一字符串,所述空格字符之后输入的字符作为所述第二字符 串。
3、 根据权利要求 2所述方法, 其特征在于, 所述输入时间间隔的所述预 定阈值为 800~1000毫秒。
4、 根据权利要求 1所述方法, 其特征在于, 所述确定所述第一字符串中 是否具有与所述第二字符串匹配的子字符串包括:
使用所述第二字符串对所述第一字符串进行模糊模式匹配,若所述第一字 符串中存在连续字符与所述第二字符串具有相同的字符集、相同的长度且同一 字符出现次数相同,则确定所述连续字符为所述第一字符串中的具有与所述第 二字符串匹配的子字符串。
5、 根据权利要求 1至 4任意一项所述方法, 其特征在于, 在以块状标识 对所述子字符串进行标识之后, 所述方法还包括:
接收用户输入的替换指令,并根据所述替换指令将所述子字符串替换为所 述第二字符串。
6、 根据权利要求 5所述方法, 其特征在于, 所述接收用户输入的替换指 令, 并根据所述替换指令将所述子字符串替换为所述第二字符串包括: 若用户 选择所述块状标识并且停留时间超过预定时间,且所述第二字符串与所述子字 符串的字符不同, 则确定接收到用户输入了替换指令, 并将所述子字符串替换 为所述第二字符串。
7、 根据权利要求 5所述方法, 其特征在于, 所述将光标移动到选择的块 标识对应位置包括:
将光标移动到被替换的所述子字符串之前。
8、 一种字符串输入控制装置, 其特征在于, 包括:
字符接收单元, 用于接收输入的第一字符串和第二字符串, 所述第一字符 串在所述第二字符串之前输入;
字符识別单元,用于对所述字符接收单元接收到的所述第一字符串进行识 別, 确定所述第一字符串中是否具有与所述第二字符串匹配的子字符串; 字符标识单元, 用于若所述字符识別单元确定结果为是, 则以块状标识对 所述子字符串进行标识;
指令接收单元, 用于接收选择块状标识的指令;
光标控制单元,用于在所述指令接收单元接收到所述选择块状标识的指令 后, 将光标移动到选择的块状标识对应位置。
9、 根据权利要求 8所述字符串输入控制装置, 其特征在于, 所述字符接 收单元包括: 字符接收子单元和字符串分段单元;
所述字符接收子单元, 用于接收输入的字符, 并获取当前输入的字符与所 述当前字符的前一字符之间的输入时间间隔;
所述字符串分段单元,用于若字符接收子单元获取到的所述输入时间间隔 大于预定阈值, 则将所述当前字符之前输入的字符作为所述第一字符串,将所 述当前字符以及后续输入的字符作为所述第二字符串; 或者, 若所述字符接收 子单元接收的字符出现空格字符,则将所述空格字符前输入的字符作为所述第 一字符串, 所述空格字符之后输入的字符作为所述第二字符串。
10、 根据权利要求 9所述字符串输入控制装置, 其特征在于,
所述字符串分段单元,用于若字符接收子单元获取到所述输入时间间隔大 于预定阈值, 则将所述当前字符之前输入的字符作为所述第一字符串,将所述 当前字符以及后续输入的字符作为所述第二字符串; 所述预定阈值为 800-1000毫秒。
11、 根据权利要求 8所述字符串输入控制装置, 其特征在于,
所述字符识別单元,用于使用所述第二字符串对所述第一字符串进行模糊 模式匹配,若所述第一字符串中存在连续字符与所述第二字符串具有相同的字 符集、相同的长度且同一字符出现次数相同, 则确定所述连续字符为所述第一 字符串中的具有与所述第二字符串匹配的子字符串。
12、 根据权利要求 8至 11任意一项所述字符串输入控制装置, 其特征在 于, 所述指令接收单元, 还用于接收用户输入的替换指令;
所述字符串输入控制装置, 还包括: 替换控制单元, 用于若所述指令接收 单元接收到用户输入的所述替换指令,则根据所述替换指令将所述子字符串替 换为所述第二字符串。
13、 根据权利要求 12所述字符串输入控制装置, 其特征在于,
所述指令接收单元,还用于确定用户选择所述块状标识是否停留时间超过 预定时间;
所述替换控制单元,用于若所述指令接收单元确定用户选择所述块状标识 并且停留时间超过预定时间, 且所述第二字符串与所述子字符串的字符不同, 则确定接收到用户输入了替换指令, 并将所述子字符串替换为所述第二字符 串。
14、 根据权利要求 12所述字符串输入控制装置, 其特征在于,
所述光标控制单元,用于若所述指令接收单元确定用户选择所述块状标识 并且停留时间超过预定时间, 则将光标移动到被替换的所述子字符串之前。
PCT/CN2013/091004 2013-12-31 2013-12-31 一种字符串输入控制方法,及装置 WO2015100574A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201380015027.1A CN104246663A (zh) 2013-12-31 2013-12-31 一种字符串输入控制方法,及装置
EP13900740.5A EP3001284A4 (en) 2013-12-31 2013-12-31 METHOD AND DEVICE FOR CHARACTER CHANNEL INPUT CONTROL
PCT/CN2013/091004 WO2015100574A1 (zh) 2013-12-31 2013-12-31 一种字符串输入控制方法,及装置
US14/984,368 US20160110332A1 (en) 2013-12-31 2015-12-30 Character string input control method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/091004 WO2015100574A1 (zh) 2013-12-31 2013-12-31 一种字符串输入控制方法,及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/984,368 Continuation US20160110332A1 (en) 2013-12-31 2015-12-30 Character string input control method and apparatus

Publications (1)

Publication Number Publication Date
WO2015100574A1 true WO2015100574A1 (zh) 2015-07-09

Family

ID=52231755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/091004 WO2015100574A1 (zh) 2013-12-31 2013-12-31 一种字符串输入控制方法,及装置

Country Status (4)

Country Link
US (1) US20160110332A1 (zh)
EP (1) EP3001284A4 (zh)
CN (1) CN104246663A (zh)
WO (1) WO2015100574A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069303A (zh) * 2020-09-17 2020-12-11 四川长虹电器股份有限公司 字符串的匹配查找方法、装置及终端
CN112784125A (zh) * 2021-01-14 2021-05-11 辽宁工程技术大学 一种输入信息的模式识别方法和装置

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653055A (zh) * 2015-07-29 2016-06-08 东莞酷派软件技术有限公司 一种文字编码符的修改方法及装置
CN106484730A (zh) * 2015-08-31 2017-03-08 北京国双科技有限公司 字符串匹配方法和装置
CN106484131B (zh) * 2015-09-02 2021-06-22 北京搜狗科技发展有限公司 一种输入纠错方法和输入法装置
US10204177B2 (en) * 2015-11-30 2019-02-12 International Business Machines Corporation Matching an ordered set of strings containing wild cards
CN105718427B (zh) * 2016-01-15 2019-12-24 联想(北京)有限公司 一种信息处理方法及电子设备
CN105700813A (zh) * 2016-02-26 2016-06-22 深圳市金立通信设备有限公司 一种信息处理方法及终端
CN106020679A (zh) * 2016-04-29 2016-10-12 深圳市金立通信设备有限公司 一种输入控制方法及终端
CN107544696B (zh) * 2016-06-24 2020-11-17 华为终端有限公司 压力触控的软键盘输入方法及终端
CN107015727A (zh) * 2017-04-07 2017-08-04 深圳市金立通信设备有限公司 一种控制字符分隔符的方法及终端
CN107066116B (zh) * 2017-04-13 2021-07-30 海信视像科技股份有限公司 字符串生成方法、字符解析方法及装置
CN107515681B (zh) * 2017-08-24 2019-08-20 维沃移动通信有限公司 一种文字输入方法、移动终端及计算机可读存储介质
WO2019130538A1 (ja) * 2017-12-28 2019-07-04 マクセル株式会社 入力情報修正方法及び情報端末
CN110389666A (zh) * 2018-04-16 2019-10-29 北京搜狗科技发展有限公司 一种输入纠错方法和装置
CN108629174B (zh) * 2018-05-08 2022-06-07 创新先进技术有限公司 字符串校验的方法及装置
JP2022019446A (ja) * 2020-07-17 2022-01-27 キヤノン株式会社 画像処理システム、装置、方法、プログラム
CN113721775A (zh) * 2021-11-01 2021-11-30 徐州正达光电有限公司 通信处理方法、装置及设备
CN113703593A (zh) * 2021-11-01 2021-11-26 徐州正达光电有限公司 设备交互通信方法、装置及存储介质

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101315581A (zh) * 2007-05-30 2008-12-03 周志农 通用键盘长按键实现方法及其在输入中的应用方法
CN102023782A (zh) * 2009-09-15 2011-04-20 北京搜狗科技发展有限公司 一种输入转换过程中确定修改点的方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060206816A1 (en) * 2005-03-11 2006-09-14 Magnus Nordenhake Method of and device for predictive text editing
EP2182446B1 (en) * 2007-08-23 2017-11-22 Kyocera Corporation Input device
KR101484776B1 (ko) * 2007-12-13 2015-01-20 엘지전자 주식회사 휴대 단말기 및 이를 이용한 문자입력방법
US20120209606A1 (en) * 2011-02-14 2012-08-16 Nice Systems Ltd. Method and apparatus for information extraction from interactions
CN103294655A (zh) * 2012-02-17 2013-09-11 侯圣勇 一种快速修改输入错误的方法、装置及输入法系统
KR101332757B1 (ko) * 2013-05-16 2013-11-25 주식회사 큐키 삭제키 입력 없이 단어 또는 문자열을 수정하는 방법 및 이를 구현한 장치

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101315581A (zh) * 2007-05-30 2008-12-03 周志农 通用键盘长按键实现方法及其在输入中的应用方法
CN102023782A (zh) * 2009-09-15 2011-04-20 北京搜狗科技发展有限公司 一种输入转换过程中确定修改点的方法及装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069303A (zh) * 2020-09-17 2020-12-11 四川长虹电器股份有限公司 字符串的匹配查找方法、装置及终端
CN112069303B (zh) * 2020-09-17 2022-08-16 四川长虹电器股份有限公司 字符串的匹配查找方法、装置及终端
CN112784125A (zh) * 2021-01-14 2021-05-11 辽宁工程技术大学 一种输入信息的模式识别方法和装置

Also Published As

Publication number Publication date
EP3001284A4 (en) 2016-09-07
EP3001284A1 (en) 2016-03-30
US20160110332A1 (en) 2016-04-21
CN104246663A (zh) 2014-12-24

Similar Documents

Publication Publication Date Title
WO2015100574A1 (zh) 一种字符串输入控制方法,及装置
WO2015074567A1 (zh) 一种敲击控制方法及终端
US11184754B2 (en) Data sharing method and terminal
WO2019015404A1 (zh) 在分屏模式下切换应用的方法、装置及其相关设备
WO2019228297A1 (zh) 显示控制方法及终端
CN108763316B (zh) 一种音频列表管理方法及移动终端
US20170364257A1 (en) Gesture control method, gesture control device and gesture control system
WO2013149530A1 (zh) 显示信息的方法、移动终端和计算机可读存储介质
WO2013135169A1 (zh) 一种输入法键盘的调整方法及其移动终端
WO2015000430A1 (zh) 智能选词的方法和装置
WO2018049885A1 (zh) 一种数据迁移方法及装置
WO2015024372A1 (zh) 发起通信的方法、装置及移动终端
WO2019052551A1 (zh) 终端设备的交互方法、存储介质以及终端设备
WO2019076377A1 (zh) 图像的查看方法及移动终端
CN110879680A (zh) 一种图标管理方法及电子设备
WO2017128986A1 (zh) 多媒体菜单项的选择方法、装置及存储介质
WO2015035794A1 (zh) 一种消息展示的方法、装置及终端设备
CN107728920B (zh) 一种复制方法及移动终端
WO2017206853A1 (zh) 一种滑动加速响应方法、及相关产品
WO2020001190A1 (zh) 应用程序界面显示方法、装置、可读存储介质及移动终端
WO2015024393A1 (zh) 发送短信的方法、装置及终端
CN103530057A (zh) 一种字符的输入方法、装置及终端设备
CN110879678A (zh) 一种图标显示方法、电子设备及存储介质
US10110720B2 (en) Dialing method for user terminal and user terminal
CN111027406B (zh) 图片识别方法、装置、存储介质及电子设备

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: 13900740

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2013900740

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE