Stylus coordinate prediction method and apparatus, and electronic device and computer storage medium

By calculating the initial velocity and acceleration of the stylus and predicting the coordinates of the stylus, the problem of high delay in predicting the handwriting trajectory is solved, and the stylus and chirality and user experience are improved.

WO2025066575A1PCT designated stage expired Publication Date: 2025-04-03HUIZHOU TCL MOBILE COMM CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/110821
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-26
Filing Date
2024-08-08
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

The current handwriting trajectory prediction method has high latency, resulting in poor handwriting and chirality, affecting the user experience.

Method used

By obtaining the current coordinate points and historical coordinate points of the stylus, combining the preset time interval of the point, the initial velocity and acceleration of the stylus are calculated, and the predicted coordinates of the stylus are predicted.

Benefits of technology

It realizes lightweight trajectory prediction of handwritten coordinates, improves the efficiency of stylus coordinate prediction, reduces prediction delay and system load, and improves handwritten user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024110821_03042025_PF_FP_ABST
    Figure CN2024110821_03042025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence. Disclosed are a stylus coordinate prediction method and apparatus, and an electronic device and a computer storage medium. The method comprises: acquiring a current coordinate point of a stylus, and an associated first historical coordinate point; on the basis of a reporting time interval, determining a first initial speed and a second initial speed; and on the basis of the first initial speed, the second initial speed and the reporting time interval, calculating predicted coordinates of the stylus. The present application improves the speed and accuracy of stylus coordinate prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Handwriting pen coordinate prediction method, device, electronic device and computer storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 26, 2023, with application number 202311253969.5 and application name “Handwriting pen coordinate prediction method, device, electronic device and computer storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of artificial intelligence technology, and specifically to a handwriting pen coordinate prediction method, device, electronic device and computer storage medium. Background Art

[0003] Styluses are becoming increasingly common in electronic products, from traditional capacitive passive pens to capacitive active pens and electromagnetic pens. These styluses provide users with writing capabilities and are widely used in devices such as mobile phones, tablets, and conference whiteboards. However, due to limitations in the operating efficiency of electronic systems (such as Android and Linux) and screen refresh rates, stylus tracking has long been criticized, seriously impacting the user experience. The primary reason for the current poor tracking of styluses is inherent latency in the system and hardware, resulting in the displayed handwriting on the device screen being slower than the actual pen tip movement.

[0004] In order to reduce handwriting latency, improve handwriting tracking and thus optimize the handwriting user experience, the current common practice in the field is to increase the handwriting pen reporting rate and display refresh rate from the hardware side, or use a higher-performance processor platform, and optimize the handwriting events in the system on the software side to reduce system latency; however, the optimization space within the system is limited, and hardware-side optimization will directly affect hardware costs. Therefore, the industry is gradually introducing stylus trajectory prediction to improve handwriting tracking performance. Technical issues

[0005] Current handwriting trajectory prediction in the industry typically relies on existing trajectories. The existing trajectory curve is then fitted using the least squares method to obtain a curve function, and then the predicted points are obtained based on the curve function. However, due to the wide variety of handwriting trajectories, the objective functions used when fitting curves of different curvatures and different rules using the least squares method are also different. Therefore, some artificial intelligence algorithms are often required to determine the trajectory shape. This also increases the complexity of the algorithm, and the delay caused by the complex algorithm itself will also be more serious. Technical Solutions

[0006] The embodiments of the present application provide a method, device, electronic device, and computer storage medium for predicting stylus coordinates, which can solve the current technical problem of high delay in stylus coordinate prediction.

[0007] The present invention provides a method for predicting handwriting pen coordinates, including:

[0008] Acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point;

[0009] determining a first initial velocity of the stylus in a first preset coordinate axis direction and a second initial velocity in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus;

[0010] The predicted coordinates of the stylus are predicted according to the first initial velocity, the second initial velocity, and the time interval for reporting points.

[0011] Furthermore, the above-mentioned calculation based on the first initial velocity, the second initial velocity and the time interval for reporting points to predict the predicted coordinates of the stylus includes:

[0012] Calculating the first initial velocity and the second initial velocity with the reporting time interval respectively to obtain a first acceleration and a second acceleration of the stylus;

[0013] The current coordinate point is adjusted according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the time interval for reporting points to obtain predicted coordinates of the stylus.

[0014] Furthermore, the first initial velocity and the second initial velocity are calculated with the reporting time interval to obtain the first acceleration and the second acceleration of the stylus, including:

[0015] Acquire a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis;

[0016] Calculating a first original acceleration of the stylus in the direction of the first preset coordinate axis according to the first historical speed, the first initial speed, and the time interval for reporting points;

[0017] calculating a second original acceleration of the stylus in the direction of the second preset coordinate axis according to the second historical speed, the second initial speed, and the time interval for reporting points;

[0018] Filtering is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.

[0019] Furthermore, the obtaining of the first historical speed of the stylus in the direction of the first preset coordinate axis and the second historical speed in the direction of the second preset coordinate axis includes:

[0020] Collecting a second historical coordinate point associated with the first historical coordinate point;

[0021] A first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed in the direction of the second preset coordinate axis are determined according to the first historical coordinate point, the second historical coordinate point and the reporting time interval.

[0022] Furthermore, the filtering process is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration, respectively, including:

[0023] Obtaining a current frame value corresponding to the current coordinate point of the stylus pen and a preset frame acquisition range of the stylus pen;

[0024] Determining all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range based on the current frame value;

[0025] The first original acceleration is filtered according to all the first historical accelerations to obtain the first acceleration, and the second original acceleration is filtered according to all the second historical accelerations to obtain the second acceleration.

[0026] Furthermore, there are multiple predicted coordinates, and adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting time interval to obtain the predicted coordinates of the stylus includes:

[0027] Obtaining a target prediction time sequence for each of the predicted coordinates, and determining a prediction sequence number for each of the predicted coordinates according to the target prediction time sequence;

[0028] Adjusting the coordinate value of the current coordinate point in the direction of the first preset coordinate axis based on the prediction sequence number, the first acceleration, the first initial velocity, and the reporting time interval to obtain a first prediction value of each predicted coordinate in the direction of the first preset coordinate axis;

[0029] Based on the prediction sequence number, the second acceleration, the second initial velocity, and the reporting time interval, the coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted to obtain a second prediction value of each of the predicted coordinates in the direction of the second preset coordinate axis;

[0030] The coordinate value of each of the predicted coordinates is determined according to the first predicted value and the second predicted value.

[0031] Furthermore, the above-mentioned determining the current coordinate point corresponding to the stylus on the display screen includes:

[0032] Acquire the current screen point of the stylus on the display screen, and a mapping ratio between the display screen and a target coordinate system;

[0033] Mapping the screen point to the target coordinate system using the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;

[0034] A current coordinate point corresponding to the stylus on the display screen is determined according to the first coordinate value and the second coordinate value.

[0035] Accordingly, an embodiment of the present application provides a stylus coordinate prediction device, comprising:

[0036] An acquisition module, configured to acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point;

[0037] a confirmation module, configured to determine a first initial velocity of the stylus in a direction of a first preset coordinate axis and a second initial velocity in a direction of a second preset coordinate axis based on the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus;

[0038] A prediction module is configured to predict the predicted coordinates of the stylus pen according to the first initial velocity, the second initial velocity, and the time interval between reporting points.

[0039] In addition, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the computer program in the memory to implement the stylus coordinate prediction method provided in an embodiment of the present application.

[0040] In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. The computer program is suitable for being loaded by a processor to execute any one of the stylus coordinate prediction methods provided in the embodiments of the present application.

[0041] In addition, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the stylus coordinate prediction methods provided in the embodiments of the present application. Beneficial effects

[0042] In an embodiment of the present application, by obtaining the current coordinate point corresponding to the stylus on the display screen and the first historical coordinate point associated with the current coordinate point, the current coordinate point of the stylus is accurately obtained; then, based on the current coordinate point, the first historical coordinate point and the preset reporting time interval of the stylus, a first initial velocity of the stylus in the direction of the first preset coordinate axis and a second initial velocity in the direction of the second preset coordinate axis are determined, thereby determining the velocity of the stylus, so that the coordinates of the stylus can be quickly predicted based on the stylus velocity; finally, based on the first initial velocity, the second initial velocity and the reporting time interval, the predicted coordinates of the stylus are predicted, thereby achieving lightweight trajectory prediction of the handwritten coordinates, improving the efficiency of the stylus coordinate prediction, reducing the prediction delay and the load requirement on the system end, so that it can be directly applied to the control chip on the handwriting device end, and can achieve accurate and efficient prediction of the handwritten coordinates without the need for other optimization processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0044] FIG1 is a schematic diagram of the flow of a stylus coordinate prediction method provided by the present application;

[0045] FIG2 is a flow chart of another embodiment of a method for predicting handwriting pen coordinates provided by the present application;

[0046] FIG3 is a schematic diagram of predicted handwriting of a stylus provided in the present application;

[0047] FIG4 is a schematic diagram of the structure of a stylus coordinate prediction device provided by the present application;

[0048] FIG5 is a schematic structural diagram of the electronic device provided in this application.

[0049] Implementation Methods of the Application

[0050] The following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of this application, not all of them. All other embodiments derived by those skilled in the art based on the embodiments of this application without inventive effort shall fall within the scope of protection of this application.

[0051] The present invention provides a method and device for predicting stylus coordinates, an electronic device, and a computer storage medium. The stylus coordinate prediction device can be integrated into an electronic device, which can be a server or a terminal.

[0052] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0053] The terminal may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited thereto. The terminal and the server may be connected directly or indirectly via wired or wireless communication, and this application does not impose any restrictions thereon.

[0054] In addition, the term "a plurality of" in the embodiments of the present application refers to two or more than two. The terms "first" and "second" in the embodiments of the present application are used to distinguish descriptions and should not be understood to imply relative importance.

[0055] It should be noted that the order of description of the following embodiments is not intended to limit the preferred order of the embodiments.

[0056] Please refer to Figure 1, which is a flow chart of a stylus coordinate prediction method provided by an embodiment of the present application. The stylus coordinate prediction method may include:

[0057] S101: Acquire a current coordinate point corresponding to a stylus on a display screen, and a first historical coordinate point associated with the current coordinate point.

[0058] In this embodiment, the current coordinate point of the stylus is the coordinate point reported by the stylus at the current reporting time. The most recent reporting time corresponding to the current reporting time is determined, and the coordinate point of the stylus at the most recent reporting time is obtained. The coordinate point at the most recent reporting time is the first historical coordinate point.

[0059] S102: Determine a first initial velocity of the stylus in a first preset coordinate axis direction and a second initial velocity in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus.

[0060] In this embodiment, as the stylus moves across the display screen, it reports its current coordinate point to the system at predetermined intervals. This predetermined interval is less than the display screen's refresh rate; the stylus can report multiple coordinate points within the refresh rate. The predetermined interval can be obtained by acquiring the stylus's coordinate point acquisition rate. Specifically, the coordinate point acquisition rate is the inherent reporting rate of the writing device, such as 240 Hz. The current stylus's reporting interval is calculated by calculating the time unit of this coordinate point acquisition rate. For example, if the stylus's reporting rate is 240 Hz, calculating the inverse of this reporting rate yields a reporting interval of 4.1667 ms. The first predetermined coordinate axis direction is the coordinate axis direction perpendicular to the second predetermined coordinate axis direction. If the first predetermined coordinate axis direction is the x-axis, the second predetermined coordinate axis direction is the y-axis; if the first predetermined coordinate axis direction is the y-axis, the second predetermined coordinate axis direction is the x-axis.

[0061] When the current coordinate point, the first historical coordinate point, and the time interval for reporting the points are obtained, the first initial velocity of the stylus in the direction of the first preset coordinate axis and the second initial velocity in the direction of the second preset coordinate axis are determined based on the current coordinate point, the first historical coordinate point, and the time interval for reporting the points. Specifically, the coordinate values ​​corresponding to the current coordinate point and the first historical coordinate point in the direction of the first preset coordinate axis are obtained to obtain a first current coordinate value and a first historical coordinate value; the first current coordinate value and the first historical coordinate value are subtracted to obtain a first difference; the ratio of the first difference to the time interval for reporting the points is calculated to obtain the first initial velocity of the stylus in the direction of the first preset coordinate axis. The coordinate values ​​corresponding to the current coordinate point and the first historical coordinate point in the direction of the second preset coordinate axis are obtained to obtain a second current coordinate value and a second historical coordinate value; the second current coordinate value and the second historical coordinate value are subtracted to obtain a second difference; the ratio of the second difference to the time interval for reporting the points is calculated to obtain the second initial velocity of the stylus in the direction of the second preset coordinate axis.

[0062] S103: Predict the predicted coordinates of the stylus pen according to the first initial speed, the first initial speed, and the time interval between reporting points.

[0063] In this embodiment, when obtaining the first initial velocity and the second initial velocity, the first historical velocity and the second historical velocity calculated for the stylus at the time of the most recent point reporting are obtained. The first historical velocity is the velocity of the stylus in the direction of the first preset coordinate axis at the time of the most recent point reporting, and the second historical velocity is the velocity of the stylus in the direction of the second preset coordinate axis at the time of the most recent point reporting. A first coordinate adjustment parameter and a second coordinate adjustment parameter are calculated based on the first and second initial velocities and the time interval between point reporting. The first current coordinate value of the current coordinate point in the direction of the first preset coordinate axis is adjusted based on the first coordinate adjustment parameter to obtain a first predicted coordinate. The second current coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted based on the second coordinate adjustment parameter to obtain a second predicted coordinate. Based on the first and second predicted coordinates, the predicted coordinates of the stylus can be determined.

[0064] The handwriting pen coordinate prediction method proposed in the present application obtains the current coordinate point corresponding to the stylus on the display screen and the first historical coordinate point associated with the current coordinate point; then, based on the current coordinate point, the first historical coordinate point and the preset reporting time interval of the stylus, determines the first initial velocity of the stylus in the direction of the first preset coordinate axis and the second initial velocity in the direction of the second preset coordinate axis; then, based on the first initial velocity, the second initial velocity and the reporting time interval, the predicted coordinates of the stylus are predicted, thereby realizing lightweight trajectory prediction of the handwriting coordinates, improving the efficiency of the handwriting pen coordinate prediction, reducing the prediction delay and the requirements for the system end load, so that it can be directly applied to the control chip on the handwriting device end, and can achieve accurate and efficient prediction of the handwriting coordinates without the need for other optimization processing.

[0065] FIG2 is a flow chart of another embodiment of a method for predicting coordinates of a stylus provided by the present application. In some embodiments of the present application, the method of predicting the coordinates of the stylus based on the first initial velocity, the second initial velocity, and the time interval for reporting points includes:

[0066] S201: Calculate the first initial velocity and the second initial velocity with the reporting time interval to obtain a first acceleration and a second acceleration of the stylus;

[0067] S202: Adjust the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the time interval for reporting points to obtain predicted coordinates of the stylus.

[0068] In this embodiment, when the first and second historical velocities are obtained, the difference between the first initial velocity and the first historical velocity is calculated, and the ratio of the difference between the first initial velocity and the first historical velocity and the time interval between the time intervals ...

[0069] Specifically, a preset prediction model can be constructed based on the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the dot-reporting time interval. The prediction model includes a stylus velocity prediction model and a stylus coordinate prediction model. Based on the stylus velocity prediction model, the first acceleration and the dot-reporting time interval are multiplied to obtain a first velocity adjustment parameter; the second acceleration and the dot-reporting time interval are multiplied to obtain a second velocity adjustment parameter. The first initial velocity is adjusted based on the first velocity adjustment parameter to obtain a first predicted velocity; the second initial velocity is adjusted based on the second velocity adjustment parameter to obtain a second predicted velocity. Then, based on the stylus coordinate prediction model, the first predicted velocity and the dot-reporting time interval are multiplied to obtain a first coordinate adjustment parameter; the second predicted velocity and the dot-reporting time interval are multiplied to obtain a second coordinate adjustment parameter. The first current coordinate value is adjusted based on the first coordinate adjustment parameter to obtain a first predicted coordinate; and the second current coordinate value is adjusted based on the second coordinate adjustment parameter to obtain a second predicted coordinate. The predicted coordinates of the stylus can be determined based on the first and second predicted coordinates.

[0070] This embodiment calculates the first acceleration and the second acceleration of the stylus by respectively calculating the first initial velocity and the second initial velocity with the time interval between reporting points. Then, the current coordinate point is adjusted according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the time interval between reporting points to obtain the predicted coordinates of the stylus, thereby achieving accurate calculation of the acceleration of the stylus, so that the coordinates of the stylus can be quickly and accurately predicted using the acceleration and the initial velocity.

[0071] In some embodiments of the present application, the first initial velocity and the second initial velocity are calculated with the time interval of the reporting point to obtain the first acceleration and the second acceleration of the stylus, including:

[0072] Acquire a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis;

[0073] Calculating a first original acceleration of the stylus in the direction of the first preset coordinate axis according to the first historical speed, the first initial speed, and the time interval for reporting points;

[0074] calculating a second original acceleration of the stylus in the direction of the second preset coordinate axis according to the second historical speed, the second initial speed, and the time interval for reporting points;

[0075] Filtering is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.

[0076] In this embodiment, the first historical speed is the speed of the stylus in the direction of the first preset coordinate axis at the time of the most recent point reporting, and the second historical speed is the speed of the stylus in the direction of the second preset coordinate axis at the time of the most recent point reporting. Each time the stylus reports a coordinate point, it calculates and stores the speed at the current reporting time. Therefore, when obtaining the first historical speed of the stylus in the direction of the first preset coordinate axis and the second historical speed of the stylus in the direction of the second preset coordinate axis, they can be directly obtained based on the stylus's stored speed corresponding to the most recent point reporting time. When obtaining the first and second historical speeds, the difference between the first initial speed and the first historical speed is calculated; this difference is then ratioed with the time interval between point reporting to obtain the first original acceleration of the stylus in the direction of the first preset coordinate axis. The difference between the second initial speed and the second historical speed is calculated; this difference is then ratioed with the time interval between point reporting to obtain the second original acceleration of the stylus in the direction of the second preset coordinate axis.

[0077] The first and second raw accelerations can be directly used as the first and second accelerations corresponding to the stylus, respectively. Alternatively, upon obtaining the first and second raw accelerations, the first and second raw accelerations can be filtered to obtain the final first and second accelerations to eliminate errors. Specifically, a stored first historical acceleration in the direction of a first preset coordinate axis and a stored second historical acceleration in the direction of a second preset coordinate axis are obtained; the first historical acceleration and the first raw acceleration are averaged to obtain the filtered first raw acceleration, i.e., the first acceleration; and the second historical acceleration and the second raw acceleration are averaged to obtain the filtered second raw acceleration, i.e., the second acceleration.

[0078] This embodiment calculates a first raw acceleration using a first historical velocity, a first initial velocity, and a time interval for reporting points; and calculates a second raw acceleration based on a second historical velocity, a second initial velocity, and a time interval for reporting points. The first raw acceleration and the second raw acceleration are then filtered to obtain the first acceleration and the second acceleration. This achieves precise calculation of the first acceleration and the second acceleration, further improving the accuracy and speed of stylus coordinate prediction.

[0079] In some embodiments of the present application, the step of obtaining the first historical speed of the stylus in the direction of the first preset coordinate axis and the second historical speed of the stylus in the direction of the second preset coordinate axis includes:

[0080] Collecting a second historical coordinate point associated with the first historical coordinate point;

[0081] A first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed in the direction of the second preset coordinate axis are determined according to the first historical coordinate point, the second historical coordinate point and the reporting time interval.

[0082] In this embodiment, the second historical coordinate point is a coordinate point associated with the first historical coordinate point, and the reporting time corresponding to the second historical coordinate point is the previous time of the reporting time corresponding to the first historical coordinate point, that is, the reporting time of the second historical coordinate point and the reporting time of the first historical coordinate point are two adjacent reporting times. The second historical coordinate point associated with the first historical coordinate point is collected, and based on the first historical coordinate point, the second historical coordinate point, and the reporting time interval, the first historical speed of the stylus in the direction of the first preset coordinate axis and the second historical speed in the direction of the second preset coordinate axis are determined. Specifically, the first coordinate difference between the first historical coordinate point and the second historical coordinate point in the direction of the first preset coordinate axis and the second coordinate difference between the first historical coordinate point and the second historical coordinate point in the direction of the second preset coordinate axis are calculated; the first coordinate difference is calculated by ratioing the first coordinate difference with the reporting time interval to obtain the first historical speed, and the second coordinate difference is calculated by ratioing the second coordinate difference with the reporting time interval to obtain the second historical speed.

[0083] This embodiment collects a second historical coordinate point associated with a first historical coordinate point, and determines a first historical speed of the stylus in the direction of a first preset coordinate axis and a second historical speed in the direction of a second preset coordinate axis based on the first historical coordinate point, the second historical coordinate point, and the time interval between reporting points. This achieves accurate acquisition of the historical speeds, enabling accurate prediction of the speed of the stylus based on the historical speeds, further improving the accuracy of stylus coordinate prediction.

[0084] In some embodiments of the present application, the filtering process is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration, respectively, including:

[0085] Obtaining a current frame value corresponding to the current coordinate point of the stylus pen and a preset frame acquisition range of the stylus pen;

[0086] Determining all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range based on the current frame value;

[0087] The first original acceleration is filtered according to all the first historical accelerations to obtain the first acceleration, and the second original acceleration is filtered according to all the second historical accelerations to obtain the second acceleration.

[0088] In this embodiment, the stylus's point reporting time is aligned with the stylus's frame value. Two consecutive stylus point reporting times correspond to two adjacent frames, and one stylus frame is displayed as a coordinate point on the display screen. When filtering the first and second raw accelerations, the current frame value corresponding to the stylus at the current coordinate point and the preset frame acquisition range corresponding to the stylus are obtained. The current frame value is the stylus's frame value corresponding to the current coordinate point, and the preset frame acquisition range is a pre-set frame acquisition range within which coordinate points corresponding to different frame values ​​are acquired.

[0089] Upon obtaining the current frame value and frame acquisition range, all first historical accelerations and all second historical accelerations within the frame acquisition range, starting from the current frame value, are acquired. The first historical acceleration is the historical acceleration in the direction of the first preset coordinate axis, and the second historical acceleration is the historical acceleration in the direction of the second preset coordinate axis. For example, if the current frame value is the fifth frame of the stylus and the frame acquisition range is 2, the first historical acceleration and the second historical acceleration are acquired for two frames starting from the fifth frame, thereby obtaining the first historical acceleration and the second historical acceleration of the fourth frame, as well as the first historical acceleration and the second historical acceleration of the third frame. The first raw acceleration is filtered based on all the first historical accelerations, i.e., the average of all the first historical accelerations and the first raw acceleration is calculated to obtain the first acceleration. The second raw acceleration is filtered based on all the second historical accelerations, i.e., the average of all the second historical accelerations and the second raw acceleration is calculated to obtain the second acceleration.

[0090] This embodiment collects all first historical accelerations to filter the first original acceleration, and collects all second historical accelerations to filter the second original acceleration, thereby reducing the prediction error of the stylus coordinates and improving the accuracy of the stylus coordinate prediction.

[0091] In some embodiments of the present application, there are multiple predicted coordinates, and adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting time interval to obtain the predicted coordinates of the stylus includes:

[0092] Obtaining a target prediction time sequence for each of the predicted coordinates, and determining a prediction sequence number for each of the predicted coordinates according to the target prediction time sequence;

[0093] Adjusting the coordinate value of the current coordinate point in the direction of the first preset coordinate axis based on the prediction sequence number, the first acceleration, the first initial velocity, and the reporting time interval to obtain a first prediction value of each predicted coordinate in the direction of the first preset coordinate axis;

[0094] Based on the prediction sequence number, the second acceleration, the second initial velocity, and the reporting time interval, the coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted to obtain a second prediction value of each of the predicted coordinates in the direction of the second preset coordinate axis;

[0095] The coordinate value of each of the predicted coordinates is determined according to the first predicted value and the second predicted value.

[0096] In this embodiment, multiple predicted coordinates can be predicted to obtain the predicted handwriting on the display screen. Specifically, a target prediction time sequence is obtained for each predicted coordinate. The target prediction time sequence is the time sequence in which each predicted coordinate is predicted to be displayed on the display screen. The prediction sequence number of each predicted coordinate is determined based on this target prediction time sequence. For example, the predicted coordinate displayed after the current coordinate point will have a prediction sequence number of 1; the predicted coordinate displayed after sequence number 1 will have a prediction sequence number of 2, and so on.

[0097] When the prediction number is obtained, the coordinate value of the current coordinate point in the direction of the first preset coordinate axis is adjusted based on the prediction number, the first acceleration, the first initial velocity, and the time interval between reporting points, to obtain a first predicted value for each predicted coordinate in the direction of the first preset coordinate axis. Specifically, the prediction number is multiplied by the first acceleration to obtain a first parameter value; the first parameter value is multiplied by the time interval between reporting points to obtain a second parameter value; the second parameter value is then added to the first initial velocity to obtain a first predicted velocity; the first predicted velocity is multiplied by the time interval between reporting points to obtain a first coordinate adjustment parameter; and the first coordinate adjustment parameter is then added to the coordinate value of the current coordinate point in the direction of the first preset coordinate axis to obtain a first predicted value. Similarly, the coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted based on the prediction number, the second acceleration, the second initial velocity, and the time interval between reporting points, to obtain a second predicted value for each predicted coordinate in the direction of the second preset coordinate axis. Based on the first and second predicted values, the coordinate value of each predicted coordinate is determined. These multiple predicted coordinates constitute the predicted handwriting of the stylus on the display screen. FIG3 is a schematic diagram of predicted handwriting of a stylus provided by an embodiment of the present application, wherein the horizontal coordinate and the vertical coordinate are coordinate values ​​in the first preset coordinate direction and the second preset coordinate direction respectively.

[0098] This embodiment determines a first prediction value by predicting the sequence number, the first acceleration, the first initial velocity, and the time interval between reporting points, and determines a second prediction value according to the prediction sequence number, the second acceleration, the second initial velocity, and the time interval between reporting points, thereby achieving accurate and lightweight prediction of multiple prediction coordinates, further improving the prediction accuracy of handwriting, reducing the prediction complexity of handwriting, reducing the prediction time, and improving the prediction efficiency.

[0099] In some embodiments of the present application, the above-mentioned determining the current coordinate point corresponding to the stylus on the display screen includes:

[0100] Acquire the current screen point of the stylus on the display screen, and a mapping ratio between the display screen and a target coordinate system;

[0101] Mapping the screen point to the target coordinate system using the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;

[0102] A current coordinate point corresponding to the stylus on the display screen is determined according to the first coordinate value and the second coordinate value.

[0103] In this embodiment, the target coordinate system is a pre-set coordinate system, and a mapping relationship exists between the display screen and the target coordinate system. A screen point on the display screen where the stylus is placed is obtained, along with a mapping ratio between the display screen and the target coordinate system. The mapping ratio is used to map the screen point on the display screen to the target coordinate system. The mapping ratio is a pre-set ratio between screen pixels and coordinate values, such as 1:10, meaning that one screen pixel corresponds to ten coordinate values. The coordinate value of the current screen point in the target coordinate system is determined based on the mapping ratio. Specifically, the origin coordinates in the target coordinate system are determined, along with the original pixel point on the display screen corresponding to the origin coordinates. A first pixel distance along a first pre-set coordinate axis and a second pixel distance along a second pre-set coordinate axis are calculated between the current screen point and the original pixel point. The mapping ratio is then used to calculate the first and second pixel distances, respectively, to obtain the first and second coordinate values ​​of the screen point in the target coordinate system. Based on these first and second coordinate values, the current coordinate point corresponding to the stylus on the display screen is determined.

[0104] This embodiment obtains the mapping ratio between the display screen and the target coordinate system, maps the screen point to the target coordinate system according to the mapping ratio, obtains the first coordinate value and the second coordinate value, thereby determining the current coordinate point corresponding to the stylus on the display screen, and realizes the accurate acquisition of the current stylus coordinates.

[0105] To facilitate better implementation of the stylus coordinate prediction method provided in the embodiments of the present application, the embodiments of the present application also provide a device based on the above-mentioned stylus coordinate prediction method. The meanings of the terms herein are the same as those in the above-mentioned stylus coordinate prediction method. For specific implementation details, please refer to the description in the method embodiment.

[0106] For example, as shown in FIG4 , the handwriting pen coordinate prediction device may include: an acquisition module 301 , a confirmation module 302 and a prediction module 303 .

[0107] An acquisition module 301 is configured to acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point;

[0108] a confirmation module 302, configured to determine a first initial velocity of the stylus in a first preset coordinate axis direction and a second initial velocity in a second preset coordinate axis direction based on the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus;

[0109] The prediction module 303 is configured to predict the predicted coordinates of the stylus according to the first initial velocity, the second initial velocity, and the time interval between reporting points.

[0110] In one embodiment of the present application, the prediction module 303 includes:

[0111] a first confirmation subunit, configured to calculate the first initial velocity and the second initial velocity with the reporting time interval respectively to obtain a first acceleration and a second acceleration of the stylus;

[0112] The second confirmation subunit is configured to adjust the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting time interval to obtain the predicted coordinates of the stylus.

[0113] In one embodiment of the present application, the first confirmation subunit includes:

[0114] a first acquiring unit, configured to acquire a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis;

[0115] a first confirmation unit, configured to calculate a first original acceleration of the stylus in the direction of the first preset coordinate axis according to the first historical speed, the first initial speed, and the time interval for reporting points;

[0116] a second confirmation unit, configured to calculate a second original acceleration of the stylus in the direction of the second preset coordinate axis according to the second historical speed, the second initial speed, and the time interval for reporting points;

[0117] A filtering unit is configured to perform filtering processing on the first original acceleration and the second original acceleration respectively to obtain the first acceleration and the second acceleration.

[0118] In one embodiment of the present application, the first acquiring unit includes:

[0119] a collection unit, configured to collect a second historical coordinate point associated with the first historical coordinate point;

[0120] The third confirmation unit is configured to determine a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed in the direction of the second preset coordinate axis according to the first historical coordinate point, the second historical coordinate point and the reporting time interval.

[0121] In one embodiment of the present application, the filtering unit includes:

[0122] A second acquiring unit, configured to acquire a current frame value corresponding to the current coordinate point of the stylus pen and a preset frame acquisition range of the stylus pen;

[0123] a fourth confirmation unit, configured to determine all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range based on the current frame value;

[0124] The filtering subunit is configured to filter the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and filter the second original acceleration according to all the second historical accelerations to obtain the second acceleration.

[0125] In one embodiment of the present application, the second confirmation subunit includes:

[0126] a third acquiring unit, configured to acquire a target prediction time sequence of each of the predicted coordinates, and determine a prediction sequence number of each of the predicted coordinates according to the target prediction time sequence;

[0127] a first adjustment subunit, configured to adjust the coordinate value of the current coordinate point in the direction of the first preset coordinate axis based on the prediction sequence number, the first acceleration, the first initial velocity, and the reporting time interval, to obtain a first prediction value of each predicted coordinate in the direction of the first preset coordinate axis;

[0128] a second adjustment subunit, configured to adjust the coordinate value of the current coordinate point in the direction of the second preset coordinate axis based on the predicted sequence number, the second acceleration, the second initial velocity, and the reporting time interval, to obtain a second predicted value of each predicted coordinate in the direction of the second preset coordinate axis;

[0129] A fifth confirmation unit is used to determine the coordinate value of each of the predicted coordinates according to the first predicted value and the second predicted value.

[0130] In one embodiment of the present application, the acquisition module 301 further includes:

[0131] a fourth acquiring unit, configured to acquire a screen point currently located on the display screen by the stylus pen, and a mapping ratio between the display screen and a target coordinate system;

[0132] a mapping unit, configured to map the screen point to the target coordinate system using the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;

[0133] The coordinate confirmation unit is used to determine the current coordinate point corresponding to the stylus on the display screen according to the first coordinate value and the second coordinate value.

[0134] The handwriting coordinate prediction device proposed in this application realizes lightweight trajectory prediction of handwriting coordinates, improves the efficiency of handwriting coordinate prediction, reduces prediction delay and system load requirements, and can be directly applied to the control chip on the handwriting device side. It can achieve accurate and efficient prediction of handwriting coordinates without the need for other optimization processing.

[0135] During specific implementation, the above modules can be implemented as independent entities, or they can be arbitrarily combined and implemented as the same or several entities. The specific implementation methods and corresponding beneficial effects of the above modules can be found in the previous method embodiments and will not be repeated here.

[0136] The present application also provides an electronic device, which may be a server or a terminal, etc. As shown in FIG5 , it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application. Specifically:

[0137] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will appreciate that the electronic device structure shown in FIG5 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0138] Processor 601 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. It executes computer programs and / or modules stored in memory 602 and accesses data stored in memory 602 to perform various functions of the electronic device and process data. Optionally, processor 601 may include one or more processing cores. Preferably, processor 601 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 601.

[0139] The memory 602 can be used to store computer programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0140] The electronic device also includes a power supply 603 for supplying power to various components. Preferably, the power supply 603 can be logically connected to the processor 601 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 603 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0141] The electronic device may further include an input unit 604, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0142] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 will run the computer programs stored in the memory 602 to implement various functions, such as:

[0143] Acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point;

[0144] determining a first initial velocity of the stylus in a first preset coordinate axis direction and a second initial velocity in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus;

[0145] The predicted coordinates of the stylus are predicted according to the first initial velocity, the second initial velocity, and the time interval for reporting points.

[0146] The electronic device proposed in this application realizes lightweight trajectory prediction of handwritten coordinates, improves the efficiency of handwriting pen coordinate prediction, reduces prediction delay and system load requirements, and enables it to be directly applied to the control chip on the handwriting device side. It can achieve accurate and efficient prediction of handwritten coordinates without the need for other optimization processing.

[0147] The specific implementations and corresponding beneficial effects of the above operations can be found in the detailed description of the handwriting pen coordinate prediction method above, which will not be elaborated here.

[0148] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0149] To this end, an embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the stylus coordinate prediction methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0150] Acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point;

[0151] determining a first initial velocity of the stylus in a first preset coordinate axis direction and a second initial velocity in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point, and a preset reporting time interval of the stylus;

[0152] The predicted coordinates of the stylus are predicted according to the first initial velocity, the second initial velocity, and the time interval for reporting points.

[0153] The computer-readable storage medium proposed in this application realizes lightweight trajectory prediction of handwritten coordinates, improves the efficiency of handwriting coordinate prediction, reduces prediction delay and system load requirements, and enables it to be directly applied to the control chip on the handwriting device side. It can achieve accurate and efficient prediction of handwritten coordinates without the need for other optimization processing.

[0154] The specific implementation methods and corresponding beneficial effects of the above operations can be found in the previous embodiments and will not be described in detail here.

[0155] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0156] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the stylus coordinate prediction methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the stylus coordinate prediction methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0157] According to one aspect of the present application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described stylus coordinate prediction method.

[0158] The above is a detailed introduction to a handwriting coordinate prediction method, device, electronic device and computer storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A handwriting pen coordinate prediction method, wherein: include: Acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point; Determine a first initial speed of the stylus in a first preset coordinate axis direction and a second initial speed of the stylus in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point and a preset reporting time interval of the stylus; The predicted coordinates of the stylus are predicted according to the first initial speed, the second initial speed and the time interval of reporting points.

2. The handwriting pen coordinate prediction method according to claim 1, wherein: The step of calculating, according to the first initial speed, the second initial speed and the time interval for reporting points, predicting the predicted coordinates of the stylus pen comprises: Calculate the first initial velocity and the second initial velocity with the reporting time interval respectively to obtain a first acceleration and a second acceleration of the stylus; The current coordinate point is adjusted according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the point reporting time interval to obtain the predicted coordinates of the stylus.

3. The handwriting pen coordinate prediction method according to claim 2, wherein: The step of calculating the first initial velocity and the second initial velocity with the reporting time interval to obtain the first acceleration and the second acceleration of the stylus pen includes: Acquire a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis; Calculating a first original acceleration of the stylus in the direction of the first preset coordinate axis according to the first historical speed, the first initial speed and the time interval for reporting points; Calculating a second original acceleration of the stylus in the direction of the second preset coordinate axis according to the second historical speed, the second initial speed and the time interval for reporting points; The first original acceleration and the second original acceleration are respectively filtered to obtain the first acceleration and the second acceleration.

4. The handwriting pen coordinate prediction method according to claim 3, wherein: The acquiring a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis includes: Collecting a second historical coordinate point associated with the first historical coordinate point; A first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis are determined according to the first historical coordinate point, the second historical coordinate point and the reporting time interval.

5. The handwriting pen coordinate prediction method according to claim 3, wherein: The filtering the first original acceleration and the second original acceleration respectively to obtain the first acceleration and the second acceleration includes: Acquire a current frame value corresponding to the current coordinate point of the stylus pen and a preset frame acquisition range of the stylus pen; Based on the current frame value, determining all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range; The first original acceleration is filtered according to all the first historical accelerations to obtain the first acceleration, and the second original acceleration is filtered according to all the second historical accelerations to obtain the second acceleration.

6. The handwriting pen coordinate prediction method according to claim 2, wherein: There are a plurality of predicted coordinates, and adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting time interval to obtain the predicted coordinates of the stylus pen includes: Acquire a target prediction time sequence of each of the prediction coordinates, and determine a prediction sequence number of each of the prediction coordinates according to the target prediction time sequence; Based on the prediction sequence number, the first acceleration, the first initial speed and the reporting time interval, the coordinate value of the current coordinate point in the direction of the first preset coordinate axis is adjusted to obtain a first prediction value of each of the predicted coordinates in the direction of the first preset coordinate axis; Based on the prediction sequence number, the second acceleration, the second initial speed and the reporting time interval, the coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted to obtain a second prediction value of each of the predicted coordinates in the direction of the second preset coordinate axis; The coordinate value of each of the predicted coordinates is determined according to the first predicted value and the second predicted value.

7. The handwriting pen coordinate prediction method according to claim 1, wherein: The determining of the current coordinate point corresponding to the stylus on the display screen includes: Acquire the current screen point of the stylus on the display screen, and the mapping ratio between the display screen and the target coordinate system; Mapping the screen point to the target coordinate system by using the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system; The current coordinate point corresponding to the stylus on the display screen is determined according to the first coordinate value and the second coordinate value.

8. The handwriting pen coordinate prediction method according to claim 1, wherein: The first historical coordinate point associated with the current coordinate point includes a coordinate point of the stylus at the most recent reporting time corresponding to the current reporting time.

9. The handwriting pen coordinate prediction method according to claim 1, wherein: The point reporting time interval is obtained by calculating the coordinate point acquisition rate in time units.

10. The handwriting pen coordinate prediction method according to claim 1, wherein: The step of determining a first initial speed of the stylus in a first preset coordinate axis direction and a second initial speed in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point and a preset reporting time interval of the stylus includes: Acquire the coordinate values ​​of the current coordinate point and the first historical coordinate point respectively corresponding to the first preset coordinate axis direction to obtain a first current coordinate value and a first historical coordinate value; Subtracting the first current coordinate value from the first historical coordinate value to obtain a first difference; Calculating a ratio of the first difference to the time interval of the reporting point, and obtaining a first initial speed of the stylus in the direction of the first preset coordinate axis; Acquire the coordinate values ​​of the current coordinate point and the first historical coordinate point respectively corresponding to the second preset coordinate axis direction to obtain a second current coordinate value and a second historical coordinate value; Subtracting the second current coordinate value from the second historical coordinate value to obtain a second difference; The ratio of the second difference to the time interval between reporting points is calculated to obtain a second initial speed of the stylus in the direction of the second preset coordinate axis.

11. The handwriting pen coordinate prediction method according to claim 2, wherein: The step of calculating the first initial velocity and the second initial velocity with the reporting time interval to obtain the first acceleration and the second acceleration of the stylus pen includes: calculating a difference between the first initial speed and the first historical speed; Calculate the ratio of the difference between the first initial speed and the first historical speed to the time interval of reporting points to obtain a first acceleration of the stylus; calculating a difference between the second initial speed and the second historical speed; A second acceleration of the stylus is obtained by calculating a ratio of a difference between the second initial speed and the second historical speed and the reporting time interval.

12. The handwriting pen coordinate prediction method according to claim 11, wherein: The step of adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting time interval to obtain the predicted coordinates of the stylus pen includes: According to the stylus speed prediction model, the first acceleration and the time interval for reporting points are multiplied to obtain a first speed adjustment parameter, and the second acceleration and the time interval for reporting points are multiplied to obtain a second speed adjustment parameter; Adjusting the first initial speed according to the first speed adjustment parameter to obtain a first predicted speed; Adjusting the second initial speed according to the second speed adjustment parameter to obtain a second predicted speed; According to the stylus coordinate prediction model, the first prediction speed and the time interval for reporting points are multiplied to obtain a first coordinate adjustment parameter, and the second prediction speed and the time interval for reporting points are multiplied to obtain a second coordinate adjustment parameter; Adjusting a first current coordinate value of the current coordinate point in the direction of the first preset coordinate axis according to the first coordinate adjustment parameter to obtain a first predicted coordinate; Adjusting a second current coordinate value of the current coordinate point in the direction of the second preset coordinate axis according to the second coordinate adjustment parameter to obtain a second predicted coordinate; The predicted coordinates of the stylus are obtained according to the first predicted coordinates and the second predicted coordinates.

13. A handwriting pen coordinate prediction device, wherein: include: An acquisition module, used to acquire a current coordinate point corresponding to the stylus on the display screen, and a first historical coordinate point associated with the current coordinate point; a confirmation module, configured to determine a first initial speed of the stylus in a direction of a first preset coordinate axis and a second initial speed in a direction of a second preset coordinate axis according to the current coordinate point, the first historical coordinate point and a preset reporting time interval of the stylus; A prediction module is used to predict the predicted coordinates of the stylus pen according to the first initial speed, the second initial speed and the time interval of reporting points.

14. The handwriting pen coordinate prediction device according to claim 13, wherein: The prediction module comprises: A first confirmation subunit is used to calculate the first initial speed and the second initial speed with the reporting time interval respectively to obtain a first acceleration and a second acceleration of the stylus; The second confirmation subunit is used to adjust the current coordinate point according to the first acceleration, the second acceleration, the first initial speed, the second initial speed and the point reporting time interval to obtain the predicted coordinates of the stylus.

15. The handwriting pen coordinate prediction device according to claim 14, wherein: The first confirmation subunit comprises: A first acquisition unit, configured to acquire a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed of the stylus in the direction of the second preset coordinate axis; A first confirmation unit, configured to calculate a first original acceleration of the stylus in the direction of the first preset coordinate axis according to the first historical speed, the first initial speed and the time interval for reporting points; A second confirmation unit, configured to calculate a second original acceleration of the stylus in the direction of the second preset coordinate axis according to the second historical speed, the second initial speed and the point reporting time interval; A filtering unit is used to filter the first original acceleration and the second original acceleration respectively to obtain the first acceleration and the second acceleration.

16. The handwriting pen coordinate prediction device according to claim 15, wherein: The first acquiring unit includes: A collection unit, used for collecting a second historical coordinate point associated with the first historical coordinate point; The third confirmation unit is used to determine a first historical speed of the stylus in the direction of the first preset coordinate axis and a second historical speed in the direction of the second preset coordinate axis according to the first historical coordinate point, the second historical coordinate point and the reporting time interval.

17. The handwriting pen coordinate prediction device according to claim 15, wherein: The filtering unit comprises: A second acquisition unit, used to acquire a current frame value corresponding to the current coordinate point of the stylus pen and a preset frame acquisition range of the stylus pen; A fourth confirmation unit, configured to determine all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range based on the current frame value; A filtering subunit is used to filter the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and to filter the second original acceleration according to all the second historical accelerations to obtain the second acceleration.

18. The handwriting pen coordinate prediction device according to claim 14, wherein: The second confirmation subunit comprises: A third acquisition unit is used to acquire a target prediction time sequence of each of the prediction coordinates, and determine a prediction sequence number of each of the prediction coordinates according to the target prediction time sequence; A first adjustment subunit is used to adjust the coordinate value of the current coordinate point in the direction of the first preset coordinate axis based on the prediction sequence number, the first acceleration, the first initial speed and the reporting time interval to obtain a first prediction value of each predicted coordinate in the direction of the first preset coordinate axis; A second adjustment subunit is used to adjust the coordinate value of the current coordinate point in the direction of the second preset coordinate axis based on the prediction sequence number, the second acceleration, the second initial speed and the reporting time interval to obtain a second prediction value of each of the predicted coordinates in the direction of the second preset coordinate axis; A fifth confirmation unit is used to determine the coordinate value of each of the predicted coordinates according to the first predicted value and the second predicted value.

19. An electronic device, wherein: The invention comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the handwriting pen coordinate prediction method according to any one of claims 1 to 12.

20. A computer-readable storage medium, wherein: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the handwriting pen coordinate prediction method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and equipment for predicting drawing point of handwriting pen

    CN112835455A

  • Handwriting input display method, electronic equipment and storage medium

    CN116560555A

  • Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

    CN117406904A

  • Character locus detection method and device and storage medium

    JP2000268130A

  • Mobile terminal and touch coordinate predicting method thereof

    US20150355778A1