CN118838532A - Handwriting input method and electronic equipment - Google Patents
Handwriting input method and electronic equipment Download PDFInfo
- Publication number
- CN118838532A CN118838532A CN202310469600.1A CN202310469600A CN118838532A CN 118838532 A CN118838532 A CN 118838532A CN 202310469600 A CN202310469600 A CN 202310469600A CN 118838532 A CN118838532 A CN 118838532A
- Authority
- CN
- China
- Prior art keywords
- electronic device
- control
- touch
- touch track
- input
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction 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
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及终端技术领域,尤其涉及一种手写输入方法及电子设备。The present application relates to the field of terminal technology, and in particular to a handwriting input method and an electronic device.
背景技术Background Art
输入法应用(input method application,IMA),也可称为输入法引擎(inputmethod engine,IME),或输入法编辑器(input method editor,IME),是用于在如手机等电子设备中实现如字词,标点符号,数字等字符串输入的软件。An input method application (IMA), also known as an input method engine (IME) or an input method editor (IME), is software used to implement string input such as words, punctuation marks, numbers, etc. in electronic devices such as mobile phones.
输入法应用大多具备手写输入功能。在输入法应用启动手写输入功能的情况下,用户可以通过点击电子设备显示的输入控件,唤起用于接收用户手写输入内容的手写板。用户在手写板上可以进行字符串的书写,电子设备可以识别用户的书写内容并显示多个候选内容。用户可以选择对应的候选内容作为向电子设备输入的内容。Most input method applications have a handwriting input function. When the input method application activates the handwriting input function, the user can click the input control displayed by the electronic device to call up a handwriting board for receiving the user's handwriting input content. The user can write a string of characters on the handwriting board, and the electronic device can recognize the user's writing content and display multiple candidate contents. The user can select the corresponding candidate content as the content to be input to the electronic device.
但是,上述方式需要用户与电子设备进行多次交互,输入效率低。However, the above method requires the user to interact with the electronic device multiple times, and the input efficiency is low.
发明内容Summary of the invention
本申请实施例提供一种手写输入方法及电子设备,能够在用户对电子设备进行手写输入的过程中,减少用户与电子设备的交互,提升输入效率。The embodiments of the present application provide a handwriting input method and an electronic device, which can reduce the interaction between the user and the electronic device and improve the input efficiency during the process of the user performing handwriting input on the electronic device.
为达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solution:
第一方面,本申请实施例提供了一种手写输入方法,应用于电子设备。该方法包括:In a first aspect, an embodiment of the present application provides a handwriting input method, which is applied to an electronic device. The method comprises:
接收基于第一界面输入的第一触摸操作。响应于第一触摸操作,电子设备显示的界面由第一界面切换为第二界面。若电子设备请求调用输入法服务,在第二界面显示第一触摸操作对应的第一触摸轨迹。A first touch operation based on the first interface input is received. In response to the first touch operation, the interface displayed by the electronic device is switched from the first interface to the second interface. If the electronic device requests to call the input method service, a first touch track corresponding to the first touch operation is displayed on the second interface.
在本申请的方法中,用户可以在第一界面向电子设备输入第一触摸操作,以在电子设备上进行书写。电子设备响应于第一触摸操作,可以将显示的界面切换至第二界面。并且,若电子设备请求调用输入法服务,电子设备可以在第二界面显示第一触摸操作对应的第一触摸轨迹,从而使用户无需在第二界面重复输入第一触摸操作,而是可以在电子设备显示的第一触摸轨迹的基础上,继续向电子设备输入新的触摸操作,以在电子设备上进行书写。能够减少用户与电子设备交互的次数,提高输入效率。In the method of the present application, a user can input a first touch operation to an electronic device on a first interface to write on the electronic device. In response to the first touch operation, the electronic device can switch the displayed interface to a second interface. Furthermore, if the electronic device requests to call an input method service, the electronic device can display a first touch track corresponding to the first touch operation on the second interface, so that the user does not need to repeatedly input the first touch operation on the second interface, but can continue to input new touch operations to the electronic device based on the first touch track displayed by the electronic device to write on the electronic device. It can reduce the number of times a user interacts with an electronic device and improve input efficiency.
结合第一方面,在一种可能的设计中,第一界面包括第一控件,第二界面包括第二控件,第二控件与第一控件相关联。接收针对第一控件输入的第一触摸操作,在第二控件中显示第一触摸轨迹。其中,第一控件与第二控件相关联是指电子设备若确定第一控件为焦点控件,则可以将显示的界面由第一界面切换为第二界面,并将第二控件代替第一控件成为新的焦点控件。In combination with the first aspect, in a possible design, the first interface includes a first control, the second interface includes a second control, and the second control is associated with the first control. A first touch operation input to the first control is received, and the first touch track is displayed in the second control. The association of the first control with the second control means that if the electronic device determines that the first control is the focus control, the displayed interface can be switched from the first interface to the second interface, and the second control replaces the first control as the new focus control.
在该方案中,电子设备接收到用户在第一界面中输入的针对第一控件的第一触摸操作后,可以将显示的界面切换至第二界面,并将第二控件确定为焦点控件。并且,若电子设备请求调用输入法服务,则可以在第二界面中显示第一触摸操作对应的第一触摸轨迹。用户可以在第二控件显示第一触摸轨迹的基础上,继续向电子设备输入针对第二控件的新的触摸操作,以在电子设备上进行书写。能够减少用户与电子设备交互的次数,提高输入效率。In this solution, after the electronic device receives the first touch operation input by the user for the first control in the first interface, the displayed interface can be switched to the second interface, and the second control can be determined as the focus control. In addition, if the electronic device requests to call the input method service, the first touch track corresponding to the first touch operation can be displayed in the second interface. The user can continue to input new touch operations for the second control to the electronic device on the basis of the first touch track displayed in the second control to write on the electronic device. It can reduce the number of times the user interacts with the electronic device and improve input efficiency.
结合第一方面,在一种可能的设计中,在第二控件中显示第一触摸轨迹之后,预测第一触摸轨迹对应的至少一个字符。在第二控件中显示第一目标字符。其中,第一触摸轨迹对应的至少一个字符包括第一目标字符。In combination with the first aspect, in a possible design, after the first touch track is displayed in the second control, at least one character corresponding to the first touch track is predicted, and a first target character is displayed in the second control, wherein the at least one character corresponding to the first touch track includes the first target character.
在该方案中,电子设备可以基于用户输入的第一触摸操作对应的第一触摸轨迹,预测用户期望向电子设备输入的至少一个字符,并在至少一个字符中确定第一目标字符,以将第一目标字符填入第二控件。In this scheme, the electronic device can predict at least one character that the user expects to input into the electronic device based on the first touch trajectory corresponding to the first touch operation input by the user, and determine a first target character among the at least one character to fill the first target character into the second control.
结合第一方面,在一种可能的设计中,第一目标字符是与第一触摸轨迹的匹配度最高的字符。In combination with the first aspect, in a possible design, the first target character is a character with the highest matching degree with the first touch track.
在该方案中,电子设备预测得到第一触摸轨迹对应的至少一个字符后,可以在至少一个字符中确定第一目标字符,并将第一目标字符填入第二控件。能够减少用户与电子设备的交互。In this solution, after the electronic device predicts at least one character corresponding to the first touch track, it can determine a first target character from the at least one character and fill the first target character into the second control, thereby reducing the interaction between the user and the electronic device.
结合第一方面,在一种可能的设计中,第二界面中还包括展示框,预测第一触摸轨迹对应的至少一个字符之后,在展示框中显示第一触摸轨迹对应的至少一个字符。之后,检测到对第一目标字符的选中操作,在第二控件中显示第一目标字符。In combination with the first aspect, in a possible design, the second interface further includes a display box, and after predicting at least one character corresponding to the first touch track, at least one character corresponding to the first touch track is displayed in the display box. Afterwards, a selection operation on the first target character is detected, and the first target character is displayed in the second control.
在该方案中,电子设备预测得到第一触摸轨迹对应的至少一个字符后,可以在展示框中展示预测得到的至少一个字符,以供用户选择。用户可以在展示框中选择期望填入第二控件的第一目标字符。In this solution, after the electronic device predicts at least one character corresponding to the first touch track, the electronic device may display the predicted at least one character in a display box for the user to select. The user may select the first target character that is desired to be filled in the second control in the display box.
结合第一方面,在一种可能的设计中,在第二控件中显示第一触摸轨迹之后,接收基于第二界面输入的第二触摸操作。在第二触摸操作是针对第二控件的触摸操作的情况下,响应于第二触摸操作,在第二控件中显示第二触摸操作对应的第二触摸轨迹。In combination with the first aspect, in one possible design, after the first touch track is displayed in the second control, a second touch operation based on the second interface input is received. When the second touch operation is a touch operation for the second control, in response to the second touch operation, a second touch track corresponding to the second touch operation is displayed in the second control.
在该方案中,第二控件显示第一触摸轨迹之后,用户还可以继续向电子设备输入针对第二控件的第二触摸操作,以进行之后的书写。电子设备响应于第二触摸操作,可以继续在第二控件中显示第二触摸操作对应的第二触摸轨迹。In this solution, after the second control displays the first touch track, the user can continue to input a second touch operation for the second control to the electronic device to perform subsequent writing. In response to the second touch operation, the electronic device can continue to display the second touch track corresponding to the second touch operation in the second control.
结合第一方面,在一种可能的设计中,响应于第二触摸操作,在第二控件中显示第二触摸操作对应的第二触摸轨迹之后,预测第一触摸轨迹和第二触摸轨迹对应的至少一个字符。在第二控件中显示第二目标字符。其中,第一触摸轨迹和第二触摸轨迹对应的至少一个字符包括第二目标字符。In combination with the first aspect, in a possible design, in response to the second touch operation, after displaying the second touch track corresponding to the second touch operation in the second control, predicting at least one character corresponding to the first touch track and the second touch track. Displaying the second target character in the second control. The at least one character corresponding to the first touch track and the second touch track includes the second target character.
在该方案中,电子设备可以基于第一触摸轨迹和第二触摸轨迹,预测用户期望向电子设备输入的至少一个字符,并在至少一个字符中确定第二目标字符,以将第二目标字符填入第二控件。In this solution, the electronic device can predict at least one character that the user wants to input to the electronic device based on the first touch track and the second touch track, and determine a second target character from the at least one character to fill the second target character into the second control.
结合第一方面,在一种可能的设计中,第二目标字符是与第一触摸轨迹和第二触摸轨迹的匹配度最高的字符In combination with the first aspect, in a possible design, the second target character is a character with the highest matching degree with the first touch track and the second touch track.
在该方案中,电子设备预测得到第一触摸轨迹和第二触摸轨迹对应的至少一个字符后,可以在至少一个字符中确定第二目标字符,并将第二目标字符填入第二控件。能够减少用户与电子设备的交互。In this solution, after the electronic device predicts at least one character corresponding to the first touch track and the second touch track, it can determine the second target character in the at least one character and fill the second target character into the second control, thereby reducing the interaction between the user and the electronic device.
结合第一方面,在一种可能的设计中,第二界面中还包括展示框,预测第一触摸轨迹和第二触摸轨迹对应的至少一个字符之后,在展示框中显示至少一个字符。检测到对第二目标字符的选中操作,在第二控件中显示第二目标字符。In combination with the first aspect, in a possible design, the second interface further includes a display box, and after predicting at least one character corresponding to the first touch track and the second touch track, at least one character is displayed in the display box. When a selection operation on the second target character is detected, the second target character is displayed in the second control.
在该方案中,电子设备预测得到第一触摸轨迹和第二触摸轨迹对应的至少一个字符后,可以在展示框中展示预测得到的至少一个字符,以供用户选择。用户可以在展示框中选择期望填入第二控件的第二目标字符。In this solution, after the electronic device predicts at least one character corresponding to the first touch track and the second touch track, the predicted at least one character can be displayed in a display box for the user to select. The user can select the second target character desired to be filled in the second control in the display box.
结合第一方面,在一种可能的设计中,响应于第一触摸操作,获取第一触摸操作对应的第一触摸轨迹的坐标。基于第一触摸轨迹的坐标,在第二界面显示第一触摸轨迹。In combination with the first aspect, in a possible design, in response to a first touch operation, the coordinates of a first touch track corresponding to the first touch operation are acquired, and based on the coordinates of the first touch track, the first touch track is displayed on the second interface.
在该方案中,电子设备可以基于第一触摸轨迹的坐标,在第二界面显示第一触摸轨迹,从而更为直观的向用户展示第一触摸轨迹。In this solution, the electronic device can display the first touch track on the second interface based on the coordinates of the first touch track, thereby showing the first touch track to the user more intuitively.
结合第一方面,在一种可能的设计中,基于第一触摸轨迹的坐标确定第一控件为焦点控件。检测到电子设备请求调用输入法服务,确定电子设备进入手写输入模式。电子设备显示的界面由第一界面切换为第二界面,基于第一触摸轨迹的坐标,在第二界面显示第一触摸轨迹。In combination with the first aspect, in a possible design, the first control is determined to be the focus control based on the coordinates of the first touch track. It is detected that the electronic device requests to call the input method service, and it is determined that the electronic device enters the handwriting input mode. The interface displayed by the electronic device is switched from the first interface to the second interface, and the first touch track is displayed on the second interface based on the coordinates of the first touch track.
在该方案中,若电子设备基于第一触摸轨迹的坐标确定第一控件为焦点控件,则可以将显示的界面由第一界面切换为第二界面,若电子设备请求调用输入法服务,则电子设备可以在第二界面显示第一触摸轨迹。用户无需在第二界面重复输入第一触摸操作,而是可以在电子设备显示的第一触摸轨迹的基础上,继续向电子设备输入新的触摸操作,以在电子设备上进行书写。能够减少用户与电子设备交互的次数,提高输入效率。In this solution, if the electronic device determines that the first control is the focus control based on the coordinates of the first touch track, the displayed interface can be switched from the first interface to the second interface, and if the electronic device requests to call the input method service, the electronic device can display the first touch track on the second interface. The user does not need to repeatedly input the first touch operation on the second interface, but can continue to input new touch operations to the electronic device based on the first touch track displayed by the electronic device to write on the electronic device. It can reduce the number of times the user interacts with the electronic device and improve input efficiency.
并且,在该方案中,若电子设备将第一控件确定为焦点控件,即使第一控件不是与电子设备的全局手写功能相适配的标准输入控件,电子设备也可以基于是否请求调用输入法服务从而确定是否进入手写输入模式。即,本申请实施例提供的方法无需第一控件与电子设备的全局手写功能相适配,电子设备也可以进入手写输入模式,用户可以直接在第一控件中进行书写以完成向电子设备的输入。Furthermore, in this solution, if the electronic device determines the first control as the focus control, even if the first control is not a standard input control that is compatible with the global handwriting function of the electronic device, the electronic device can determine whether to enter the handwriting input mode based on whether to request to call the input method service. That is, the method provided in the embodiment of the present application does not require the first control to be compatible with the global handwriting function of the electronic device, and the electronic device can also enter the handwriting input mode, and the user can directly write in the first control to complete the input to the electronic device.
结合第一方面,在一种可能的设计中,基于第一触摸轨迹的坐标确定第一控件为焦点控件之前,基于第一触摸轨迹的坐标,在第一触摸轨迹经过的至少一个窗口中确定焦点窗口。将焦点窗口中的第一控件确定为焦点控件,其中,第一触摸轨迹经过焦点窗口中的至少一个控件,至少一个控件包括所述第一控件。In combination with the first aspect, in a possible design, before determining that the first control is a focus control based on the coordinates of the first touch track, a focus window is determined in at least one window passed by the first touch track based on the coordinates of the first touch track. The first control in the focus window is determined as the focus control, wherein the first touch track passes through at least one control in the focus window, and the at least one control includes the first control.
在该方案中,电子设备可以基于第一触摸轨迹的坐标确定焦点窗口,以及,基于第一触摸轨迹的坐标,在焦点窗口中将第一控件确定为焦点控件。电子设备确定焦点窗口和/或焦点控件后,可以做出对应的响应。In this solution, the electronic device can determine the focus window based on the coordinates of the first touch track, and determine the first control as the focus control in the focus window based on the coordinates of the first touch track. After the electronic device determines the focus window and/or the focus control, it can make a corresponding response.
结合第一方面,在一种可能的设计中,基于第一触摸轨迹的坐标,将第一触摸轨迹经过的首个或末个窗口确定为焦点窗口。基于第一触摸轨迹的坐标,将焦点窗口中的第一控件确定为焦点控件,第一控件为第一触摸轨迹在焦点窗口中经过的首个或末个控件。In combination with the first aspect, in a possible design, based on the coordinates of the first touch track, the first or last window passed by the first touch track is determined as the focus window. Based on the coordinates of the first touch track, the first control in the focus window is determined as the focus control, and the first control is the first or last control passed by the first touch track in the focus window.
在该方案中,第一触摸轨迹可能经过多个焦点窗口,第一触摸轨迹也可能经过多个焦点控件。电子设备可以将第一触摸轨迹经过的首个或末个窗口确定为焦点窗口,以及,将第一触摸轨迹在焦点窗口中经过的第一控件确定为焦点控件,为电子设备确定焦点窗口以及确定焦点控件提供了多种实现方式。In this solution, the first touch track may pass through multiple focus windows, and the first touch track may also pass through multiple focus controls. The electronic device can determine the first or last window passed by the first touch track as the focus window, and determine the first control passed by the first touch track in the focus window as the focus control, providing multiple implementations for the electronic device to determine the focus window and determine the focus control.
结合第一方面,在一种可能的设计中,第一界面包括第一控件,第二界面包括第二控件,第二控件与第一控件相关联。接收针对第一控件输入的第一触摸操作,响应于第一触摸操作,将显示的界面由第一界面切换为第二界面,将第二控件确定为新的焦点控件。In combination with the first aspect, in a possible design, the first interface includes a first control, the second interface includes a second control, and the second control is associated with the first control. A first touch operation input to the first control is received, and in response to the first touch operation, the displayed interface is switched from the first interface to the second interface, and the second control is determined as a new focus control.
在该方案中,即使第一控件被确定为焦点控件后,会触发电子设备的显示界面发生切换。即,电子设备显示的界面由第一界面切换为第二界面。电子设备也会将第二界面中包括的第二控件接替第一控件成为新的焦点控件。用户可以继续在第二控件中进行书写。In this solution, even if the first control is determined as the focus control, it will trigger the display interface of the electronic device to switch. That is, the interface displayed by the electronic device switches from the first interface to the second interface. The electronic device will also replace the first control with the second control included in the second interface as the new focus control. The user can continue to write in the second control.
结合第一方面,在一种可能的设计中,在第二界面显示第一触摸操作对应的第一触摸轨迹之后,接收基于第二界面输入的第二触摸操作。响应于第二触摸操作,获取第二触摸操作对应的第二触摸轨迹的坐标。基于第二触摸轨迹的坐标,若焦点控件未发生切换,基于第二触摸轨迹的坐标,在焦点控件中显示第二触摸轨迹。In combination with the first aspect, in a possible design, after the first touch track corresponding to the first touch operation is displayed on the second interface, a second touch operation based on the second interface input is received. In response to the second touch operation, the coordinates of the second touch track corresponding to the second touch operation are obtained. Based on the coordinates of the second touch track, if the focus control has not been switched, the second touch track is displayed in the focus control based on the coordinates of the second touch track.
在该方案中,用户可以在焦点控件显示第一触摸轨迹的基础上,继续向电子设备输入针对焦点控件的第二触摸操作,以在电子设备上进行书写。电子设备响应于第二触摸操作,可以在焦点控件中显示第二触摸轨迹,从而更为直观的向用户展示第二触摸轨迹。In this solution, the user can continue to input a second touch operation for the focus control to the electronic device on the basis of the focus control displaying the first touch track, so as to write on the electronic device. In response to the second touch operation, the electronic device can display the second touch track in the focus control, thereby more intuitively showing the second touch track to the user.
结合第一方面,在一种可能的设计中,响应于第二触摸操作,获取第二触摸操作对应的第二触摸轨迹的坐标之后,在确定焦点控件发生切换的情况下,检测电子设备是否请求调用输入法服务。若检测到电子设备请求调用输入法服务,确定电子设备进入手写输入模式。若电子设备进入手写输入模式,且第二触摸操作为滑动操作,则基于第二触摸轨迹的坐标,在切换后的焦点控件中显示第二触摸轨迹。In combination with the first aspect, in a possible design, in response to the second touch operation, after obtaining the coordinates of the second touch track corresponding to the second touch operation, when it is determined that the focus control has switched, it is detected whether the electronic device requests to call the input method service. If it is detected that the electronic device requests to call the input method service, it is determined that the electronic device enters the handwriting input mode. If the electronic device enters the handwriting input mode and the second touch operation is a sliding operation, the second touch track is displayed in the switched focus control based on the coordinates of the second touch track.
在该方案中,在焦点控件显示第一触摸轨迹的基础上,若用户继续向电子设备输入第二触摸操作,且用户输入的第二触摸操作触发了焦点控件发生切换,可以重新基于电子设备是否请求调用输入法服务,从而确定电子设备是否进入手写输入模式。若电子设备进入手写输入模式,且第二触摸操作为滑动操作,则基于第二触摸轨迹的坐标,在切换后的焦点控件中显示第二触摸轨迹,从而更为直观的向用户展示第二触摸轨迹。In this solution, on the basis of the focus control displaying the first touch track, if the user continues to input the second touch operation to the electronic device, and the second touch operation input by the user triggers the focus control to switch, it can be determined whether the electronic device enters the handwriting input mode based on whether the electronic device requests to call the input method service. If the electronic device enters the handwriting input mode, and the second touch operation is a sliding operation, the second touch track is displayed in the switched focus control based on the coordinates of the second touch track, so as to more intuitively show the second touch track to the user.
结合第一方面,在一种可能的设计中,焦点控件发生切换包括焦点控件由一个焦点控件切换为另一个焦点控件。或者,电子设备当前显示的界面中从不存在焦点控件切换为存在焦点控件。In combination with the first aspect, in a possible design, the switching of the focus control includes the focus control switching from one focus control to another focus control. Alternatively, the interface currently displayed by the electronic device switches from no focus control to a focus control.
该方案中,为焦点控件是否发生切换提供了多种可能的判断方式。In this solution, multiple possible ways of judging whether the focus control is switched are provided.
结合第一方面,在一种可能的设计中,第一触摸操作为滑动操作。In combination with the first aspect, in a possible design, the first touch operation is a sliding operation.
在该方案中,若电子设备确定第一触摸操作为滑动操作,电子设备可以在第二界面中显示第一触摸操作对应的第一触摸轨迹,从而更为直观的向用户展示该第一触摸轨迹。若电子设备确定第一触摸操作为点击操作,电子设备可以不显示该点击操作对应的触摸轨迹,从而节约电子设备的运行内存。In this solution, if the electronic device determines that the first touch operation is a sliding operation, the electronic device can display the first touch track corresponding to the first touch operation in the second interface, thereby more intuitively showing the first touch track to the user. If the electronic device determines that the first touch operation is a click operation, the electronic device may not display the touch track corresponding to the click operation, thereby saving the running memory of the electronic device.
结合第一方面,在一种可能的设计中,电子设备获取第一触摸轨迹的属性。其中,第一触摸轨迹的属性包括第一属性和第二属性。当电子设备检测到第一触摸操作是用户通过手指在电子设备的显示屏上进行的触摸操作的情况下,可以将第一触摸操作对应的第一触摸轨迹的属性确定为第一属性。当电子设备检测到第一触摸操作是用户是通过如手写笔等工具在电子设备的显示屏上进行的触摸操作的情况下,可以将第一触摸操作对应的第一触摸轨迹的属性确定为第二属性。In combination with the first aspect, in a possible design, the electronic device obtains the attribute of the first touch track. The attribute of the first touch track includes a first attribute and a second attribute. When the electronic device detects that the first touch operation is a touch operation performed by a user on the display screen of the electronic device through a finger, the attribute of the first touch track corresponding to the first touch operation can be determined as the first attribute. When the electronic device detects that the first touch operation is a touch operation performed by a user on the display screen of the electronic device through a tool such as a stylus, the attribute of the first touch track corresponding to the first touch operation can be determined as the second attribute.
其中,电子设备在检测到第一触摸轨迹为第二属性的情况下,执行上述第一方面及其任一种可能的设计方式所述的方法,从而避免用户误触电子设备的显示屏。电子设备在检测到第一触摸轨迹为第一属性的情况下,执行上述第一方面及其任一种可能的设计方式所述的方法,从而避免异物误触电子设备的显示屏。Wherein, when the electronic device detects that the first touch track is of the second attribute, the electronic device executes the method described in the first aspect and any possible design thereof, thereby preventing the user from accidentally touching the display screen of the electronic device. When the electronic device detects that the first touch track is of the first attribute, the electronic device executes the method described in the first aspect and any possible design thereof, thereby preventing foreign objects from accidentally touching the display screen of the electronic device.
第二方面,本申请实施例提供一种电子设备,该电子设备包括输入管理模块、焦点管理模块以及手写输入模块。In a second aspect, an embodiment of the present application provides an electronic device, which includes an input management module, a focus management module, and a handwriting input module.
结合第二方面,在一种可能的设计中,输入管理模块检测到输入的第一触摸操作,对第一触摸操作对应的第一触摸轨迹的坐标进行缓存。以及,输入管理模块将第一触摸轨迹的坐标发送至焦点管理模块。焦点管理模块接收到输入管理模块发送的第一触摸轨迹的坐标后,基于第一触摸轨迹的坐标,确定焦点窗口。焦点管理模块在确定焦点窗口的情况下,可以基于第一触摸轨迹的坐标和焦点窗口确定是否存在焦点控件。In combination with the second aspect, in a possible design, the input management module detects the first touch operation input, and caches the coordinates of the first touch track corresponding to the first touch operation. And, the input management module sends the coordinates of the first touch track to the focus management module. After the focus management module receives the coordinates of the first touch track sent by the input management module, the focus management module determines the focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module can determine whether there is a focus control based on the coordinates of the first touch track and the focus window.
结合第二方面,在一种可能的设计中,在焦点管理模块确定不存在焦点控件的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the second aspect, in a possible design, when the focus management module determines that there is no focus control, the coordinates of the received first touch track can be deleted to release memory space of the electronic device.
结合第二方面,在一种可能的设计中,在焦点管理模块确定存在焦点控件的情况下,焦点管理模块还可以检测焦点控件是否发生切换。若焦点管理模块检测到焦点控件发生切换,则向输入管理模块发送第一信息。其中,第一信息用于告知输入管理模块焦点控件发生切换。In conjunction with the second aspect, in a possible design, when the focus management module determines that there is a focus control, the focus management module may further detect whether the focus control is switched. If the focus management module detects that the focus control is switched, the first information is sent to the input management module. The first information is used to inform the input management module that the focus control is switched.
输入管理模块接收到焦点管理模块发送的第一信息后,可以检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式。其中,输入管理模块若检测到电子设备请求调用输入法服务,则确定电子设备进入手写输入模式。输入管理模块若未检测到电子设备请求调用输入法服务,则确定电子设备不进入手写输入模式。After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. If the input management module detects that the electronic device requests to call the input method service, it determines that the electronic device enters the handwriting input mode. If the input management module does not detect that the electronic device requests to call the input method service, it determines that the electronic device does not enter the handwriting input mode.
结合第二方面,在一种可能的设计中,在输入管理模块确定电子设备不进入手写输入模式的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the second aspect, in a possible design, when the input management module determines that the electronic device does not enter the handwriting input mode, the coordinates of the received first touch track can be deleted to release memory space of the electronic device.
结合第二方面,在一种可能的设计中,在输入管理模块确定电子设备进入手写输入模式的情况下,输入管理模块可以基于缓存的第一触摸轨迹的坐标,确定第一触摸操作是点击操作还是滑动操作。In combination with the second aspect, in a possible design, when the input management module determines that the electronic device enters the handwriting input mode, the input management module can determine whether the first touch operation is a click operation or a sliding operation based on the coordinates of the cached first touch trajectory.
结合第二方面,在一种可能的设计中,在输入管理模块确定第一触摸操作是点击操作的情况下,输入管理模块可以删除缓存的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the second aspect, in a possible design, when the input management module determines that the first touch operation is a click operation, the input management module may delete the cached coordinates of the first touch track to release memory space of the electronic device.
结合第二方面,在一种可能的设计中,在输入管理模块确定第一触摸操作是滑动操作的情况下,可以向手写输入模块发送缓存的第一触摸轨迹的坐标。In combination with the second aspect, in a possible design, when the input management module determines that the first touch operation is a sliding operation, the coordinates of the cached first touch track may be sent to the handwriting input module.
手写输入模块接收到输入管理模块发送的第一触摸轨迹的坐标后,可以基于第一触摸轨迹的坐标,控制电子设备显示第一触摸轨迹。After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module can control the electronic device to display the first touch track based on the coordinates of the first touch track.
结合第二方面,在一种可能的设计中,手写输入模块还可以基于第一触摸轨迹的坐标,预测第一触摸轨迹对应的字符。之后,手写输入模块可以控制电子设备显示该字符,并隐藏已经显示的第一触摸轨迹。In conjunction with the second aspect, in a possible design, the handwriting input module may also predict the character corresponding to the first touch track based on the coordinates of the first touch track. Afterwards, the handwriting input module may control the electronic device to display the character and hide the displayed first touch track.
结合第二方面,在一种可能的设计中,在输入管理模块未监测到焦点控件发生切换的情况下,若输入管理模块再次检测到第二触摸操作,输入管理模块可以将第二触摸操作对应的第二触摸轨迹的坐标发送至手写输入模块。手写输入模块可以继续基于接收的第二触摸轨迹的坐标,预测第二触摸轨迹对应的字符。之后,手写输入模块可以向输入管理模块发送预测得到的字符。输入管理模块接收到手写输入模块发送的字符后,可以控制电子设备显示该字符,并隐藏已经显示的第二触摸轨迹。In combination with the second aspect, in a possible design, when the input management module does not detect the switching of the focus control, if the input management module detects the second touch operation again, the input management module can send the coordinates of the second touch track corresponding to the second touch operation to the handwriting input module. The handwriting input module can continue to predict the character corresponding to the second touch track based on the received coordinates of the second touch track. Afterwards, the handwriting input module can send the predicted character to the input management module. After receiving the character sent by the handwriting input module, the input management module can control the electronic device to display the character and hide the displayed second touch track.
结合第二方面,在一种可能的设计中,第一信息还包括用于表征焦点管理模块确定的切换后的焦点控件的标识。输入管理模块确定第一触摸操作是滑动操作并向手写输入模块发送缓存的第一触摸轨迹的坐标的同时,还可以向手写输入模块发送用于表征焦点管理模块确定的切换后的焦点控件的标识。手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件和/或焦点控件的周围显示用户的第一触摸轨迹。以及,手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件中显示预测得到的字符,并隐藏已经显示第一触摸轨迹。In combination with the second aspect, in a possible design, the first information also includes an identifier for characterizing the switched focus control determined by the focus management module. When the input management module determines that the first touch operation is a sliding operation and sends the coordinates of the cached first touch track to the handwriting input module, it can also send an identifier for characterizing the switched focus control determined by the focus management module to the handwriting input module. The handwriting input module can control the electronic device to display the user's first touch track in the focus control and/or around the focus control based on the received identifier of the focus control. And, the handwriting input module can control the electronic device to display the predicted characters in the focus control and hide the displayed first touch track based on the received identifier of the focus control.
结合第二方面,在一种可能的设计中,输入管理模块检测到输入的触摸操作,可以获取该触摸操作对应的触摸轨迹的属性。其中,该触摸操作可以是第一触摸操作,也可以是第二触摸操作。In conjunction with the second aspect, in a possible design, the input management module detects an input touch operation and can obtain the attributes of the touch track corresponding to the touch operation, wherein the touch operation can be a first touch operation or a second touch operation.
当电子设备检测到该触摸操作是用户是通过手指在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第一属性。当电子设备检测到该触摸操作是用户是通过如手写笔等工具在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第二属性。When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a finger, the attribute of the touch track corresponding to the touch operation can be determined as the first attribute. When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a tool such as a stylus pen, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.
结合第二方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第一属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免异物误触电子设备的显示屏。In combination with the second aspect, in a possible design, when the input management module determines that the touch track is of the first attribute, a corresponding response can be made to the touch track, thereby preventing foreign objects from accidentally touching the display screen of the electronic device.
结合第二方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第二属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免用户误触电子设备的显示屏。In combination with the second aspect, in a possible design, when the input management module determines that the touch track is a second attribute, a corresponding response can be made to the touch track, thereby preventing the user from accidentally touching the display screen of the electronic device.
第三方面,本申请实施例提供一种电子设备,该电子设备包括输入管理模块、焦点管理模块以及手写输入模块。In a third aspect, an embodiment of the present application provides an electronic device, which includes an input management module, a focus management module, and a handwriting input module.
结合第三方面,在一种可能的设计中,输入管理模块检测到输入的第一触摸操作,对第一触摸操作对应的第一触摸轨迹的坐标进行缓存。以及,输入管理模块将第一触摸轨迹的坐标发送至焦点管理模块。焦点管理模块接收到输入管理模块发送的第一触摸轨迹的坐标后,基于第一触摸轨迹的坐标,确定焦点窗口。焦点管理模块在确定焦点窗口的情况下,可以基于第一触摸轨迹的坐标和焦点窗口确定是否存在焦点控件。In combination with the third aspect, in a possible design, the input management module detects the first touch operation input, and caches the coordinates of the first touch track corresponding to the first touch operation. And, the input management module sends the coordinates of the first touch track to the focus management module. After receiving the coordinates of the first touch track sent by the input management module, the focus management module determines the focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module can determine whether there is a focus control based on the coordinates of the first touch track and the focus window.
结合第三方面,在一种可能的设计中,在焦点管理模块确定不存在焦点控件的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the third aspect, in a possible design, when the focus management module determines that there is no focus control, the coordinates of the received first touch track can be deleted to release memory space of the electronic device.
结合第三方面,在一种可能的设计中,在焦点管理模块确定存在焦点控件的情况下,焦点管理模块还可以检测焦点控件是否发生切换。若焦点管理模块检测到焦点控件发生切换,则向输入管理模块发送第一信息。其中,第一信息用于告知输入管理模块焦点控件发生切换。In conjunction with the third aspect, in a possible design, when the focus management module determines that there is a focus control, the focus management module may further detect whether the focus control is switched. If the focus management module detects that the focus control is switched, the first information is sent to the input management module. The first information is used to inform the input management module that the focus control is switched.
输入管理模块接收到焦点管理模块发送的第一信息后,可以检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式。其中,输入管理模块若检测到电子设备请求调用输入法服务,则确定电子设备进入手写输入模式。输入管理模块若未检测到电子设备请求调用输入法服务,则确定电子设备不进入手写输入模式。After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. If the input management module detects that the electronic device requests to call the input method service, it determines that the electronic device enters the handwriting input mode. If the input management module does not detect that the electronic device requests to call the input method service, it determines that the electronic device does not enter the handwriting input mode.
结合第三方面,在一种可能的设计中,在输入管理模块确定电子设备不进入手写输入模式的情况下,输入管理模块可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the third aspect, in a possible design, when the input management module determines that the electronic device does not enter the handwriting input mode, the input management module can delete the coordinates of the received first touch track to release memory space of the electronic device.
结合第三方面,在一种可能的设计中,在输入管理模块确定电子设备进入手写输入模式的情况下,输入管理模块可以向手写输入模块发送缓存的第一触摸轨迹的坐标。In combination with the third aspect, in a possible design, when the input management module determines that the electronic device enters the handwriting input mode, the input management module may send the cached coordinates of the first touch track to the handwriting input module.
手写输入模块接收到输入管理模块发送的第一触摸轨迹的坐标后,可以基于第一触摸轨迹的坐标,确定第一触摸操作是点击操作还是滑动操作。After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module can determine whether the first touch operation is a click operation or a slide operation based on the coordinates of the first touch track.
结合第三方面,在一种可能的设计中,在手写输入模块确定第一触摸操作是点击操作的情况下,可以向输入管理模块发送第二信息。输入管理模块接收到第二信息后,可以删除缓存的第一触摸轨迹的坐标,以释放电子设备的内存空间。In conjunction with the third aspect, in a possible design, when the handwriting input module determines that the first touch operation is a click operation, the second information can be sent to the input management module. After receiving the second information, the input management module can delete the cached coordinates of the first touch track to release memory space of the electronic device.
结合第三方面,在一种可能的设计中,在输入管理模块确定第一触摸操作是滑动操作的情况下,可以向手写输入模块发送缓存的第一触摸轨迹的坐标。In combination with the third aspect, in a possible design, when the input management module determines that the first touch operation is a sliding operation, the coordinates of the cached first touch track may be sent to the handwriting input module.
手写输入模块接收到输入管理模块发送的第一触摸轨迹的坐标后,可以基于第一触摸轨迹的坐标,控制电子设备显示第一触摸轨迹。After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module can control the electronic device to display the first touch track based on the coordinates of the first touch track.
结合第三方面,在一种可能的设计中,手写输入模块还可以基于第一触摸轨迹的坐标,预测第一触摸轨迹对应的字符。之后,手写输入模块可以控制电子设备显示该字符,并隐藏已经显示的第一触摸轨迹。In conjunction with the third aspect, in a possible design, the handwriting input module may also predict the character corresponding to the first touch track based on the coordinates of the first touch track. Afterwards, the handwriting input module may control the electronic device to display the character and hide the displayed first touch track.
结合第三方面,在一种可能的设计中,在输入管理模块未监测到焦点控件发生切换的情况下,若输入管理模块再次检测到输入的第二触摸操作,输入管理模块可以将第二触摸操作对应的第二触摸轨迹的坐标发送至手写输入模块。手写输入模块可以继续基于接收的第二触摸轨迹的坐标,预测第二触摸轨迹对应的字符。之后,手写输入模块可以向输入管理模块发送预测得到的字符。输入管理模块接收到手写输入模块发送的字符后,可以控制电子设备显示该字符,并隐藏已经显示的第二触摸轨迹。In combination with the third aspect, in a possible design, when the input management module does not detect the switching of the focus control, if the input management module detects the input of a second touch operation again, the input management module can send the coordinates of the second touch track corresponding to the second touch operation to the handwriting input module. The handwriting input module can continue to predict the character corresponding to the second touch track based on the coordinates of the received second touch track. Afterwards, the handwriting input module can send the predicted character to the input management module. After receiving the character sent by the handwriting input module, the input management module can control the electronic device to display the character and hide the displayed second touch track.
结合第三方面,在一种可能的设计中,第一信息还包括用于表征焦点管理模块确定的切换后的焦点控件的标识。输入管理模块确定第一触摸操作是滑动操作并向手写输入模块发送缓存的第一触摸轨迹的坐标的同时,还可以向手写输入模块发送用于表征焦点管理模块确定的切换后的焦点控件的标识。手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件和/或焦点控件的周围显示第一触摸轨迹。以及,手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件中显示预测得到的字符,并隐藏已经显示第一触摸轨迹。In combination with the third aspect, in a possible design, the first information also includes an identifier for characterizing the focus control after switching determined by the focus management module. While the input management module determines that the first touch operation is a sliding operation and sends the coordinates of the cached first touch track to the handwriting input module, it can also send an identifier for characterizing the focus control after switching determined by the focus management module to the handwriting input module. The handwriting input module can control the electronic device to display the first touch track in the focus control and/or around the focus control based on the received identifier of the focus control. And, the handwriting input module can control the electronic device to display the predicted characters in the focus control and hide the displayed first touch track based on the received identifier of the focus control.
结合第三方面,在一种可能的设计中,输入管理模块检测到输入的触摸操作,可以获取该触摸操作对应的触摸轨迹的属性。其中,该触摸操作可以是第一触摸操作,也可以是第二触摸操作。In conjunction with the third aspect, in a possible design, the input management module detects an input touch operation and can obtain the attributes of the touch track corresponding to the touch operation, wherein the touch operation can be a first touch operation or a second touch operation.
当电子设备检测到该触摸操作是用户是通过手指在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第一属性。当电子设备检测到该触摸操作是用户是通过如手写笔等工具在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第二属性。When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a finger, the attribute of the touch track corresponding to the touch operation can be determined as the first attribute. When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a tool such as a stylus pen, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.
结合第三方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第一属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免异物误触电子设备的显示屏。In combination with the third aspect, in a possible design, when the input management module determines that the touch track is the first attribute, a corresponding response can be made to the touch track, thereby preventing foreign objects from accidentally touching the display screen of the electronic device.
结合第三方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第二属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免用户误触电子设备的显示屏。In combination with the third aspect, in a possible design, when the input management module determines that the touch track is the second attribute, a corresponding response can be made to the touch track, thereby preventing the user from accidentally touching the display screen of the electronic device.
第四方面,本申请实施例提供一种电子设备,该电子设备包括输入管理模块、焦点管理模块以及手写输入模块。In a fourth aspect, an embodiment of the present application provides an electronic device, which includes an input management module, a focus management module, and a handwriting input module.
结合第四方面,在一种可能的设计中,输入管理模块检测到输入的第一触摸操作,将第一触摸操作对应的第一触摸轨迹的坐标发送至焦点管理模块和手写输入模块。焦点管理模块接收到输入管理模块发送的第一触摸轨迹的坐标后,基于第一触摸轨迹的坐标,确定焦点窗口。焦点管理模块在确定焦点窗口的情况下,可以基于第一触摸轨迹的坐标和焦点窗口确定是否存在焦点控件。In conjunction with the fourth aspect, in a possible design, the input management module detects a first touch operation input, and sends the coordinates of a first touch track corresponding to the first touch operation to the focus management module and the handwriting input module. After receiving the coordinates of the first touch track sent by the input management module, the focus management module determines the focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module can determine whether there is a focus control based on the coordinates of the first touch track and the focus window.
结合第四方面,在一种可能的设计中,焦点管理模块在确定不存在焦点控件的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the fourth aspect, in a possible design, when the focus management module determines that there is no focus control, the focus management module may delete the coordinates of the received first touch track to release memory space of the electronic device.
结合第四方面,在一种可能的设计中,焦点管理模块在确定存在焦点控件的情况下,还可以检测焦点控件是否发生切换。若焦点管理模块检测到焦点控件发生切换,则向输入管理模块发送第一信息。其中,第一信息用于告知输入管理模块焦点控件发生切换。In conjunction with the fourth aspect, in a possible design, the focus management module may further detect whether the focus control is switched when determining that there is a focus control. If the focus management module detects that the focus control is switched, the first information is sent to the input management module. The first information is used to inform the input management module that the focus control is switched.
输入管理模块接收到焦点管理模块发送的第一信息后,可以检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式。其中,输入管理模块若检测到电子设备请求调用输入法服务,则确定电子设备进入手写输入模式。输入管理模块若未检测到电子设备请求调用输入法服务,则确定电子设备不进入手写输入模式。After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. If the input management module detects that the electronic device requests to call the input method service, it determines that the electronic device enters the handwriting input mode. If the input management module does not detect that the electronic device requests to call the input method service, it determines that the electronic device does not enter the handwriting input mode.
结合第四方面,在一种可能的设计中,在输入管理模块确定电子设备不进入手写输入模式的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In combination with the fourth aspect, in a possible design, when the input management module determines that the electronic device does not enter the handwriting input mode, the coordinates of the received first touch track can be deleted to release memory space of the electronic device.
结合第四方面,在一种可能的设计中,在输入管理模块确定电子设备进入手写输入模式的情况下,可以向手写输入模块发送第三信息。第三信息用于告知手写输入模块电子设备进入手写输入模式。手写输入模块接收到输入管理模块发送的第三信息后,可以基于之前接收的第一触摸轨迹的坐标,确定第一触摸操作是点击操作还是滑动操作。In conjunction with the fourth aspect, in a possible design, when the input management module determines that the electronic device enters the handwriting input mode, a third information may be sent to the handwriting input module. The third information is used to inform the handwriting input module that the electronic device enters the handwriting input mode. After the handwriting input module receives the third information sent by the input management module, it may determine whether the first touch operation is a click operation or a slide operation based on the coordinates of the first touch track previously received.
结合第四方面,在一种可能的设计中,在手写输入模块确定第一触摸操作是点击操作的情况下,可以向输入管理模块发送第二信息。输入管理模块接收到第二信息后,可以删除缓存的第一触摸轨迹的坐标,以释放电子设备的内存空间。In conjunction with the fourth aspect, in a possible design, when the handwriting input module determines that the first touch operation is a click operation, the second information can be sent to the input management module. After receiving the second information, the input management module can delete the cached coordinates of the first touch track to release memory space of the electronic device.
结合第四方面,在一种可能的设计中,在输入管理模块确定第一触摸操作是滑动操作的情况下,可以向手写输入模块发送缓存的第一触摸轨迹的坐标。In combination with the fourth aspect, in a possible design, when the input management module determines that the first touch operation is a sliding operation, the coordinates of the cached first touch track may be sent to the handwriting input module.
手写输入模块接收到输入管理模块发送的第一触摸轨迹的坐标后,可以基于第一触摸轨迹的坐标,控制电子设备显示该第一触摸轨迹。After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module can control the electronic device to display the first touch track based on the coordinates of the first touch track.
结合第四方面,在一种可能的设计中,手写输入模块还可以基于第一触摸轨迹的坐标,预测第一触摸轨迹对应的字符。之后,手写输入模块可以控制电子设备显示该字符,并隐藏已经显示的第一触摸轨迹。In conjunction with the fourth aspect, in a possible design, the handwriting input module may also predict the character corresponding to the first touch track based on the coordinates of the first touch track. Afterwards, the handwriting input module may control the electronic device to display the character and hide the displayed first touch track.
结合第四方面,在一种可能的设计中,在输入管理模块未监测到焦点控件发生切换的情况下,若输入管理模块再次检测到输入的第二触摸操作,输入管理模块可以将第二触摸操作对应的第二触摸轨迹的坐标发送至手写输入模块。手写输入模块可以继续基于接收的第二触摸轨迹的坐标,预测第二触摸轨迹对应的字符。之后,手写输入模块可以向输入管理模块发送预测得到的字符。输入管理模块接收到手写输入模块发送的字符后,可以控制电子设备显示该字符,并隐藏已经显示的第二触摸轨迹。In conjunction with the fourth aspect, in a possible design, when the input management module does not detect the switching of the focus control, if the input management module detects the input of a second touch operation again, the input management module may send the coordinates of the second touch track corresponding to the second touch operation to the handwriting input module. The handwriting input module may continue to predict the character corresponding to the second touch track based on the coordinates of the received second touch track. Afterwards, the handwriting input module may send the predicted character to the input management module. After receiving the character sent by the handwriting input module, the input management module may control the electronic device to display the character and hide the displayed second touch track.
结合第四方面,在一种可能的设计中,第一信息还包括用于表征焦点管理模块确定的切换后的焦点控件的标识。输入管理模块确定第一触摸操作是滑动操作并向手写输入模块发送缓存的第一触摸轨迹的坐标的同时,还可以向手写输入模块发送用于表征焦点管理模块确定的切换后的焦点控件的标识。手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件和/或焦点控件的周围显示用户的第一触摸轨迹。以及,手写输入模块可以基于接收的焦点控件的标识,控制电子设备在焦点控件中显示预测得到的字符,并隐藏已经显示的第一触摸轨迹。In combination with the fourth aspect, in a possible design, the first information also includes an identifier for characterizing the switched focus control determined by the focus management module. When the input management module determines that the first touch operation is a sliding operation and sends the coordinates of the cached first touch track to the handwriting input module, it can also send an identifier for characterizing the switched focus control determined by the focus management module to the handwriting input module. The handwriting input module can control the electronic device to display the user's first touch track in the focus control and/or around the focus control based on the received identifier of the focus control. And, the handwriting input module can control the electronic device to display the predicted characters in the focus control and hide the displayed first touch track based on the received identifier of the focus control.
结合第四方面,在一种可能的设计中,输入管理模块检测到输入的触摸操作,可以获取该触摸操作对应的触摸轨迹的属性。其中,该触摸操作可以是第一触摸操作,也可以是第二触摸操作。In conjunction with the fourth aspect, in a possible design, the input management module detects an input touch operation and can obtain the attributes of the touch track corresponding to the touch operation, wherein the touch operation can be a first touch operation or a second touch operation.
当电子设备检测到该触摸操作是用户是通过手指在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第一属性。当电子设备检测到该触摸操作是用户是通过如手写笔等工具在电子设备的显示屏上进行的触摸操作的情况下,可以将该触摸操作对应的触摸轨迹的属性确定为第二属性。When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a finger, the attribute of the touch track corresponding to the touch operation can be determined as the first attribute. When the electronic device detects that the touch operation is a touch operation performed by the user on the display screen of the electronic device through a tool such as a stylus pen, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.
结合第四方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第一属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免异物误触电子设备的显示屏。In combination with the fourth aspect, in a possible design, when the input management module determines that the touch track is the first attribute, a corresponding response can be made to the touch track, thereby preventing foreign objects from accidentally touching the display screen of the electronic device.
结合第四方面,在一种可能的设计中,在输入管理模块确定该触摸轨迹为第二属性的情况下,可以对该触摸轨迹作出对应的响应,从而避免用户误触电子设备的显示屏。In combination with the fourth aspect, in a possible design, when the input management module determines that the touch track is the second attribute, a corresponding response can be made to the touch track, thereby preventing the user from accidentally touching the display screen of the electronic device.
第五方面,本申请实施例提供了一种电子设备。该电子设备包括存储器和一个或多个处理器,存储器和处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器执行计算机指令时,使得该电子设备执行第一方面及其任一种可能的设计方式所述的方法。In a fifth aspect, an embodiment of the present application provides an electronic device. The electronic device includes a memory and one or more processors, the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor executes the computer instructions, the electronic device executes the method described in the first aspect and any possible design thereof.
第六方面,本申请实施例提供了一种芯片系统。该芯片系统包括一个或多个接口电路和一个或多个处理器。接口电路和处理器通过线路互联,接口电路用于从电子设备的存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令,当处理器执行所述计算机指令时,所述电子设备执行第一方面及其任一种可能的设计方式所述的方法。In a sixth aspect, an embodiment of the present application provides a chip system. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line, and the interface circuit is used to receive a signal from a memory of an electronic device and send a signal to the processor, the signal including a computer instruction stored in the memory, and when the processor executes the computer instruction, the electronic device executes the method described in the first aspect and any possible design thereof.
第七方面,本申请实施例提供了一种计算机存储介质,包括计算机指令。当计算机指令在电子设备上运行时,使得电子设备执行第一方面及其任一种可能的设计方式所述的方法。In a seventh aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible design thereof.
第八方面,本申请实施例提供了一种计算机程序产品。当计算机程序产品在计算机上运行时,使得计算机执行第一方面及其任一种可能的设计方式所述的方法。In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the method described in the first aspect and any possible design thereof.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为现有技术提供的第一种手写输入方法的示意图;FIG1 is a schematic diagram of a first handwriting input method provided by the prior art;
图2A为现有技术提供的第一种手写输入界面的示意图;FIG2A is a schematic diagram of a first handwriting input interface provided in the prior art;
图2B为现有技术提供的第二种手写输入界面的示意图;FIG2B is a schematic diagram of a second handwriting input interface provided by the prior art;
图2C为现有技术提供的第三种手写输入界面的示意图;FIG2C is a schematic diagram of a third handwriting input interface provided by the prior art;
图3A为本申请实施例提供的一种电子设备的硬件结构图;FIG3A is a hardware structure diagram of an electronic device provided in an embodiment of the present application;
图3B为本申请实施例提供的一种电子设备的软件结构图;FIG3B is a software structure diagram of an electronic device provided in an embodiment of the present application;
图4A为本申请实施例提供的第一种界面示意图;FIG4A is a schematic diagram of a first interface provided in an embodiment of the present application;
图4B为本申请实施例提供的第二种界面示意图;FIG4B is a schematic diagram of a second interface provided in an embodiment of the present application;
图4C为本申请实施例提供的第三种界面示意图;FIG4C is a schematic diagram of a third interface provided in an embodiment of the present application;
图4D为本申请实施例提供的第四种界面示意图;FIG4D is a schematic diagram of a fourth interface provided in an embodiment of the present application;
图5为本申请实施例提供的一种触摸轨迹的示意图;FIG5 is a schematic diagram of a touch track provided by an embodiment of the present application;
图6A为本申请实施例提供的第五种界面示意图;FIG6A is a schematic diagram of a fifth interface provided in an embodiment of the present application;
图6B为本申请实施例提供的第六种界面示意图;FIG6B is a schematic diagram of a sixth interface provided in an embodiment of the present application;
图7为本申请实施例提供的第七种界面示意图;FIG7 is a seventh interface schematic diagram provided in an embodiment of the present application;
图8为本申请实施例提供的第八种界面示意图;FIG8 is a schematic diagram of an eighth interface provided in an embodiment of the present application;
图9为本申请实施例提供的一种电子设备的模块结构示意图;FIG9 is a schematic diagram of a module structure of an electronic device provided in an embodiment of the present application;
图10为本申请实施例提供的手写输入方法在实现方式1中的流程示意图;FIG10 is a schematic diagram of a flow chart of a handwriting input method in implementation mode 1 provided in an embodiment of the present application;
图11为本申请实施例提供的手写输入方法在实现方式2中的流程示意图;FIG11 is a schematic diagram of a flow chart of a handwriting input method in implementation mode 2 provided in an embodiment of the present application;
图12为本申请实施例提供的手写输入方法在实现方式3中的流程示意图;FIG12 is a schematic diagram of a flow chart of a handwriting input method provided in an embodiment of the present application in implementation mode 3;
图13为本申请实施例提供的一种电子设备的示意图。FIG. 13 is a schematic diagram of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
为了便于理解,示例的给出了部分与本申请实施例相关概念的说明以供参考。如下所示:For ease of understanding, some examples of concepts related to the embodiments of the present application are provided for reference, as shown below:
字符串:包括字词、数字、字母、符号等字符中的至少一项的序列。例如,字符串“你好123”。String: A sequence of at least one of words, numbers, letters, symbols, etc. For example, the string "你好123".
输入控件:可以是用于实现字符串输入的控件。输入控件可以包括在电子设备显示的各种应用的界面或窗口中。Input control: It can be a control used to implement string input. The input control can be included in the interface or window of various applications displayed by the electronic device.
候选内容:在输入法应用的界面中展示的供用户选择的内容。候选内容通常与用户通过输入法应用向电子设备输入的内容相关联。候选内容可以包括至少一个候选词,其中,候选词可以是字词(例如“你”、“你好”等)、可以是标点符号(例如“!”、“?”等),也可以是数字(例如“1”、“13”等)等,本申请不做限制。Candidate content: content displayed in the interface of the input method application for user selection. Candidate content is usually associated with content input by the user into the electronic device through the input method application. Candidate content may include at least one candidate word, wherein the candidate word may be a word (such as "you", "hello", etc.), a punctuation mark (such as "!", "?", etc.), or a number (such as "1", "13", etc.), etc., and this application does not impose any restrictions.
输入法应用是用于在如手机等电子设备中实现字符串输入的软件。输入法应用大多具备手写输入功能,用户可以直接在电子设备的显示屏上进行字符或字符串的书写,以向电子设备输入对应的内容。Input method applications are software used to implement character string input in electronic devices such as mobile phones. Most input method applications have a handwriting input function, and users can directly write characters or character strings on the display screen of the electronic device to input corresponding content into the electronic device.
在一种相关技术中,参见图1,在输入法应用启动手写输入功能的情况下,用户可以对电子设备显示的输入控件101进行点击或选中操作。电子设备检测到用户对输入控件101的点击或选中操作后,可以请求调用输入法服务,以在显示的界面中拉起输入法应用对应的输入法窗口102。输入法窗口102中包括用于接收用户的书写内容的手写板103。用户可以通过在手写板103上进行触摸操作以书写对应的内容。电子设备识别到用户在手写板103上书写的内容后,可以在展示框104中显示多个与用户书写的内容相关联的候选词。电子设备检测到用户对候选词进行点击或选中操作后,可以将用户选中的候选词作为用户向电子设备输入的书写内容填入输入控件101。In a related technology, referring to FIG1 , when the input method application starts the handwriting input function, the user can click or select the input control 101 displayed by the electronic device. After the electronic device detects the user's click or selection operation on the input control 101, it can request to call the input method service to pull up the input method window 102 corresponding to the input method application in the displayed interface. The input method window 102 includes a handwriting board 103 for receiving the user's written content. The user can write the corresponding content by touching the handwriting board 103. After the electronic device recognizes the content written by the user on the handwriting board 103, it can display multiple candidate words associated with the content written by the user in the display box 104. After the electronic device detects that the user clicks or selects the candidate word, the candidate word selected by the user can be filled into the input control 101 as the written content input by the user to the electronic device.
可见,用户通过上述方式向电子设备输入书写内容需要与电子设备进行多次交互,操作繁琐且输入效率低。It can be seen that when a user inputs written content into an electronic device in the above manner, it is necessary to interact with the electronic device multiple times, which is cumbersome and has low input efficiency.
在一种相关技术中,电子设备还具有全局手写功能。用户可以在标准输入控件中进行触摸操作以书写对应的内容。其中,标准输入控件是与电子设备的全局手写功能相适配的一种输入控件。电子设备检测到用户对标准输入控件的触摸操作后,可以触发全局手写功能,以进入手写输入模式。之后,电子设备可以将识别到的用户在标准输入控件中书写的内容填入标准输入控件。In a related technology, the electronic device also has a global handwriting function. The user can perform a touch operation in a standard input control to write corresponding content. Among them, the standard input control is an input control adapted to the global handwriting function of the electronic device. After the electronic device detects the user's touch operation on the standard input control, it can trigger the global handwriting function to enter the handwriting input mode. Afterwards, the electronic device can fill the recognized content written by the user in the standard input control into the standard input control.
但是,标准输入控件通常存在于电子设备自带的应用对应的应用界面中。而一些第三方应用对应的应用界面中包括的输入控件大多为普通输入控件。普通输入控件无法与电子设备的全局手写功能相适配。因此,当电子设备检测到用户对普通输入控件的触摸操作后,会将该触摸操作视为点击操作,从而进行对应的响应。However, standard input controls usually exist in the application interface corresponding to the application that comes with the electronic device. The input controls included in the application interface corresponding to some third-party applications are mostly ordinary input controls. Ordinary input controls cannot adapt to the global handwriting function of the electronic device. Therefore, when the electronic device detects the user's touch operation on the ordinary input control, it will regard the touch operation as a click operation and make a corresponding response.
在一种相关技术中,参见图2A,在用户对输入控件201进行触摸操作会触发电子设备的显示界面发生切换的情况下,若用户在输入控件201和/或输入控件201的周围进行用于字符串书写的触摸操作,例如,用户在输入控件201和/或输入控件201的周围输入书写内容的第一笔。无论输入控件201是否为标准输入控件,电子设备均会将用户在输入控件201和/或输入控件201的周围输入的触摸操作识别为点击操作,并将当前显示的界面切换为如图2B所示的输入界面202或切换为如图2C所示的输入界面203。In a related technology, referring to FIG2A , when a user performs a touch operation on an input control 201, which triggers a switch in the display interface of the electronic device, if the user performs a touch operation for writing a character string on the input control 201 and/or around the input control 201, for example, the user enters the first stroke of the written content on the input control 201 and/or around the input control 201. Regardless of whether the input control 201 is a standard input control, the electronic device will recognize the touch operation input by the user on the input control 201 and/or around the input control 201 as a click operation, and switch the currently displayed interface to the input interface 202 shown in FIG2B or to the input interface 203 shown in FIG2C.
参见图2B,输入界面202中包括用于接收用户的书写内容的输入控件204。在输入控件204是标准输入控件的情况下,用户可以重新在输入控件204和/或输入控件204的周围输入书写内容。例如,用户在输入控件204和/或输入控件204的周围中输入书写内容的第一笔。电子设备识别到用户在输入控件204和/或输入控件204的周围书写的内容后,可以将识别出的内容作为用户向电子设备输入的书写内容填入输入控件204。2B , the input interface 202 includes an input control 204 for receiving user's written content. In the case where the input control 204 is a standard input control, the user can re-enter the written content in the input control 204 and/or around the input control 204. For example, the user enters the first stroke of the written content in the input control 204 and/or around the input control 204. After the electronic device recognizes the content written by the user in the input control 204 and/or around the input control 204, the recognized content can be filled into the input control 204 as the written content input by the user to the electronic device.
参见图2C,输入界面203中包括输入法窗口205。输入法窗口205中包括用于接收用户的书写内容的手写板206。用户可以重新在输入控件或者手写板206上输入书写内容。例如,用户可以重新在手写板206上输入书写内容的第一笔。电子设备识别到用户在手写板206上书写的内容后,可以在展示框207中显示多个与用户书写的内容相关联的候选词。电子设备检测到用户对某一候选词进行点击或选中操作后,可以将用户选中的候选词作为用户向电子设备输入的书写内容填入输入控件208。Referring to FIG. 2C , the input interface 203 includes an input method window 205. The input method window 205 includes a handwriting board 206 for receiving the user's written content. The user can re-enter the written content on the input control or the handwriting board 206. For example, the user can re-enter the first stroke of the written content on the handwriting board 206. After the electronic device recognizes the content written by the user on the handwriting board 206, a plurality of candidate words associated with the user's written content can be displayed in the display box 207. After the electronic device detects that the user clicks or selects a candidate word, the candidate word selected by the user can be filled into the input control 208 as the written content input by the user to the electronic device.
但是,用户通过上述方式向电子设备输入书写内容时,若用户对输入控件进行的触摸操作会触发电子设备的显示界面发生切换,由于界面切换后,电子设备会丢失掉该触摸操作对应的触摸轨迹,因此,用户需要在电子设备上进行至少两次同样的触摸操作。However, when the user inputs written content to the electronic device in the above manner, if the user's touch operation on the input control triggers the display interface of the electronic device to switch, the electronic device will lose the touch track corresponding to the touch operation after the interface switches. Therefore, the user needs to perform the same touch operation on the electronic device at least twice.
本申请实施例提供的手写输入方法,可以应用于电子设备中。该方法中,用户可以通过向电子设备输入与书写相关的触摸操作,以在电子设备上进行书写。电子设备基于用户的触摸操作,可以请求调用输入法服务并进入手写输入模式。并且,可以显示该触摸操作对应的触摸轨迹。在电子设备进入手写输入模式后,用户无需再向电子设备重复输入该触摸操作,而是可以在电子设备显示的该触摸操作对应的触摸轨迹的基础上,继续向电子设备输入新的触摸操作,以在电子设备上进行书写。本申请实施例提供的方法能够减少用户与电子设备交互的次数,从而提高输入效率。The handwriting input method provided in the embodiment of the present application can be applied to an electronic device. In the method, a user can write on the electronic device by inputting a touch operation related to writing to the electronic device. Based on the user's touch operation, the electronic device can request to call an input method service and enter a handwriting input mode. And, the touch track corresponding to the touch operation can be displayed. After the electronic device enters the handwriting input mode, the user does not need to repeatedly input the touch operation to the electronic device, but can continue to input new touch operations to the electronic device based on the touch track corresponding to the touch operation displayed by the electronic device to write on the electronic device. The method provided in the embodiment of the present application can reduce the number of times a user interacts with an electronic device, thereby improving input efficiency.
示例性的,本申请实施例中的电子设备可以为便携式计算机(如手机、折叠屏手机)、平板电脑、笔记本电脑、个人计算机(personal computer,PC)、可穿戴电子设备(如智能手表)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、车载电脑等,以下实施例对该电子设备的具体形式不做特殊限制。Exemplarily, the electronic device in the embodiments of the present application can be a portable computer (such as a mobile phone, a foldable screen mobile phone), a tablet computer, a laptop computer, a personal computer (PC), a wearable electronic device (such as a smart watch), an augmented reality (AR) device, a virtual reality (VR) device, a car computer, etc. The following embodiments do not impose any special restrictions on the specific form of the electronic device.
图3A示出了电子设备100的结构示意图。FIG. 3A shows a schematic structural diagram of the electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块130,电源管理模块131,电池132,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentification module,SIM)卡接口195等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 130, a power management module 131, a battery 132, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。例如,在电子设备进入手写输入模式的情况下,显示屏194可以显示用户向电子设备输入的触摸操作对应的触摸轨迹。The display screen 194 is used to display images, videos, etc. For example, when the electronic device enters the handwriting input mode, the display screen 194 can display the touch track corresponding to the touch operation input by the user to the electronic device.
显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystaldisplay,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,文字输入功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,词库,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flashstorage,UFS)等。The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, a text input function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a thesaurus, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
传感器模块180可以包括触摸传感器180K。触摸传感器180K也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。The sensor module 180 may include a touch sensor 180K. The touch sensor 180K is also called a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near it.
示例性的,触摸传感器180K可以检测到用户通过手指或如手写笔等工具在显示屏194上的触摸操作。For example, the touch sensor 180K may detect a touch operation performed by a user on the display screen 194 using a finger or a tool such as a stylus pen.
触摸传感器180K在检测到触摸操作的情况下,可以将检测到的触摸操作传递给处理器,以确定触摸事件的相关信息。处理器还可以控制显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。When the touch sensor 180K detects a touch operation, it can transmit the detected touch operation to the processor to determine relevant information of the touch event. The processor can also control the display screen 194 to provide visual output related to the touch operation. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.
例如,在本申请实施例中,触摸传感器180K可以用于检测用户在特定的控件和/或控件的周围的触摸操作,并将检测到的触摸操作传递给处理器。处理器接收到触摸传感器180K发送的触摸操作,可以基于电子设备是否请求调用输入法服务从而确定电子设备是否进入手写输入模式。For example, in the embodiment of the present application, the touch sensor 180K can be used to detect the user's touch operation on a specific control and/or around the control, and transmit the detected touch operation to the processor. The processor receives the touch operation sent by the touch sensor 180K and can determine whether the electronic device enters the handwriting input mode based on whether the electronic device requests to call the input method service.
基于图3A所示的电子设备100实现本申请实施例中的手写输入方法时,触摸传感器180K检测到用户输入的触摸操作,可以将检测到的触摸操作传递给处理器110。处理器110可以基于触摸操作对应的触摸轨迹的坐标,确定焦点控件。之后,处理器110可以检测电子设备是否请求调用输入法服务。在处理器110确定电子设备请求调用输入法服务的情况下,处理器可以控制电子设备进入手写输入模式,以及,控制显示屏194显示该触摸操作对应的触摸轨迹。When the handwriting input method in the embodiment of the present application is implemented based on the electronic device 100 shown in FIG. 3A, the touch sensor 180K detects the touch operation input by the user and can pass the detected touch operation to the processor 110. The processor 110 can determine the focus control based on the coordinates of the touch track corresponding to the touch operation. Afterwards, the processor 110 can detect whether the electronic device requests to call the input method service. In the case where the processor 110 determines that the electronic device requests to call the input method service, the processor can control the electronic device to enter the handwriting input mode, and control the display screen 194 to display the touch track corresponding to the touch operation.
并且,处理器110在进入手写输入模式的情况下,可以预测该触摸轨迹对应的字符。之后,处理器110可以控制显示屏194显示预测得到的字符。与用户先通过与电子设备交互以唤起输入法应用,之后基于唤起的输入法应用向电子设备输入对应的字符相比,本申请实施例提供的方法能够减少用户与电子设备交互的次数,从而提高输入效率。Furthermore, when the processor 110 enters the handwriting input mode, it can predict the character corresponding to the touch track. Afterwards, the processor 110 can control the display screen 194 to display the predicted character. Compared with the user first interacting with the electronic device to invoke the input method application, and then inputting the corresponding character to the electronic device based on the invoked input method application, the method provided in the embodiment of the present application can reduce the number of times the user interacts with the electronic device, thereby improving the input efficiency.
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system of the layered architecture is taken as an example to exemplify the software structure of the electronic device 100.
图3B是本发明实施例的电子设备100的软件结构框图。FIG. 3B is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android Runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime (Android Runtime) and the system library, and the kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图3B所示,应用程序包可以包括相机,图库,日历,地图,WLAN,音乐,短信息,输入法应用等应用程序。各应用程序包在运行时可以为电子设备提供不同的功能。例如,输入法应用运行时,电子设备可以基于输入法应用接收用户输入的字符或字符串。As shown in FIG3B , the application package may include applications such as camera, gallery, calendar, map, WLAN, music, short message, input method application, etc. Each application package may provide different functions for the electronic device when running. For example, when the input method application is running, the electronic device may receive characters or strings input by the user based on the input method application.
在一些实施例中,应用程序层还可以包括手写输入模块。位于应用程序层中的手写输入模块可以是用户安装在电子设备中的第三方应用程序。In some embodiments, the application layer may further include a handwriting input module. The handwriting input module in the application layer may be a third-party application installed in the electronic device by the user.
其中,手写输入模块可以在获取到用户在电子设备上的触摸轨迹的情况下,确定该触摸轨迹对应的触摸操作是点击操作还是滑动操作。和/或,手写输入模块可以在获取到用户在电子设备上的触摸轨迹的情况下,控制电子设备显示该触摸轨迹。和/或,手写输入模块可以在获取到用户在电子设备上的触摸轨迹的情况下,预测该触摸轨迹对应的字符,并控制电子设备显示该字符等。Wherein, the handwriting input module can determine whether the touch operation corresponding to the touch track is a click operation or a slide operation when the user's touch track on the electronic device is obtained. And/or, the handwriting input module can control the electronic device to display the touch track when the user's touch track on the electronic device is obtained. And/or, the handwriting input module can predict the character corresponding to the touch track when the user's touch track on the electronic device is obtained, and control the electronic device to display the character, etc.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
如图3B所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器,输入管理模块,焦点管理模块等。As shown in FIG. 3B , the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an input management module, a focus management module, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and disappear automatically after a short stay without user interaction.
输入管理模块可以在检测到用户输入的触摸操作的情况下,缓存该触摸操作对应的触摸轨迹的坐标。和/或,输入管理模块可以用于检测电子设备是否请求调用输入法服务,从而确定电子设备是否进入手写输入模式。和/或,输入管理模块可以用于确定用户的触摸操作是点击操作还是滑动操作等。The input management module can cache the coordinates of the touch track corresponding to the touch operation when a touch operation input by the user is detected. And/or, the input management module can be used to detect whether the electronic device requests to call the input method service, so as to determine whether the electronic device enters the handwriting input mode. And/or, the input management module can be used to determine whether the user's touch operation is a click operation or a slide operation, etc.
焦点管理模块用于在获取到用户在电子设备上的触摸轨迹的情况下,确定焦点窗口。和/或,焦点管理模块用于在确定焦点窗口的情况下,确定是否存在焦点控件等。The focus management module is used to determine the focus window when the touch track of the user on the electronic device is acquired. And/or, the focus management module is used to determine whether there is a focus control when the focus window is determined.
在一些实施例中,应用程序框架层还可以包括手写输入模块。位于应用程序框架层中的手写输入模块可以是电子设备的软件系统中自带的模块。其中,位于应用程序框架层中的手写输入模块的描述可以参见位于应用程序层中的手写输入模块的描述,在此不做赘述。In some embodiments, the application framework layer may further include a handwriting input module. The handwriting input module in the application framework layer may be a module provided in the software system of the electronic device. The description of the handwriting input module in the application framework layer may refer to the description of the handwriting input module in the application layer, and will not be repeated here.
Android Runtime包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。A 2D graphics engine is a drawing engine for 2D drawings.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
示例性的,以下实施例中所涉及的技术方案均可以在具有上述硬件架构和/或上述软件架构的电子设备中实现。下面结合附图和手写输入场景对本申请实施例提供的手写输入方法进行详细说明。Exemplarily, the technical solutions involved in the following embodiments can all be implemented in an electronic device having the above hardware architecture and/or the above software architecture. The handwriting input method provided in the embodiments of the present application is described in detail below in conjunction with the accompanying drawings and handwriting input scenarios.
电子设备显示的界面可以包括多个窗口,每个窗口上又可以包括多个控件。例如,参见图4A,电子设备显示的界面中包括窗口400。窗口400上叠加显示有窗口410、窗口420以及窗口430。窗口410中包括控件411和控件412。窗口420中包括控件421。窗口430中包括控件431、控件432以及控件433。The interface displayed by the electronic device may include multiple windows, and each window may include multiple controls. For example, referring to FIG. 4A , the interface displayed by the electronic device includes window 400. Window 400 is superimposed with windows 410, 420, and 430. Window 410 includes controls 411 and 412. Window 420 includes controls 421. Window 430 includes controls 431, 432, and 433.
在一些实施例中,用户可以在电子设备的显示屏上进行触摸操作,以向电子设备输入触摸轨迹。电子设备在检测到用户的触摸操作的情况下,可以获取该触摸轨迹的坐标。电子设备基于触摸轨迹的坐标,可以在触摸轨迹经过的至少一个窗口中确定焦点窗口。以及,在触摸轨迹经过了焦点窗口中的至少一个控件的情况下,电子设备可以在焦点窗口中触摸轨迹经过的至少一个控件中确定焦点控件。In some embodiments, a user may perform a touch operation on a display screen of an electronic device to input a touch track to the electronic device. When the electronic device detects a touch operation of the user, it may obtain the coordinates of the touch track. Based on the coordinates of the touch track, the electronic device may determine a focus window in at least one window through which the touch track passes. Also, when the touch track passes through at least one control in the focus window, the electronic device may determine a focus control in at least one control through which the touch track passes in the focus window.
其中,触摸轨迹的坐标可以包括触摸轨迹的起点坐标、终点坐标,以及从起点坐标到终点坐标之间触摸轨迹经过的预设数量个触摸点的点坐标。The coordinates of the touch track may include the starting point coordinates, the ending point coordinates, and the point coordinates of a preset number of touch points that the touch track passes through between the starting point coordinates and the ending point coordinates.
在一些实施例中,电子设备可以获取触摸轨迹的起点坐标,并将触摸轨迹的起点坐标所在的窗口确定为焦点窗口。之后,电子设备可以检测该触摸轨迹是否经过焦点窗口中的至少一个控件。In some embodiments, the electronic device may obtain the starting coordinates of the touch track and determine the window where the starting coordinates of the touch track are located as the focus window. Afterwards, the electronic device may detect whether the touch track passes through at least one control in the focus window.
若触摸轨迹经过焦点窗口中的至少一个控件,电子设备可以获取触摸轨迹在焦点窗口中经过首个控件时的点坐标。之后,电子设备可以将该点坐标所在的控件确定为焦点控件。或者,若触摸轨迹经过焦点窗口中的至少一个控件,电子设备可以获取触摸轨迹在焦点窗口中经过末个控件时的点坐标。之后,电子设备可以将该点坐标所在的控件确定为焦点控件。If the touch track passes through at least one control in the focus window, the electronic device can obtain the point coordinates of the touch track when it passes through the first control in the focus window. Afterwards, the electronic device can determine the control where the point coordinates are located as the focus control. Alternatively, if the touch track passes through at least one control in the focus window, the electronic device can obtain the point coordinates of the touch track when it passes through the last control in the focus window. Afterwards, the electronic device can determine the control where the point coordinates are located as the focus control.
若触摸轨迹未经过焦点窗口中的任何一个控件,电子设备可以确定当前显示的界面中不存在焦点控件。If the touch track does not pass through any control in the focus window, the electronic device can determine that there is no focus control in the currently displayed interface.
示例性的,继续参见图4A。用户在电子设备的显示屏上进行触摸操作,以向电子设备输入触摸轨迹。其中,触摸轨迹经过窗口400、窗口410以及窗口420。电子设备在检测到用户的触摸操作的情况下,可以获取该触摸操作对应的触摸轨迹的起点坐标。由于该触摸轨迹的起点坐标位于窗口400内,因此,电子设备可以将窗口400确定为焦点窗口。Exemplarily, continue to refer to FIG. 4A. The user performs a touch operation on the display screen of the electronic device to input a touch track to the electronic device. The touch track passes through window 400, window 410, and window 420. When the electronic device detects the user's touch operation, it can obtain the starting point coordinates of the touch track corresponding to the touch operation. Since the starting point coordinates of the touch track are located in window 400, the electronic device can determine window 400 as the focus window.
之后,电子设备可以检测触摸轨迹是否经过窗口400中的控件。由于触摸轨迹未经过窗口400中的任何一个控件,因此,电子设备可以确定当前显示的界面中不存在焦点控件。Afterwards, the electronic device may detect whether the touch track passes through a control in the window 400. Since the touch track does not pass through any control in the window 400, the electronic device may determine that there is no focus control in the currently displayed interface.
示例性的,参见图4B。用户在电子设备的显示屏上进行触摸操作,以向电子设备输入触摸轨迹。其中,触摸轨迹经过窗口440、窗口450以及窗口460。电子设备在检测到用户的触摸操作的情况下,可以获取该触摸操作对应的触摸轨迹的起点坐标。由于触摸轨迹的起点位于窗口440中,因此,电子设备可以将窗口440确定为焦点窗口。For example, see FIG4B. The user performs a touch operation on the display screen of the electronic device to input a touch track to the electronic device. The touch track passes through window 440, window 450, and window 460. When the electronic device detects the user's touch operation, it can obtain the starting point coordinates of the touch track corresponding to the touch operation. Since the starting point of the touch track is located in window 440, the electronic device can determine window 440 as the focus window.
之后,电子设备可以检测触摸轨迹是否经过窗口440中的控件。Afterwards, the electronic device may detect whether the touch track passes through the controls in window 440 .
由于触摸轨迹经过窗口440中的控件441和控件442,并且,电子设备基于触摸轨迹的坐标可以确定触摸轨迹在窗口440中经过的首个控件为控件441。因此,电子设备可以将控件441确定为焦点控件。或者,由于触摸轨迹经过窗口440中的控件441和控件442,并且,电子设备基于触摸轨迹的坐标可以确定触摸轨迹在窗口440中经过的末个控件为控件442。因此,电子设备可以将控件442确定为焦点控件。Since the touch track passes through control 441 and control 442 in window 440, and the electronic device can determine that the first control that the touch track passes through in window 440 is control 441 based on the coordinates of the touch track. Therefore, the electronic device can determine control 441 as the focus control. Alternatively, since the touch track passes through control 441 and control 442 in window 440, and the electronic device can determine that the last control that the touch track passes through in window 440 is control 442 based on the coordinates of the touch track. Therefore, the electronic device can determine control 442 as the focus control.
在一些实施例中,电子设备可以获取触摸轨迹的终点坐标,并将触摸轨迹的终点坐标所在的窗口确定为焦点窗口。之后,电子设备可以检测该触摸轨迹是否经过焦点窗口中的至少一个控件。In some embodiments, the electronic device may obtain the coordinates of the end point of the touch track, and determine the window where the coordinates of the end point of the touch track are located as the focus window. Afterwards, the electronic device may detect whether the touch track passes through at least one control in the focus window.
若触摸轨迹经过焦点窗口中的至少一个控件,电子设备可以获取触摸轨迹在焦点窗口中经过首个控件时的点坐标。之后,电子设备可以将该点坐标所在的控件确定为焦点控件。或者,若触摸轨迹经过焦点窗口中的至少一个控件,电子设备可以获取触摸轨迹在焦点窗口中经过末个控件时的点坐标。之后,电子设备可以将该点坐标所在的控件确定为焦点控件。If the touch track passes through at least one control in the focus window, the electronic device can obtain the point coordinates of the touch track when it passes through the first control in the focus window. Afterwards, the electronic device can determine the control where the point coordinates are located as the focus control. Alternatively, if the touch track passes through at least one control in the focus window, the electronic device can obtain the point coordinates of the touch track when it passes through the last control in the focus window. Afterwards, the electronic device can determine the control where the point coordinates are located as the focus control.
若触摸轨迹未经过焦点窗口中的任何一个控件,且电子设备在检测到用户的触摸操作前确定某一控件为焦点控件。则电子设备在检测到用户的触摸操作后,可以仍将之前确定的该控件确定为焦点控件。If the touch track does not pass through any control in the focus window, and the electronic device determines a control as the focus control before detecting the user's touch operation, the electronic device may still determine the previously determined control as the focus control after detecting the user's touch operation.
若触摸轨迹未经过焦点窗口中的任何一个控件,且电子设备在检测到用户的触摸操作前确定显示的界面中不存在焦点控件。则电子设备在检测到用户的触摸操作后,仍确定显示的界面中不存在焦点控件。If the touch track does not pass through any control in the focus window, and the electronic device determines that there is no focus control in the displayed interface before detecting the user's touch operation, then the electronic device still determines that there is no focus control in the displayed interface after detecting the user's touch operation.
可以理解的是,在同一时间,电子设备中只能包括一个焦点窗口,或者,电子设备中只能包括一个焦点窗口和一个焦点控件。随着电子设备每一次获取到用户的触摸轨迹,电子设备显示的各控件可能接续成为焦点控件,电子设备显示的各窗口也可能接续成为焦点窗口。It is understandable that at the same time, the electronic device can only include one focus window, or the electronic device can only include one focus window and one focus control. As the electronic device acquires the user's touch track each time, each control displayed by the electronic device may successively become a focus control, and each window displayed by the electronic device may successively become a focus window.
示例性的,继续参见图4C,用户在电子设备的显示屏上进行触摸操作,以向电子设备输入触摸轨迹。由于该触摸轨迹均位于控件471内,且控件471位于窗口470内,因此,电子设备基于该触摸轨迹的坐标可以将控件471确定为焦点控件。以及,电子设备可以基于该触摸轨迹的坐标将窗口470确定为焦点窗口。Exemplarily, referring to FIG. 4C , the user performs a touch operation on the display screen of the electronic device to input a touch track to the electronic device. Since the touch tracks are all located in the control 471, and the control 471 is located in the window 470, the electronic device can determine the control 471 as the focus control based on the coordinates of the touch track. And the electronic device can determine the window 470 as the focus window based on the coordinates of the touch track.
继续参见图4C,在控件471被确定为焦点控件,窗口470被确定为焦点窗口之后。若用户再次在电子设备的显示屏上进行触摸操作,电子设备获取到该触摸操作对应的触摸轨迹后,由于该触摸轨迹均位于控件481内,且控件481位于窗口480内。因此,电子设备基于该触摸轨迹的坐标可以将控件481确定为焦点控件。以及,电子设备基于该触摸轨迹的坐标可以将窗口480确定为焦点窗口。此时,控件471不再被确定为焦点控件,窗口470也不再被确定为焦点窗口。即,焦点控件和焦点窗口均发生切换。Continuing to refer to Figure 4C, after control 471 is determined as the focus control and window 470 is determined as the focus window. If the user performs a touch operation on the display screen of the electronic device again, after the electronic device obtains the touch track corresponding to the touch operation, since the touch track is located in control 481, and control 481 is located in window 480. Therefore, the electronic device can determine control 481 as the focus control based on the coordinates of the touch track. And, the electronic device can determine window 480 as the focus window based on the coordinates of the touch track. At this time, control 471 is no longer determined as the focus control, and window 470 is no longer determined as the focus window. That is, both the focus control and the focus window are switched.
继续参见图4D,在控件491被确定为焦点控件,窗口490被确定为焦点窗口之后。若用户再次在电子设备的显示屏上进行触摸操作,电子设备获取到该触摸操作对应的触摸轨迹后,由于该触摸轨迹均位于控件492内,且控件492位于窗口490内。因此,电子设备基于该触摸轨迹的坐标可以将控件492确定为焦点控件。以及,电子设备基于该触摸轨迹的坐标可以将窗口490确定为焦点窗口。此时,控件491不再被确定为焦点控件,但窗口490仍然被确定为焦点窗口。即,焦点控件发生切换,焦点窗口未发生切换。Continuing to refer to Figure 4D, after control 491 is determined as the focus control and window 490 is determined as the focus window. If the user performs a touch operation on the display screen of the electronic device again, after the electronic device obtains the touch track corresponding to the touch operation, since the touch track is located in control 492, and control 492 is located in window 490. Therefore, the electronic device can determine control 492 as the focus control based on the coordinates of the touch track. And, the electronic device can determine window 490 as the focus window based on the coordinates of the touch track. At this time, control 491 is no longer determined as the focus control, but window 490 is still determined as the focus window. That is, the focus control is switched, and the focus window is not switched.
基于上述示例可知,焦点控件发生切换时,焦点窗口不一定发生切换。而焦点窗口发生切换时,焦点控件会发生切换。Based on the above examples, it can be seen that when the focus control switches, the focus window does not necessarily switch. However, when the focus window switches, the focus control switches.
在一些实施例中,电子设备在检测到用户输入的触摸轨迹后,可以确定是否存在焦点控件。若存在焦点控件,电子设备可以确定焦点控件是否发生切换。In some embodiments, after detecting the touch track input by the user, the electronic device can determine whether there is a focus control. If there is a focus control, the electronic device can determine whether the focus control is switched.
其中,电子设备可以通过如下方式确定焦点控件是否发生切换:The electronic device may determine whether the focus control is switched in the following manner:
电子设备基于在检测到用户输入的触摸轨迹后确定的焦点控件和在检测到用户输入的触摸轨迹前确定的焦点控件是否为同一控件,可以确定焦点控件是否发生切换。其中,若为同一控件,则可以确定焦点控件未发生切换。若不为同一控件,则可以确定焦点控件发生切换。The electronic device can determine whether the focus control is switched based on whether the focus control determined after detecting the touch track of the user input and the focus control determined before detecting the touch track of the user input are the same control. If they are the same control, it can be determined that the focus control has not been switched. If they are not the same control, it can be determined that the focus control has been switched.
或者,电子设备若检测到用户输入触摸轨迹前显示的界面中不存在焦点控件,但用户输入触摸轨迹后显示的界面中存在焦点控件,则电子设备可以确定焦点控件发生切换。Alternatively, if the electronic device detects that there is no focus control in the interface displayed before the user inputs the touch track, but there is a focus control in the interface displayed after the user inputs the touch track, the electronic device can determine that the focus control is switched.
在一些实施例中,电子设备在确定焦点控件发生切换的情况下,可以基于是否请求调用输入法服务,确定是否进入手写输入模式。若电子设备请求调用输入法服务,则电子设备进入手写输入模式。若电子设备未请求调用输入法服务,则电子设备不进入手写输入模式。In some embodiments, when determining that the focus control is switched, the electronic device can determine whether to enter the handwriting input mode based on whether the input method service is requested to be called. If the electronic device requests to call the input method service, the electronic device enters the handwriting input mode. If the electronic device does not request to call the input method service, the electronic device does not enter the handwriting input mode.
例如,在电子设备确定焦点控件发生切换前,电子设备已经进入手写输入模式。则在电子设备确定焦点控件发生切换后,若电子设备未请求调用输入法服务,则电子设备退出手写输入模式。For example, before the electronic device determines that the focus control is switched, the electronic device has entered the handwriting input mode. After the electronic device determines that the focus control is switched, if the electronic device does not request to call the input method service, the electronic device exits the handwriting input mode.
若在电子设备确定焦点控件发生切换前,电子设备未进入手写输入模式。则在电子设备确定焦点控件发生切换后,若电子设备未请求调用输入法服务,电子设备仍然保持不进入手写输入模式。If the electronic device does not enter the handwriting input mode before the electronic device determines that the focus control is switched, then after the electronic device determines that the focus control is switched, if the electronic device does not request to call the input method service, the electronic device still does not enter the handwriting input mode.
又例如,在电子设备确定焦点控件发生切换前,电子设备已经进入手写输入模式。则在电子设备确定焦点控件发生切换后,若电子设备请求调用输入法服务,则电子设备仍然保持进入手写输入模式。For another example, before the electronic device determines that the focus control has switched, the electronic device has entered the handwriting input mode. After the electronic device determines that the focus control has switched, if the electronic device requests to call the input method service, the electronic device still remains in the handwriting input mode.
若在电子设备确定焦点控件发生切换前,电子设备未进入手写输入模式。则在电子设备确定焦点控件发生切换后,若电子设备请求调用输入法服务,则电子设备进入手写输入模式。If the electronic device does not enter the handwriting input mode before the electronic device determines that the focus control is switched, then after the electronic device determines that the focus control is switched, if the electronic device requests to call the input method service, the electronic device enters the handwriting input mode.
可见,本申请实施例提供的方法中,电子设备检测到用户对某一控件进行触摸操作时,即使该控件不是与电子设备的全局手写功能相适配的标准输入控件,电子设备也可以基于是否请求调用输入法服务从而确定是否进入手写输入模式。即,本申请实施例提供的方法无需第三方应用的输入控件与电子设备的全局手写功能相适配,电子设备也可以进入手写输入模式,用户可以直接在第三方应用的输入控件中进行书写以完成向电子设备的输入。It can be seen that in the method provided in the embodiment of the present application, when the electronic device detects that the user performs a touch operation on a certain control, even if the control is not a standard input control that is compatible with the global handwriting function of the electronic device, the electronic device can determine whether to enter the handwriting input mode based on whether to request to call the input method service. That is, the method provided in the embodiment of the present application does not require the input control of the third-party application to be compatible with the global handwriting function of the electronic device, and the electronic device can also enter the handwriting input mode, and the user can directly write in the input control of the third-party application to complete the input to the electronic device.
在一些实施例中,用户每次从接触电子设备的显示屏到停止接触电子设备的显示屏视为一次触摸操作。在用户每次在电子设备上进行触摸操作的过程中,电子设备检测到用户停止接触电子设备的显示屏,则确定用户结束本次触摸操作。In some embodiments, each time the user touches the display screen of the electronic device and stops touching the display screen of the electronic device is considered as a touch operation. During each touch operation performed by the user on the electronic device, if the electronic device detects that the user stops touching the display screen of the electronic device, it is determined that the user has ended the touch operation.
其中,用户在电子设备的显示屏上进行的触摸操作可以包括点击操作和滑动操作。电子设备可以基于获取的触摸轨迹的坐标,确定用户的触摸操作是点击操作还是滑动操作。The touch operation performed by the user on the display screen of the electronic device may include a click operation and a slide operation. The electronic device may determine whether the touch operation of the user is a click operation or a slide operation based on the coordinates of the acquired touch track.
参见图5中的(a),用户可以通过手指或如手写笔等工具点击显示屏上的某个位置,以在电子设备的显示屏上进行点击操作。其中,用户在进行点击操作时,向电子设备输入的触摸轨迹501为点状。因此,若电子设备获取的触摸轨迹的坐标包括的点坐标的数量小于预设数量(例如,小于2),电子设备可以确定用户的触摸操作是点击操作。Referring to (a) in FIG. 5 , a user can click a certain position on the display screen with a finger or a tool such as a stylus pen to perform a click operation on the display screen of the electronic device. When the user performs the click operation, the touch track 501 input to the electronic device is in the form of a point. Therefore, if the number of point coordinates included in the coordinates of the touch track acquired by the electronic device is less than a preset number (for example, less than 2), the electronic device can determine that the user's touch operation is a click operation.
参见图5中的(b),用户可以在保持手指或如手写笔等工具与显示屏接触的情况下移动手指或如手写笔等工具,以在电子设备的显示屏上进行滑动操作。其中,用户在进行滑动操作时,向电子设备输入的触摸轨迹502为线状。因此,若电子设备获取的触摸轨迹的坐标包括的点坐标的数量大于或等于预设数量(例如,大于2),电子设备可以确定用户的触摸操作是滑动操作。Referring to (b) in FIG. 5 , the user can move a finger or a tool such as a stylus pen while keeping the finger or a tool such as a stylus pen in contact with the display screen to perform a sliding operation on the display screen of the electronic device. When the user performs the sliding operation, the touch track 502 input to the electronic device is linear. Therefore, if the number of point coordinates included in the coordinates of the touch track acquired by the electronic device is greater than or equal to a preset number (for example, greater than 2), the electronic device can determine that the user's touch operation is a sliding operation.
在一些实施例中,在电子设备响应于用户的触摸操作,进入手写输入模式的情况下,若电子设备确定该触摸操作为滑动操作,电子设备可以基于该触摸操作对应的触摸轨迹的坐标,显示该触摸操作对应的触摸轨迹,从而更为直观的向用户展示该触摸轨迹。若电子设备确定该触摸操作为点击操作,则电子设备可以不显示该点击操作对应的触摸轨迹,从而节约电子设备的运行内存。In some embodiments, when the electronic device enters the handwriting input mode in response to a user's touch operation, if the electronic device determines that the touch operation is a sliding operation, the electronic device may display the touch track corresponding to the touch operation based on the coordinates of the touch track corresponding to the touch operation, thereby more intuitively showing the touch track to the user. If the electronic device determines that the touch operation is a click operation, the electronic device may not display the touch track corresponding to the click operation, thereby saving the running memory of the electronic device.
示例性的,参见图6A。用户可以在控件601和/或控件601的周围进行触摸操作。电子设备检测到用户的触摸操作后,可以将控件601确定为焦点控件,并请求调用输入法服务。由于电子设备请求调用了输入法服务,因此,电子设备可以进入手写输入模式。之后,电子设备在确定用户的触摸操作为滑动操作的情况下,可以基于该滑动操作对应的触摸轨迹的坐标,在控件601和/或控件601的周围显示该触摸轨迹。For example, see Figure 6A. The user can perform a touch operation on control 601 and/or around control 601. After the electronic device detects the user's touch operation, it can determine control 601 as the focus control and request to call the input method service. Since the electronic device requests to call the input method service, the electronic device can enter the handwriting input mode. Afterwards, when the electronic device determines that the user's touch operation is a sliding operation, the electronic device can display the touch track on control 601 and/or around control 601 based on the coordinates of the touch track corresponding to the sliding operation.
在一些实施例中,在电子设备显示用户的触摸操作(本申请实施例中也可称为第一触摸操作)对应的触摸轨迹(本申请实施例中也可称为第一触摸轨迹)之后,若用户继续向电子设备输入触摸操作(本申请实施例中也可称为第二触摸操作)。电子设备在检测到用户的第二触摸操作后,可以检测焦点控件是否发生切换。In some embodiments, after the electronic device displays a touch track (also referred to as a first touch track in the embodiment of the present application) corresponding to a user's touch operation (also referred to as a first touch operation in the embodiment of the present application), if the user continues to input a touch operation (also referred to as a second touch operation in the embodiment of the present application) to the electronic device. After detecting the user's second touch operation, the electronic device can detect whether the focus control is switched.
若焦点控件未发生切换,电子设备可以显示第二触摸操作对应的触摸轨迹(本申请实施例中也可称为第二触摸轨迹)。If the focus control does not switch, the electronic device can display the touch track corresponding to the second touch operation (which may also be referred to as the second touch track in the embodiment of the present application).
若焦点控件发生切换,电子设备可以参照前述实施例中的描述,基于电子设备是否请求调用输入法服务从而重新确定电子设备是否进入手写输入模式,以及,进行对应的响应。If the focus control switches, the electronic device can refer to the description in the above embodiment, and re-determine whether the electronic device enters the handwriting input mode based on whether the electronic device requests to call the input method service, and make a corresponding response.
在一些实施例中,电子设备可以基于第一触摸轨迹的坐标和/或第二触摸轨迹的坐标,预测与第一触摸轨迹和/或第二触摸轨迹对应的至少一个字符。之后,电子设备可以在焦点控件中显示至少一个字符中的目标字符。In some embodiments, the electronic device may predict at least one character corresponding to the first touch track and/or the second touch track based on the coordinates of the first touch track and/or the coordinates of the second touch track. Afterwards, the electronic device may display the target character in the at least one character in the focus control.
其中,目标字符可以包括第一目标字符、第二目标字符以及第三目标字符。第一目标字符可以是基于第一触摸轨迹的坐标,得到的第一触摸轨迹对应的字符。第二目标字符可以是基于第一触摸轨迹的坐标和第二触摸轨迹的坐标,得到的第一触摸轨迹和第二触摸轨迹对应的字符。第三目标字符可以是基于第二触摸轨迹的坐标得到的第二触摸轨迹对应的字符。The target characters may include a first target character, a second target character, and a third target character. The first target character may be a character corresponding to the first touch track obtained based on the coordinates of the first touch track. The second target character may be a character corresponding to the first touch track and the second touch track obtained based on the coordinates of the first touch track and the coordinates of the second touch track. The third target character may be a character corresponding to the second touch track obtained based on the coordinates of the second touch track.
在一些实施例中,目标字符可以是与第一触摸轨迹和/或第二触摸轨迹的匹配度最高的字符。例如,第一目标字符可以是与第一触摸轨迹的匹配度最高的字符。第二目标字符可以是与第一触摸轨迹和第二触摸轨迹的匹配度最高的字符。第三目标字符可以是与第二触摸轨迹的匹配度最高的字符。In some embodiments, the target character may be the character with the highest degree of matching with the first touch track and/or the second touch track. For example, the first target character may be the character with the highest degree of matching with the first touch track. The second target character may be the character with the highest degree of matching with the first touch track and the second touch track. The third target character may be the character with the highest degree of matching with the second touch track.
示例性的,继续参见图6A。用户向电子设备输入针对控件601的第一触摸操作,电子设备随着用户输入的第一触摸操作可以显示第一触摸轨迹“一”。之后,用户可以继续向电子设备输入针对控件601的第二触摸操作,电子设备随着用户输入的第二触摸操作可以显示第二触摸轨迹“丿”。电子设备基于第一触摸轨迹的坐标和第二触摸轨迹的坐标,可以通过预测得到与第一触摸轨迹和第二触摸轨迹对应的至少一个字符(例如,得到字符“厂”、“T”、“尸”等)。之后,电子设备可以在控件601中显示与第一触摸轨迹和第二触摸轨迹的匹配度最高的字符(例如,显示字符“厂”)。Exemplary, continue to refer to Figure 6A. The user inputs a first touch operation for the control 601 to the electronic device, and the electronic device can display a first touch track "一" along with the first touch operation input by the user. Afterwards, the user can continue to input a second touch operation for the control 601 to the electronic device, and the electronic device can display a second touch track "丿" along with the second touch operation input by the user. Based on the coordinates of the first touch track and the coordinates of the second touch track, the electronic device can predict at least one character corresponding to the first touch track and the second touch track (for example, obtain the characters "厂", "T", "尸", etc.). Afterwards, the electronic device can display the character with the highest matching degree with the first touch track and the second touch track in the control 601 (for example, display the character "厂").
在一些实施例中,参见图6B,目标字符可以是用户选中的字符。电子设备基于第一触摸轨迹的坐标和/或第二触摸轨迹的坐标,预测得到与第一触摸轨迹和/或第二触摸轨迹对应的至少一个字符后,还可以显示展示框602。展示框602中包括电子设备预测得到的至少一个字符。用户可以对至少一个字符中的目标字符进行点击或选中操作。电子设备检测到用户对目标字符的点击或选中操作后,可以在焦点控件603中显示该目标字符。In some embodiments, referring to FIG6B , the target character may be a character selected by the user. After the electronic device predicts at least one character corresponding to the first touch track and/or the second touch track based on the coordinates of the first touch track and/or the coordinates of the second touch track, it may also display a display frame 602. Display frame 602 includes at least one character predicted by the electronic device. The user may click or select the target character in at least one character. After the electronic device detects the user's click or selection operation on the target character, the target character may be displayed in the focus control 603.
在一些实施例中,电子设备可以通过输入法应用预测第一触摸轨迹和/或第二触摸轨迹对应的至少一个字符。之后,电子设备可以拉起输入法应用对应的输入法窗口。输入法窗口中包括显示有输入法应用预测得到的至少一个字符的展示框。用户可以通过对展示框中的目标字符进行点击或选中操作,以向焦点控件中输入该字符。In some embodiments, the electronic device may predict at least one character corresponding to the first touch track and/or the second touch track through an input method application. Afterwards, the electronic device may pull up an input method window corresponding to the input method application. The input method window includes a display box displaying at least one character predicted by the input method application. The user may click or select the target character in the display box to input the character into the focus control.
本申请实施例以用户向电子设备输入针对焦点控件的第一触摸操作和/或第二触摸操作为例,示例性的说明了电子设备获取第一触摸轨迹和/或第二触摸轨迹对应的字符的方法。在实际应用中,用户向电子设备输入针对焦点控件的第二触摸操作之后,还可以继续向电子设备输入针对焦点控件的第三触摸操作、第四触摸操作等更多触摸操作。电子设备可以在检测到用户输入的第三触摸操作、第四触摸操作等更多触摸操作后,显示第三触摸操作对应的第三触摸轨迹、第四触摸操作对应的第四触摸轨迹等更多的触摸轨迹。电子设备基于这些触摸轨迹,可以预测得到对应的字符。The embodiment of the present application takes the example of a user inputting a first touch operation and/or a second touch operation for a focus control to an electronic device, and exemplifies a method for an electronic device to obtain characters corresponding to a first touch trajectory and/or a second touch trajectory. In actual applications, after the user inputs a second touch operation for a focus control to the electronic device, the user may continue to input a third touch operation, a fourth touch operation, and other more touch operations for the focus control to the electronic device. After detecting the third touch operation, the fourth touch operation, and other more touch operations input by the user, the electronic device may display more touch trajectories, such as a third touch trajectory corresponding to the third touch operation, a fourth touch trajectory corresponding to the fourth touch operation, and so on. Based on these touch trajectories, the electronic device may predict the corresponding characters.
在一些实施例中,在电子设备响应于用户的触摸操作,进入手写输入模式,并将显示的界面由第一界面切换为第二界面的情况下,若电子设备确定该触摸操作为滑动操作,电子设备可以将该触摸操作确定为第一触摸操作,并在第二界面中显示第一触摸操作对应的第一触摸轨迹,从而更为直观的向用户展示该第一触摸轨迹。若电子设备确定该触摸操作为点击操作,电子设备可以不显示该点击操作对应的触摸轨迹,从而节约电子设备的运行内存。In some embodiments, when the electronic device enters the handwriting input mode in response to the user's touch operation and switches the displayed interface from the first interface to the second interface, if the electronic device determines that the touch operation is a sliding operation, the electronic device may determine the touch operation as a first touch operation and display the first touch track corresponding to the first touch operation in the second interface, thereby more intuitively showing the first touch track to the user. If the electronic device determines that the touch operation is a click operation, the electronic device may not display the touch track corresponding to the click operation, thereby saving the running memory of the electronic device.
在一些实施例中,第一界面中可以包括第一控件,第二界面中可以包括第二控件。第一控件与第二控件相关联。其中,第一控件与第二控件相关联是指电子设备若确定第一控件为焦点控件,则可以将显示的界面由第一界面切换为第二界面,并将第二控件代替第一控件确定为新的焦点控件。In some embodiments, the first interface may include a first control, and the second interface may include a second control. The first control is associated with the second control. The association of the first control with the second control means that if the electronic device determines that the first control is the focus control, the displayed interface can be switched from the first interface to the second interface, and the second control is determined to replace the first control as the new focus control.
示例性,继续参见图7,用户可以在控件701和/或控件701的周围进行触摸操作。其中,用户在控件701和/或控件701的周围进行的触摸操作会触发电子设备显示的界面发生切换,即由界面702切换为界面703。电子设备检测到用户的触摸操作后,可以将控件701确定为焦点控件。之后,电子设备可以将显示的界面由界面702切换为界面703。电子设备显示界面703后,可以将界面703中的控件704确定为新的焦点控件。For example, referring to FIG. 7 , the user can perform a touch operation on control 701 and/or around control 701. Among them, the touch operation performed by the user on control 701 and/or around control 701 will trigger the interface displayed by the electronic device to switch, that is, switch from interface 702 to interface 703. After the electronic device detects the user's touch operation, it can determine control 701 as the focus control. Afterwards, the electronic device can switch the displayed interface from interface 702 to interface 703. After the electronic device displays interface 703, it can determine control 704 in interface 703 as the new focus control.
在一些实施例中,若电子设备检测到用户针对第一控件输入的触摸操作为滑动操作,则电子设备可以将该触摸操作确定为第一触摸操作,并可以在第二控件中和/或第二控件的周围显示该第一触摸操作对应的第一触摸轨迹。In some embodiments, if the electronic device detects that the touch operation input by the user to the first control is a sliding operation, the electronic device can determine the touch operation as a first touch operation, and can display a first touch trajectory corresponding to the first touch operation in the second control and/or around the second control.
示例性的,继续参见图7,若用户在界面702中输入的触摸操作为滑动操作,电子可以将用户的触摸操作确定为第一触摸操作,并在界面703包括的控件704中显示第一触摸操作对应的第一触摸轨迹。Exemplarily, referring to FIG. 7 , if the touch operation input by the user in the interface 702 is a sliding operation, the electronic device may determine the user's touch operation as a first touch operation and display a first touch track corresponding to the first touch operation in the control 704 included in the interface 703 .
在一些实施例中,电子设备在第二界面中显示第一触摸轨迹的情况下,用户无需在第二界面中重复输入针对焦点控件的第一触摸操作,而是可以继续在第二界面中输入之后的书写内容,从而提高书写效率。In some embodiments, when the electronic device displays the first touch track in the second interface, the user does not need to repeatedly input the first touch operation for the focus control in the second interface, but can continue to input subsequent writing content in the second interface, thereby improving writing efficiency.
示例性的,继续参见图7,在界面703包括的控件704中显示第一触摸操作对应的第一触摸轨迹的情况下,用户还可以继续在控件704和/或控件704的周围输入如第二触摸操作等更多的触摸操作,以进行之后的书写。电子设备在检测到用户输入的如第二触摸操作等更多的触摸操作的情况下,可以显示如第二触摸操作对应的第二触摸轨迹等更多的触摸轨迹。Exemplarily, referring to FIG. 7 , when the first touch track corresponding to the first touch operation is displayed in the control 704 included in the interface 703, the user can continue to input more touch operations such as the second touch operation in the control 704 and/or around the control 704 to perform subsequent writing. When the electronic device detects more touch operations such as the second touch operation input by the user, it can display more touch tracks such as the second touch track corresponding to the second touch operation.
在一些实施例中,电子设备可以基于用户在第一界面中输入的第一触摸轨迹的坐标和/或用户在第二界面中输入的第二触摸轨迹的坐标,预测用户在第一界面和/或第二界面中输入的触摸轨迹对应的至少一个字符。之后,电子设备可以在焦点控件(例如,上述实施例中的第二控件)中显示至少一个字符中的目标字符。In some embodiments, the electronic device may predict at least one character corresponding to the touch track input by the user in the first interface and/or the second interface based on the coordinates of the first touch track input by the user in the first interface and/or the coordinates of the second touch track input by the user in the second interface. Afterwards, the electronic device may display the target character in the at least one character in the focus control (e.g., the second control in the above embodiment).
示例性的,在目标字符是与第一触摸轨迹和/或第二触摸轨迹的匹配度最高的字符的情况下,继续参见图7。电子设备基于用户在控件701和/或控件701的周围输入的第一触摸操作对应的第一触摸轨迹的坐标和用户在控件704和/或控件701的周围输入的第二触摸操作对应的第二触摸轨迹的坐标,可以预测得到目标字符“人”。之后,电子设备可以在控件704中显示目标字符“人”。Exemplarily, when the target character is the character with the highest matching degree with the first touch track and/or the second touch track, continue to refer to FIG. 7. The electronic device can predict the target character "人" based on the coordinates of the first touch track corresponding to the first touch operation input by the user on the control 701 and/or around the control 701 and the coordinates of the second touch track corresponding to the second touch operation input by the user on the control 704 and/or around the control 701. Afterwards, the electronic device can display the target character "人" in the control 704.
在一些实施例中,在目标字符是用户选中的字符的情况下,参见图8,电子设备可以基于用户在第一界面801中输入的第一触摸操作对应的第一触摸轨迹的坐标和/或用户在第二界面802中输入的第二触摸操作对应的第二触摸轨迹的坐标,预测用户在第一界面801和/或第二界面802中输入的触摸轨迹对应的至少一个字符。之后,电子设备可以显示展示框803。展示框803中包括电子设备预测得到的至少一个字符。用户可以对至少一个字符中的目标字符进行点击或选中操作。电子设备检测到用户对目标字符的点击或选中操作后,可以在焦点控件804中显示该目标字符。In some embodiments, when the target character is a character selected by the user, referring to FIG8 , the electronic device may predict at least one character corresponding to the touch track input by the user in the first interface 801 and/or the second interface 802 based on the coordinates of the first touch track corresponding to the first touch operation input by the user in the first interface 801 and/or the coordinates of the second touch track corresponding to the second touch operation input by the user in the second interface 802. Afterwards, the electronic device may display a display box 803. The display box 803 includes at least one character predicted by the electronic device. The user may click or select the target character in the at least one character. After the electronic device detects the user's click or selection operation on the target character, the target character may be displayed in the focus control 804.
在一些实施例中,电子设备在获取到用户的触摸轨迹的情况下,可以获取该触摸轨迹的属性。触摸轨迹的属性可以包括第一属性和第二属性。其中,当电子设备检测到用户是通过手指在电子设备的显示屏上进行触摸操作的情况下,可以将用户的触摸操作对应的触摸轨迹的属性确定为第一属性。当电子设备检测到用户是通过如手写笔等工具在电子设备的显示屏上进行触摸操作的情况下,可以将用户的触摸操作对应的触摸轨迹的属性确定为第二属性。In some embodiments, when the electronic device obtains the touch track of the user, it can obtain the attribute of the touch track. The attribute of the touch track may include a first attribute and a second attribute. Among them, when the electronic device detects that the user performs a touch operation on the display screen of the electronic device with a finger, the attribute of the touch track corresponding to the user's touch operation can be determined as the first attribute. When the electronic device detects that the user performs a touch operation on the display screen of the electronic device with a tool such as a stylus, the attribute of the touch track corresponding to the user's touch operation can be determined as the second attribute.
在一些实施例中,为了避免用户误触电子设备的显示屏,电子设备可以在检测到触摸轨迹为第二属性的情况下,执行上述本申请实施例提供的手写输入方法。In some embodiments, in order to prevent the user from accidentally touching the display screen of the electronic device, the electronic device may execute the handwriting input method provided in the above-mentioned embodiment of the present application when detecting that the touch track is the second attribute.
在一些实施例中,为了避免异物误触电子设备的显示屏,电子设备可以在检测到触摸轨迹为第一属性的情况下,执行上述本申请实施例提供的手写输入方法。In some embodiments, in order to prevent foreign objects from accidentally touching the display screen of the electronic device, the electronic device can execute the handwriting input method provided in the above-mentioned embodiment of the present application when detecting that the touch track is the first attribute.
可以理解的是,电子设备可以基于如传感器等硬件检测用户是通过手指还是如手写笔等工具在电子设备上输入的触摸操作,从而确定该触摸操作对应的触摸轨迹的属性是第一属性还是第二属性。本申请对电子设备如何确定触摸轨迹的属性的方法不予限制。It is understandable that the electronic device can detect whether the user inputs a touch operation on the electronic device through a finger or a tool such as a stylus based on hardware such as a sensor, thereby determining whether the attribute of the touch track corresponding to the touch operation is the first attribute or the second attribute. This application does not limit the method for how the electronic device determines the attribute of the touch track.
在一些方案中,可以对本申请的多个实施例进行组合,并实施组合后的方案。可选的,各方法实施例的流程中的一些操作任选地被组合,并且/或者一些操作的顺序任选地被改变。并且,各流程的步骤之间的执行顺序仅是示例性的,并不构成对步骤之间执行顺序的限制,各步骤之间还可以是其他执行顺序。并非旨在表明所述执行次序是可以执行这些操作的唯一次序。本领域的普通技术人员会想到多种方式来对本文所述的操作进行重新排序。另外,应当指出的是,本文某个实施例涉及的过程细节同样以类似的方式适用于其他实施例,或者,不同实施例之间可以组合使用。In some schemes, multiple embodiments of the present application can be combined, and the combined scheme can be implemented. Optionally, some operations in the process of each method embodiment are optionally combined, and/or the order of some operations is optionally changed. In addition, the execution order between the steps of each process is only exemplary and does not constitute a restriction on the execution order between the steps. There can also be other execution orders between the steps. It is not intended to indicate that the execution order is the only order in which these operations can be performed. A person of ordinary skill in the art will think of a variety of ways to reorder the operations described herein. In addition, it should be noted that the process details involved in a certain embodiment of this article are also applicable to other embodiments in a similar manner, or different embodiments can be used in combination.
此外,方法实施例中的某些步骤可等效替换成其他可能的步骤。或者,方法实施例中的某些步骤可以是可选的,在某些使用场景中可以删除。或者,可以在方法实施例中增加其他可能的步骤。In addition, some steps in the method embodiment may be equivalently replaced by other possible steps. Alternatively, some steps in the method embodiment may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiment.
并且,各方法实施例之间可以单独实施,或结合起来实施。Furthermore, the various method embodiments may be implemented separately or in combination.
可以理解的是,为了实现上述功能,本申请实施例还提供了一种电子设备,电子设备包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It is understandable that, in order to achieve the above functions, the embodiment of the present application also provides an electronic device, and the electronic device includes hardware and/or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分。例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
示例性地,参见图9,本申请实施例提供的电子设备900包括输入管理模块901、焦点管理模块902以及手写输入模块903。下面结合实现方式1-实现方式3对电子设备900包括的各模块进行详细的说明。9 , the electronic device 900 provided in the embodiment of the present application includes an input management module 901, a focus management module 902, and a handwriting input module 903. The modules included in the electronic device 900 are described in detail below in conjunction with implementation modes 1 to 3.
实现方式1:Implementation 1:
结合图10,输入管理模块901检测到用户的第一触摸操作,对该第一触摸操作对应的第一触摸轨迹的坐标进行缓存。以及,输入管理模块901将该第一触摸轨迹的坐标发送至焦点管理模块902。10 , the input management module 901 detects a first touch operation of the user, caches the coordinates of a first touch track corresponding to the first touch operation, and sends the coordinates of the first touch track to the focus management module 902 .
焦点管理模块902接收到输入管理模块901发送的第一触摸轨迹的坐标后,基于第一触摸轨迹的坐标,确定焦点窗口。After receiving the coordinates of the first touch track sent by the input management module 901 , the focus management module 902 determines the focus window based on the coordinates of the first touch track.
焦点管理模块902在确定焦点窗口的情况下,可以基于第一触摸轨迹的坐标和焦点窗口确定是否存在焦点控件。When determining the focus window, the focus management module 902 may determine whether there is a focus control based on the coordinates of the first touch track and the focus window.
其中,在焦点管理模块902确定不存在焦点控件的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。In the case where the focus management module 902 determines that there is no focus control, the coordinates of the received first touch track may be deleted to release memory space of the electronic device.
在焦点管理模块902确定存在焦点控件的情况下,焦点管理模块902还可以检测焦点控件是否发生切换。若焦点管理模块902检测到焦点控件发生切换,则向输入管理模块901发送第一信息。其中,第一信息用于告知输入管理模块901焦点控件发生切换。When the focus management module 902 determines that there is a focus control, the focus management module 902 may also detect whether the focus control is switched. If the focus management module 902 detects that the focus control is switched, the first information is sent to the input management module 901. The first information is used to inform the input management module 901 that the focus control is switched.
输入管理模块901接收到焦点管理模块902发送的第一信息后,可以检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式。其中,输入管理模块901若检测到电子设备请求调用输入法服务,则确定电子设备进入手写输入模式。输入管理模块901若未检测到电子设备请求调用输入法服务,则确定电子设备不进入手写输入模式。After receiving the first information sent by the focus management module 902, the input management module 901 can detect whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. If the input management module 901 detects that the electronic device requests to call the input method service, it determines that the electronic device enters the handwriting input mode. If the input management module 901 does not detect that the electronic device requests to call the input method service, it determines that the electronic device does not enter the handwriting input mode.
在输入管理模块901确定电子设备不进入手写输入模式的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。When the input management module 901 determines that the electronic device does not enter the handwriting input mode, the coordinates of the received first touch track may be deleted to release the memory space of the electronic device.
在输入管理模块901确定电子设备进入手写输入模式的情况下,输入管理模块901可以基于缓存的第一触摸轨迹的坐标,确定用户的第一触摸操作是点击操作还是滑动操作。When the input management module 901 determines that the electronic device enters the handwriting input mode, the input management module 901 may determine whether the first touch operation of the user is a click operation or a slide operation based on the cached coordinates of the first touch track.
在输入管理模块901确定用户的第一触摸操作是点击操作的情况下,输入管理模块901可以删除缓存的第一触摸轨迹的坐标,以释放电子设备的内存空间。When the input management module 901 determines that the first touch operation of the user is a click operation, the input management module 901 may delete the cached coordinates of the first touch track to release memory space of the electronic device.
在输入管理模块901确定用户的第一触摸操作是滑动操作的情况下,可以向手写输入模块903发送缓存的第一触摸轨迹的坐标。When the input management module 901 determines that the first touch operation of the user is a sliding operation, the coordinates of the cached first touch track may be sent to the handwriting input module 903 .
手写输入模块903接收到输入管理模块901发送的第一触摸轨迹的坐标后,可以基于该第一触摸轨迹的坐标,控制电子设备显示该第一触摸轨迹。After receiving the coordinates of the first touch track sent by the input management module 901 , the handwriting input module 903 may control the electronic device to display the first touch track based on the coordinates of the first touch track.
此外,手写输入模块903还可以基于第一触摸轨迹的坐标,预测第一触摸轨迹对应的字符。之后,手写输入模块903可以控制电子设备显示该字符,并隐藏已经显示的第一触摸轨迹。In addition, the handwriting input module 903 can also predict the character corresponding to the first touch track based on the coordinates of the first touch track. Afterwards, the handwriting input module 903 can control the electronic device to display the character and hide the displayed first touch track.
在一些实施例中,在输入管理模块901未监测到焦点控件发生切换的情况下,若输入管理模块901再次检测到用户的第二触摸操作,输入管理模块901可以将该第二触摸操作对应的第二触摸轨迹的坐标发送至手写输入模块903。手写输入模块903可以继续基于接收的第二触摸轨迹的坐标,预测第二触摸轨迹对应的字符。之后,手写输入模块903可以向输入管理模块901发送预测得到的字符。输入管理模块901接收到手写输入模块903发送的字符后,可以控制电子设备显示该字符,并隐藏已经显示的第二触摸轨迹。In some embodiments, when the input management module 901 does not detect the switching of the focus control, if the input management module 901 detects the user's second touch operation again, the input management module 901 can send the coordinates of the second touch track corresponding to the second touch operation to the handwriting input module 903. The handwriting input module 903 can continue to predict the character corresponding to the second touch track based on the coordinates of the received second touch track. After that, the handwriting input module 903 can send the predicted character to the input management module 901. After receiving the character sent by the handwriting input module 903, the input management module 901 can control the electronic device to display the character and hide the displayed second touch track.
在一些实施例中,第一信息还包括用于表征焦点管理模块902确定的切换后的焦点控件的标识。输入管理模块901确定用户的第二触摸操作是滑动操作并向手写输入模块903发送缓存的第二触摸轨迹的坐标的同时,还可以向手写输入模块903发送用于表征焦点管理模块902确定的切换后的焦点控件的标识。手写输入模块903可以基于接收的焦点控件的标识,控制电子设备在焦点控件和/或焦点控件的周围显示用户的第二触摸轨迹。以及,手写输入模块903可以基于接收的焦点控件的标识,控制电子设备在焦点控件中显示预测得到的字符,并隐藏已经显示的第二触摸轨迹。In some embodiments, the first information also includes an identifier for characterizing the switched focus control determined by the focus management module 902. While the input management module 901 determines that the user's second touch operation is a sliding operation and sends the coordinates of the cached second touch track to the handwriting input module 903, it can also send an identifier for characterizing the switched focus control determined by the focus management module 902 to the handwriting input module 903. The handwriting input module 903 can control the electronic device to display the user's second touch track in the focus control and/or around the focus control based on the received identifier of the focus control. And, the handwriting input module 903 can control the electronic device to display the predicted characters in the focus control and hide the displayed second touch track based on the received identifier of the focus control.
在一些实施例中,输入管理模块901检测到用户的触摸操作(可以为第一触摸操作,也可以为第二触摸操作),可以获取该触摸操作对应的触摸轨迹的属性。其中,当电子设备检测到用户是通过手指在电子设备的显示屏上进行触摸操作的情况下,可以将用户的触摸操作对应的触摸轨迹的属性确定为第一属性。当电子设备检测到用户是通过如手写笔等工具在电子设备的显示屏上进行触摸操作的情况下,可以将用户的触摸操作对应的触摸轨迹的属性确定为第二属性。In some embodiments, the input management module 901 detects a user's touch operation (which may be a first touch operation or a second touch operation), and may obtain the attribute of the touch track corresponding to the touch operation. When the electronic device detects that the user is performing a touch operation on the display screen of the electronic device with a finger, the attribute of the touch track corresponding to the user's touch operation may be determined as the first attribute. When the electronic device detects that the user is performing a touch operation on the display screen of the electronic device with a tool such as a stylus, the attribute of the touch track corresponding to the user's touch operation may be determined as the second attribute.
在输入管理模块901确定该触摸轨迹为第一属性的情况下,可以继续执行本场景中的步骤,从而避免异物误触电子设备的显示屏。When the input management module 901 determines that the touch track is of the first attribute, the steps in this scenario may continue to be executed, thereby preventing foreign objects from accidentally touching the display screen of the electronic device.
或者,在输入管理模块901确定该触摸轨迹为第二属性的情况下,可以继续执行本场景中的步骤,从而避免用户误触电子设备的显示屏。Alternatively, when the input management module 901 determines that the touch track is of the second attribute, the steps in this scenario may continue to be executed, thereby preventing the user from accidentally touching the display screen of the electronic device.
实现方式2:Implementation 2:
结合图11,在实现方式2中,输入管理模块901检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式之前的步骤可以参见实现方式1中的步骤,在此不做赘述。11 , in implementation 2, the input management module 901 detects whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. The steps before that can refer to the steps in implementation 1 and are not repeated here.
在输入管理模块901确定电子设备不进入手写输入模式的情况下,输入管理模块901可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。When the input management module 901 determines that the electronic device does not enter the handwriting input mode, the input management module 901 may delete the received coordinates of the first touch track to release the memory space of the electronic device.
在输入管理模块901确定电子设备进入手写输入模式的情况下,输入管理模块901可以向手写输入模块903发送缓存的第一触摸轨迹的坐标。When the input management module 901 determines that the electronic device enters the handwriting input mode, the input management module 901 may send the cached coordinates of the first touch track to the handwriting input module 903 .
手写输入模块903接收到输入管理模块901发送的第一触摸轨迹的坐标后,可以基于第一触摸轨迹的坐标,确定用户的第一触摸操作是点击操作还是滑动操作。After receiving the coordinates of the first touch track sent by the input management module 901 , the handwriting input module 903 may determine whether the first touch operation of the user is a click operation or a slide operation based on the coordinates of the first touch track.
在手写输入模块903确定用户的第一触摸操作是点击操作的情况下,可以向输入管理模块901发送第二信息。输入管理模块901接收到第二信息后,可以删除缓存的第一触摸轨迹的坐标,以释放电子设备的内存空间。When the handwriting input module 903 determines that the user's first touch operation is a click operation, the second information may be sent to the input management module 901. After receiving the second information, the input management module 901 may delete the cached coordinates of the first touch track to release memory space of the electronic device.
在手写输入模块903确定用户的第一触摸操作是滑动操作后的步骤可以参见实现方式1中手写输入模块903接收到输入管理模块901发送的第一触摸轨迹的坐标后的步骤,在此不做赘述。The steps after the handwriting input module 903 determines that the user's first touch operation is a sliding operation can refer to the steps after the handwriting input module 903 receives the coordinates of the first touch track sent by the input management module 901 in implementation mode 1, which will not be repeated here.
基于上述内容可知,实现方式1与实现方式2的区别在于:Based on the above content, the difference between implementation method 1 and implementation method 2 is:
在实现方式1中,电子设备进入手写输入模式后,输入管理模块901可以基于缓存的第一触摸轨迹的坐标,确定用户的第一触摸操作是点击操作还是滑动操作。在输入管理模块901确定用户的第一触摸操作是滑动操作的情况下,才向手写输入模块903发送缓存的第一触摸轨迹的坐标。而在实现方式2中,电子设备进入手写输入模式后,输入管理模块901直接向手写输入模块903发送缓存的第一触摸轨迹的坐标。由手写输入模块903基于第一触摸轨迹的坐标,确定用户的第一触摸操作是点击操作还是滑动操作。In implementation mode 1, after the electronic device enters the handwriting input mode, the input management module 901 can determine whether the user's first touch operation is a click operation or a slide operation based on the coordinates of the cached first touch track. The input management module 901 sends the cached coordinates of the first touch track to the handwriting input module 903 only when it determines that the user's first touch operation is a slide operation. In implementation mode 2, after the electronic device enters the handwriting input mode, the input management module 901 directly sends the cached coordinates of the first touch track to the handwriting input module 903. The handwriting input module 903 determines whether the user's first touch operation is a click operation or a slide operation based on the coordinates of the first touch track.
实现方式3:Implementation 3:
结合图12,输入管理模块901检测到用户的第一触摸操作,将该第一触摸轨迹的坐标发送至焦点管理模块902和手写输入模块903。12 , the input management module 901 detects a first touch operation of the user, and sends the coordinates of the first touch track to the focus management module 902 and the handwriting input module 903 .
焦点管理模块902接收到输入管理模块901发送的第一触摸轨迹的坐标后,基于第一触摸轨迹的坐标,确定焦点窗口。After receiving the coordinates of the first touch track sent by the input management module 901 , the focus management module 902 determines the focus window based on the coordinates of the first touch track.
焦点管理模块902在确定焦点窗口的情况下,可以基于第一触摸轨迹的坐标和焦点窗口确定是否存在焦点控件。When determining the focus window, the focus management module 902 may determine whether there is a focus control based on the coordinates of the first touch track and the focus window.
焦点管理模块902在确定不存在焦点控件的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。When determining that there is no focus control, the focus management module 902 may delete the received coordinates of the first touch track to release memory space of the electronic device.
焦点管理模块902在确定存在焦点控件的情况下,还可以检测焦点控件是否发生切换。若焦点管理模块902检测到焦点控件发生切换,则向输入管理模块901发送第一信息。其中,第一信息用于告知输入管理模块901焦点控件发生切换。When determining that there is a focus control, the focus management module 902 may also detect whether the focus control is switched. If the focus management module 902 detects that the focus control is switched, the first information is sent to the input management module 901. The first information is used to inform the input management module 901 that the focus control is switched.
输入管理模块901接收到焦点管理模块902发送的第一信息后,可以检测电子设备是否请求调用输入法服务,以确定电子设备是否进入手写输入模式。其中,输入管理模块901若检测到电子设备请求调用输入法服务,则确定电子设备进入手写输入模式。输入管理模块901若未检测到电子设备请求调用输入法服务,则确定电子设备不进入手写输入模式。After receiving the first information sent by the focus management module 902, the input management module 901 can detect whether the electronic device requests to call the input method service to determine whether the electronic device enters the handwriting input mode. If the input management module 901 detects that the electronic device requests to call the input method service, it determines that the electronic device enters the handwriting input mode. If the input management module 901 does not detect that the electronic device requests to call the input method service, it determines that the electronic device does not enter the handwriting input mode.
在输入管理模块901确定电子设备不进入手写输入模式的情况下,可以删除接收的第一触摸轨迹的坐标,以释放电子设备的内存空间。When the input management module 901 determines that the electronic device does not enter the handwriting input mode, the coordinates of the received first touch track may be deleted to release the memory space of the electronic device.
在输入管理模块901确定电子设备进入手写输入模式的情况下,可以向手写输入模块903发送第三信息。第三信息用于告知手写输入模块903电子设备进入手写输入模式。When the input management module 901 determines that the electronic device enters the handwriting input mode, the third information may be sent to the handwriting input module 903. The third information is used to inform the handwriting input module 903 that the electronic device enters the handwriting input mode.
手写输入模块903接收到输入管理模块901发送的第三信息后,可以基于之前接收的第一触摸轨迹的坐标,确定用户的第一触摸操作是点击操作还是滑动操作。After receiving the third information sent by the input management module 901, the handwriting input module 903 can determine whether the first touch operation of the user is a click operation or a slide operation based on the coordinates of the first touch track received previously.
其中,手写输入模块903确定用户的第一触摸操作是点击操作还是滑动操作后的步骤可以参见实现方式2中的步骤,在此不做赘述。The steps after the handwriting input module 903 determines whether the user's first touch operation is a click operation or a slide operation can refer to the steps in implementation method 2, which will not be repeated here.
基于上述内容可知,实现方式2与实现方式3的区别在于:Based on the above content, the difference between implementation method 2 and implementation method 3 is:
在实现方式2中,输入管理模块901检测到用户的第一触摸操作,对该第一触摸操作对应的第一触摸轨迹的坐标进行缓存。当输入管理模块901确定电子设备进入手写输入模式后,将第一触摸轨迹的坐标发送至手写输入模块903。而在实现方式3中,输入管理模块901检测到用户的第一触摸操作,无需缓存该第一触摸操作对应的触摸轨迹的坐标,而是直接向将第一触摸轨迹的坐标发送至手写输入模块903。手写输入模块903后续可以直接调用该第一触摸轨迹的坐标。In implementation mode 2, the input management module 901 detects the user's first touch operation and caches the coordinates of the first touch track corresponding to the first touch operation. When the input management module 901 determines that the electronic device has entered the handwriting input mode, the coordinates of the first touch track are sent to the handwriting input module 903. In implementation mode 3, the input management module 901 detects the user's first touch operation, and does not need to cache the coordinates of the touch track corresponding to the first touch operation, but directly sends the coordinates of the first touch track to the handwriting input module 903. The handwriting input module 903 can subsequently directly call the coordinates of the first touch track.
本申请实施例还提供一种电子设备,如图13所示,该电子设备可以包括一个或者多个处理器1301、存储器1302和通信接口1303。An embodiment of the present application also provides an electronic device, as shown in FIG13 , which may include one or more processors 1301 , a memory 1302 , and a communication interface 1303 .
其中,存储器1302、通信接口1303与处理器1301耦合。例如,存储器1302、通信接口1303与处理器1301可以通过总线1304耦合在一起。The memory 1302 and the communication interface 1303 are coupled to the processor 1301. For example, the memory 1302, the communication interface 1303 and the processor 1301 may be coupled together via a bus 1304.
其中,通信接口1303用于与其他设备进行数据传输。存储器1302中存储有计算机程序代码。计算机程序代码包括计算机指令,当计算机指令被处理器1301执行时,使得电子设备执行本申请实施例中的手写输入方法。The communication interface 1303 is used for data transmission with other devices. The memory 1302 stores computer program codes. The computer program codes include computer instructions. When the computer instructions are executed by the processor 1301, the electronic device executes the handwriting input method in the embodiment of the present application.
其中,处理器1301可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。处理器可以用于支持电子设备执行上述实施例中提供的方法步骤。例如,处理器可以用于支持电子设备执行图10中的步骤。或者,处理器可以用于支持电子设备执行图11中的步骤。或者,处理器可以用于支持电子设备执行图12中的步骤。Among them, the processor 1301 can be a processor or a controller, for example, a central processing unit (CPU), a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the present disclosure. The processor can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The processor can be used to support an electronic device to execute the method steps provided in the above embodiments. For example, the processor can be used to support an electronic device to execute the steps in Figure 10. Alternatively, the processor can be used to support an electronic device to execute the steps in Figure 11. Alternatively, the processor can be used to support an electronic device to execute the steps in Figure 12.
其中,总线1304可以是外设部件互连标准(Peripheral ComponentInterconnect,PCI)总线或扩展工业标准结构(Extended Industry StandardArchitecture,EISA)总线等。上述总线1304可以分为地址总线、数据总线、控制总线等。为便于表示,图13中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 1304 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 1304 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, FIG13 only uses one thick line, but does not mean that there is only one bus or one type of bus.
本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
示例性地,该芯片系统可以是现场可编程门阵列(field programmable gatearray,FPGA),可以是专用集成芯片(AP设备plication specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(centralprocessor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controllerunit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the chip system can be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.
应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.
本申请实施例还提供一种计算机可读存储介质,该计算机存储介质中存储有计算机程序代码,当上述处理器执行该计算机程序代码时,电子设备执行上述方法实施例中的相关方法步骤。An embodiment of the present application further provides a computer-readable storage medium, in which a computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the method embodiment.
本申请实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中的相关方法步骤。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the relevant method steps in the above method embodiment.
另外,本申请实施例还提供一种装置。该装置具体可以是组件或模块,该装置可包括相连的一个或多个处理器和存储器。其中,存储器用于存储计算机程序。当该计算机程序被一个或多个处理器执行时,使得装置执行上述各方法实施例中的场景配置方法。In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device performs the scene configuration method in the above-mentioned method embodiments.
其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应地软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(AP设备plication specific integrated circuit,ASIC)中。The steps of the method or algorithm described in conjunction with the disclosed content of the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).
通过以上的实施方式的描述,本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成;即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
Claims (21)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310469600.1A CN118838532A (en) | 2023-04-23 | 2023-04-23 | Handwriting input method and electronic equipment |
PCT/CN2024/071877 WO2024222054A1 (en) | 2023-04-23 | 2024-01-11 | Handwriting input method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310469600.1A CN118838532A (en) | 2023-04-23 | 2023-04-23 | Handwriting input method and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118838532A true CN118838532A (en) | 2024-10-25 |
Family
ID=93144640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310469600.1A Pending CN118838532A (en) | 2023-04-23 | 2023-04-23 | Handwriting input method and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118838532A (en) |
WO (1) | WO2024222054A1 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110162266A (en) * | 2019-05-31 | 2019-08-23 | 四川长虹教育科技有限公司 | A kind of system for realizing arbitrary interface writing on the blackboard on intelligent interaction large-size screen monitors |
CN113407039A (en) * | 2020-03-17 | 2021-09-17 | 北京搜狗科技发展有限公司 | Input method, device and machine readable medium |
CN115480658A (en) * | 2021-05-28 | 2022-12-16 | 华为技术有限公司 | Stylus input method, electronic equipment and system |
CN113703631A (en) * | 2021-08-31 | 2021-11-26 | 维沃移动通信有限公司 | Writing control method and device, electronic equipment and storage medium |
CN114610188B (en) * | 2022-02-09 | 2024-02-13 | 广东能龙教育股份有限公司 | Interface handwriting writing method and system, control device and storage medium |
CN115686334B (en) * | 2022-10-31 | 2023-11-28 | 荣耀终端有限公司 | Operation control method, electronic device and readable storage medium |
-
2023
- 2023-04-23 CN CN202310469600.1A patent/CN118838532A/en active Pending
-
2024
- 2024-01-11 WO PCT/CN2024/071877 patent/WO2024222054A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
WO2024222054A1 (en) | 2024-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9448694B2 (en) | Graphical user interface for navigating applications | |
US20180356947A1 (en) | Electronic device and method for providing content according to field attribute | |
CN114816167B (en) | Application icon display method, electronic device and readable storage medium | |
CN118276722A (en) | Window display method and electronic device | |
CN114706633B (en) | Preloading method, electronic device and storage medium | |
WO2021253922A1 (en) | Font switching method and electronic device | |
CN114461312B (en) | Display method, electronic device and storage medium | |
CN117615055B (en) | Display control method, electronic equipment and storage medium | |
CN116048317B (en) | Display method and device | |
CN116664734B (en) | Ring chart display method, electronic device and readable storage medium | |
CN116033062B (en) | Interface display method of application program, electronic device and readable storage medium | |
WO2024222054A1 (en) | Handwriting input method and electronic device | |
CN116719459A (en) | Display method of comment box, electronic device and readable storage medium | |
CN114490442A (en) | File segment adjustment method and electronic device | |
CN116662222B (en) | Cache management method and related equipment | |
WO2024109220A1 (en) | Widget display method, electronic device, and readable storage medium | |
CN116700554B (en) | Information display method, electronic device and readable storage medium | |
CN116661645B (en) | Method for displaying application cards, electronic device and readable storage medium | |
CN117724780B (en) | Information acquisition method | |
WO2022252788A1 (en) | Control method and electronic device | |
CN115016714B (en) | Electronic device control method, system, electronic device and storage medium | |
US20250080637A1 (en) | Call service bootstrapping method, electronic device, and storage medium | |
US20240212635A1 (en) | Method for adjusting display screen brightness, electronic device, and storage medium | |
CN115576477A (en) | Handwriting input display method, electronic device and storage medium | |
CN117131241A (en) | Search object recommendation method, electronic device and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |