WO2017050274A1 - 文字输入方法和电子设备 - Google Patents

文字输入方法和电子设备 Download PDF

Info

Publication number
WO2017050274A1
WO2017050274A1 PCT/CN2016/099879 CN2016099879W WO2017050274A1 WO 2017050274 A1 WO2017050274 A1 WO 2017050274A1 CN 2016099879 W CN2016099879 W CN 2016099879W WO 2017050274 A1 WO2017050274 A1 WO 2017050274A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
text
entered
character
determining
Prior art date
Application number
PCT/CN2016/099879
Other languages
English (en)
French (fr)
Inventor
高鹏飞
张跃
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to US15/762,930 priority Critical patent/US20180285336A1/en
Publication of WO2017050274A1 publication Critical patent/WO2017050274A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0236Character input methods using selection techniques to select from displayed items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/018Input/output arrangements for oriental characters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • G06F40/129Handling non-Latin characters, e.g. kana-to-kanji conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/274Converting codes to words; Guess-ahead of partial word inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Definitions

  • the embodiments of the present invention relate to the field of communications technologies, and in particular, to a text input method and an electronic device.
  • text input method is an important way for users to interact with mobile phones.
  • the frequency and duration of user use also grows.
  • the current text input method is based on the method of linearly inputting characters from left to right.
  • the pinyin text input method is taken as an example.
  • the user inputs the English character “shurufa” in turn, and the text input method receives the character stream, and parses “shu ⁇ ru ⁇ fa” in order from left to right, and generates a list of candidate words "input method, input, The number goes, ", the user selects the candidate word "input method", and the candidate word “input method” fills in the right end of the control text box, thereby completing the text input process.
  • Embodiments of the present invention provide a text input method and an electronic device for improving text input efficiency and flexibility of a text input process.
  • an embodiment of the present invention provides a text input method, including:
  • Parsing the character generating and displaying at least one set of candidate characters corresponding to the character;
  • the character to be input is inserted at the input position.
  • the determining, according to the obtained operation, the input text corresponding to the operation, before the input position in the input text further includes:
  • N is an integer greater than or equal to 1;
  • N+1 to-be-entered positions of the text to be input wherein a position between each two sets of words is a position to be input, and a leftmost end of the input text is a to-be-entered Position, the rightmost end of the input text is a position to be input;
  • Determining, according to the obtained operation, the input position of the to-be-entered text corresponding to the operation in the input text including:
  • the determining, according to the obtained operation, determining, in the N+1 to-be-entered positions The corresponding input location for the operation including:
  • the operation is the operation of pressing the text to be input
  • the duration of the operation of pressing the text to be input is M preset durations, determining that the input position corresponding to the operation is in the input text N+1-M positions from left to right; the M is an integer greater than or equal to 1.
  • the determining, according to the obtained operation, determining, in the N+1 to-be-entered locations The corresponding input location for the operation including:
  • the operation is an operation of clicking the text to be input, it is determined that the input position corresponding to the operation is the N+1th position from left to right in the input text.
  • the determining, according to the obtained operation, determining, in the N+1 to-be-entered locations The corresponding input location for the operation including:
  • the operation is an operation of double-clicking the character to be input, it is determined that the input position corresponding to the operation is the first position from left to right in the input text.
  • an electronic device including:
  • the obtaining unit is configured to obtain a character input by the user
  • a processing unit configured to parse the character to obtain at least one set of candidate characters corresponding to the character
  • a display unit configured to display at least one set of candidate characters corresponding to the character
  • the obtaining unit is further configured to acquire an operation of the user to input a text, where the to-be-entered text is any one of the at least one set of candidate characters;
  • a determining unit configured to determine, according to the obtained operation, an input position of the to-be-entered text corresponding to the operation in the input text
  • an insertion unit configured to insert the text to be input at the input position.
  • the processing unit is further configured to: determine, by the determining unit, that the to-be-entered text corresponding to the operation is in the input text according to the acquired operation Before the input position, the word segmentation process is performed on the input text to obtain N sets of words, and the N is an integer greater than or equal to 1; according to the N sets of words, the N+1 to-be-entered characters are determined. Entering a position, wherein a position between each two sets of words is a position to be input, a leftmost end of the input text is a position to be input, and a rightmost end of the input text is a position to be input;
  • the determining unit is specifically configured to determine, according to the obtained operation, an input position corresponding to the operation in the N+1 to-be-entered positions.
  • the determining unit is specifically configured to: if it is determined that the operation is an operation of pressing the text to be input, And the duration of the operation of pressing the text to be input is M preset durations, and determining that the input position corresponding to the operation is the N+1-M positions from left to right in the input text;
  • the M is an integer greater than or equal to 1.
  • the determining unit is specifically configured to: if the operation is determined to be an operation of clicking the text to be input The input position corresponding to the operation is determined to be the N+1th position from left to right in the input text.
  • the determining unit is specifically configured to: when determining that the operation is double-clicking the operation of the text to be input Determining that the input position corresponding to the operation is the first bit from left to right in the input text. Set.
  • the text input method and the electronic device provided in this embodiment acquire an operation of the user to input text through the electronic device, thereby determining an input position of the input text corresponding to the operation in the input text, and then inserting at the determined input position.
  • the text to be input is used; thereby making it possible to accurately adjust the input position of the text to be input, thereby improving the efficiency of text input and the flexibility of the text input process.
  • Embodiment 1 is a flowchart of Embodiment 1 of a character input method according to the present invention
  • Embodiment 2 is a flowchart of Embodiment 2 of a text input method according to the present invention
  • Embodiment 1 of an electronic device according to the present invention is a schematic structural diagram of Embodiment 1 of an electronic device according to the present invention.
  • Embodiment 4 is a schematic structural diagram of Embodiment 2 of an electronic device according to the present invention.
  • FIG. 1 is a flowchart of Embodiment 1 of a text input method according to the present invention. As shown in FIG. 1 , the method in this embodiment may include:
  • the execution entity may be an electronic device, and the electronic device may be a device such as a smart phone or a tablet computer; the electronic device may acquire a character input by the user, and the character is, for example, “naer”.
  • the electronic device parses the acquired characters, generates at least one set of candidate characters corresponding to the characters, and displays at least one set of candidate characters corresponding to the characters; the character “naer” corresponds to At least one set of candidate words includes, for example, "Where", “Where”, “Horse”, “Nar”.
  • the operation of the user to input the text is obtained, and the to-be-entered text may be any one of the at least one set of candidate characters.
  • the electronic device can determine the input position corresponding to the operation according to the obtained operation for inputting the text, and the input position is the input position of the text to be input in the input text, which can be preset in this embodiment. Different operations correspond to different input positions.
  • the input text is, for example, the text that has been filled in the control text box displayed on the display interface of the electronic device.
  • the electronic device after determining the input position corresponding to the operation, the electronic device inserts the character to be input into the input position, thereby completing the input process of the text.
  • the text input method provided in this embodiment obtains an input position of the to-be-entered text corresponding to the operation in the input text by acquiring an operation of the user to input the text, and then inserting the to-be-entered text at the determined input position; Therefore, the use of the input position of the text to be input can be accurately adjusted, and the text input efficiency and the flexibility of the text input process are improved.
  • Embodiment 2 is a flowchart of Embodiment 2 of the text input method of the present invention. As shown in FIG. 2, the method in this embodiment may include:
  • S202 Parse the character, and generate and display at least one set of candidate characters corresponding to the character.
  • the electronic device can perform word segmentation on the input text to obtain N sets of words, and N is an integer greater than or equal to 1. It should be noted that the process of word segmentation is similar to the prior art, and details are not described herein. .
  • the text has been entered as “to eat tomorrow”, and the word segmentation has been entered for the words “to go to dinner tomorrow”, and three groups of words can be obtained, namely “tomorrow”, “go” and “meal”.
  • S205 Determine, according to the N sets of words, N+1 to-be-entered positions of the to-be-entered text, where a position between each two sets of words is a position to be input, and a leftmost end of the input text is one To be input, the rightmost end of the entered text is a position to be input.
  • the electronic device may determine, according to the N sets of words obtained after the word segmentation, that there are N+1 positions to be input, wherein the position between each two sets of words is a position to be input, which has been input.
  • the leftmost end of the text is a position to be entered, and the rightmost end of the input text is a position to be input.
  • the execution order of S203 and S204-S205 is in no particular order.
  • the three groups of words "Tomorrow”, “Go” and “Eat” have been entered in the text "Tomorrow to eat", and four positions to be entered can be determined.
  • the leftmost end of "Tomorrow” is a position to be entered, "Tomorrow” and There is a position to be entered between "go”, a position to be input between "go” and “meal”, and a rightmost position of "dining” is a position to be input. Therefore, the four positions to be input can be exemplified as follows: “to be input position” tomorrow "to be input position” to "to be input position” to eat "to be input position"
  • the electronic device determines an input position of the to-be-entered text from the N+1 to-be-entered positions according to the obtained operation of the user to input the text, for example, the text to be input is “Where”, and the electronic device according to The user's operation of "Where” determines that the location to be entered is between “go” and “meal”, and then the electronic device inserts "where" between "go” and “meal”. For example, the last text obtained is: Where to eat tomorrow.
  • the operation is an operation of pressing the text to be input
  • the duration of the operation of pressing the text to be input is M preset durations
  • the operation of the user to input the text is a pressing operation, and the duration of the pressing operation is M preset durations, it is determined that the input position of the text to be input is the N+1 from left to right in the input text. - M positions, M is an integer greater than or equal to 1.
  • M is an integer greater than or equal to 1.
  • the process of determining the duration of the pressing operation may be, for example, the length of time that the user acquired by the electronic device continuously presses the pressure of the character to be input over the preset pressure.
  • an implementation solution is: the electronic device displays the following candidate text: Where is the child, where the user needs to input the text as “Where”, the user presses the “Where” text to be input, and presses the text to be input.
  • the electronic device will jump the text input cursor "
  • the electronic device can determine The position between "go” and “eat” is the position to be input; if the position of the text input cursor is "tomorrow to eat” at this time is not the input position of the user who wants to input text, the user continues to press and enter The text "Where", when you continue to press the duration of the text "Where” to be a preset duration, the electronic device will enter the text into the cursor "
  • the operation is an operation of clicking the text to be input
  • determining that the input position corresponding to the operation is the N+1 from left to right in the input text.
  • the N+1th position from the left to the right of the input text is the rightmost position of the input text;
  • the click operation is similar to the click operation in the prior art, and details are not described herein again.
  • the input location of "Where” is the N+1th position from left to right in the text "Tomorrow to eat", then insert "Where to go” and get "Where to eat tomorrow.”
  • the operation is an operation of double-clicking the text to be input
  • determining that the input position corresponding to the operation is the first position from left to right in the input text
  • Place The first position from left to right in the input text is the leftmost position of the input text
  • the double-click operation is similar to the click operation in the prior art, and will not be described here.
  • the input location of "Where” is the first position from left to right in the text "Tomorrow to eat", and then "Where to go” is to get "Where to eat tomorrow.”
  • the text input method provided in this embodiment obtains N sets of words by acquiring an operation of the user to input the text, and performing word segmentation on the input text, and determines N+1 to be input according to the N sets of words. Position, and then, according to the obtained operation, determining an input position of the text to be input in the N+1 to-be-entered positions, and inserting the text to be input at the input position; thereby enabling the use of the input position of the text to be input to be accurately adjusted, thereby improving The efficiency of text input and the flexibility of the text input process.
  • the electronic device of this embodiment may include: an obtaining unit 11, a processing unit 12, a display unit 13, a determining unit 14, and an inserting unit 15, wherein
  • the obtaining unit 11 is configured to obtain a character input by the user, and the processing unit 12 is configured to parse the character to generate at least one set of candidate characters corresponding to the character, and the display unit 13 is configured to display the character corresponding to At least one set of candidate characters;
  • the obtaining unit 11 is further configured to acquire an operation of the user to input a text, wherein the to-be-entered text is any one of the at least one set of candidate characters; 14.
  • the method is configured to determine, according to the obtained operation, an input position of the to-be-entered text corresponding to the operation in the input text, and an insertion unit 15 configured to insert the to-be-entered text at the input position.
  • the processing unit 12 is further configured to: after the determining unit 14 determines, according to the acquired operation, that the input text corresponding to the operation is input before the input position in the input text, Performing word segmentation processing to obtain N sets of words, wherein N is an integer greater than or equal to 1; and determining N+1 to-be-entered positions of the to-be-entered text according to the N sets of words, wherein each two sets of words The position between the two is a position to be input, the leftmost end of the input text is a position to be input, and the rightmost end of the input text is a position to be input;
  • the determining unit 14 is specifically configured to determine, according to the obtained operation, an input position corresponding to the operation in the N+1 to-be-entered positions.
  • the determining unit 14 is configured to: if it is determined that the operation is an operation of pressing the text to be input, and the duration of the operation of pressing the text to be input is M preset durations, determining The input position corresponding to the operation is the N+1th to Mth positions from left to right in the input text; and the M is an integer greater than or equal to 1.
  • the determining unit 14 is specifically configured to: if the operation is determined to be an operation of clicking the text to be input, determining that the input position corresponding to the operation is from left to right in the input text. The N+1th position.
  • the determining unit 14 is configured to: if it is determined that the operation is double-clicking the operation of the text to be input, determining that the input position corresponding to the operation is the left to right of the input text. 1 location.
  • the electronic device of this embodiment may be used to implement the technical solutions of the foregoing method embodiments of the present invention, and the implementation principles and technical effects thereof are similar, and details are not described herein again.
  • the electronic device may be a handheld computer system, such as a smart phone, a tablet personal computer, a personal digital assistant (PDA), and a mobile internet device (Mobile). Internet Device (MID) or Wearable Device.
  • PDA personal digital assistant
  • MID mobile internet device
  • FIG. 4 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than those illustrated, or combine some components, or Different parts are arranged. The specific components of the electronic device will be specifically described below with reference to FIG. 4:
  • the input device 22 is used to implement user interaction with the electronic device and/or information input into the electronic device.
  • input device 22 can receive numeric or character information input by a user to generate a signal input related to user settings or function controls.
  • the input device 22 may be a touch panel, or may be other human-computer interaction interfaces, such as physical input keys, microphones, etc., and may be other external information acquisition devices, such as a camera.
  • a touch panel also known as a touch screen or touch screen, collects operational actions that the user touches or approaches on.
  • the user uses an action of any suitable object or accessory such as a finger or a stylus on or near the touch panel, and drives the corresponding connecting device according to a preset program.
  • the touch panel may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects a touch operation of the user, converts the detected touch operation into an electrical signal, and transmits the electrical signal to the touch controller;
  • the touch controller receives the electrical signal from the touch detection device, It is converted into contact coordinates and sent to the processor 23.
  • the touch controller can also receive commands from the processor 23 and execute them.
  • touch panels can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the physical input keys employed by input device 22 may include However, it is not limited to one or more of a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, a joystick, and the like.
  • An input device in the form of a microphone can collect the voice input by the user or the environment and convert it into a command executable by the processor 23 in the form of an electrical signal.
  • the input device 22 may also be various types of sensor devices, such as Hall devices, for detecting physical quantities of electronic devices, such as force, moment, pressure, stress, position, displacement, speed, Acceleration, angle, angular velocity, number of revolutions, speed, and time when the operating state changes, etc., are converted into electricity for detection and control.
  • sensor components may also include gravity sensors, three-axis accelerometers, gyroscopes, and the like.
  • Output device 24 includes, but is not limited to, an image output device and a sound output device.
  • the image output device is used to output text, pictures, and/or video.
  • the image output device may include a display panel, such as a liquid crystal display (LCD), an organic light-emitting diode (OLED), or a field emission display (FED).
  • the display panel is configured in a form such as .
  • the image output device may comprise a reflective display, such as an electrophoretic display, or a display utilizing an Interferometric Modulation of Light.
  • the image output device can include a single display or multiple displays of different sizes.
  • the touch panel used by the input device 22 can also serve as a display panel of the output device.
  • the touch panel detects a touch or proximity gesture thereon, it is transmitted to the processor 23 to determine the type of touch event, and then the processor 23 provides a corresponding visual output on the display panel depending on the type of touch event.
  • the input device 22 and the output device 24 function as two independent components to implement the input and output functions of the electronic device, but the touch panel and the display panel may be integrated to realize the input and output functions of the electronic device.
  • the image output device may display various graphical user interfaces (GUIs) as virtual control components, including but not limited to windows, scroll axes, icons, and scrapbooks, for the user to touch. Control mode to operate.
  • GUIs graphical user interfaces
  • the processor 23 is a control center of the electronic device that connects various parts of the entire computer using various interfaces and lines, by running or executing software programs and/or application units stored in the memory, and recalling data stored in the memory 21, Perform site-wide monitoring of the site's various functions and processing data.
  • the electronic device may include: a memory 21, an input device 22, a processor 23, and an output device 24, wherein the memory 21 is configured to store program code for executing a text input method, and store
  • the device 21 may include a non-volatile memory.
  • the input device 22 can be a touch screen, and the output device 24 can also be a touch screen.
  • the processor 23 can be a central processing unit (CPU) or an application specific integrated circuit (ASIC). Or one or more integrated circuits configured to implement embodiments of the present invention.
  • the input device 22, the processor 23, and the output device 24 are used to call program code stored in the memory 21 for performing the following operations:
  • the input device 22 is configured to acquire characters input by the user
  • the processor 23 is configured to parse the character to generate at least one set of candidate characters corresponding to the character;
  • An output device 24 configured to display at least one set of candidate characters corresponding to the character
  • the processor 23 is further configured to acquire an operation of the user to input text, where the to-be-entered text is any one of the at least one set of candidate characters; and determine the operation according to the obtained operation. Corresponding input position of the to-be-entered text in the input text; inserting the to-be-entered text at the input position.
  • the processor 23 is further configured to perform word segmentation processing on the input text before determining, according to the obtained operation, the input text corresponding to the operation in an input position in the input text.
  • the processor 23 is configured to determine, according to the obtained operation, that the N+1 is determined according to the obtained operation, according to the obtained operation, determining the input position of the to-be-entered text corresponding to the operation in the input text. The input position corresponding to the operation in the input position.
  • the processor 23 determines, according to the obtained operation, the input location corresponding to the operation in the N+1 to-be-entered positions, specifically: If the operation is the operation of pressing the text to be input, and the duration of the operation of pressing the text to be input is M preset durations, determining that the input position corresponding to the operation is in the input text N+1-M positions from left to right; the M is an integer greater than or equal to 1.
  • the processor 23 determines an input position corresponding to the operation in the N+1 to-be-entered positions, specifically, if: For When the operation of the character to be input is clicked, it is determined that the input position corresponding to the operation is the N+1th position from left to right in the input text.
  • the processor 23 determines an input position corresponding to the operation in the N+1 to-be-entered positions, specifically, if: In order to double-click the operation of the character to be input, it is determined that the input position corresponding to the operation is the first position from left to right in the input text.
  • the technical solution that the input device 22, the processor 23, and the output device 24 are specifically implemented by calling the program code stored in the memory 21 can refer to the text input method provided by the foregoing embodiment of the present invention, and the implementation principle and technical effect are similar.
  • the technical solution that the input device 22, the processor 23, and the output device 24 are specifically implemented by calling the program code stored in the memory 21 can refer to the text input method provided by the foregoing embodiment of the present invention, and the implementation principle and technical effect are similar.
  • the technical solution that the input device 22, the processor 23, and the output device 24 are specifically implemented by calling the program code stored in the memory 21 can refer to the text input method provided by the foregoing embodiment of the present invention, and the implementation principle and technical effect are similar.
  • the technical solution that the input device 22, the processor 23, and the output device 24 are specifically implemented by calling the program code stored in the memory 21 can refer to the text input method provided by the foregoing embodiment of the present invention, and the implementation principle and technical effect are similar.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the steps of the foregoing method embodiments are performed; and the foregoing storage medium includes: read-only memory (English: Read-Only Memory, ROM for short), random access memory (English: Random Access Memory, Abbreviation: RAM), disk or CD-ROM, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • CD-ROM Compact Disc-ROM

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种文字输入方法和电子设备,此方法包括:获取使用者输入的字符(S101);对所述字符进行解析,生成并显示所述字符对应的至少一组候选文字(S102);获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字(S103);根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置(S104);在所述输入位置插入所述待输入文字(S105);从而使得使用可以准确地调整待输入文字的输入位置,提高了文字输入效率及文字输入过程的灵活性。

Description

文字输入方法和电子设备
本申请要求于2015年09月25日提交中国专利局、申请号为201510623225.7、名称为“文字输入方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及通信技术领域,尤其涉及一种文字输入方法和电子设备。
背景技术
伴随着智能手机的普及,文字输入法作为用户与手机交互的重要途径,用户使用的频率和时长也随之增长;目前的文字输入法都是基于从左往右依次线性输入字符的方式,以拼音文字输入法为例,用户依次输入英文字符“shurufa”,文字输入法接收字符流,并从左到右依照顺序解析“shu`ru`fa”,并生成候选词列表“输入法,输入,数去,......”,用户选择候选词“输入法”,候选词“输入法”填入控件文本框的右端,从而完成文字的输入过程。
但是,当用户想要在文本框中已输入的文字中间插入有些文字时,用户需要将光标的位置手动调整至待插入的位置,而手动调整有些会出错,使得用户多次调整才能将光标位置调整至合适的位置,降低了文字输入效率及文字输入过程的灵活性。
发明内容
本发明实施例提供一种文字输入方法和电子设备,用于提高文字输入效率及文字输入过程的灵活性。
第一方面,本发明实施例提供一种文字输入方法,包括:
获取使用者输入的字符;
对所述字符进行解析,生成并显示所述字符对应的至少一组候选文字;
获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;
根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;
在所述输入位置插入所述待输入文字。
在第一方面的第一种可能的实现方式中,所述根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,还包括:
对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;
根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
所述根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置,包括:
根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
若所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
结合第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
若所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
若所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置。
第二方面,本发明实施例提供一种电子设备,包括:
获取单元,用于获取使用者输入的字符;
处理单元,用于对所述字符进行解析,获得所述字符对应的至少一组候选文字;
显示单元,用于对显示所述字符对应的至少一组候选文字;
所述获取单元,还用于获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;
确定单元,用于根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;
插入单元,用于在所述输入位置插入所述待输入文字。
在第二方面的第一种可能的实现方式中,所述处理单元,还用于在所述确定单元根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
所述确定单元,具体用于根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述确定单元,具体用于若确定所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
结合第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述确定单元,具体用于若确定所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
结合第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述确定单元,具体用于若确定所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位 置。
本实施例提供的文字输入方法和电子设备,通过电子设备获取使用者对待输入文字的操作,从而确定该操作对应的待输入文字在已输入文字中的输入位置,然后在确定的输入位置处插入该待输入文字;从而使得使用可以准确地调整待输入文字的输入位置,提高了文字输入效率及文字输入过程的灵活性。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明文字输入方法实施例一的流程图;
图2为本发明文字输入方法实施例二的流程图;
图3为本发明电子设备实施例一的结构示意图;
图4为本发明电子设备实施例二的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为本发明文字输入方法实施例一的流程图,如图1所示,本实施例的方法可以包括:
S101、获取使用者输入的字符。
本实施例中,执行主体可以为电子设备,电子设备可以为智能手机、平板电脑等设备;电子设备可以获取使用者输入的字符,该字符例如为“naer”。
S102、对所述字符进行解析,生成并显示所述字符对应的至少一组候选文 字。
本实施例中,电子设备获得使用者输入的字符之后,对获取的字符进行解析,生成这些字符对应的至少一组候选文字,并且显示这些字符对应的至少一组候选文字;字符“naer”对应的至少一组候选文字例如包括“哪儿”、“那儿”、“马儿”、“纳尔”。
S103、获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字。
本实施例中,然后获取使用者对待输入文字的操作,该待输入文字可以为上述至少一组候选文字中的任一组候选文字。
S104、根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置。
本实施例中,电子设备根据获得的对待输入文字的操作,可以确定该操作对应的输入位置,该输入位置即为该待输入文字在已输入文字中的输入位置,本实施例中可以预先设定不同的操作对应不同的输入位置。已输入文字例如为电子设备的显示界面上显示的已填入至控件文本框中的文字。
S105、在所述输入位置插入所述待输入文字。
本实施例中,电子设备在确定上述操作对应的输入位置后,将待输入文字插入至该输入位置,从而完成了文字的输入过程。
本实施例提供的文字输入方法,通过获取使用者对待输入文字的操作,从而确定该操作对应的待输入文字在已输入文字中的输入位置,然后在确定的输入位置处插入该待输入文字;从而使得使用可以准确地调整待输入文字的输入位置,提高了文字输入效率及文字输入过程的灵活性。
图2为本发明文字输入方法实施例二的流程图,如图2所示,本实施例的方法可以包括:
S201、获取使用者输入的字符。
S202、对所述字符进行解析,生成并显示所述字符对应的至少一组候选文字。
S203、获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字。
本实施例中,S201-S203的具体实现过程可以参见本发明方法实施例一中 的相关描述,此处不再赘述。
S204、对已输入文字进行分词处理,获得N组词,N为大于或等于1的整数。
本实施例中,电子设备可以对已输入文字进行分词处理,获得N组词,N为大于或等于1的整数,需要说明的是,分词处理的过程与现有技术类似,此处不再赘述。
例如:已输入文字为“明天去吃饭”,对已输入文字“明天去吃饭”进行分词处理,可以获得三组词,分别为“明天”“去”“吃饭”。
S205、根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置。
本实施例中,电子设备可以根据分词处理后获得的N组词,确定待输入文字的待输入位置有N+1个,其中,每两组词之间的位置为一个待输入位置,已输入文字的最左端为一个待输入位置,已输入文字的最右端为一个待输入位置。另外,需要说明的是,S203与S204-S205的执行顺序不分先后。
例如:已输入文字“明天去吃饭”的三组词“明天”“去”“吃饭”,可以确定4个待输入位置,分别为“明天”的最左端为一个待输入位置、“明天”与“去”之间为一个待输入位置,“去”与“吃饭”之间为一个待输入位置,“吃饭”的最右端为一个待输入位置。因此,四个待输入位置可以如下例示:“待输入位置”明天“待输入位置”去“待输入位置”吃饭“待输入位置”
S206、根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
S207、在所述输入位置插入所述待输入文字。
本实施例中,电子设备根据获取的使用者对待输入文字的操作,从这N+1个待输入位置中确定该待输入文字的输入位置,例如待输入文字为“哪儿”,而且电子设备根据使用者对“哪儿”的操作,确定待输入位置为“去”与“吃饭”之间,然后,电子设备在“去”与“吃饭”之间插入“哪儿”。例如最后获得的文字为:明天去哪儿吃饭。
下面对S206的具体实现过程进行举例描述。
在第一种可行的实现方式中,若所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对 应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
具体地,如果使用者对待输入文字的操作为按压操作,而且按压操作的时长为M个预设时长时,则确定待输入文字的输入位置为已输入文字中从左往右的第N+1-M个位置,M为大于或等于1的整数。以已输入文字为“明天去吃饭”为例,如果使用者对输入文字的按压操作为1个预设时长时,则可以确定待输入文字的输入位置为“明天去吃饭”中从左往右的第3个位置,即待输入文字的输入位置为“去”与“吃饭”之间的位置。确定按压操作的时长的过程例如可以为:电子设备获取的使用者连续按压待输入文字的压力超过预设压力的时长。
可选地,一种实现方案为:电子设备显示如下候选文字:哪儿那儿马儿纳尔,使用者需要输入文字为“哪儿”,则使用者按压待输入文字“哪儿”,当按压待输入文字“哪儿”的时长为一个预设时长时,电子设备会将文字输入光标“|”从“吃饭”的最右端跳转到“去”与“吃饭”之间,即文字输入光标的位置由“明天去吃饭|”变更为“明天去|吃饭”,如果此时文字输入光标到达的位置为使用者想输入文字的输入位置,则使用者不再执行按压“哪儿”的操作,电子设备可以确定“去”与“吃饭”之间的位置为待输入位置;如果此时文字输入光标的位置为“明天去|吃饭”的位置不是使用者想输入文字的输入位置,则使用者继续按压待输入文字“哪儿”,当继续按压待输入文字“哪儿”的时长为个预设时长时,电子设备会将文字输入光标“|”从“去”与“吃饭”之间跳转到“明天”与“去”之间,即文字输入光标的位置由“明天去|吃饭”变更为“明天|去吃饭”,如果此时文字输入光标到达的位置为使用者想输入文字的输入位置,则使用者不再执行按压“哪儿”的操作,电子设备可以确定“明天”与“去”之间的位置为待输入位置。
在第二种可行的实现方式中,若所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置;所述已输入文字中从左往右的第N+1个位置为已输入文字的最右端位置;单击操作与现有技术中的单击操作类似,此处不再赘述。例如:“哪儿”的输入位置为已输入文字“明天去吃饭”中从左往右的第N+1个位置,则插入“哪儿”之后得到“明天去吃饭哪儿”。
在第三种可行的实现方式中,若所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置;所 述已输入文字中从左往右的第1个位置为已输入文字的最左端位置;双击操作与现有技术中的单击操作类似,此处不再赘述。例如:“哪儿”的输入位置为已输入文字“明天去吃饭”中从左往右的第1个位置,则插入“哪儿”之后得到“哪儿明天去吃饭”。
本实施例提供的文字输入方法,通过获取使用者对待输入文字的操作,以及对已输入文字进行分词处理,获得N组词,并根据N组词,确定待输入文字的N+1个待输入位置,然后根据获取的所述操作,确定在N+1个待输入位置中待输入文字的输入位置,在输入位置插入待输入文字;从而使得使用可以准确地调整待输入文字的输入位置,提高了文字输入效率及文字输入过程的灵活性。
图3为本发明电子装置实施例一的结构示意图,如图3所示,本实施例的电子装置可以包括:获取单元11、处理单元12、显示单元13、确定单元14和插入单元15,其中,获取单元11,用于获取使用者输入的字符;处理单元12,用于对所述字符进行解析,生成所述字符对应的至少一组候选文字;显示单元13,用于显示所述字符对应的至少一组候选文字;所述获取单元11,还用于获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;确定单元14,用于根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;插入单元15,用于在所述输入位置插入所述待输入文字。
可选地,处理单元12,还用于在所述确定单元14根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;以及根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
确定单元14,具体用于根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
可选地,所述确定单元14,具体用于若确定所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
可选地,所述确定单元14,具体用于若确定所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
可选地,所述确定单元14,具体用于若确定所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置。
本实施例的电子装置,可以用于执行本发明上述各方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
图4为本发明电子设备实施例二的结构示意图。本发明实施例中,所述电子设备可以是一种手持形式的计算机系统,如智能手机、平板电脑(Tablet Personal Computer)、个人数字助理(personal digital assistant,简称:PDA)、移动上网装置(Mobile Internet Device,简称:MID)或可穿戴式设备(Wearable Device)等。本领域的技术人员可以理解,图4中示出的电子设备的结构不构成对电子设备的限定,所述电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。下面结合图4对电子设备的各个构成部件进行具体的介绍:
输入设备22用于实现使用者与电子设备的交互和/或信息输入到电子设备中。例如,输入设备22可以接收使用者输入的数字或字符信息,以产生与使用者设置或功能控制有关的信号输入。在本发明具体实施方式中,输入设备22可以是触控面板,也可以是其他人机交互界面,例如实体输入键、麦克风等,还可是其他外部信息获取装置,例如摄像头等。触控面板,也称为触摸屏或触控屏,可收集用户在其上触摸或接近的操作动作。比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或接近触控面板的位置的操作动作,并根据预先设定的程式驱动相应的连接装置。可选的,触控面板可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测使用者的触摸操作,并将检测到的触摸操作转换为电信号,以及将所述电信号传送给触摸控制器;触摸控制器从触摸检测装置上接收所述电信号,并将它转换成触点坐标,再送给处理器23。所述触摸控制器还可以接收处理器23发来的命令并执行。此外,可以采用电阻式、电容式、红外线(Infrared)以及表面声波等多种类型实现触控面板。在本发明的其他实施方式中,输入设备22所采用的实体输入键可以包括 但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。麦克风形式的输入设备可以收集用户或环境输入的语音并将其转换成电信号形式的、处理器23可执行的命令。在本发明一些实施方式中,所述输入设备22还可以是各类传感器件,例如霍尔器件,用于侦测电子设备的物理量,例如力、力矩、压力、应力、位置、位移、速度、加速度、角度、角速度、转数、转速以及工作状态发生变化的时间等,转变成电量来进行检测和控制。其他的一些传感器件还可以包括重力感应计、三轴加速计、陀螺仪等。
输出设备24包括但不限于影像输出设备和声音输出设备。影像输出设备用于输出文字、图片和/或视频。所述影像输出设备可包括显示面板,例如采用液晶显示器(Liquid Crystal Display,简称:LCD)、有机发光二极管(Organic Light-Emitting Diode,简称:OLED)、场发射显示器(field emission display,简称:FED)等形式来配置的显示面板。或者所述影像输出设备可以包括反射式显示器,例如电泳式(electrophoretic)显示器,或利用光干涉调变技术(Interferometric Modulation of Light)的显示器。所述影像输出设备可以包括单个显示器或不同尺寸的多个显示器。在本发明的具体实施方式中,输入设备22所采用的触控面板亦可同时作为输出设备的显示面板。例如,当触控面板检测到在其上的触摸或接近的手势后,传送给处理器23以确定触摸事件的类型,随后处理器23根据触摸事件的类型在显示面板上提供相应的视觉输出。输入设备22与输出设备24是作为两个独立的部件来实现电子设备的输入和输出功能,但也可以将触控面板与显示面板集成一体而实现电子设备的输入和输出功能。例如,所述影像输出设备可以显示各种图形化用户接口(Graphical User Interface,简称:GUI)以作为虚拟控制组件,包括但不限于窗口、卷动轴、图标及剪贴簿,以供用户通过触控方式进行操作。
处理器23是电子设备的控制中心,利用各种接口和线路连接整个计算机的各个部分,通过运行或执行存储在存储器内的软件程序和/或应用单元,以及调用存储在存储器21内的数据,执行站点的各种功能和处理数据,从而对站点进行整体监控。
如图4所示,所述电子设备可以包括:存储器21、输入设备22、处理器23和输出设备24,其中,存储器21用于存储执行文字输入方法的程序代码,存储 器21可以包括非易失性存储器(Non-volatile Memory)。输入设备22可以为触摸屏,输出设备24也可以为触摸屏,处理器23可以是一个中央处理器(Central Processing Unit,简称:CPU),或者是特定集成电路(Application Specific Integrated Circuit,简称:ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。输入设备22、处理器23和输出设备24用于调用存储器21中存储的程序代码,用于执行如下操作:
输入设备22,用于获取使用者输入的字符;
处理器23,用于对所述字符进行解析,生成所述字符对应的至少一组候选文字;
输出设备24,用于显示所述字符对应的至少一组候选文字;
处理器23,还用于获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;在所述输入位置插入所述待输入文字。
可选地,处理器23,还用于在根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
处理器23在根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置时,具体用于:根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
可选地,在第一种可行的实现方式中,处理器23在根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置时,具体用于:若所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
在第二种可行的实现方式中,处理器23在根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置时,具体用于:若所述操作为 单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
在第三种可行的实现方式中,处理器23在根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置时,具体用于:若所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置。
需要说明的是,输入设备22、处理器23和输出设备24通过调用存储器21中存储的程序代码具体实现的技术方案可以参见上述本发明实施例提供的文字输入方法,其实现原理和技术效果类似,详细可以参见上述各实施例中的相关记载,在此不再赘述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:只读内存(英文:Read-Only Memory,简称:ROM)、随机存取存储器(英文:Random Access Memory,简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (10)

  1. 一种文字输入方法,其特征在于,包括:
    获取使用者输入的字符;
    对所述字符进行解析,生成并显示所述字符对应的至少一组候选文字;
    获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;
    根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;
    在所述输入位置插入所述待输入文字。
  2. 根据权利要求1所述的方法,其特征在于,所述根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,还包括:
    对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;
    根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
    所述根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置,包括:根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
  3. 根据权利要求2所述的方法,其特征在于,所述根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
    若所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
  4. 根据权利要求2所述的方法,其特征在于,所述根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
    若所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
  5. 根据权利要求2所述的方法,其特征在于,所述根据获取的所述操作, 确定在所述N+1个待输入位置中所述操作对应的输入位置,包括:
    若所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置。
  6. 一种电子设备,其特征在于,包括:
    获取单元,用于获取使用者输入的字符;
    处理单元,用于对所述字符进行解析,获得所述字符对应的至少一组候选文字;
    显示单元,用于对显示所述字符对应的至少一组候选文字;
    所述获取单元,还用于获取所述使用者对待输入文字的操作,所述待输入文字为所述至少一组候选文字中的任一组候选文字;
    确定单元,用于根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置;
    插入单元,用于在所述输入位置插入所述待输入文字。
  7. 根据权利要求6所述的电子设备,其特征在于,所述处理单元,还用于在所述确定单元根据获取的所述操作,确定所述操作对应的所述待输入文字在已输入文字中的输入位置之前,对所述已输入文字进行分词处理,获得N组词,所述N为大于或等于1的整数;根据所述N组词,确定所述待输入文字的N+1个待输入位置,其中,每两组词之间的位置为一个待输入位置,所述已输入文字的最左端为一个待输入位置,所述已输入文字的最右端为一个待输入位置;
    所述确定单元,具体用于根据获取的所述操作,确定在所述N+1个待输入位置中所述操作对应的输入位置。
  8. 根据权利要求7所述的电子设备,其特征在于,所述确定单元,具体用于若确定所述操作为按压所述待输入文字的操作,且所述按压所述待输入文字的操作的时长为M个预设时长,则确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1-M个位置;所述M为大于或等于1的整数。
  9. 根据权利要求7所述的电子设备,其特征在于,所述确定单元,具体用于若确定所述操作为单击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第N+1个位置。
  10. 根据权利要求7所述的电子设备,其特征在于,所述确定单元,具 体用于若确定所述操作为双击所述待输入文字的操作时,确定所述操作对应的输入位置为所述已输入文字中从左往右的第1个位置。
PCT/CN2016/099879 2015-09-25 2016-09-23 文字输入方法和电子设备 WO2017050274A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/762,930 US20180285336A1 (en) 2015-09-25 2016-09-23 Text Input Method, And Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510623225.7 2015-09-25
CN201510623225.7A CN106557175B (zh) 2015-09-25 2015-09-25 文字输入方法和电子设备

Publications (1)

Publication Number Publication Date
WO2017050274A1 true WO2017050274A1 (zh) 2017-03-30

Family

ID=58385636

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/099879 WO2017050274A1 (zh) 2015-09-25 2016-09-23 文字输入方法和电子设备

Country Status (3)

Country Link
US (1) US20180285336A1 (zh)
CN (1) CN106557175B (zh)
WO (1) WO2017050274A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376033A (zh) * 2017-09-08 2018-08-07 淄博职业学院 一种运用于英语输入法中的英语字符串输入方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268166B (zh) * 2014-09-09 2017-04-19 北京搜狗科技发展有限公司 一种输入方法、装置和电子设备
CN109933217B (zh) * 2019-03-12 2020-05-01 北京字节跳动网络技术有限公司 用于推送语句的方法和装置
CN116088692B (zh) * 2021-11-03 2024-04-19 百度国际科技(深圳)有限公司 用于呈现候选字符串和训练判别式模型的方法和装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231597B1 (en) * 2002-10-07 2007-06-12 Microsoft Corporation Method, apparatus, and computer-readable medium for creating asides within an electronic document
CN101887346A (zh) * 2010-06-22 2010-11-17 宇龙计算机通信科技(深圳)有限公司 一种信息输入控制方法、装置及通信终端
CN102681764A (zh) * 2012-01-14 2012-09-19 广东欧珀移动通信有限公司 一种触摸屏文字输入交互方法
CN104375756A (zh) * 2013-08-16 2015-02-25 北京三星通信技术研究有限公司 触控操作的方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110219323A1 (en) * 2010-03-03 2011-09-08 Samsung Electronics Co., Ltd. Mobile device and method for letter input based on cut or copy and paste
CN102799358B (zh) * 2012-06-20 2017-08-08 南京中兴软件有限责任公司 光标显示位置的确定方法及装置
CN104020948B (zh) * 2013-02-28 2017-09-22 联想(北京)有限公司 一种在触摸屏中确定光标位置的方法及装置
US9961239B2 (en) * 2015-06-07 2018-05-01 Apple Inc. Touch accommodation options

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231597B1 (en) * 2002-10-07 2007-06-12 Microsoft Corporation Method, apparatus, and computer-readable medium for creating asides within an electronic document
CN101887346A (zh) * 2010-06-22 2010-11-17 宇龙计算机通信科技(深圳)有限公司 一种信息输入控制方法、装置及通信终端
CN102681764A (zh) * 2012-01-14 2012-09-19 广东欧珀移动通信有限公司 一种触摸屏文字输入交互方法
CN104375756A (zh) * 2013-08-16 2015-02-25 北京三星通信技术研究有限公司 触控操作的方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108376033A (zh) * 2017-09-08 2018-08-07 淄博职业学院 一种运用于英语输入法中的英语字符串输入方法

Also Published As

Publication number Publication date
US20180285336A1 (en) 2018-10-04
CN106557175A (zh) 2017-04-05
CN106557175B (zh) 2019-02-05

Similar Documents

Publication Publication Date Title
US10120469B2 (en) Vibration sensing system and method for categorizing portable device context and modifying device operation
US20200218486A1 (en) Devices, Methods, and Graphical User Interfaces for Wireless Pairing with Peripheral Devices and Displaying Status Information Concerning the Peripheral Devices
US11893235B2 (en) Application display method and terminal
AU2014201588B2 (en) Object control method and apparatus of user device
JP5759660B2 (ja) タッチ・スクリーンを備える携帯式情報端末および入力方法
US9880697B2 (en) Remote multi-touch control
US9459704B2 (en) Method and apparatus for providing one-handed user interface in mobile device having touch screen
US10628025B2 (en) Device, method, and graphical user interface for generating haptic feedback for user interface elements
WO2017050274A1 (zh) 文字输入方法和电子设备
US10353550B2 (en) Device, method, and graphical user interface for media playback in an accessibility mode
JP2009266236A (ja) デバイス上の言語入力インターフェース
WO2015085868A1 (zh) 一种电子设备的用户界面的处理方法及电子设备
US20170357568A1 (en) Device, Method, and Graphical User Interface for Debugging Accessibility Information of an Application
US20120274573A1 (en) Korean input method and apparatus using touch screen, and portable terminal including key input apparatus
WO2018112803A1 (zh) 触摸屏手势识别的方法及装置
US20190265833A1 (en) Dynamic space bar
JP2019101739A (ja) 情報処理装置、情報処理システムおよびプログラム
TW201109996A (en) Method for operating a touch screen, method for defining a touch gesture on the touch screen, and electronic device thereof

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 15762930

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16848155

Country of ref document: EP

Kind code of ref document: A1