Handwriting input display method, electronic device, and storage medium

By predicting the location of undetected handwriting input points on touch devices and intercepting the predicted handwriting drawing process when the operation stops, the problem of handwriting input delay is solved, thus improving the user experience.

CN116560555BActive Publication Date: 2026-01-20HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210102832.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2026-01-20
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

When using handwriting input on a touch device, the displayed handwriting is delayed compared to the actual position of the pen tip, resulting in a poor user experience. Furthermore, the continued display of the predicted handwriting after the user stops handwriting input leads to errors.

Method used

By collecting the current reporting point position information of handwriting input operations, machine learning algorithms such as Taylor polynomial or Kalman filter algorithms are used to predict the position of undetected reporting points, and the drawing process of the predicted handwriting is intercepted when the handwriting input operation stops, so as to avoid displaying incorrect handwriting.

Benefits of technology

It improves the responsiveness of handwriting, enhances the user experience, ensures that the displayed handwriting corresponds to the actual operation, and avoids incorrect display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116560555B_ABST
    Figure CN116560555B_ABST
Patent Text Reader

Abstract

The application provides a handwriting input display method, an electronic device and a storage medium. The method comprises the following steps: in response to a handwriting input operation on a display screen, collecting position information of a current report point generated by the handwriting input operation; predicting position information of at least one report point after the current report point based on the position information of the current report point generated by the handwriting input operation; drawing predicted handwriting based on the position information of the at least one predicted report point; displaying the drawn predicted handwriting on the display screen; detecting whether the handwriting input operation is stopped; and if the handwriting input operation is stopped, intercepting the drawing process of the predicted handwriting. The application can predict handwriting input report points in advance and draw predicted handwriting, so as to improve the hand following property of handwriting, and when the handwriting input operation of the user is stopped, the drawing process of the predicted handwriting is intercepted in time, so as to avoid the display screen from displaying incorrect handwriting, and effectively improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of touch control, in particular to a handwriting input display method, an electronic device and a storage medium. BACKGROUND

[0002] Nowadays, touch devices such as smart phones, tablet computers, readers, smart watches and the like have been widely applied to daily life of users, and handwriting input on a touch screen of the touch device has become a common way of human-computer interaction. When handwriting input is performed on the touch screen, displayed handwriting is usually delayed from an actual position of a pen tip, and there is a difference from the experience of writing with an ordinary pen on paper. By predicting handwriting input points that have not been detected in advance and performing drawing and display of handwriting based on the predicted handwriting input points, the hand-following property of handwriting can be improved. However, the handwriting input operation of a user can be stopped at any time, and if the handwriting input points that have not been actually detected are continued to be displayed based on the predicted handwriting input points, the displayed handwriting does not correspond to the actual operation of the user, and thus incorrect handwriting is displayed, which affects the use experience of the user. SUMMARY

[0003] In view of the above, it is necessary to provide a handwriting input display method, an electronic device and a storage medium, which can intercept a drawing process of predicted handwriting when handwriting input operation is stopped, so as to avoid displaying incorrect handwriting.

[0004] In a first aspect, the present application provides a handwriting input display method, comprising: in response to handwriting input operation on a display screen, collecting position information of a current input point generated by the handwriting input operation; predicting position information of at least one input point after the current input point based on the position information of the current input point generated by the handwriting input operation; drawing predicted handwriting based on the position information of the at least one predicted input point; detecting whether the handwriting input operation is stopped; if the handwriting input operation is stopped, intercepting the drawing process of the predicted handwriting; or if the handwriting input operation is not stopped, displaying the drawn predicted handwriting on the display screen. Through the above technical solution, in the process of handwriting input of a user, handwriting input points that have not been detected can be predicted in advance, and predicted handwriting can be drawn, so as to improve the hand-following property of handwriting. In addition, when handwriting input operation of the user is stopped, the drawing process of predicted handwriting can be intercepted in time, so as to avoid the display screen displaying incorrect handwriting, and the use experience of the user is improved.

[0005] In a possible implementation, the display screen comprises a touch layer, and the touch layer comprises a plurality of sensing channels and a plurality of driving channels; the position information of the current point generated by the handwriting input operation is collected by detecting the position of the touch layer generating a sensing capacitance through the sensing channels and the driving channels; the position of the touch layer generating the sensing capacitance is determined as the position of the point generated by the handwriting input operation; and the coordinates of the point on the display screen are obtained based on the sensing capacitance detected by the sensing channels and the driving channels. Through the technical solution, the position information of the point generated by the handwriting input operation on the display screen can be accurately obtained.

[0006] In a possible implementation, the position information of at least one point after the current point is predicted by establishing a point prediction model based on the position information of the historical points generated by the handwriting input operation and a machine learning algorithm, and predicting the position information of at least one point after the current point based on the point prediction model. Through the technical solution, the point prediction model can be established based on historical data and an AI model, and the accuracy of the predicted point position of the point prediction model can be improved.

[0007] In a possible implementation, the machine learning algorithm is a second-order Taylor polynomial algorithm, and the formula of the second-order Taylor polynomial algorithm is as follows: wherein, s Δt is the coordinates of the next predicted point of the current point, s0 is the coordinates of the current point, v is the speed of the handwriting input operation, a is the acceleration of the handwriting input operation, and Δt is the interval time between the generation of the next predicted point and the detection of the current point. Through the technical solution, the Taylor polynomial algorithm can be associated with the coordinates and time of the point generated by the handwriting input operation, and the accuracy of the point prediction model can be improved.

[0008] In a possible implementation, the point prediction model is established based on the position information of the historical points generated by the handwriting input operation and a machine learning algorithm, and the speed and acceleration of the handwriting input operation are calculated by a second-order Taylor polynomial algorithm according to the coordinates and time of the plurality of historical points collected to establish the point prediction model. Through the technical solution, the parameters of the Taylor polynomial algorithm can be determined based on historical data, and the accuracy of the point prediction model can be improved.

[0009] In a possible implementation, the machine learning algorithm is a Kalman filter algorithm, and the formula of the Kalman filter algorithm is as follows: , , , wherein, is the predicted point coordinates at time k, is the point coordinate of the k-1 moment, A is a state transition matrix, B is a control matrix, is the control amount of the k-1 moment, P k is the error covariance of the k moment, P k-1 is the error covariance of the k-1 moment, Q is a process noise, K k is the Kalman gain of the k moment, H is a Kalman parameter matrix, R is a measurement noise, is the predicted point coordinate of the k moment after correction, y k is the measurement value of the k moment. Through the above technical solution, the Kalman filtering algorithm can be associated with the coordinates of the points generated by the handwriting input operation, and the accuracy of the point prediction model can be improved.

[0010] In a possible implementation, the establishing of the point prediction model based on the position information of the historical points generated by the handwriting input operation and the machine learning algorithm includes: calculating the parameters of the Kalman filtering algorithm according to the coordinates of the plurality of historical points collected, to establish the point prediction model. Through the above technical solution, the parameters of the Kalman filtering algorithm can be determined based on the historical data, so that the accuracy of the point prediction model can be improved.

[0011] In a possible implementation, the predicting of the position information of at least one point after the current point based on the point prediction model includes: inputting the coordinates of the current point into the point prediction model to obtain the coordinates of at least one predicted point after the current point. Through the above technical solution, the position information of the predicted point can be quickly obtained, so that the predicted handwriting can be drawn in time, and the hand-following property of the handwriting display can be improved.

[0012] In a possible implementation, the predicting of the position information of at least one point after the current point based on the point prediction model includes: judging whether the current point is the first point detected within a preset time; and if the current point is the first point detected within the preset time, predicting the position information of a first preset number of points after the current point based on the point prediction model. Through the above technical solution, when the user just starts to perform the handwriting input operation, the position information of a larger number of points can be obtained, the distance of the predicted handwriting can be increased, the distance between the handwriting and the actual position of the handwriting input can be shortened, and the hand-following property of the handwriting display can be improved.

[0013] In a possible implementation, the predicting the position information of at least one point after the current point based on the point prediction model comprises: determining whether the speed of the current handwriting input operation is greater than a preset value; if the speed of the current handwriting input operation is greater than the preset value, predicting the position information of a second preset number of points after the current point based on the point prediction model; or if the speed of the current handwriting input operation is less than or equal to the preset value, predicting the position information of a third preset number of points after the current point based on the point prediction model, wherein the first preset number is greater than or equal to the second preset number, and the second preset number is greater than the third preset number. Through the technical solution, when the user is performing handwriting input operation and the handwriting input operation is less likely to stop, a larger number of predicted point position information can be obtained, so that the hand-following property of handwriting is improved. Meanwhile, when the handwriting input operation performed by the user is about to end, a smaller number of predicted point position information is obtained, so that the error handwriting is avoided from being drawn and displayed, and the computing resource is reduced.

[0014] In a possible implementation, the predicting the position information of at least one point after the current point based on the point prediction model comprises: determining whether the acceleration of the current handwriting input operation is greater than or equal to 0; if the acceleration of the current handwriting input operation is greater than or equal to 0, predicting the position information of a fourth preset number of points after the current point based on the point prediction model, the fourth preset number being greater than the first preset number; or if the acceleration of the current handwriting input operation is less than 0, predicting the position information of the third preset number of points after the current point based on the point prediction model. Through the technical solution, when the handwriting input operation has no stopping trend, the number of predicted points obtained is increased, so that the length of the predicted handwriting is increased, the distance between the handwriting and the actual handwriting position is shortened, and the hand-following property of handwriting display is further improved. Meanwhile, when the handwriting input operation has a stopping trend, the number of predicted points obtained is reduced, so that the length of the predicted handwriting is shortened, the error handwriting is avoided from being displayed on the display screen, and the computing resource is reduced.

[0015] In a possible implementation, the drawing the predicted handwriting based on the position information of at least one predicted point comprises: drawing the predicted handwriting based on the position information of at least one predicted point in a window management service; transmitting a window in which the drawn predicted handwriting is located to a display composition service; transmitting, by the display composition service, a plurality of windows including the window in which the drawn predicted handwriting is located to a hardware composition service; compositing, by the hardware composition service, the plurality of windows including the window in which the drawn predicted handwriting is located into a user interface to be displayed, and transmitting the user interface to be displayed to a display screen. Through the technical solution, the drawing and display efficiency of the predicted handwriting can be improved.

[0016] In a possible implementation, the drawing of the predicted handwriting based on the position information of the at least one predicted point in the window management service comprises: determining a window of the window management service in which the at least one predicted point is located; generating, by the application processor, a figure of the at least one predicted point at a position corresponding to the coordinates of the at least one predicted point in the window, and a figure of a line between the predicted point and the previous point; and performing rasterization processing on the figure of the at least one predicted point and the figure of the line between the predicted point and the previous point by the graphics processor to obtain an image of the at least one predicted point and an image of the line between the predicted point and the previous point. The above technical solution can improve the drawing efficiency of the predicted handwriting.

[0017] In a possible implementation, the transmission of the window in which the predicted handwriting is drawn to the display composition service comprises: after the image of the at least one predicted point and the image of the line between the predicted point and the previous point are drawn, sending a rendering instruction to the display composition service; and the window management service transmits the window containing the drawn image of the at least one predicted point and the image of the line between the predicted point and the previous point to the display composition service. The above technical solution can improve the display efficiency of the predicted handwriting.

[0018] In a possible implementation, the detection of whether the handwriting input operation is stopped comprises: determining whether the display screen currently detects a point generated by the handwriting input operation; if the display screen currently does not detect the point generated by the handwriting input operation, determining that the handwriting input operation is stopped; or if the display screen currently detects the point generated by the handwriting input operation, determining that the handwriting input operation is not stopped. The above technical solution can accurately detect the stop of the handwriting input operation.

[0019] In a possible implementation, the interception of the drawing process of the predicted handwriting comprises: sending an interception instruction to a drawing monitoring module; in response to the interception instruction, the drawing monitoring module determines a drawing process in which the drawing process of the predicted handwriting currently is; the drawing monitoring module sends the interception instruction to the current drawing process; and in response to the interception instruction, the current drawing process controls a next drawing process of the drawing process of the predicted handwriting to stop drawing. The above technical solution can timely intercept the drawing process of the predicted handwriting when the handwriting input operation is stopped, so as to avoid displaying an incorrect handwriting.

[0020] In a possible implementation, the current drawing process returns a null value to the next drawing process to control the next drawing process to stop drawing, including: the current drawing process returns a null value to the next drawing process to control the next drawing process to terminate the drawing process of the predicted handwriting. Through the technical solution, when the handwriting input operation stops, the drawing process of the predicted handwriting can be quickly intercepted, and the display of the wrong handwriting can be avoided.

[0021] In a possible implementation, the current drawing process returns a null value to the next drawing process to control the next drawing process to terminate the drawing process of the predicted handwriting, including: if the drawing monitoring module determines that the current drawing process is at the application layer, the application layer sends a null value to the display compositing service to control the display compositing service to terminate the drawing process of the predicted handwriting. Through the technical solution, when the handwriting input operation stops, the process of the predicted handwriting drawing process in the application layer can be terminated in time, the interception of the predicted handwriting drawing process is realized, and the display of the wrong handwriting can be avoided.

[0022] In a possible implementation, the current drawing process returns a null value to the next drawing process to control the next drawing process to terminate the drawing process of the predicted handwriting, including: if the drawing monitoring module determines that the current drawing process is at the display compositing service, the display compositing service sends a null value to the hardware compositing service to control the hardware compositing service to terminate the drawing process of the predicted handwriting. Through the technical solution, when the handwriting input operation stops, the process of the predicted handwriting drawing process in the display compositing service can be terminated in time, the interception of the predicted handwriting drawing process is realized, and the display of the wrong handwriting can be avoided.

[0023] In a possible implementation, the current drawing process returns a null value to the next drawing process to control the next drawing process to terminate the drawing process of the predicted handwriting, including: if the drawing monitoring module determines that the current drawing process is at the hardware compositing service, the hardware compositing service sends a null value to the display screen to control the display screen to terminate the drawing process of the predicted handwriting. Through the technical solution, when the handwriting input operation stops, the process of the predicted handwriting drawing process in the hardware compositing service can be terminated in time, the interception of the predicted handwriting drawing process is realized, and the display of the wrong handwriting can be avoided.

[0024] In a possible implementation, the stopping drawing by the next drawing process of the drawing flow of the predicted handwriting is performed by: if the current drawing process is determined to be in the display screen by the drawing monitoring module, sending the interception instruction to the display driver service, and controlling the display driver service to terminate the drawing flow of the predicted handwriting. By the above technical solution, when the handwriting input operation is stopped, the process of the display driver service driving the display screen to display the predicted handwriting can be terminated in time, the interception of the drawing flow of the predicted handwriting is realized, and the display of the wrong handwriting is avoided.

[0025] In a possible implementation, the sampling rate of the display screen is greater than the refresh rate of the display screen. By the above technical solution, the position information of the report point can be collected faster, and the predicted handwriting can be displayed slower, so that when the handwriting input operation is stopped, the drawing flow of the predicted handwriting can be intercepted in time, and the display of the wrong handwriting is avoided.

[0026] In a second aspect, the present application provides an electronic device, comprising a memory and a processor, wherein the memory is configured to store program instructions; and the processor is configured to read and execute the program instructions stored in the memory, so that the electronic device executes the handwriting input display method described above when the program instructions are executed by the processor.

[0027] In a third aspect, the present application provides a computer storage medium, which stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the handwriting input display method described above.

[0028] In addition, the technical effects brought by the second aspect to the third aspect can be referred to the description of the methods of the above method part, which will not be repeated here.

[0029] The handwriting input display method, the electronic device and the storage medium provided by the embodiments of the present application can predict the handwriting input report point that has not been detected in advance in the handwriting input process, and draw the predicted handwriting, so as to improve the hand-following property of the handwriting, and at the same time, when the handwriting input operation of the user is stopped, the drawing flow of the predicted handwriting is intercepted in time, the display screen is prevented from displaying the wrong handwriting, and the user experience is effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1A is a state diagram of a display screen and a handwriting pen provided by an embodiment of the present application.

[0031] Figure 1B is a handwriting diagram of a handwriting pen on a display screen provided by an embodiment of the present application.

[0032] Figure 2is a software architecture diagram of an electronic device provided by an embodiment of the present application.

[0033] Figure 3 is a flowchart of a handwriting input display method provided by an embodiment of the present application.

[0034] Figure 4 is a structural schematic diagram of a display screen provided by an embodiment of the present application.

[0035] Figure 5 is a partial schematic diagram of passing a touch event provided by an embodiment of the present application.

[0036] Figure 6 is a schematic diagram of passing a touch event provided by an embodiment of the present application.

[0037] Figure 7 is a flowchart of predicting position information of at least one point after a current point provided by an embodiment of the present application.

[0038] Figure 8 is a schematic diagram of a point drawing process provided by an embodiment of the present application.

[0039] Figure 9 is a flowchart of drawing predicted handwriting based on position information of at least one predicted point provided by an embodiment of the present application.

[0040] Figure 10 is a schematic diagram of handwriting displayed by a display screen provided by an embodiment of the present application.

[0041] Figure 11 is a flowchart of a handwriting input display method provided by another embodiment of the present application.

[0042] Figure 12 is a software architecture diagram of an electronic device provided by another embodiment of the present application.

[0043] Figure 13 is a flowchart of an interception process of drawing predicted handwriting provided by an embodiment of the present application.

[0044] Figure 14 is a flowchart of a handwriting input display method provided by another embodiment of the present application.

[0045] Figure 15 is an application scenario schematic diagram of a handwriting input display method provided by an embodiment of the present application.

[0046] Figure 16 is an application scenario schematic diagram of a handwriting input display method provided by another embodiment of the present application.

[0047] Figure 17 is a hardware architecture diagram of an electronic device provided by an embodiment of the present application. Detailed Implementation

[0048] For ease of understanding, some concepts related to the embodiments of this application are illustrated and explained by way of example.

[0049] It should be noted that the terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" refers to one or more. "More than one" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c (seven cases).

[0051] To better understand the handwriting input display method provided in the embodiments of this application, the application scenarios of the handwriting input display method of this application will be described first below.

[0052] See Figure 1A The diagram shown illustrates the state of the electronic device's display screen and stylus according to an embodiment of this application. When the stylus touches the display screen of the electronic device and moves on the screen, the display screen collects the reporting points of the stylus at a certain sampling rate, draws the reporting points, and connects adjacent reporting points to generate and display the stylus's handwriting.

[0053] However, since the sampling rate and refresh rate of the display screen are usually fixed, there is a delay between the time when the stylus tip contacts the display screen to generate a report point and the time when the display screen detects the report point, resulting in that the drawn report point position lags behind the actual report point of the stylus. Meanwhile, since the refresh rate of the display screen is limited, i.e., the number of displayed pictures per second is limited, there is also a delay between the time when the drawing of the report point is completed and the time when the display screen displays the report point, resulting in that the displayed report point position lags behind the actual report point of the stylus, and further resulting in that the displayed stylus handwriting lags behind the actual report point position of the stylus.

[0054] Referring to Figure 1B Fig. 1 shows a stylus handwriting on a display screen provided by an embodiment of the present application. For example Figure 1B Fig. 1 shows a stylus handwriting, when the stylus tip contacts the display screen at position c, the display screen collects the report point corresponding to the previous contact point of the stylus tip at position b, and the display screen displays the report point corresponding to the previous two contact points at position a. Since the display screen needs to spend a certain amount of time to collect the report point of the stylus, draw the report point, connect the report point with the previous report point to form the handwriting, and display the handwriting, when the display screen displays the report point at position a, the stylus tip has actually moved to position c of the display screen, resulting in that the displayed stylus handwriting lags behind the actual position of the stylus.

[0055] Referring to Figure 2 Fig. 2 shows a software architecture diagram of an electronic device provided by an embodiment of the present application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. For example, the Android system is divided into four layers, from top to bottom, the application layer 101, the framework layer 102, the Android runtime and system library 103, the kernel layer 104 and the hardware layer 105.

[0056] The application layer can include a series of application packages. For example, the application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, device control service and the like.

[0057] The framework layer provides the application layer with application programming interfaces (APIs) and programming frameworks. The application framework layer includes some pre-defined functions. For example, the application framework layer can include window manager, content provider, view system, phone manager, resource manager, notification manager and the like.

[0058] The window manager is used to manage windows programs. The window manager can acquire the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc. The content provider is used to store and acquire data, and make the data accessible to the application program. The data can include video, image, audio, dialed and received phone, browsing history and bookmark, phone book, etc. The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application program. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures. The phone manager is used to provide the communication function of the electronic device. For example, the management of the call state (including connection, hang-up, etc.). The resource manager provides various resources for the application program, such as localized strings, icons, pictures, layout files, video files, etc. The notification manager enables the application program to display notification information in the status bar, which can be used to convey a type of message that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of downloading, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application program running in the background, and can also be a notification in the form of a dialogue window appearing on the screen. For example, prompting text information in the status bar, issuing a prompt sound, the electronic device vibrating, the indicator light flashing, etc.

[0059] The Android Runtime includes the core library and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core library contains two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

[0060] The application layer and the framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection, etc.

[0061] The system library can include a plurality of functional modules. For example, the surface manager, the media library, the three-dimensional graphics processing library (for example: OpenGL ES), the 2D graphics engine (for example: SGL), etc.

[0062] The surface manager is used for managing the display subsystem and provides 2D and 3D layer fusion for multiple applications. The media library supports playback and recording of multiple commonly used audio, video formats, and static image files. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like. The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.

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

[0064] The kernel layer is the core of the operating system of the electronic device, is the first layer of software expansion based on hardware, provides the most basic functions of the operating system, is the basis of the operating system, is responsible for managing the processes, memory, device drivers, files, and network systems of the system, and determines the performance and stability of the system. For example, the kernel can determine the operation time of an application program on a certain part of hardware.

[0065] The kernel layer includes programs closely related to the hardware, such as interrupt handling programs and device drivers, and also includes basic, common, and high-frequency running modules, such as clock management modules, process scheduling modules, and the like, and also includes critical data structures. The kernel layer can be set in the processor or fixed in the internal memory.

[0066] The hardware layer is the hardware of the electronic device, and the hardware layer at least includes a display screen.

[0067] To solve the problem that the displayed handwriting is delayed from the actual position of the pen tip when the handwriting pen is used for handwriting input on the touch screen, an embodiment of the present application provides a handwriting input display method.

[0068] Referring to FIG. 1, Figure 3 The method is applied in an electronic device, and the handwriting input display method comprises the following steps.

[0069] S301, in response to a handwriting input operation on the display screen, collecting position information of a current report point generated by the handwriting input operation.

[0070] In an embodiment of the present application, the handwriting input operation is an operation of contacting or moving on the display screen by a finger or a handwriting pen. The handwriting pen can be a capacitive pen, such as an active capacitive pen or a passive capacitive pen. The capacitive pen is a pen made of a conductor material, having a conductive characteristic, used for touching a capacitive screen to complete a human-computer interaction operation, and is an auxiliary device for simulating a human body (usually a finger of the human body) to complete a human-computer interaction. The material of the tip of the active capacitive pen is polyoxymethylene having high strength, high impact resistance, smoothness and other characteristics. Based on the characteristics of polyoxymethylene, the active capacitive pen has better smoothness. The passive capacitive pen is an auxiliary device simulating the touch effect of a finger. The tip of the pen can be made of conductive foam, metal, brush and other conductive materials that can affect the change of capacitance. The tip of the passive capacitive pen is relatively thick.

[0071] Referring to Figure 4 Fig. 1 is a structural schematic diagram of a display screen provided by an embodiment of the present application. In an embodiment of the present application, the display screen 194 of the electronic device is a touch screen. The display screen 194 includes a touch layer 201 and a display layer 202. The touch layer 201 includes a plurality of sensing channels 203 and driving channels 204, and a plurality of electrodes are arranged on the sensing channels 203 and the driving channels 204.

[0072] In an embodiment of the present application, the position information of the report points of the handwriting pen is collected in the kernel layer, including: collecting the position information of a plurality of report points of the handwriting pen at a preset sampling rate. The preset sampling rate is a default sampling rate of the display screen. The sampling rate is the number of report points collected per second. Optionally, the preset sampling rate is 240 Hz.

[0073] Referring to Figure 5Fig. 1 shows a schematic diagram of a touch event transmission method according to an embodiment of the present application. In an embodiment of the present application, the position information of the report point generated by the handwriting input operation is coordinate information, the kernel layer includes a touch driving module 1041, and the touch driving module is a touch driving circuit. A user can perform a handwriting input operation on the display screen using a stylus, such as drawing a line, drawing a mark, writing a word, or drawing an image. The position information of the report point generated by the handwriting input operation includes the following steps. When the stylus contacts the display screen, the electrodes in the stylus and the electrodes on the sensing channel and the driving channel generate a sensing capacitance. The display screen forms a report point of the stylus at the position where the sensing capacitance is generated. The sensing channel of the touch layer reports the generated sensing capacitance to the touch driving module of the kernel layer. The touch driving module obtains the X-axis coordinate of the report point of the stylus based on the capacitance change of the sensing channel. The driving channel reports the generated sensing capacitance to the touch driving module. The touch driving module obtains the Y-axis coordinate of the report point of the stylus based on the capacitance change of the driving channel. The kernel layer obtains the X-axis coordinate and the Y-axis coordinate of the report point obtained by the touch driving module, and thus obtains the position information of the report point of the stylus. In an embodiment of the present application, the X-axis coordinate and the Y-axis coordinate are coordinates in a coordinate system established with the edges of the display screen as the coordinate axes.

[0074] In another embodiment of the present application, a user can perform a handwriting input operation on the display screen using a finger, such as drawing a line, drawing a mark, writing a word, or drawing an image. The position information of the report point generated by the handwriting input operation includes the following steps. The finger is a conductor. When the user's finger contacts the display screen, the finger can generate a sensing capacitance with the electrodes on the sensing channel and the driving channel. The display screen forms a report point of the finger at the position where the sensing capacitance is generated. The sensing channel of the touch layer reports the generated sensing capacitance to the touch driving module of the kernel layer. The touch driving module obtains the X-axis coordinate of the report point of the stylus based on the capacitance change of the sensing channel. The driving channel reports the generated sensing capacitance to the touch driving module. The touch driving module obtains the Y-axis coordinate of the report point of the stylus based on the capacitance change of the driving channel. The kernel layer obtains the X-axis coordinate and the Y-axis coordinate of the report point obtained by the touch driving module, and thus obtains the position information of the report point of the finger.

[0075] In an embodiment of the present application, the display screen includes short edges and long edges. If the sensing channel is arranged parallel to the short edges and the driving channel is arranged parallel to the long edges, the touch driving module obtains the X-axis coordinate of the report point based on the capacitance change of the sensing channel, and the touch driving module obtains the Y-axis coordinate of the report point based on the capacitance change of the driving channel. In another embodiment of the present application, if the sensing channel is arranged parallel to the long edges and the driving channel is arranged parallel to the short edges, the touch driving module obtains the Y-axis coordinate of the report point based on the capacitance change of the sensing channel, and the touch driving module obtains the X-axis coordinate of the report point based on the capacitance change of the driving channel.

[0076] Reference is made to Figure 6Fig. 1 shows a schematic diagram of delivering a touch event according to an embodiment of the present application. Figure 6 Fig. 2 shows a schematic diagram of a touch framework of an electronic device. In an embodiment of the present application, the framework layer includes an InputReader module 1021, an InputDispatcher module 1022, and a Window Manager module 1023. The InputReader module 1021 is an InputReader thread of an Input Manager Service InputManagerService of the electronic device, the InputDispatcher module 1022 is an InputDispatcher thread of the Input Manager Service InputManagerService, and the Window Manager module 1023 is a Window Manager Service WindowManagerService of the electronic device.

[0077] In an embodiment of the present application, the kernel layer transmits the position information of the touch point generated by the handwriting input operation to the application layer through the framework layer. Specifically, the kernel layer transmits the position information of the touch point generated by the handwriting input operation to the application layer through the framework layer includes that the touch driver module of the kernel layer transmits the position information of the touch point generated by the handwriting input operation to the InputReader module of the framework layer, the InputReader module transmits the position information of the touch point generated by the handwriting input operation to the InputDispatcher module, the InputDispatcher module distributes the position information of the touch point generated by the handwriting input operation to the Window Manager module, the Window Manager module transmits the position information of the touch point generated by the handwriting input operation to the application layer, for example, to the application for drawing the handwriting trace.

[0078] S302, predicting the position information of at least one touch point after the current touch point based on the position information of the current touch point generated by the handwriting input operation.

[0079] In an embodiment of the present application, the position information of the historical touch point is the coordinate of the touch point detected before the current touch point, and the position information of at least one touch point after the current touch point is the coordinate of at least one touch point after the current touch point. The prediction of the position information of at least one touch point after the current touch point based on the position information of the current touch point generated by the handwriting input operation is performed by the application layer, and the detailed process can refer to Figure 7 Specifically, the method includes:

[0080] S3021, establishing a touch point prediction model based on the position information of the historical touch point generated by the handwriting input operation and a machine learning algorithm.

[0081] It should be noted that when the user writes or draws on the display screen by using a finger or a stylus, the moving track displayed based on the handwriting input (i.e., the handwriting of the handwriting input) is a curve or a straight line, and the report points generated by the handwriting input operation are points on the curve or the straight line. Since the moving track displayed based on the handwriting input changes over time, the points on the moving track can be divided into the coordinates of the X axis and the coordinates of the Y axis, and the time-coordinate functions of the X axis and the Y axis are constructed respectively.

[0082] In an embodiment of the present application, the machine learning algorithm is a Taylor polynomial algorithm. The Taylor polynomial is a function for approximating any curve, and the Taylor polynomial is shown in formula (1):

[0083] (1).

[0084] Alternatively, a second-order Taylor polynomial is used as the report point prediction model, and the second-order Taylor polynomial is shown in formula (2):

[0085] (2).

[0086] In formula (2), f(t) is the coordinate of the report point on the X axis or the Y axis at time t. t0 is the time at which the current report point is detected, and t represents the time at which the predicted report point is generated. t-t0 can be represented by Δt, i.e., Δt represents the interval time between the generation of the predicted report point and the detection of the current report point. Therefore, formula (2) can be equivalent to formula (3):

[0087] (3).

[0088] In an embodiment of the present application, since f(t) is a function based on time t, the derivative of the coordinate of the predicted point with respect to time t can represent the speed v of the handwriting input operation, and the second derivative of the coordinate of the predicted point with respect to time t can represent the acceleration a of the handwriting input operation. Therefore, formula (3) can also be equivalent to formula (4):

[0089] (4).

[0090] In formula (4), s Δt is the coordinate of the report point on the X axis or the Y axis at time t, and s0 is the coordinate of the current report point on the X axis or the Y axis.

[0091] In an embodiment of the present application, the report point prediction model is established based on the report point information generated by the handwriting input operation and the machine learning algorithm, which includes: according to the coordinates and times of the plurality of historical report points collected, the speed v and the acceleration a of the handwriting input operation are calculated by the second-order Taylor polynomial algorithm, so as to obtain the report point prediction model s Δt .

[0092] It should be noted that the coordinates of the multiple report points include X-axis coordinates and Y-axis coordinates. Therefore, the speed v of the handwriting input operation in the X-axis of the adjacent two report points can be obtained by calculating the rate of change of the X-axis coordinates of the adjacent two report points within the interval time. The acceleration a of the handwriting input operation in the X-axis of the adjacent two report points can be obtained by calculating the derivative of the speed v of the adjacent two report points within the interval time, and then the predicted report point model of the X-axis can be obtained. Similarly, the speed v of the handwriting input operation in the Y-axis of the adjacent two report points can be obtained by calculating the rate of change of the Y-axis coordinates of the adjacent two report points within the interval time. The acceleration a of the handwriting input operation in the Y-axis of the adjacent two report points can be obtained by calculating the derivative of the speed v of the adjacent two report points within the interval time, and then the predicted report point model of the Y-axis can be obtained.

[0093] S3022, predicting the position information of at least one report point after the current report point based on the report point prediction model.

[0094] In an embodiment of the present application, the step of predicting the position information of at least one report point after the current report point based on the report point prediction model includes: inputting the coordinates of the current report point into the report point prediction model to obtain the coordinates of at least one predicted report point after the current report point.

[0095] In an embodiment of the present application, assuming that the coordinates of the current report point are (x0, y0), the X-axis coordinate of the next predicted report point is , and the Y-axis coordinate of the next predicted report point is . Wherein, Δt is the average value of the interval time between two continuous historical report points. In other embodiments, Δt can also be an arbitrarily set time.

[0096] In an embodiment of the present application, by the above method, the coordinates of the second report point after the current report point can be further predicted according to the coordinates of the next predicted report point of the current report point, so as to obtain the coordinates of multiple predicted report points.

[0097] In an embodiment of the present application, the step of predicting the position information of at least one report point after the current report point based on the report point prediction model includes: judging whether the current report point is the first report point detected within a preset time, and if the current report point is the first report point detected within the preset time, predicting the position information of the first preset number of report points after the current report point based on the report point prediction model. Optionally, the preset time is 10 seconds.

[0098] In an embodiment of the present application, the position information of the at least one point after the current point is predicted based on the point prediction model comprises: determining whether the speed of the current handwriting input operation is greater than a preset value, if the speed of the current handwriting input operation is greater than the preset value, predicting the position information of the second preset number of points after the current point based on the point prediction model, and if the speed of the current handwriting input operation is less than or equal to the preset value, predicting the position information of the third preset number of points after the current point based on the point prediction model.

[0099] In an embodiment of the present application, the first preset number is greater than or equal to the second preset number, and the second preset number is greater than the third preset number. Optionally, the first preset number is 3, the second preset number is 2, and the third preset number is 1.

[0100] It should be noted that if the current point is the first point detected within a preset time, it indicates that the user has just started to perform the handwriting input operation, at this time, the coordinates of a larger number of predicted points can be obtained, and the coordinates of more points can be predicted, thereby further improving the hand-following property of the handwriting trace. If the speed of the current handwriting input operation is greater than the preset value, it indicates that the user is performing the handwriting input operation and the possibility of ending the handwriting input operation is low, at this time, a larger number of predicted point coordinates can be obtained, and the coordinates of more points can be predicted, thereby further improving the hand-following property of the handwriting trace. If the speed of the current handwriting input operation is less than or equal to the preset value, it indicates that the handwriting input operation performed by the user is about to end, at this time, a smaller number of predicted point coordinates can be obtained, thereby avoiding drawing and displaying an incorrect handwriting trace, and reducing the operation resources.

[0101] In another embodiment of the present application, the machine learning algorithm can also be a Kalman filter algorithm. The formula of the Kalman filter algorithm is as formula (5):

[0102] (5).

[0103] In formula (5), is the predicted point coordinate at time k, i.e., the prediction result, is the point coordinate at time k-1 (i.e., the coordinate of the current point), A is a state transition matrix, and B is a control matrix, is the control amount at time k-1.

[0104] When the Kalman filter predicts the point coordinates, the prediction result needs to be corrected based on the error. For example, the error covariance is used to represent the error of the point coordinate prediction, and the calculation formula of the error covariance at time k is as formula (6):

[0105] (6).

[0106] In formula (6), Pk P is the error covariance at time k k-1 Q is the process noise at time k-1.

[0107] The Kalman filter also needs to correct the prediction result based on the Kalman gain when predicting the report point coordinates. The calculation formula of the Kalman gain is as formula (7):

[0108] (7).

[0109] In formula (7), K k is the Kalman gain at time k, H is the Kalman parameter matrix, and R is the measurement noise.

[0110] Based on the Kalman gain K k , the predicted report point coordinates are corrected to obtain the optimal predicted report point coordinates. The correction formula is as formula (8):

[0111] (8).

[0112] In formula (8), x is the optimal predicted report point coordinates at time k, and y k is the measurement value at time k.

[0113] After obtaining the optimal predicted report point coordinates at time k, the error covariance at time k+1 needs to be estimated. The calculation formula of the error covariance at time k+1 is as formula (9):

[0114] (9).

[0115] In formula (9), P k+1 is the error covariance at time k+1, and I is the identity matrix.

[0116] In another embodiment of the present application, the report point prediction model is established based on the position information of historical report points generated by the handwriting input operation and the machine learning algorithm, which includes: according to the coordinates of a plurality of historical report points collected, the parameters of the Kalman filtering algorithm are calculated to obtain the report point prediction model. Optionally, the parameters of the Kalman filtering algorithm can include the state transition matrix A, the control matrix B, the control amount at time k-1, the process noise Q, the Kalman parameter matrix H, the measurement noise R, the measurement value y k at time k, and the identity matrix I.

[0117] In another embodiment of the present application, the machine learning algorithm can also be a pseudo-spectrum algorithm.

[0118] S303, drawing the predicted handwriting based on the position information of the at least one predicted report point.

[0119] Referring to Figure 8 Fig. 1 is a schematic diagram of a predicted handwriting drawing process provided by an embodiment of the present application. Figure 8 Fig. 1 is also a display framework of an electronic device. In an embodiment of the present application, the framework layer further comprises a display synthesis module 1024, which serves as a Surface Flinger service of the electronic device. The kernel layer further comprises a display driver module 1042 and a hardware synthesis module 1043. The display driver module is a display driver circuit, and the hardware synthesis module serves as an HWC (Hardware Composer HAL) service of the electronic device.

[0120] In an embodiment of the present application, the detailed process of drawing the predicted handwriting based on the position information of the at least one predicted report point is as shown in Figure 9 Fig. 2, and specifically comprises:

[0121] S3031, the application layer draws the predicted handwriting based on the position information of the at least one predicted report point and the window management module.

[0122] In an embodiment of the present application, after the application layer predicts the information of at least one report point after the current report point, the predicted handwriting is drawn based on the information of the at least one predicted report point. Drawing the predicted handwriting comprises drawing the at least one predicted report point and a connection line between the predicted report point and the previous report point.

[0123] Specifically, drawing the at least one predicted report point and the connection line between the predicted report point and the previous report point comprises: determining the window in which the at least one predicted report point is located through the window management service, generating a figure of the at least one predicted report point at a position corresponding to the coordinates of the at least one predicted report point in the window through the application processor based on the coordinates of the at least one predicted report point, and generating a figure of the connection line between the predicted report point and the previous report point, rasterizing the figure of the at least one predicted report point and the figure of the connection line between the predicted report point and the previous report point through the graphics processor to obtain an image of the at least one predicted report point and an image of the connection line between the predicted report point and the previous report point.

[0124] It should be noted that the figure of the at least one predicted report point and the figure of the connection line between the predicted report point and the previous report point are vector figures with a preset shape and size. The image of the at least one predicted report point and the image of the connection line between the predicted report point and the previous report point are images with pixels.

[0125] In an embodiment of the present application, the application layer further draws other contents in the window in which the at least one predicted report point is located except for the report points and the report point connection lines, and the contents of other windows.

[0126] S3032, transmit the window in which the predicted handwriting is drawn to the display compositing module.

[0127] In an embodiment of the present application, transmitting the drawn predicted handwriting to the display compositing module comprises: after the application layer completes drawing of the at least one predicted point and the line between the predicted point and the previous point, sending a rendering instruction to the display compositing module, and the window management module transmits the window containing the image of the drawn at least one predicted point and the image of the line between the predicted point and the previous point to the display compositing module. Meanwhile, the window management module also transmits other windows of the user interface to the display compositing module.

[0128] S3033, the display compositing module transmits the multiple windows including the window containing the drawn predicted handwriting to the hardware compositing module.

[0129] S3034, the hardware compositing module composites the multiple windows including the window containing the drawn predicted handwriting into the user interface to be displayed, and transmits the user interface to be displayed to the display screen.

[0130] In an embodiment of the present application, the hardware compositing module transmits the user interface to be displayed to the display screen and stores it in the frame buffer of the display screen.

[0131] In an embodiment of the present application, the drawing process of the predicted handwriting comprises the process from drawing the predicted handwriting by the application layer to displaying the drawn predicted handwriting on the display screen.

[0132] S304, display the drawn predicted handwriting on the display screen.

[0133] In an embodiment of the present application, displaying the drawn predicted handwriting on the display screen is performed by the kernel layer, comprising: the display driver module drives the display screen to read the user interface to be displayed from the frame buffer, and displays the user interface to display the drawn predicted handwriting.

[0134] In an embodiment of the present application, the display compositing module can transmit the current refresh rate of the display screen to the display driver module.

[0135] Referring to Figure 10 Fig. 1 shows a schematic diagram of handwriting input handwriting provided by an embodiment of the present application. Figure 10The point a in the figure is a report point displayed by the display screen, the point b is a report point generated by the current handwriting input operation detected by the display screen, the point d is a predicted report point, and the point c is an actual contact point of the handwriting input operation. The handwriting between the points a and b is actual handwriting, and the handwriting between the points b and d is predicted handwriting displayed by the display screen. The predicted report point c is closer to the actual contact point c of the handwriting input operation than the point b, and the predicted handwriting is closer to the actual contact point c of the handwriting input operation than the actual handwriting, thereby improving the hand-following performance of the handwriting displayed by the handwriting input.

[0136] Referring to Figure 11 The figure shows a flowchart of a handwriting input display method provided by another embodiment of the present application. The method is applied to an electronic device, and the handwriting input display method comprises the following steps.

[0137] S401, in response to a handwriting input operation on the display screen, collecting position information of a current report point generated by the handwriting input operation.

[0138] S402, based on the position information of the current report point generated by the handwriting input operation, predicting position information of at least one report point after the current report point.

[0139] S403, based on the position information of the at least one predicted report point, drawing predicted handwriting.

[0140] S404, displaying the drawn predicted handwriting on the display screen.

[0141] S405, detecting whether the handwriting input operation is stopped.

[0142] In an embodiment of the present application, detecting whether the handwriting input operation is stopped comprises: the display driving module determining whether the display screen currently detects a report point generated by the handwriting input operation. If it is determined that the display screen currently does not detect the report point generated by the handwriting input operation, it is determined that the handwriting input operation is stopped. If it is determined that the display screen currently still detects the report point generated by the handwriting input operation, it is determined that the handwriting input operation is not stopped.

[0143] In an embodiment of the present application, if the touch driving module currently calculates the position information of the report point generated by the handwriting input operation, it is determined that the display screen currently still detects the report point generated by the handwriting input operation. If the touch driving module currently does not calculate the position information of the report point generated by the handwriting input operation, it is determined that the display screen currently does not detect the report point generated by the handwriting input operation.

[0144] Understandably, during handwriting input, the user's finger or stylus is usually in continuous contact with the display screen. The touch layer of the display screen can continuously detect the reporting points generated by the handwriting input operation. If the user's finger or stylus is lifted and no longer in contact with the display screen, the touch layer will not detect the reporting points generated by the handwriting input operation, and thus it can be determined that the handwriting input operation has stopped.

[0145] S406, If handwriting input stops, intercept the process of predicting handwriting drawing.

[0146] See Figure 12 The diagram shown is a software architecture diagram of an electronic device provided in another embodiment of this application. In one embodiment of this application, the framework layer further includes a drawing monitoring module 1025, used to monitor the drawing process in which at least one predicted reporting point is being drawn. A detailed process for intercepting the drawing process of at least one predicted reporting point is as follows: Figure 13 As shown, it specifically includes:

[0147] S4061, if the handwriting input operation stops, the touch driver module sends the interception instruction Erase_touch() to the drawing listening module.

[0148] S4062, in response to the interception command, the drawing monitoring module determines the current drawing process of the predicted handwriting.

[0149] S4063, the drawing listening module sends the interception instruction Erase_touch() to the current drawing process.

[0150] S4064, in response to the intercept instruction Erase_touch(), the next drawing process in the current drawing process controlling the drawing flow of the predicted handwriting stops drawing.

[0151] In one embodiment of this application, the current drawing process controlling the next drawing process of at least one predicted point drawing process to stop drawing includes: the module corresponding to the current drawing process returning a null value to the module corresponding to the next drawing process, so as to control the module of the next drawing process to terminate the drawing process of the predicted handwriting.

[0152] For example, if the drawing monitoring module determines that the current drawing process of the predicted handwriting is the process in which the application layer draws the predicted handwriting in the window management module, it sends an interception command to the application layer. In response to the interception command, the application layer returns an empty value to the display composition module. Since the display composition module receives an empty value instead of a window containing the completed predicted handwriting, the display composition module cannot send the window to the hardware composition module, and the hardware composition module cannot composite the window. Thus, the display screen cannot display the predicted handwriting, thereby intercepting the drawing process of the predicted handwriting.

[0153] For example, if the drawing monitoring module determines that the current drawing process of the drawing process of the predicted handwriting is the process in which the display composition module transmits multiple windows including the window in which the predicted handwriting is drawn to the hardware composition module, the interception instruction is sent to the display composition module, the display composition module returns an empty value to the hardware composition module in response to the interception instruction, and the hardware composition module cannot synthesize the window because it receives the empty value instead of the window including the predicted handwriting. Thus, the display screen cannot display the predicted handwriting, thereby achieving interception of the drawing process of the predicted handwriting.

[0154] For example, if the drawing monitoring module determines that the current drawing process of the drawing process of the predicted handwriting is the process in which the hardware composition module synthesizes multiple windows including the window in which the predicted handwriting is drawn into a user interface to be displayed, the interception instruction is sent to the hardware composition module, the hardware composition module returns an empty value to the display screen in response to the interception instruction, and the display screen cannot display the user interface including the predicted handwriting because it receives the empty value instead of the user interface to be displayed. Thus, the drawing process of the predicted handwriting is intercepted.

[0155] For example, if the drawing monitoring module determines that the current drawing process of the drawing process of the predicted handwriting is the process in which the hardware composition module has transmitted the user interface to be displayed to the display screen, the interception instruction is sent to the display driver module, the display driver module does not drive the display screen to display the user interface including the predicted handwriting in response to the interception instruction, so that the display screen cannot display the user interface including the predicted handwriting, thereby achieving interception of the drawing process of the predicted handwriting.

[0156] It can be understood that, in the case where the handwriting input operation is stopped, if the drawing process of the predicted handwriting is continued, the predicted handwriting will be completed and displayed on the display screen, resulting in an error handwriting and affecting the handwriting input experience of the user. Therefore, in the case where the handwriting input operation is stopped, the drawing process of the predicted handwriting is intercepted in time, thereby avoiding display of the error handwriting on the display screen.

[0157] It should be noted that, in the case where the handwriting input operation is stopped, the drawing process of the predicted handwriting is intercepted, and if the actual detected report points and the handwriting strokes have not been drawn, the drawing of the actual detected report points and the handwriting strokes is continued, and the actual detected report points and the handwriting strokes are displayed on the display screen after being drawn.

[0158] In an embodiment of the present application, the sampling rate of the display screen is greater than the refresh rate of the display screen. Alternatively, the sampling rate of the display screen is a preset multiple of the refresh rate. Optionally, the preset multiple is 2. For example, if the sampling rate of the display screen is 240 Hz, the refresh rate of the display screen is 120 Hz. It can be understood that the sampling rate of the display screen is set to be much greater than the refresh rate of the display screen, so as to quickly collect the position information of the report point and slowly display the predicted handwriting. In this way, when the handwriting input operation stops, the drawing process of the predicted handwriting can be intercepted in time, so as to avoid the display screen from displaying the wrong handwriting input handwriting, and improve the user experience.

[0159] In an embodiment of the present application, if the handwriting input operation stops, the coordinates of the predicted report point are stopped.

[0160] In another embodiment of the present application, the handwriting input display method further comprises: judging whether the acceleration of the current handwriting input operation is greater than or equal to 0, if the acceleration of the current handwriting input operation is greater than or equal to 0, predicting the position information of the fourth preset number of report points after the current report point based on the report point prediction model, and if the acceleration of the current handwriting input operation is less than 0, predicting the position information of the third preset number of report points after the current report point based on the report point prediction model.

[0161] In another embodiment of the present application, the fourth preset number is greater than the first preset number.

[0162] It should be noted that if the acceleration of the current handwriting input operation is greater than or equal to 0, the speed of the handwriting input operation continues to increase, which indicates that the handwriting input operation has no tendency to stop. The number of predicted report points obtained can be increased to increase the length of the predicted handwriting, shorten the distance between the handwriting and the actual handwriting position, and further improve the hand-following property of the handwriting display. If the acceleration of the current handwriting input operation is less than 0, the speed of the handwriting input operation decreases, which indicates that the handwriting input operation has a tendency to stop. The number of predicted report points obtained can be reduced to shorten the length of the predicted handwriting, avoid the display screen from displaying the wrong handwriting, and reduce the operation resources.

[0163] Referring to Figure 14 FIG. 4 shows a flowchart of a handwriting input display method provided by another embodiment of the present application. The method is applied in an electronic device, a handwriting input operation is generated by a user operating a handwriting pen, and the handwriting input display method comprises:

[0164] S501, in response to the handwriting pen drawing a line on the display screen, the display screen generates a capacitance change.

[0165] S502, calculating the actual position of the report point according to the capacitance change of the display screen.

[0166] S503, calculating the position of the predicted report point according to the report point prediction model and marking.

[0167] S504, the stylus application receives the predicted point position.

[0168] S505, the predicted point is drawn according to the predicted point position. The drawing of the predicted point includes drawing the predicted point and a line between the predicted point and the previous point, i.e. the predicted handwriting.

[0169] S506, it is determined whether the stylus lifting event is received. If the stylus lifting event is received, the flow goes to S507. If the stylus lifting event is not received, the flow goes to S508.

[0170] S507, the stylus application intercepts the drawing process of the predicted point.

[0171] S508, the display screen displays the drawn predicted point.

[0172] Referring to Figure 15 Fig. 1 shows an application scenario of a handwriting input display method provided by an embodiment of the present application.

[0173] At the hardware layer, in response to the handwriting input operation of the user, the capacitance value of the touch layer of the display screen changes, and the capacitance value change is reported to the touch driver. At the kernel layer, the touch driver obtains the position information of the reported point based on the capacitance value change of the touch layer, and reports the position information of the reported point to the input reading service Input Reader at the framework layer. At the framework layer, the input reading service Input Reader transmits the position information of the reported point to the input distribution service Input Dispatcher, and the input distribution service Input Dispatcher further transmits the position information of the reported point to the window management service WMS, and the window management service WMS transmits the position information of the reported point to the application program layer. At the application program layer, the application program layer that draws the handwriting input trajectory predicts the position information of at least one reported point after the current reported point based on the position information of multiple reported points, and draws the predicted trajectory based on the position information of at least one predicted point and the window management service WMS, and transmits the window in which the drawn predicted trajectory is located to the display composition service Surface Flinger, so as to render the drawn predicted trajectory. At the framework layer, the display composition service Surface Flinger transmits multiple windows including the window in which the drawn predicted trajectory is located to the hardware composition service HWC at the kernel layer. At the kernel layer, the hardware composition service HWC composes multiple windows including the window in which the drawn predicted trajectory is located into a user interface to be displayed, and transmits the user interface to be displayed to the display layer of the display screen for caching. At the hardware layer, the display layer of the display screen displays the user interface including the predicted trajectory under the display driver at the kernel layer. At this time, the user can see the predicted trajectory on the display screen, and the hand following property of the predicted trajectory is improved.

[0174] Referring to Figure 16 Fig. 2 is a schematic diagram of an application scenario of a handwriting input display method according to another embodiment of the present application.

[0175] At the hardware layer, in response to the handwriting input operation of the user, the capacitance value of the touch layer of the display screen changes, and the capacitance value change is reported to the touch driver. At the kernel layer, the touch driver obtains the position information of the reporting point based on the capacitance value change of the touch layer, and reports the position information of the reporting point to the input reading service Input Reader at the framework layer. At the framework layer, the input reading service Input Reader transmits the position information of the reporting point to the input distribution service Input Dispatcher, and the input distribution service Input Dispatcher further transmits the position information of the reporting point to the window management service WMS, and the window management service WMS transmits the position information of the reporting point to the application layer. At the application layer, the application for drawing the handwriting input stroke predicts the position information of at least one reporting point after the current reporting point based on the position information of multiple reporting points, and draws the predicted stroke based on the position information of at least one predicted reporting point and the window management service WMS, and transmits the window in which the drawn predicted stroke is located to the display composition service Surface Flinger, so as to render the drawn predicted stroke. At the framework layer, the display composition service Surface Flinger transmits multiple windows including the window in which the drawn predicted stroke is located to the hardware composition service HWC at the kernel layer. At the kernel layer, the hardware composition service HWC composes multiple windows including the window in which the drawn predicted stroke is located into a user interface to be displayed, and transmits the user interface to be displayed to the display layer of the display screen for caching. At the hardware layer, the display layer of the display screen displays the user interface including the predicted stroke under the display driver at the kernel layer. At this time, the user can see the predicted stroke on the display screen, and the hand-following property of the predicted stroke is improved.

[0176] In the drawing process of the predicted stroke (the process between the application drawing the predicted stroke to the display screen and receiving the user interface to be displayed and before the user interface is displayed), if the touch driver does not receive the capacitance value change reported by the touch layer, it indicates that the touch layer does not receive the handwriting input operation, and the handwriting input operation of the user stops. At this time, the touch driver sends the intercept instruction Erase_touch() to the drawing listening module Touch_Listener at the framework layer. At the framework layer, the drawing listening module Touch_Listener determines the drawing process in which the drawing process of the predicted stroke currently locates.

[0177] If the drawing monitoring module Touch Listener determines that the drawing process of the predicted handwriting currently is the process of the application layer drawing the predicted handwriting in the window management service WMS, an intercept instruction is sent to the application layer, the application layer returns NULL to the display composition service Surface Flinger in response to the intercept instruction, the display composition service Surface Flinger receives NULL instead of a window containing the predicted handwriting drawn, thus the display composition service Surface Flinger cannot send the window to the hardware composition service HWC, the hardware composition service HWC also cannot compose the window, thus the display screen cannot display the predicted handwriting, and the user cannot see the predicted handwriting, thereby the drawing process of the predicted handwriting is intercepted.

[0178] If the drawing monitoring module Touch Listener determines that the drawing process of the predicted handwriting currently is the process of the display composition service Surface Flinger transmitting a plurality of windows containing the window in which the predicted handwriting drawn to the hardware composition service HWC, an intercept instruction is sent to the display composition service Surface Flinger, the display composition service Surface Flinger returns NULL to the hardware composition service HWC in response to the intercept instruction, the hardware composition service HWC receives NULL instead of the window containing the predicted handwriting drawn, thus the hardware composition service HWC cannot compose the window, thus the display screen cannot display the predicted handwriting, and the user cannot see the predicted handwriting, thereby the drawing process of the predicted handwriting is intercepted.

[0179] For example, if the drawing monitoring module Touch Listener determines that the drawing process of the predicted handwriting currently is the process of the hardware composition service HWC composing a plurality of windows containing the window in which the predicted handwriting drawn into a user interface to be displayed, an intercept instruction is sent to the hardware composition service HWC, the hardware composition service HWC returns NULL to the display screen in response to the intercept instruction, the display screen receives NULL instead of the user interface to be displayed, thus the display screen cannot display the user interface containing the predicted handwriting, and the user cannot see the predicted handwriting, thereby the drawing process of the predicted handwriting is intercepted.

[0180] For example, if the drawing monitoring module determines that the drawing process of the predicted handwriting currently is in the process of the hardware synthesis module transmitting the user interface to be displayed to the display screen, the interception instruction is sent to the display driver module, the display driver module responds to the interception instruction and does not drive the display screen to display the user interface containing the predicted handwriting, so that the display screen cannot display the user interface containing the predicted handwriting, and the user cannot see the predicted handwriting, thereby achieving interception of the drawing process of the predicted handwriting.

[0181] Referring to Figure 17 As shown in FIG. 1, the electronic device 100 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a netbook, and a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device, and embodiments of the present application do not specially limit the specific type of the electronic device 100.

[0182] The electronic device 100 can 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 speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0183] It can be understood that the structural schematic of the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown, or combine certain components, or split certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0184] The processor 110 can include one or more processing units. For example, the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors.

[0185] The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0186] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are used repeatedly by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0187] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an Inter-integrated Circuit (I2C) interface, an Inter-integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface, etc.

[0188] The I2C interface is a bidirectional synchronous serial bus, including a Serial Data Line (SDA) and a Derail Clock Line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C bus. The processor 110 can be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces respectively. For example, the processor 110 can be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface, and realize the touch function of the electronic device 100.

[0189] The I2S interface can be used for audio communication.

[0190] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.

[0191] The UART interface is a universal serial data bus, which is used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.

[0192] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), and the like. In some embodiments, the processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.

[0193] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal.

[0194] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like.

[0195] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods.

[0196] The electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.

[0197] The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can use 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, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0198] The digital signal processor is used to process digital signals, which can process not only digital image signals but also other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0199] The internal memory 121 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs).

[0200] The random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation of DDR SDRAM is generally referred to as DDR5 SDRAM), etc.

[0201] The non-volatile memory can include disk storage devices, flash memories.

[0202] The flash memory can include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operation principle, and can include single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential order, and can include universal flash storage (UFS), embedded multi media card (eMMC), etc. according to the storage specification.

[0203] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of operating systems or other programs running, and can also be used to store data of users and application programs, etc.

[0204] The non-volatile memory can also store executable programs and data of users and applications, etc., which can be loaded into the random access memory in advance for direct reading and writing by the processor 110.

[0205] The external memory interface 120 can be used to connect an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to realize data storage functions. For example, files such as music and videos are stored in the external non-volatile memory.

[0206] The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include a plurality of instructions which, when executed by the processor 110, can implement the handwriting input display method described above to implement the handwriting input display function of the electronic device 100.

[0207] The pressure sensor 180A is used to sense a pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0208] The touch sensor 180K is also referred to as a "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch panel". The touch sensor 180K is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180K can transmit the detected touch operation to the application processor to determine a touch event type. Visual output related to the touch operation can be provided through the display screen 194. In some embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0209] The embodiments also provide a computer storage medium, which stores computer instructions. When the computer instructions are executed on the electronic device 100, the electronic device 100 performs the above-mentioned related method steps to implement the handwriting input display method in the above-mentioned embodiments.

[0210] The embodiments also provide a computer program product. When the computer program product is executed on a computer, the computer performs the above-mentioned related steps to implement the handwriting input display method in the above-mentioned embodiments.

[0211] In addition, the embodiments of the present application also provide an apparatus, which can be a chip, a component or a module. The apparatus can include a processor and a memory connected to each other. When the apparatus is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip performs the handwriting input display method in the above-mentioned method embodiments.

[0212] The electronic device, the computer storage medium, the computer program product or the chip provided by the embodiments can be used to execute the corresponding method provided above, and thus the beneficial effects achieved by the electronic device, the computer storage medium, the computer program product or the chip can refer to the beneficial effects of the corresponding method provided above, which will not be described here.

[0213] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional modules is taken as an example for illustration. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above.

[0214] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are merely illustrative, for example, the division of the modules or units is merely a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another apparatus, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, and can be electrical, mechanical or other forms.

[0215] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or a plurality of physical units, that is, can be located in one place, or can be distributed to a plurality of different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0216] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0217] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part of the prior art that makes a contribution or the whole or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for causing an apparatus (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method of the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0218] Finally, it should be noted that the above embodiments are merely used to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. A handwriting input display method, characterized by, The method comprises: in response to a handwriting input operation on a display screen, collecting position information of a current point generated by the handwriting input operation; based on the position information of the current point generated by the handwriting input operation, predicting position information of at least one point after the current point, comprising: if the speed of the handwriting input operation is greater than a preset value, predicting position information of a second preset number of points after the current point; if the speed of the handwriting input operation is less than or equal to the preset value, predicting position information of a third preset number of points after the current point, the second preset number being greater than the third preset number; based on the position information of at least one predicted point, drawing a predicted handwriting trace; displaying the drawn predicted handwriting trace on the display screen; detecting whether the handwriting input operation has stopped; if the handwriting input operation has stopped, intercepting the drawing process of the predicted handwriting trace, comprising: sending an interception instruction to a drawing monitoring module; in response to the interception instruction, the drawing monitoring module determines the current drawing process of the drawing process of the predicted handwriting trace, sends the interception instruction to the current drawing process; in response to the interception instruction, the current drawing process returns a null value to the next drawing process of the drawing process of the predicted handwriting trace, controls the next drawing process to terminate the drawing process of the predicted handwriting trace, if the drawing monitoring module determines that the current drawing process is in a hardware compositing service, the hardware compositing service sends a null value to the display screen, controls the display screen to terminate the drawing process of the predicted handwriting trace, if the drawing monitoring module determines that the current drawing process is in the display screen, sends the interception instruction to a display driver service, controls the display driver service to terminate the drawing process of the predicted handwriting trace.

2. The handwriting input display method of claim 1, wherein, The display screen comprises a touch layer, the touch layer comprises a plurality of sensing channels and a plurality of driving channels, and the collection of the position information of the current point generated by the handwriting input operation comprises: detecting the position of the sensing capacitor generated by the touch layer through the sensing channel and the driving channel; determining the position of the sensing capacitor generated by the touch layer as the position of the point generated by the handwriting input operation; obtaining the coordinates of the point on the display screen based on the sensing capacitor detected by the sensing channel and the driving channel.

3. The handwriting input display method of claim 1, wherein, The prediction of the position information of at least one point after the current point comprises: establishing a point prediction model based on the position information of the historical points generated by the handwriting input operation and a machine learning algorithm; predicting the position information of at least one point after the current point based on the point prediction model.

4. The handwriting input display method of claim 3, wherein, The machine learning algorithm is a second-order Taylor polynomial algorithm, and the formula of the second-order Taylor polynomial algorithm is: , wherein s Δt s0+ vΔt+ a(Δt)2 / 2, s0+ vΔt+ a(Δt)2 / 2+ v(Δt)2+ a(Δt)3 / 3, s0+ vΔt+ a(Δt)2 / 2+ v(Δt)2+ a(Δt)3 / 3+ v(Δt)3+ a(Δt)4 / 4, s0+ vΔt+ a(Δt)2 / 2+ v(Δt)2+ a(Δt)3 / 3+ v(Δt)3+ a(Δt)4 / 4+ v(Δt)4+ a(Δt)5 / 5, s0+ vΔt+ a(Δt 5. The handwriting input display method of claim 4, wherein, The establishment of the point prediction model based on the position information of the historical points generated by the handwriting input operation and a machine learning algorithm comprises: According to the coordinates and time of a plurality of historical points obtained by collection, the speed and acceleration of the handwriting input operation are calculated by a second-order Taylor polynomial algorithm to establish the point prediction model.

6. The handwriting input display method of claim 3, wherein, The machine learning algorithm is a Kalman filter algorithm, and the formula of the Kalman filter algorithm is: , , , , wherein, is a predicted point coordinate at time k, is a point coordinate at time k-1, A is a state transition matrix, is a transpose matrix of the state transition matrix, B is a control matrix, is a control amount at time k-1, P k is an error covariance at time k, k-1 is an error covariance at time k-1, Q is a process noise, K k is a Kalman gain at time k, H is a Kalman parameter matrix, is a transpose matrix of the Kalman parameter matrix, R is a measurement noise, is a corrected predicted point coordinate at time k, y k is a measurement value at time k.

7. The handwriting input display method of claim 6, wherein, The position information of the historical report points generated based on the handwriting input operation and the machine learning algorithm establish a report point prediction model, which comprises: According to the coordinates of the plurality of historical report points collected, the parameters of the Kalman filtering algorithm are calculated by the Kalman filtering algorithm to establish the report point prediction model.

8. The handwriting input display method according to any one of claims 3, 5, 7, wherein, The position information of at least one report point after the current report point predicted based on the report point prediction model comprises: The coordinates of the current report point are input into the report point prediction model to obtain the coordinates of at least one predicted report point after the current report point.

9. The handwriting input display method of claim 8, wherein, The position information of at least one report point after the current report point predicted based on the report point prediction model comprises: Determine whether the current report point is the first report point detected within a preset time; If the current report point is the first report point detected within the preset time, predict the position information of a first preset number of report points after the current report point based on the report point prediction model, the first preset number being greater than or equal to the second preset number.

10. The handwriting input display method of claim 9, wherein, The position information of at least one report point after the current report point predicted based on the report point prediction model comprises: Determine whether the acceleration of the current handwriting input operation is greater than or equal to 0; If the acceleration of the current handwriting input operation is greater than or equal to 0, predict the position information of a fourth preset number of report points after the current report point based on the report point prediction model, the fourth preset number being greater than the first preset number; or If the acceleration of the current handwriting input operation is less than 0, predict the position information of a third preset number of report points after the current report point based on the report point prediction model.

11. The handwriting input display method of claim 1, wherein, Drawing the predicted handwriting based on the position information of at least one predicted report point comprises: Drawing the predicted handwriting in the window management service based on the position information of at least one predicted report point; Transmitting the window in which the predicted handwriting is drawn to the display composition service; The display composition service transmits a plurality of windows including the window in which the predicted handwriting is drawn to the hardware composition service; The hardware composition service composes the plurality of windows including the window in which the predicted handwriting is drawn into a user interface to be displayed, and transmits the user interface to be displayed to the display screen.

12. The handwriting input display method of claim 11, wherein, Drawing the predicted handwriting in the window management service based on the position information of at least one predicted report point comprises: Determine the window of the window management service in which the at least one predicted report point is located; Based on the coordinates of the at least one predicted report point, generate a graph of the at least one predicted report point at the position corresponding to the coordinates in the window by the application processor, and generate a graph of the connection line between the at least one predicted report point and the previous report point; Rasterize the graph of the at least one predicted report point and the graph of the connection line between the at least one predicted report point and the previous report point by the graphics processor to obtain an image of the at least one predicted report point and an image of the connection line between the at least one predicted report point and the previous report point.

13. The handwriting input display method of claim 12, wherein, The window in which the predicted handwriting is drawn is transmitted to the display composition service, which comprises: After the image of the at least one predicted report point and the image of the line between the at least one predicted report point and the previous report point are drawn, a rendering instruction is sent to the display compositing service; The window management service transmits a window containing the image of the at least one predicted report point and the image of the line between the at least one predicted report point and the previous report point to the display compositing service.

14. The handwriting input display method of claim 1, wherein, The detection of whether the handwriting input operation is stopped includes: determining whether the display screen currently detects the report point generated by the handwriting input operation; if the display screen currently does not detect the report point generated by the handwriting input operation, determining that the handwriting input operation is stopped; or if the display screen currently detects the report point generated by the handwriting input operation, determining that the handwriting input operation is not stopped.

15. The handwriting input display method of claim 1, wherein, The return of the null value by the current drawing process to the next drawing process of the drawing process of the predicted handwriting controls the next drawing process to terminate the drawing process of the predicted handwriting, including: if the drawing monitoring module determines that the current drawing process is in the application layer, the application layer sends a null value to the display compositing service to control the display compositing service to terminate the drawing process of the predicted handwriting.

16. The handwriting input display method of claim 1, wherein, The return of the null value by the current drawing process to the next drawing process of the drawing process of the predicted handwriting controls the next drawing process to terminate the drawing process of the predicted handwriting, including: if the drawing monitoring module determines that the current drawing process is in the display compositing service, the display compositing service sends a null value to the hardware compositing service to control the hardware compositing service to terminate the drawing process of the predicted handwriting.

17. The handwriting input display method of claim 1, wherein, The sampling rate of the display screen is greater than the refresh rate of the display screen.

18. An electronic device, comprising: The electronic device includes a memory and a processor: The memory is configured to store program instructions. The processor is configured to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the handwriting input display method as claimed in any one of claims 1 to 17.

19. A computer storage medium, comprising, The computer storage medium stores program instructions, and when the program instructions are executed on the electronic device, the electronic device executes the handwriting input display method as claimed in any one of claims 1 to 17.

Citation Information

Patent Citations

  • Terminal device display method and terminal device

    CN105518587A

  • Drawing method, device and equipment and storage medium

    CN110297677A

  • Method and equipment for predicting drawing point of handwriting pen

    CN112835455A