Handwriting input method and electronic device

By receiving and responding to touch operations in electronic devices, switching interfaces and displaying touch trajectories, and predicting characters intended by the user, it solves the problem of low efficiency of existing handwriting input methods and achieves a more efficient input experience.

WO2024222054A1PCT designated stage expired Publication Date: 2024-10-31HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/071877
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-23
Filing Date
2024-01-11
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing handwriting input methods in electronic devices require multiple interactions between the user and the device, resulting in low input efficiency.

Method used

By receiving and responding to the user's touch operations, switching interfaces and displaying touch traces, it predicts the characters intended by the user and reduces repeated input operations.

Benefits of technology

It improves the efficiency of handwriting input, reduces the number of interactions between the user and the device, and increases the input speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024071877_31102024_PF_FP_ABST
    Figure CN2024071877_31102024_PF_FP_ABST
Patent Text Reader

Abstract

A handwriting input method and an electronic device, relating to the technical field of terminals. In the method, an electronic device receives a first touch operation inputted on the basis of a first interface. In response to the first touch operation, an interface displayed by the electronic device is switched from the first interface to a second interface. If the electronic device requests to call an input method service, a first touch track corresponding to the first touch operation is displayed on the second interface. The method can enable a user to continue to input a new touch operation into the electronic device on the basis of the first touch track displayed by the electronic device without repeatedly inputting the first touch operation on the second interface, so as to write on the electronic device. The number of times of interaction between the user and the electronic device can be reduced, and input efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Handwriting input method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on April 23, 2023, with application number 202310469600.1 and application name “Handwriting Input Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a handwriting input method and electronic device. Background Art

[0003] An input method application (IMA), also known as an input method engine (IME) or input method editor (IME), is software used to input strings of characters such as words, punctuation marks, and numbers in electronic devices such as mobile phones.

[0004] Most input method apps have a handwriting input function. When the handwriting input function is enabled in an input method app, the user can tap the input control displayed on the electronic device to bring up a handwriting pad for receiving the user's handwritten input. The user can write a string of characters on the handwriting pad, and the electronic device can recognize the user's handwriting and display multiple candidate characters. The user can then select a corresponding candidate character as input to the electronic device.

[0005] However, the above method requires the user to interact with the electronic device multiple times, and the input efficiency is low.

[0006] Summary of the Invention

[0007] 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.

[0008] To achieve the above objectives, the present invention adopts the following technical solutions:

[0009] In a first aspect, an embodiment of the present application provides a handwriting input method, which is applied to an electronic device. The method includes:

[0010] A first touch operation based on input from the first interface 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 an input method service, a first touch track corresponding to the first touch operation is displayed on the second interface.

[0011] 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 a new touch operation to the electronic device based on the first touch track displayed by the electronic device to write on the electronic device. This can reduce the number of times a user interacts with the electronic device and improve input efficiency.

[0012] In conjunction with the first aspect, in one 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 trace 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.

[0013] In this solution, after the electronic device receives a first touch operation input by the user on a first interface for a first control, it can switch the displayed interface to the second interface and determine the second control as the focus control. Furthermore, if the electronic device requests to call an input method service, the first touch track corresponding to the first touch operation can be displayed on the second interface. Based on the display of the first touch track on the second control, the user can continue to input new touch operations on the second control to the electronic device to write on the electronic device. This can reduce the number of times the user interacts with the electronic device and improve input efficiency.

[0014] In conjunction with the first aspect, in one 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. A first target character is displayed in the second control. The at least one character corresponding to the first touch track includes the first target character.

[0015] In this solution, the electronic device can predict at least one character that the user wants 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.

[0016] In combination with the first aspect, in a possible design, the first target character is a character having the highest matching degree with the first touch trajectory.

[0017] 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 user's interaction with the electronic device.

[0018] In conjunction with the first aspect, in one possible design, the second interface further includes a display frame. After predicting at least one character corresponding to the first touch track, the at least one character corresponding to the first touch track is displayed in the display frame. Subsequently, upon detecting a selection operation on the first target character, the first target character is displayed in the second control.

[0019] In this solution, after the electronic device predicts at least one character corresponding to the first touch track, it can display the predicted at least one character in a display box for the user to select. The user can select the first target character desired to be filled in the second control in the display box.

[0020] In conjunction 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 a second interface input is received. If the second touch operation is a touch operation directed to 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.

[0021] In this solution, after the second control displays the first touch track, the user can continue to input a second touch operation on 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.

[0022] In conjunction with the first aspect, in one possible design, in response to a second touch operation, after displaying a second touch track corresponding to the second touch operation in a second control, at least one character corresponding to the first touch track and the second touch track is predicted. A second target character is displayed 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.

[0023] 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.

[0024] In combination with the first aspect, in a possible design, the second target character is the character with the highest matching degree with the first touch track and the second touch track.

[0025] 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 a second target character from the at least one character and fill the second target character into the second control, thereby reducing the user's interaction with the electronic device.

[0026] In conjunction with the first aspect, in one possible design, the second interface further includes a display box. After predicting at least one character corresponding to the first touch track and the second touch track, the at least one character is displayed in the display box. When a selection operation of a second target character is detected, the second target character is displayed in the second control.

[0027] 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 display the predicted at least one character in a display box for the user to select. The user can select the second target character that they want to fill in the second control in the display box.

[0028] In conjunction with the first aspect, in one possible design, in response to a first touch operation, 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.

[0029] 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.

[0030] In conjunction with the first aspect, in one possible design, a first control is determined to be a focused control based on the coordinates of the first touch track. Upon detecting that the electronic device has requested to call an input method service, it is determined that the electronic device has entered handwriting input mode. The interface displayed by the electronic device switches from the first interface to a second interface, and based on the coordinates of the first touch track, the first touch track is displayed on the second interface.

[0031] 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. 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 repeat the first touch operation on the second interface. Instead, based on the first touch track displayed by the electronic device, the user can continue to input new touch operations to the electronic device to write on the electronic device. This can reduce the number of times the user interacts with the electronic device and improve input efficiency.

[0032] Furthermore, in this solution, if the electronic device determines that the first control is the focus control, even if the first control is not a standard input control compatible with the electronic device's global handwriting function, the electronic device can determine whether to enter the handwriting input mode based on whether the input method service is requested. In other words, the method provided in the embodiment of the present application does not require the first control to be compatible with the electronic device's global handwriting function, and the electronic device can enter the handwriting input mode, and the user can directly write in the first control to complete input to the electronic device.

[0033] In conjunction with the first aspect, in one possible design, before determining the first control as the focused control based on the coordinates of the first touch track, a focused window is determined in at least one window that the first touch track passes through based on the coordinates of the first touch track. The first control in the focused window is determined as the focused control, wherein the first touch track passes through at least one control in the focused window, the at least one control including the first control.

[0034] In this solution, the electronic device can determine the focus window based on the coordinates of the first touch track, and, based on the coordinates of the first touch track, determine the first control as the focus control in the focus window. After determining the focus window and / or focus control, the electronic device can make a corresponding response.

[0035] In conjunction with the first aspect, in one possible design, based on the coordinates of the first touch track, the first or last window that the first touch track passes through 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, where the first control is the first or last control that the first touch track passes through in the focus window.

[0036] In this solution, the first touch track may pass through multiple focus windows or multiple focus controls. The electronic device can determine the first or last window passed by the first touch track as the focus window, and the first control passed by the first touch track in the focus window as the focus control. This provides multiple implementation methods for the electronic device to determine the focus window and focus control.

[0037] In conjunction with the first aspect, in one possible design, a first interface includes a first control, a second interface includes a second control, and the second control is associated with the first control. A first touch operation inputted 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 focused control.

[0038] In this solution, even after the first control is determined as the focused control, the electronic device's display interface switches. That is, the electronic device switches from the first interface to the second interface. The electronic device also makes the second control included in the second interface the new focused control, replacing the first control. The user can continue writing in the second control.

[0039] In conjunction with the first aspect, in one possible design, after a first touch track corresponding to the first touch operation is displayed on the second interface, a second touch operation based on input on the second interface is received. In response to the second touch operation, coordinates of a 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 switched, the second touch track is displayed in the focus control based on the coordinates of the second touch track.

[0040] In this solution, the user can continue to input a second touch operation on the electronic device to the focused control, based on the first touch track displayed on the focused control, to write on the electronic device. In response to the second touch operation, the electronic device can display the second touch track in the focused control, thereby more intuitively showing the second touch track to the user.

[0041] In conjunction with the first aspect, in one possible design, in response to a second touch operation, after obtaining the coordinates of a second touch track corresponding to the second touch operation, if it is determined that the focus control has switched, it is detected whether the electronic device has requested to call an input method service. If it is detected that the electronic device has requested to call an input method service, it is determined that the electronic device has entered handwriting input mode. If the electronic device has entered 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.

[0042] In this solution, if the user continues to input a second touch operation into the electronic device after the focus control displays the first touch trace, and the second touch operation triggers a switch in the focus control, the electronic device can be re-determined based on whether the electronic device requests to call the input method service to determine whether the electronic device has entered handwriting input mode. If the electronic device enters handwriting input mode and the second touch operation is a slide operation, the second touch trace is displayed in the switched focus control based on the coordinates of the second touch trace, thereby more intuitively presenting the second touch trace to the user.

[0043] In conjunction with the first aspect, in one possible design, the focus control switching includes the focus control switching from one focus control to another focus control. Alternatively, the focus control is switched from not existing to existing in the interface currently displayed by the electronic device.

[0044] In this solution, multiple possible ways of determining whether the focus control has switched are provided.

[0045] In combination with the first aspect, in a possible design, the first touch operation is a sliding operation.

[0046] 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 can not display the touch track corresponding to the click operation, thereby saving the electronic device's operating memory.

[0047] In conjunction with the first aspect, in one possible design, the electronic device obtains an attribute of the first touch trajectory. The attribute of the first touch trajectory 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 using a finger, the attribute of the first touch trajectory 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 using a tool such as a stylus, the attribute of the first touch trajectory corresponding to the first touch operation can be determined as the second attribute.

[0048] 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.

[0049] 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.

[0050] In conjunction with the second aspect, in one possible design, the input management module detects a first touch input operation and caches the coordinates of a first touch track corresponding to the first touch operation. Furthermore, 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 a focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module may determine whether a focus control exists based on the coordinates of the first touch track and the focus window.

[0051] 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.

[0052] In conjunction with the second aspect, in one possible design, when the focus management module determines that a focused control exists, the focus management module may further detect whether the focused control has switched. If the focus management module detects that the focused control has switched, the focus management module sends first information to the input management module. The first information is used to inform the input management module that the focused control has switched.

[0053] After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device has requested to call the input method service to determine whether the electronic device has entered the handwriting input mode. If the input management module detects that the electronic device has requested to call the input method service, the input management module determines that the electronic device has entered the handwriting input mode. If the input management module does not detect that the electronic device has requested to call the input method service, the input management module determines that the electronic device has not entered the handwriting input mode.

[0054] 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.

[0055] In combination with the second aspect, in one 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.

[0056] 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 can delete the cached coordinates of the first touch track to release memory space of the electronic device.

[0057] 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.

[0058] After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module may control the electronic device to display the first touch track based on the coordinates of the first touch track.

[0059] In conjunction with the second aspect, in one possible design, the handwriting input module may further predict the character corresponding to the first touch track based on the coordinates of the first touch track. The handwriting input module may then control the electronic device to display the character and hide the displayed first touch track.

[0060] In conjunction with the second aspect, in one possible design, if the input management module detects a second touch operation again without detecting a switch in the focus control, 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 received coordinates of the 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.

[0061] In combination with the second aspect, in a possible design, the first information also includes an identifier for representing the focus control after switching 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 representing the focus control after switching determined by the focus management module to the handwriting input module. Based on the received identifier of the focus control, 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. In addition, based on the received identifier of the focus control, 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.

[0062] In conjunction with the second aspect, in one 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. The touch operation can be a first touch operation or a second touch operation.

[0063] When the electronic device detects that the touch operation is performed by the user using a finger on the display screen of the electronic device, 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 performed by the user using a tool such as a stylus pen on the display screen of the electronic device, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.

[0064] 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.

[0065] In combination with the second 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.

[0066] 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.

[0067] In conjunction with the third aspect, in one possible design, the input management module detects a first touch input operation and caches the coordinates of a first touch track corresponding to the first touch operation. Furthermore, 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 a focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module may determine whether a focus control exists based on the coordinates of the first touch track and the focus window.

[0068] 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.

[0069] In conjunction with the third aspect, in one possible design, when the focus management module determines that a focused control exists, the focus management module may further detect whether the focused control has switched. If the focus management module detects that the focused control has switched, the focus management module sends first information to the input management module. The first information is used to inform the input management module that the focused control has switched.

[0070] After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device has requested to call the input method service to determine whether the electronic device has entered the handwriting input mode. If the input management module detects that the electronic device has requested to call the input method service, the input management module determines that the electronic device has entered the handwriting input mode. If the input management module does not detect that the electronic device has requested to call the input method service, the input management module determines that the electronic device has not entered the handwriting input mode.

[0071] In combination with the third aspect, in one 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.

[0072] In combination with the third aspect, in one 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.

[0073] After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module may determine whether the first touch operation is a click operation or a slide operation based on the coordinates of the first touch track.

[0074] In conjunction with the third aspect, in one possible design, if the handwriting input module determines that the first touch operation is a click operation, 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 free up memory space in the electronic device.

[0075] 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.

[0076] After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module may control the electronic device to display the first touch track based on the coordinates of the first touch track.

[0077] In conjunction with the third aspect, in one possible design, the handwriting input module may further predict the character corresponding to the first touch track based on the coordinates of the first touch track. The handwriting input module may then control the electronic device to display the character and hide the displayed first touch track.

[0078] In conjunction with the third aspect, in one possible design, if the input management module does not detect a switch in the focus control, and the input management module detects a second touch operation input 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.

[0079] In combination with the third aspect, in one possible design, the first information also includes an identifier for representing the focus control after switching 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 representing the focus control after switching determined by the focus management module to the handwriting input module. Based on the received identifier of the focus control, 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. In addition, based on the received identifier of the focus control, 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.

[0080] In conjunction with the third aspect, in one 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. The touch operation can be a first touch operation or a second touch operation.

[0081] When the electronic device detects that the touch operation is performed by the user using a finger on the display screen of the electronic device, 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 performed by the user using a tool such as a stylus pen on the display screen of the electronic device, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.

[0082] 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.

[0083] 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.

[0084] 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.

[0085] In conjunction with the fourth aspect, in one possible design, the input management module detects a first touch input operation 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 a focus window based on the coordinates of the first touch track. When determining the focus window, the focus management module may determine whether there is a focused control based on the coordinates of the first touch track and the focus window.

[0086] In conjunction with the fourth aspect, in a possible design, when the focus management module determines that there is no focus control, it can delete the coordinates of the received first touch track to release memory space of the electronic device.

[0087] In conjunction with the fourth aspect, in one possible design, the focus management module, upon determining that a focused control exists, may further detect whether the focused control has switched. If the focus management module detects that the focused control has switched, the focus management module sends first information to the input management module. The first information is used to inform the input management module that the focused control has switched.

[0088] After receiving the first information sent by the focus management module, the input management module can detect whether the electronic device has requested to call the input method service to determine whether the electronic device has entered the handwriting input mode. If the input management module detects that the electronic device has requested to call the input method service, the input management module determines that the electronic device has entered the handwriting input mode. If the input management module does not detect that the electronic device has requested to call the input method service, the input management module determines that the electronic device has not entered the handwriting input mode.

[0089] 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.

[0090] In conjunction with the fourth aspect, in one possible design, when the input management module determines that the electronic device has entered handwriting input mode, it may send third information to the handwriting input module. The third information is used to inform the handwriting input module that the electronic device has entered handwriting input mode. After receiving the third information sent by the input management module, the handwriting input module may determine whether the first touch operation is a click operation or a slide operation based on the coordinates of the previously received first touch trajectory.

[0091] In conjunction with the fourth aspect, in one possible design, if the handwriting input module determines that the first touch operation is a click operation, second information may be sent to the input management module. After receiving the second information, the input management module may delete the cached coordinates of the first touch track to free up memory space in the electronic device.

[0092] 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 can be sent to the handwriting input module.

[0093] After receiving the coordinates of the first touch track sent by the input management module, the handwriting input module may control the electronic device to display the first touch track based on the coordinates of the first touch track.

[0094] In conjunction with the fourth aspect, in one possible design, the handwriting input module may further predict the character corresponding to the first touch track based on the coordinates of the first touch track. The handwriting input module may then control the electronic device to display the character and hide the displayed first touch track.

[0095] In conjunction with the fourth aspect, in one possible design, if the input management module does not detect a switch in the focus control, and the input management module detects a second touch operation input 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 second touch track that has been displayed.

[0096] In conjunction with the fourth aspect, in a possible design, the first information also includes an identifier for representing the focus control after switching 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 representing the focus control after switching determined by the focus management module to the handwriting input module. Based on the received identifier of the focus control, 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. In addition, based on the received identifier of the focus control, 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.

[0097] In conjunction with the fourth aspect, in one 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. The touch operation can be a first touch operation or a second touch operation.

[0098] When the electronic device detects that the touch operation is performed by the user using a finger on the display screen of the electronic device, 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 performed by the user using a tool such as a stylus pen on the display screen of the electronic device, the attribute of the touch track corresponding to the touch operation can be determined as the second attribute.

[0099] 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.

[0100] 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.

[0101] In a fifth aspect, embodiments of the present application provide an electronic device. The electronic device includes a memory and one or more processors, the memory and the processors being coupled; the memory is configured to store computer program code, the computer program code including 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.

[0102] In a sixth aspect, embodiments of the present application provide a chip system. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via wiring. The interface circuits are configured to receive signals from a memory of an electronic device and send signals to the processors. The signals include computer instructions stored in the memory. When the processors execute the computer instructions, the electronic device executes the method described in the first aspect and any possible design thereof.

[0103] In a seventh aspect, an embodiment of the present application provides a computer storage medium comprising 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.

[0104] 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

[0105] FIG1 is a schematic diagram of a first handwriting input method provided by the prior art;

[0106] FIG2A is a schematic diagram of a first handwriting input interface provided by the prior art;

[0107] FIG2B is a schematic diagram of a second handwriting input interface provided by the prior art;

[0108] FIG2C is a schematic diagram of a third handwriting input interface provided by the prior art;

[0109] FIG3A is a hardware structure diagram of an electronic device provided in an embodiment of the present application;

[0110] FIG3B is a software structure diagram of an electronic device provided in an embodiment of the present application;

[0111] FIG4A is a schematic diagram of a first interface provided in an embodiment of the present application;

[0112] FIG4B is a schematic diagram of a second interface provided in an embodiment of the present application;

[0113] FIG4C is a schematic diagram of a third interface provided in an embodiment of the present application;

[0114] FIG4D is a schematic diagram of a fourth interface provided in an embodiment of the present application;

[0115] FIG5 is a schematic diagram of a touch track provided by an embodiment of the present application;

[0116] FIG6A is a schematic diagram of a fifth interface provided in an embodiment of the present application;

[0117] FIG6B is a schematic diagram of a sixth interface provided in an embodiment of the present application;

[0118] FIG7 is a schematic diagram of a seventh interface provided in an embodiment of the present application;

[0119] FIG8 is a schematic diagram of an eighth interface provided in an embodiment of the present application;

[0120] FIG9 is a schematic diagram of a module structure of an electronic device provided in an embodiment of the present application;

[0121] FIG10 is a schematic diagram of a flow chart of a handwriting input method according to an embodiment of the present application in implementation mode 1;

[0122] FIG11 is a flow chart of the handwriting input method provided in an embodiment of the present application in implementation mode 2;

[0123] FIG12 is a flow chart of the handwriting input method provided in an embodiment of the present application in implementation mode 3;

[0124] FIG13 is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0125] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying 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 merely a description of the association relationship of associated objects, indicating that three relationships can exist, 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.

[0126] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, 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.

[0127] For ease of understanding, some examples of concepts related to the embodiments of this application are provided for reference as follows:

[0128] String: A sequence including at least one of characters such as words, numbers, letters, symbols, etc. For example, the string "Hello 123".

[0129] Input control: It can be a control used to implement string input. The input control can be included in the interfaces or windows of various applications displayed on the electronic device.

[0130] Candidate content: The content displayed in the interface of the input method application for the user to select. The candidate content is usually associated with the content input by the user to the electronic device through the input method application. The candidate content can include at least one candidate word. Among them, the candidate word can be a word (such as "you", "hello", etc.), can be a punctuation mark (such as "!", "?", etc.), or can be a number (such as "1", "13", etc.), etc., and this application does not make restrictions.

[0131] The input method application is software used to implement string input in electronic devices such as mobile phones. Most input method applications have a handwriting input function, and the user can directly write characters or strings on the display screen of the electronic device to input the corresponding content to the electronic device.

[0132] In a related technology, referring to FIG. 1, when the input method application starts the handwriting input function, the user can perform a click or selection operation on the input control 101 displayed on the electronic device. After the electronic device detects the 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 corresponding to the input method application 102 in the displayed interface. The input method window 102 includes a handwriting board 103 for receiving the writing content of the user. The user can write the corresponding content by performing a touch operation on 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 the click or selection operation on the candidate word, it can fill the candidate word selected by the user as the writing content input by the user to the electronic device into the input control 101.

[0133] It can be seen that the user needs to interact with the electronic device multiple times to input the writing content in the above manner, and the operation is cumbersome and the input efficiency is low.

[0134] In a related technology, an electronic device also has a global handwriting function. Users can perform touch operations in a standard input control to write corresponding content. The standard input control is an input control compatible with the electronic device's global handwriting function. After the electronic device detects a user touch operation on the standard input control, it can trigger the global handwriting function to enter handwriting input mode. The electronic device can then fill the standard input control with the content it recognizes the user has written in the standard input control.

[0135] However, standard input controls are typically found in the application interfaces of built-in applications on electronic devices. In contrast, the input controls included in the application interfaces of some third-party applications are mostly standard input controls. Standard input controls are not compatible with the global handwriting functions of electronic devices. Therefore, when an electronic device detects a user touching a standard input control, it interprets the touch as a click and responds accordingly.

[0136] 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 an 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 user's touch operation 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.

[0137] Referring to FIG. 2B , input interface 202 includes an input control 204 for receiving user written content. If input control 204 is a standard input control, the user can re-enter written content in input control 204 and / or the area surrounding input control 204. For example, the user enters the first stroke of written content in input control 204 and / or the area surrounding input control 204. After the electronic device recognizes the content written by the user in input control 204 and / or the area surrounding input control 204, it can enter the recognized content into input control 204 as the written content input by the user into the electronic device.

[0138] 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, it can display multiple candidate words associated with the content written by the user in the display box 207. After the electronic device detects that the user clicks or selects a candidate word, it can fill in the candidate word selected by the user as the written content input by the user to the electronic device into the input control 208.

[0139] 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, since the electronic device will lose the touch track corresponding to the touch operation after the interface switches, the user needs to perform the same touch operation on the electronic device at least twice.

[0140] The handwriting input method provided in the embodiment of the present application can be applied to electronic devices. In this method, the user can write on the electronic device by inputting touch operations related to writing to the electronic device. Based on the user's touch operation, the electronic device can request to call the input method service and enter the handwriting input mode. In addition, 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 the user interacts with the electronic device, thereby improving input efficiency.

[0141] For example, 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) / 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.

[0142] FIG3A shows a schematic structural diagram of the electronic device 100 .

[0143] 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 140, a power management module 141, a battery 142, 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.

[0144] It should be understood that the structure illustrated in the embodiments 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, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0145] 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 processing unit (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). The different processing units may be independent devices or integrated into one or more processors.

[0146] 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.

[0147] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0148] In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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.

[0149] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0150] The display screen 194 is used to display images, videos, etc. For example, when the electronic device enters a handwriting input mode, the display screen 194 may display a touch track corresponding to a touch operation input by the user to the electronic device.

[0151] Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0152] 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 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0153] 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 can 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 can store data created during the use of the electronic device 100 (such as audio data, a vocabulary, 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.

[0154] Sensor module 180 may include a touch sensor 180K. Touch sensor 180K is also called a "touch panel." Touch sensor 180K may be disposed on display screen 194. The touch sensor 180K and display screen 194 form a touch screen, also called a "touch screen." Touch sensor 180K is used to detect touch operations applied to or near the touch sensor.

[0155] For example, the touch sensor 180K can detect a touch operation performed by a user on the display screen 194 using a finger or a tool such as a stylus pen.

[0156] When the touch sensor 180K detects a touch operation, it can transmit the detected touch operation to the processor to determine relevant information about the touch event. The processor can also control the display screen 194 to provide a visual output related to the touch operation. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different location from the display screen 194.

[0157] For example, in an embodiment of the present application, the touch sensor 180K can be used to detect a user's touch operation on a specific control and / or the area 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.

[0158] When the handwriting input method in the embodiment of the present application is implemented based on the electronic device 100 shown in Figure 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. If 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.

[0159] Furthermore, when entering handwriting input mode, the processor 110 can predict the character corresponding to the touch trajectory. The processor 110 can then control the display screen 194 to display the predicted character. Compared to a user first interacting with the electronic device to invoke an input method application, and then inputting the corresponding character into the electronic device based on the invoked input method application, the method provided in the embodiments of the present application can reduce the number of interactions between the user and the electronic device, thereby improving input efficiency.

[0160] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0161] FIG3B is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0162] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0163] The application layer can include a series of application packages.

[0164] As shown in FIG3B , the application package may include applications such as camera, gallery, calendar, map, WLAN, music, short message, and input method applications. 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.

[0165] 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 by the user in the electronic device.

[0166] In particular, the handwriting input module can, upon obtaining a user's touch trajectory on the electronic device, determine whether the touch operation corresponding to the touch trajectory is a click operation or a slide operation. Furthermore, the handwriting input module can, upon obtaining a user's touch trajectory on the electronic device, control the electronic device to display the touch trajectory. Furthermore, the handwriting input module can, upon obtaining a user's touch trajectory on the electronic device, predict the character corresponding to the touch trajectory and control the electronic device to display the character.

[0167] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0168] As shown in FIG3B , 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.

[0169] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0170] 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.

[0171] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0172] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0173] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0174] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.

[0175] Upon detecting a user touch operation, the input management module can cache the coordinates of the touch trajectory corresponding to the touch operation. Alternatively, the input management module can detect whether the electronic device has requested an input method service, thereby determining whether the electronic device has entered handwriting input mode. Alternatively, the input management module can determine whether the user's touch operation is a click, a slide, or the like.

[0176] The focus management module is used to determine the focus window when the user's touch track 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.

[0177] 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 included in the software system of the electronic device. For a description of the handwriting input module in the application framework layer, refer to the description of the handwriting input module in the application layer, and will not be repeated here.

[0178] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for scheduling and management of the Android system.

[0179] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0180] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0181] The system library can include multiple functional modules, such as a surface manager, media libraries, a 3D graphics processing library (such as OpenGL ES), and a 2D graphics engine (such as SGL).

[0182] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0183] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0184] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0185] A 2D graphics engine is a drawing engine for 2D drawings.

[0186] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0187] For example, the technical solutions involved in the following embodiments can all be implemented in electronic devices 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 with reference to the accompanying drawings and handwriting input scenarios.

[0188] An interface displayed by an electronic device may include multiple windows, each of which may include multiple controls. For example, referring to FIG4A , an interface displayed by an electronic device includes window 400. Window 400 is overlaid with windows 410, 420, and 430. Window 410 includes controls 411 and 412. Window 420 includes control 421. Window 430 includes controls 431, 432, and 433.

[0189] In some embodiments, a user can perform a touch operation on the display screen of an electronic device to input a touch track to the electronic device. Upon detecting the user's touch operation, the electronic device can obtain the coordinates of the touch track. Based on the coordinates of the touch track, the electronic device can determine a focus window in at least one window that the touch track passes through. Furthermore, if the touch track passes through at least one control in the focus window, the electronic device can determine the focus control in the at least one control that the touch track passes through in the focus window.

[0190] The coordinates of the touch track may include the coordinates of the starting point and the ending point of the touch track, and the coordinates of a preset number of touch points that the touch track passes through between the starting point and the ending point.

[0191] 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. Thereafter, the electronic device may detect whether the touch track passes through at least one control in the focus window.

[0192] If the touch track passes through at least one control in the focus window, the electronic device can obtain the coordinates of the point where the touch track passes through the first control in the focus window. The electronic device can then determine the control where the 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 coordinates of the point where the touch track passes through the last control in the focus window. The electronic device can then determine the control where the coordinates are located as the focus control.

[0193] 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.

[0194] For example, referring to Figure 4A , a user performs a touch operation on the display screen of an electronic device to input a touch trajectory to the electronic device. The touch trajectory passes through window 400, window 410, and window 420. Upon detecting the user's touch operation, the electronic device can obtain the starting coordinates of the touch trajectory corresponding to the touch operation. Since the starting coordinates of the touch trajectory are within window 400, the electronic device can determine window 400 as the focus window.

[0195] Afterwards, the electronic device may detect whether the touch track passes through any 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.

[0196] For example, see Figure 4B . A user performs a touch operation on the display screen of an electronic device to input a touch trajectory to the electronic device. The touch trajectory passes through window 440, window 450, and window 460. Upon detecting the user's touch operation, the electronic device can obtain the coordinates of the starting point of the touch trajectory corresponding to the touch operation. Since the starting point of the touch trajectory is located in window 440, the electronic device can determine window 440 as the focus window.

[0197] Thereafter, the electronic device may detect whether the touch track passes through the controls in the window 440 .

[0198] Because the touch track passes through controls 441 and 442 in window 440, and the electronic device can determine, based on the coordinates of the touch track, that the first control passed by the touch track in window 440 is control 441, the electronic device can therefore determine control 441 as the focused control. Alternatively, because the touch track passes through controls 441 and 442 in window 440, and the electronic device can determine, based on the coordinates of the touch track, that the last control passed by the touch track in window 440 is control 442, the electronic device can therefore determine control 442 as the focused control.

[0199] 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. Thereafter, the electronic device may detect whether the touch track passes through at least one control in the focus window.

[0200] If the touch track passes through at least one control in the focus window, the electronic device can obtain the coordinates of the point where the touch track passes through the first control in the focus window. The electronic device can then determine the control where the 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 coordinates of the point where the touch track passes through the last control in the focus window. The electronic device can then determine the control where the coordinates are located as the focus control.

[0201] If the touch track does not pass through any control in the focus window, and the electronic device determines that a control is 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.

[0202] 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, the electronic device still determines that there is no focus control in the displayed interface after detecting the user's touch operation.

[0203] It is understood that at the same time, an electronic device can only include one focused window, or one focused window and one focused control. As the electronic device acquires the user's touch trajectory each time, each control displayed by the electronic device may successively become the focused control, and each window displayed by the electronic device may successively become the focused window.

[0204] For example, referring to FIG4C , a user performs a touch operation on the display screen of an electronic device to input a touch track to the electronic device. Since the touch track is located within control 471, and control 471 is located within window 470, the electronic device can determine control 471 as the focused control based on the coordinates of the touch track. Furthermore, the electronic device can determine window 470 as the focused window based on the coordinates of the touch track.

[0205] 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.

[0206] 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 all 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, but the focus window is not switched.

[0207] Based on the above examples, we can see that when the focus control switches, the focus window does not necessarily switch. However, when the focus window switches, the focus control switches.

[0208] In some embodiments, after detecting the touch track of the user input, 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.

[0209] The electronic device may determine whether the focus control is switched by:

[0210] The electronic device can determine whether the focus control has switched based on whether the focus control determined after detecting a touch track input by the user and the focus control determined before detecting the touch track input by the user are the same control. If they are the same control, it can be determined that the focus control has not switched. If they are not the same control, it can be determined that the focus control has switched.

[0211] 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 has been switched.

[0212] In some embodiments, when the electronic device determines that the focus control has switched, it can determine whether to enter the handwriting input mode based on whether the input method service is requested. If the electronic device requests the input method service, the electronic device enters the handwriting input mode. If the electronic device does not request the input method service, the electronic device does not enter the handwriting input mode.

[0213] For example, if the electronic device has entered the handwriting input mode before determining that the focus control has switched, then after determining that the focus control has switched, if the electronic device does not request to call the input method service, the electronic device exits the handwriting input mode.

[0214] If the electronic device does not enter the handwriting input mode before the electronic device determines that the focus control has switched, then after the electronic device determines that the focus control has 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.

[0215] For another example, if the electronic device has already entered the handwriting input mode before determining that the focus control has switched, then 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 remains in the handwriting input mode.

[0216] If the electronic device does not enter the handwriting input mode before the electronic device determines that the focus control has switched, then 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 enters the handwriting input mode.

[0217] As can be seen, in the method provided in the embodiment of the present application, when the electronic device detects that a user has performed a touch operation on a certain control, even if the control is not a standard input control 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 a request is made to call the input method service. In other words, 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. The user can directly write in the input control of the third-party application to complete the input to the electronic device.

[0218] In some embodiments, each time a user touches and stops touching the display screen of an electronic device is considered 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, the user determines that the touch operation has ended.

[0219] 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.

[0220] Referring to (a) in FIG5 , a user can perform a click operation on the display screen of an electronic device by clicking a location on the display screen with a finger or a tool such as a stylus. When the user performs a click operation, a touch track 501 input to the electronic device is in the form of a point. Therefore, if the coordinates of the touch track obtained by the electronic device include less than a preset number of point coordinates (e.g., less than 2), the electronic device can determine that the user's touch operation is a click operation.

[0221] Referring to FIG. 5( b ), a user can move a finger or a tool such as a stylus while maintaining contact with the display screen to perform a sliding operation on the display screen of an electronic device. When performing a sliding operation, the touch track 502 input to the electronic device by the user 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 (e.g., greater than 2), the electronic device can determine that the user's touch operation is a sliding operation.

[0222] In some embodiments, when an electronic device enters a handwriting input mode in response to a user's touch operation, if the electronic device determines that the touch operation is a slide 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 presenting 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 electronic device's operating memory.

[0223] 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. Thereafter, if the electronic device determines that the user's touch operation is a sliding operation, it 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.

[0224] 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) into the electronic device, the electronic device may detect whether a focus control switches after detecting the user's second touch operation.

[0225] 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).

[0226] 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.

[0227] 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. Thereafter, the electronic device may display the target character in the at least one character in the focus control.

[0228] 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.

[0229] 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.

[0230] Exemplarily, continue to refer to FIG. 6A. The user inputs a first touch operation on the control 601 to the electronic device. The electronic device can display a first touch trajectory "one" along with the user's input of the first touch operation. After that, the user can continue to input a second touch operation on the control 601 to the electronic device. The electronic device can display a second touch trajectory "pie" along with the user's input of the second touch operation. Based on the coordinates of the first touch trajectory and the coordinates of the second touch trajectory, the electronic device can predict at least one character corresponding to the first touch trajectory and the second touch trajectory (for example, obtain characters such as "factory", "T", "corpse", etc.). After that, the electronic device can display the character with the highest matching degree to the first touch trajectory and the second touch trajectory in the control 601 (for example, display the character "factory").

[0231] In some embodiments, referring to FIG. 6B, the target character can be a character selected by the user. After the electronic device predicts at least one character corresponding to the first touch trajectory and / or the second touch trajectory based on the coordinates of the first touch trajectory and / or the coordinates of the second touch trajectory, it can also display a display box 602. The display box 602 includes at least one character predicted by the electronic device. The user can perform a click or selection operation on the target character among the at least one character. After the electronic device detects the click or selection operation of the user on the target character, it can display the target character in the focus control 603.

[0232] In some embodiments, the electronic device can predict at least one character corresponding to the first touch trajectory and / or the second touch trajectory through an input method application. After that, the electronic device can pull up an input method window corresponding to the input method application. The input method window includes a display box showing at least one character predicted by the input method application. The user can input the character into the focus control by performing a click or selection operation on the target character in the display box.

[0233] Taking the user's input of a first touch operation and / or a second touch operation on the focus control to the electronic device as an example, this embodiment of the present application exemplarily illustrates the method for the electronic device to obtain the character corresponding to the first touch trajectory and / or the second touch trajectory. In practical applications, after the user inputs a second touch operation on the focus control to the electronic device, the user can continue to input more touch operations such as a third touch operation, a fourth touch operation, etc. on the focus control to the electronic device. The electronic device can 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, etc. after detecting the user's input of the third touch operation, the fourth touch operation, etc. Based on these touch trajectories, the electronic device can predict the corresponding characters.

[0234] In some embodiments, when the electronic device enters a handwriting input mode in response to a user's touch operation and switches the displayed interface from a first interface to a 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 a 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 electronic device's operating memory.

[0235] 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, it can switch the displayed interface from the first interface to the second interface, and determine the second control as the new focus control instead of the first control.

[0236] For example, referring to Figure 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. Thereafter, 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.

[0237] 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 the first touch track corresponding to the first touch operation in the second control and / or around the second control.

[0238] For example, referring to FIG7 , 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 .

[0239] 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.

[0240] Exemplarily, continue to refer to FIG. 7. When the first touch trajectory 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 and / or around the control 704 for subsequent writing. When the electronic device detects more touch operations input by the user such as the second touch operation, it can display more touch trajectories such as the second touch trajectory corresponding to the second touch operation.

[0241] In some embodiments, the electronic device can predict at least one character corresponding to the touch trajectory input by the user in the first interface and / or the second interface based on the coordinates of the first touch trajectory input by the user in the first interface and / or the coordinates of the second touch trajectory input by the user in the second interface. Subsequently, the electronic device can display the target character among the at least one character in the focus control (e.g., the second control in the above embodiment).

[0242] Exemplarily, when the target character is the character with the highest matching degree with the first touch trajectory and / or the second touch trajectory, continue to refer to FIG. 7. Based on the coordinates of the first touch trajectory corresponding to the first touch operation input by the user in and / or around the control 701 and the coordinates of the second touch trajectory corresponding to the second touch operation input by the user in and / or around the control 704, the electronic device can predict the target character "person". Subsequently, the electronic device can display the target character "person" in the control 704.

[0243] In some embodiments, when the target character is the character selected by the user, refer to FIG. 8. The electronic device can predict at least one character corresponding to the touch trajectory input by the user in the first interface 801 and / or the second interface 802 based on the coordinates of the first touch trajectory corresponding to the first touch operation input by the user in the first interface 801 and / or the coordinates of the second touch trajectory corresponding to the second touch operation input by the user in the second interface 802. Subsequently, the electronic device can display the display box 803. The display box 803 includes at least one character predicted by the electronic device. The user can perform a click or selection operation on the target character among the at least one character. After the electronic device detects the click or selection operation on the target character by the user, it can display the target character in the focus control 804.

[0244] In some embodiments, when the electronic device obtains a user's touch trajectory, it can obtain the attributes of the touch trajectory. The attributes of the touch trajectory may include a first attribute and a second attribute. Specifically, 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 trajectory corresponding to the user's touch operation can 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 trajectory corresponding to the user's touch operation can be determined as the second attribute.

[0245] 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 trajectory is the second attribute.

[0246] 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 trajectory is the first attribute.

[0247] It is understood that the electronic device can detect, based on hardware such as a sensor, whether a user inputs a touch operation on the electronic device using a finger or a tool such as a stylus, thereby determining whether the attribute of the touch trajectory corresponding to the touch operation is the first attribute or the second attribute. This application does not limit the method by which the electronic device determines the attribute of the touch trajectory.

[0248] 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 limitation 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. Ordinary technicians in this field will think of many 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.

[0249] Furthermore, some steps in the method embodiments may be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and may be deleted in certain usage scenarios. Alternatively, other possible steps may be added to the method embodiments.

[0250] Furthermore, the various method embodiments may be implemented separately or in combination.

[0251] It is understandable that in order to achieve the above functions, the embodiments of the present application further provide an electronic device, which 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 embodiments 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 be beyond the scope of this application.

[0252] This embodiment can divide the electronic device into functional modules based on the above-mentioned method example. For example, each functional module can be divided according to its function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and only represents a logical functional division. In actual implementation, other division methods may be used.

[0253] 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 implementations 1 to 3.

[0254] Implementation method 1:

[0255] 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 .

[0256] 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.

[0257] 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.

[0258] 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.

[0259] When the focus management module 902 determines that there is a focused control, the focus management module 902 may further detect whether the focused control has switched. If the focus management module 902 detects that the focused control has switched, the focus management module 902 sends a first message to the input management module 901. The first message is used to inform the input management module 901 that the focused control has switched.

[0260] After receiving the first information sent by the focus management module 902, the input management module 901 can detect whether the electronic device has requested to call the input method service to determine whether the electronic device has entered the handwriting input mode. If the input management module 901 detects that the electronic device has requested to call the input method service, it determines that the electronic device has entered the handwriting input mode. If the input management module 901 does not detect that the electronic device has requested to call the input method service, it determines that the electronic device has not entered the handwriting input mode.

[0261] When the input management module 901 determines that the electronic device does not enter the handwriting input mode, the received coordinates of the first touch track may be deleted to release memory space of the electronic device.

[0262] 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 user's first touch operation is a click operation or a slide operation based on the cached coordinates of the first touch track.

[0263] 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.

[0264] When the input management module 901 determines that the user's first touch operation is a sliding operation, the cached coordinates of the first touch track may be sent to the handwriting input module 903 .

[0265] 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.

[0266] 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.

[0267] In some embodiments, if the input management module 901 does not detect a switch in the focus control, and the input management module 901 detects a second touch operation by the user again, the input management module 901 may 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 may 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 903 may 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 may control the electronic device to display the character and hide the already displayed second touch track.

[0268] In some embodiments, the first information also includes an identifier for representing the focus control after switching determined by the focus management module 902. When 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 representing the focus control after switching determined by the focus management module 902 to the handwriting input module 903. Based on the received identifier of the focus control, 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. In addition, based on the received identifier of the focus control, the handwriting input module 903 can control the electronic device to display the predicted characters in the focus control and hide the second touch track that has been displayed.

[0269] 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. Specifically, 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.

[0270] 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.

[0271] 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.

[0272] Implementation 2:

[0273] 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 this can refer to the steps in implementation 1 and are not described in detail here.

[0274] 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 memory space of the electronic device.

[0275] 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 .

[0276] 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 user's first touch operation is a click operation or a slide operation based on the coordinates of the first touch track.

[0277] If the handwriting input module 903 determines that the user's first touch operation is a click operation, it can send second information to the input management module 901. After receiving the second information, the input management module 901 can delete the cached coordinates of the first touch track to free up memory space in the electronic device.

[0278] 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, and are not repeated here.

[0279] Based on the above content, the difference between implementation method 1 and implementation method 2 is:

[0280] In implementation method 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. Only when the input management module 901 determines that the user's first touch operation is a slide operation will it send the cached coordinates of the first touch track to the handwriting input module 903. In implementation method 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.

[0281] Implementation 3:

[0282] 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 .

[0283] 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.

[0284] 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.

[0285] 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.

[0286] When the focus management module 902 determines that there is a focused control, it can also detect whether the focused control has switched. If the focus management module 902 detects that the focused control has switched, it sends a first message to the input management module 901. The first message is used to inform the input management module 901 that the focused control has switched.

[0287] After receiving the first information sent by the focus management module 902, the input management module 901 can detect whether the electronic device has requested to call the input method service to determine whether the electronic device has entered the handwriting input mode. If the input management module 901 detects that the electronic device has requested to call the input method service, it determines that the electronic device has entered the handwriting input mode. If the input management module 901 does not detect that the electronic device has requested to call the input method service, it determines that the electronic device has not entered the handwriting input mode.

[0288] When the input management module 901 determines that the electronic device does not enter the handwriting input mode, the received coordinates of the first touch track may be deleted to release memory space of the electronic device.

[0289] When the input management module 901 determines that the electronic device has entered 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 has entered the handwriting input mode.

[0290] After receiving the third information sent by the input management module 901 , the handwriting input module 903 may determine whether the user's first touch operation is a click operation or a slide operation based on the coordinates of the first touch track received previously.

[0291] 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 2 and will not be repeated here.

[0292] Based on the above content, the difference between Implementation 2 and Implementation 3 is:

[0293] In implementation 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 handwriting input mode, the coordinates of the first touch track are sent to the handwriting input module 903. In implementation 3, the input management module 901 detects the user's first touch operation and does not cache the coordinates of the touch track corresponding to the first touch operation. Instead, the coordinates of the first touch track are directly sent to the handwriting input module 903. The handwriting input module 903 can subsequently directly call the coordinates of the first touch track.

[0294] An embodiment of the present application further provides an electronic device, as shown in FIG13 , which may include one or more processors 1301 , a memory 1302 , and a communication interface 1303 .

[0295] 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.

[0296] The communication interface 1303 is used to transmit data with other devices. The memory 1302 stores computer program code. The computer program code includes 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.

[0297] Among them, the processor 1301 can be a processor or a controller, for example, a central processing unit (CPU), a general-purpose 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 the various exemplary logic blocks, modules and circuits described in conjunction with the contents of this disclosure. The processor can also be a combination that implements computing functions, for example, 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 the electronic device to execute the method steps provided in the above embodiments. For example, the processor can be used to support the electronic device to execute the steps in Figure 10. Alternatively, the processor can be used to support the electronic device to execute the steps in Figure 11. Alternatively, the processor can be used to support the electronic device to execute the steps in Figure 12.

[0298] The bus 1304 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 1304 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, FIG13 shows only one thick line, but this does not necessarily mean that there is only one bus or only one type of bus.

[0299] 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.

[0300] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0301] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, 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 provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

[0302] Exemplarily, the chip system may 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.

[0303] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. 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.

[0304] An embodiment of the present application further provides a computer-readable storage medium, in which computer program code is stored. When the processor executes the computer program code, the electronic device executes the relevant method steps in the above method embodiment.

[0305] An embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the relevant method steps in the above method embodiment.

[0306] In addition, embodiments of the present application further provide a device. Specifically, the device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is configured to store a computer program. When the computer program is executed by one or more processors, the device performs the scenario configuration method described in each of the above method embodiments.

[0307] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0308] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in hardware or by executing software instructions by a processor. The software instructions can be composed of corresponding software modules, which 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 discs (CD-ROMs), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the 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).

[0309] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0310] In the several embodiments provided in this 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 merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, 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

1. A handwriting input method, applied to electronic equipment, characterized in that: include: Receiving a first touch operation based on a first interface input; 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, the first touch track corresponding to the first touch operation is displayed on the second interface.

2. The method according to claim 1, characterized in that The first interface includes a first control, the second interface includes a second control, and the second control is associated with the first control; The receiving a first touch operation based on a first interface input includes: Receiving a first touch operation inputted to the first control; The displaying, on the second interface, a first touch track corresponding to the first touch operation includes: The first touch track is displayed in the second control.

3. The method according to claim 2, characterized in that After displaying the first touch track in the second control, the method further includes: predicting at least one character corresponding to the first touch trajectory; A first target character is displayed in the second control, and the at least one character corresponding to the first touch track includes the first target character.

4. The method according to claim 3, characterized in that The first target character is a character having the highest matching degree with the first touch track.

5. The method according to claim 3, characterized in that: The second interface also includes a display frame, and after predicting at least one character corresponding to the first touch trajectory, the method further includes: displaying at least one character corresponding to the first touch track in the display frame; The displaying the first target character in the second control further includes: A selection operation on the first target character is detected, and the first target character is displayed in the second control.

6. The method according to any one of claims 2 to 5, characterized in that: After displaying the first touch track in the second control, the method further includes: Receiving a second touch operation based on the second interface input; In the case where the second touch operation is a touch operation on 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.

7. The method according to claim 6, characterized in that After displaying, in response to the second touch operation, a second touch track corresponding to the second touch operation in the second control, the method further includes: predicting at least one character corresponding to the first touch track and the second touch track; A second target character is displayed in the second control, and at least one character corresponding to the first touch track and the second touch track includes the second target character.

8. The method according to claim 7, characterized in that The second target character is a character having the highest matching degree with the first touch trajectory and the second touch trajectory.

9. The method according to claim 7, characterized in that: The second interface also includes a display frame, and after predicting at least one character corresponding to the first touch trajectory and the second touch trajectory, the method further includes: displaying the at least one character in the display frame; The displaying of the second target character in the second control further includes: A selection operation on the second target character is detected, and the second target character is displayed in the second control.

10. The method according to any one of claims 2 to 9, characterized in that: The method further comprises: In response to the first touch operation, acquiring coordinates of a first touch track corresponding to the first touch operation; The displaying, on the second interface, a first touch track corresponding to the first touch operation includes: Based on the coordinates of the first touch track, the first touch track is displayed on the second interface.

11. The method according to claim 10, characterized in that The displaying the first touch track on the second interface based on the coordinates of the first touch track includes: Determining that the first control is a focus control based on the coordinates of the first touch track; Detecting that the electronic device requests to call an input method service, and determining that the electronic device enters a 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.

12. The method according to claim 11, characterized in that Before determining the first control as a focus control based on the coordinates of the first touch track, the method further includes: determining a focus window 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 a focus control, wherein the first touch track passes through the at least one control in the focus window, and the at least one control includes the first control.

13. The method according to claim 12, characterized in that The determining, based on the coordinates of the first touch track, a focus window in at least one window passed by the first touch track includes: Based on the coordinates of the first touch track, determining the first or last window passed by the first touch track as a focus window; The step of determining the first control in the focus window as a focus control comprises: Based on the coordinates of the first touch track, the first control in the focus window is determined as a focus control, and the first control is the first or last control passed by the first touch track in the focus window.

14. The method according to any one of claims 11 to 13, characterized in that: The first interface includes a first control, the second interface includes a second control, and the second control is associated with the first control; The receiving a first touch operation based on a first interface input includes: Receiving a first touch operation inputted to the first control; Before displaying the first touch track corresponding to the first touch operation on the second interface, the method further includes: In response to the first touch operation, switching the displayed interface from the first interface to the second interface; The second control is determined as a new focus control.

15. The method according to claim 14, characterized in that After displaying the first touch track corresponding to the first touch operation on the second interface, the method further includes: Receiving a second touch operation based on the second interface input; In response to the second touch operation, acquiring coordinates of a second touch track corresponding to the second touch operation; Based on the coordinates of the second touch track, when it is determined that 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.

16. The method according to claim 15, characterized in that After acquiring the coordinates of a second touch track corresponding to the second touch operation in response to the second touch operation, the method further includes: In the case where it is determined that the focus control is switched, detecting whether the electronic device requests to call an input method service; In the case of detecting that the electronic device requests to call the input method service, determining that the electronic device enters the handwriting input mode; When the electronic device enters the handwriting input mode, if 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.

17. The method according to claim 15 or 16, characterized in that The switching of the focus control includes: The focus control is switched from one focus control to another focus control; Alternatively, the interface currently displayed by the electronic device switches from one in which there is no focus control to one in which there is a focus control.

18. The method according to any one of claims 1 to 17, characterized in that: The first touch operation is a sliding operation.

19. An electronic device, characterized in that: include: A memory and one or more processors; the memory is coupled to the processor; wherein the memory stores computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1-18.

20. A computer-readable storage medium comprising computer instructions, characterized in that: When the computer instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 18.

21. A computer program product, characterized in that When the computer program product is run on a computer, the computer is caused to perform the method according to any one of claims 1 to 18.

Citation Information

Patent Citations

  • System for achieving blackboard writing on any interface on intelligent interaction large screen

    CN110162266A

  • Input method and device and machine readable medium

    CN113407039A

  • Interface handwriting writing method and system, control device and storage medium

    CN114610188A

  • Handwriting pen input method, electronic equipment and system

    CN115480658A

  • Operation control method, electronic equipment and readable storage medium

    CN115686334A