CN117406904A - Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium - Google Patents

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

Info

Publication number
CN117406904A
CN117406904A CN202311253969.5A CN202311253969A CN117406904A CN 117406904 A CN117406904 A CN 117406904A CN 202311253969 A CN202311253969 A CN 202311253969A CN 117406904 A CN117406904 A CN 117406904A
Authority
CN
China
Prior art keywords
coordinate
point
acceleration
historical
handwriting pen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311253969.5A
Other languages
Chinese (zh)
Inventor
曾露
于洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202311253969.5A priority Critical patent/CN117406904A/en
Publication of CN117406904A publication Critical patent/CN117406904A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04815Interaction with a metaphor-based environment or interaction object displayed as three-dimensional, e.g. changing the user viewpoint with respect to the environment or object

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of artificial intelligence and discloses a handwriting pen coordinate prediction method, a handwriting pen coordinate prediction device, electronic equipment and a computer storage medium, wherein the handwriting pen coordinate prediction method comprises the following steps of: acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point; determining a first initial speed of the handwriting pen in a first preset coordinate axis direction and a second initial speed of the handwriting pen in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point and a preset reporting point time interval of the handwriting pen; and according to the first initial speed, the second initial speed and the reporting time interval, calculating, and predicting the predicted coordinates of the handwriting pen. The method and the device improve the speed and accuracy of handwriting pen coordinate prediction.

Description

Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a handwriting pen coordinate prediction method, a handwriting pen coordinate prediction device, electronic equipment and a computer storage medium.
Background
Handwriting pens are becoming more common in electronic products, ranging from traditional capacitive passive pens to capacitive active pens and electromagnetic pens, and can provide a user with writing functions so as to be widely applied to mobile phones, tablets, conference whiteboards and other devices. Due to the fact that the operation efficiency of electronic systems (such as android and Linux) and the screen refresh rate are limited, the following chirality of a handwriting pen is always polluted, and the user experience is seriously affected. The main reason that the handwriting pen has poor chirality is that the system and hardware have inherent time delay, so that the handwriting displayed on the screen of the device is slower than the actual pen point movement track.
In order to reduce handwriting delay and improve handwriting following chirality so as to optimize handwriting user experience, the current common practice in the field is to improve handwriting pen point reporting rate from a hardware end, improve display refresh rate, or use a higher-performance processor platform, and optimize handwriting events in a system at a software end so as to reduce system delay; however, the optimization space in the system is limited, and the hardware cost is directly affected by the optimization of the hardware end, so that the industry gradually improves the handwriting following performance by introducing handwriting pen track prediction.
Handwriting track prediction in the current industry is generally performed according to an existing track, then an existing track curve is fitted based on a least square method, a curve function is obtained, and then a predicted point is obtained according to the curve function. However, because the handwriting track is changed, the objective functions adopted when curves with different curvatures and different rules are fitted by using the least square method are also different, and therefore, some artificial intelligence algorithms are needed to judge the track shape. This also adds to the complexity of the algorithm, and the delay due to the complex algorithm itself is more severe.
Disclosure of Invention
The embodiment of the application provides a handwriting pen coordinate prediction method, a handwriting pen coordinate prediction device, electronic equipment and a computer storage medium, which can solve the technical problem of high current handwriting pen coordinate prediction delay.
The embodiment of the application provides a handwriting pen coordinate prediction method, which comprises the following steps:
acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point;
determining 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 point time interval of the stylus;
and predicting the predicted coordinates of the handwriting pen according to the first initial speed, the second initial speed and the reporting point time interval calculation.
Further, the predicting the predicted coordinates of the stylus according to the first initial speed, the second initial speed and the reporting time interval includes:
calculating the first initial speed and the second initial speed with the point reporting time interval respectively to obtain a first acceleration and a second acceleration of the handwriting pen;
and adjusting 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 coordinate of the handwriting pen.
Further, the calculating the first initial speed and the second initial speed with the reporting time interval to obtain a first acceleration and a second acceleration of the stylus pen includes:
acquiring a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen in the direction of the second preset coordinate axis;
according to the first historical speed, the first initial speed and the reporting time interval, calculating to obtain a first original acceleration of the stylus in the direction of the first preset coordinate axis;
according to the second historical speed, the second initial speed and the reporting time interval, calculating to obtain a second original acceleration of the stylus in the direction of the second preset coordinate axis;
and respectively carrying out filtering processing on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.
Further, the acquiring the first historical speed of the stylus in the first preset coordinate axis direction and the second historical speed of the stylus in the second preset coordinate axis direction includes:
Collecting a second historical coordinate point associated with the first historical coordinate point;
and determining a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen 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.
Further, the filtering processing is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration, which includes:
acquiring a current frame value corresponding to the current coordinate point of the handwriting pen and a frame acquisition range preset by the handwriting pen;
determining all first historical acceleration and second historical acceleration of the handwriting pen in the frame acquisition range based on the current frame value;
and filtering the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and filtering the second original acceleration according to all the second historical accelerations to obtain the second acceleration.
Further, the adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial speed, the second initial speed, and the reporting time interval to obtain the predicted coordinate of the stylus includes:
Acquiring a target prediction time sequence of each prediction coordinate, and determining a prediction sequence number of each prediction coordinate according to the target prediction time sequence;
based on the predicted sequence number, the first acceleration, the first initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the direction of the first preset coordinate axis to obtain a first predicted value of each predicted coordinate in the direction of the first preset coordinate axis;
based on the predicted sequence number, the second acceleration, the second initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the second preset coordinate axis direction to obtain a second predicted value of each predicted coordinate in the second preset coordinate axis direction;
and determining coordinate values of the predicted coordinates according to the first predicted value and the second predicted value.
Further, the determining the current coordinate point corresponding to the handwriting pen on the display screen includes:
acquiring a screen point of the handwriting pen on the display screen currently and a mapping ratio of the display screen to a target coordinate system;
Mapping the screen point into the target coordinate system through the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;
and determining a current coordinate point corresponding to the handwriting pen on the display screen according to the first coordinate value and the second coordinate value.
Accordingly, an embodiment of the present application provides a handwriting pen coordinate prediction apparatus, including:
the acquisition module is used for acquiring a current coordinate point corresponding to the handwriting pen on the display screen and a first historical coordinate point associated with the current coordinate point;
the confirmation module is used for determining a first initial speed of the handwriting pen in a first preset coordinate axis direction and a second initial speed of the handwriting pen in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point and a preset point time interval of the handwriting pen;
and the prediction module is used for predicting the predicted coordinate of the handwriting pen according to the first initial speed, the second initial speed and the point-reporting time interval calculation.
In addition, the embodiment of the application also provides electronic equipment, which comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for running the computer program in the memory to realize the handwriting pen coordinate prediction method provided by the embodiment of the application.
In addition, the embodiment of the application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute any handwriting pen coordinate prediction method provided by the embodiment of the application.
In addition, the embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is executed by a processor to realize any handwriting pen coordinate prediction method provided by the embodiment of the application.
In the embodiment of the application, the accurate acquisition of the current coordinate point of the handwriting pen is realized by acquiring the current coordinate point of the handwriting pen corresponding to the display screen and the first historical coordinate point associated with the current coordinate point; then, according to the current coordinate point, the first historical coordinate point and a preset reporting point time interval of the handwriting pen, determining a first initial speed of the handwriting pen in the direction of a first preset coordinate axis and a second initial speed of the handwriting pen in the direction of a second preset coordinate axis, and determining the handwriting pen speed, so that the handwriting pen speed can be used for rapidly predicting the handwriting pen coordinates; finally, according to the first initial speed, the second initial speed and the reporting time interval, the predicted coordinates of the handwriting pen are predicted, the lightweight track prediction of the handwriting coordinates is realized, the efficiency of handwriting pen coordinate prediction is improved, the prediction delay and the requirements on the system end load are reduced, the method can be directly applied to a control chip of a handwriting device end, and the accurate and efficient prediction of the handwriting coordinates can be realized without other optimization processing.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a stylus coordinate prediction method provided by the present application;
FIG. 2 is a flowchart of another embodiment of a stylus coordinate prediction method provided herein;
FIG. 3 is a schematic diagram of predicted writing of a stylus provided herein;
fig. 4 is a schematic structural diagram of a handwriting pen coordinate prediction device provided by the application;
fig. 5 is a schematic structural diagram of an electronic device provided in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a handwriting pen coordinate prediction method, a handwriting pen coordinate prediction device, electronic equipment and a computer storage medium. The handwriting pen coordinate prediction device can be integrated in electronic equipment, and the electronic equipment can be a server, a terminal and other equipment.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform.
The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
In addition, "plurality" in the embodiments of the present application means two or more. "first" and "second" and the like in the embodiments of the present application are used for distinguishing descriptions and are not to be construed as implying relative importance.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
Referring to fig. 1, fig. 1 is a flowchart of a method for predicting coordinates of a stylus according to an embodiment of the disclosure. The stylus coordinate prediction method may include:
s101, acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point.
In this embodiment, the current coordinate point of the stylus is the coordinate point reported by the stylus at the current reporting point time, the last reporting point time corresponding to the current reporting point time is determined, the coordinate point of the stylus at the last reporting point time is obtained, and the coordinate point at the last reporting point time is the first historical coordinate point.
S102, determining 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 point time interval of the stylus.
In this embodiment, when the stylus moves on the display screen, the coordinate point where the stylus is currently located is reported to the system end at a preset reporting time interval. The preset reporting time interval is smaller than the refreshing frequency of the display screen, and the handwriting pen can report multiple coordinate points within the refreshing frequency of the display screen. The preset reporting time interval of the handwriting pen can be obtained by acquiring the coordinate point acquisition rate of the handwriting pen. Specifically, the coordinate point acquisition rate is the inherent point reporting rate of the writing equipment, such as 240hz; and calculating the time unit of the coordinate point acquisition rate to obtain the reporting point time interval of the current handwriting pen. For example, the reporting rate of the stylus pen is 240hz, and the reciprocal of the reporting rate is calculated, so that the reporting time interval of the stylus pen is 4.1667ms. The first preset coordinate axis direction is a coordinate axis direction perpendicular to the second preset coordinate axis direction, and if the first preset coordinate axis direction is an x axis, the second preset coordinate axis direction is a y axis; if the first preset coordinate axis direction is the y axis, the second preset coordinate axis direction is the x axis.
When the current coordinate point, the first historical coordinate point and the reporting point time interval are obtained, determining a first initial speed of the handwriting pen in the direction of a first preset coordinate axis and a second initial speed of the handwriting pen in the direction of a second preset coordinate axis according to the current coordinate point, the first historical coordinate point and the reporting point time interval. Specifically, coordinate values corresponding to the current coordinate point and the first historical coordinate point in the direction of a first preset coordinate axis are obtained, and a first current coordinate value and a first historical coordinate value are obtained; subtracting the first current coordinate value from the first historical coordinate value to obtain a first difference value; and calculating the ratio of the first difference value to the reporting time interval to obtain a first initial speed of the handwriting pen in the direction of a first preset coordinate axis. Acquiring coordinate values corresponding to the current coordinate point and the first historical coordinate point in a second preset coordinate axis direction respectively, and acquiring 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 value; and calculating the ratio of the second difference value to the reporting time interval to obtain a second initial speed of the stylus in the direction of a second preset coordinate axis.
S103, according to the first initial speed, the first initial speed and the reporting time interval, predicting the predicted coordinate of the handwriting pen.
In this embodiment, when the first initial speed and the second initial speed are obtained, a first historical speed and a second historical speed obtained by calculating the stylus at the last point-reporting time are obtained, where the first historical speed is the speed of the stylus at the first preset coordinate axis direction at the last point-reporting time, and the second historical speed is the speed of the stylus at the second preset coordinate axis direction at the last point-reporting time. And calculating according to the first initial speed and the second initial speed and the reporting time interval respectively to obtain a first coordinate adjustment parameter and a second coordinate adjustment parameter. Adjusting a first current coordinate value of the current coordinate point in a first preset coordinate axis direction based on the first coordinate adjustment parameter to obtain a first predicted coordinate; and adjusting a second current coordinate value of the current coordinate point in the direction of a second preset coordinate axis based on the second coordinate adjustment parameter to obtain a second predicted coordinate. And determining the predicted coordinates of the stylus according to the first predicted coordinates and the second predicted coordinates.
According to the handwriting pen coordinate prediction method, the current coordinate point of the handwriting pen corresponding to the display screen and the first historical coordinate point associated with the current coordinate point are obtained; then, according to the current coordinate point, the first historical coordinate point and a preset reporting point time interval of the handwriting pen, determining a first initial speed of the handwriting pen in a first preset coordinate axis direction and a second initial speed of the handwriting pen in a second preset coordinate axis direction; and then, according to the first initial speed, the second initial speed and the reporting time interval, the predicted coordinates of the handwriting pen are predicted, the lightweight track prediction of the handwriting coordinates is realized, the efficiency of handwriting pen coordinate prediction is improved, the prediction delay and the requirement on the system end load are reduced, so that the method can be directly applied to a control chip of a handwriting device end, and the accurate and efficient prediction of the handwriting coordinates can be realized without other optimization processing.
Fig. 2 is a flowchart of another embodiment of a method for predicting coordinates of a stylus according to the present application, where in some embodiments of the present application, the predicting the predicted coordinates of the stylus according to the first initial speed, the second initial speed, and the reporting time interval includes:
s201, calculating 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 handwriting pen;
s202, adjusting 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 coordinate of the stylus.
In this embodiment, when the first historical speed and the second historical speed are obtained, calculating a difference value between the first initial speed and the first historical speed, and calculating a ratio of the difference value between the first initial speed and the first historical speed to a reporting time interval to obtain a first acceleration of the handwriting pen; and calculating the difference value between the second initial speed and the second historical speed, and calculating the ratio of the difference value between the second initial speed and the second historical speed to the reporting time interval to obtain the second acceleration of the handwriting pen. When the first acceleration and the second acceleration are obtained, the current coordinate point is adjusted according to the first acceleration, the second acceleration, the first initial speed, the second initial speed and the reporting time interval, and the predicted coordinate of the handwriting pen is obtained.
Specifically, a preset prediction model may be constructed based on the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the reporting interval, where the prediction model includes a stylus velocity prediction model and a stylus coordinate prediction model. Calculating the product of the first acceleration and the reporting time interval according to the handwriting speed prediction model to obtain a first speed adjustment parameter; and performing product operation on the second acceleration and the point-reporting time interval to obtain a second speed adjusting parameter. Adjusting the first initial speed according to the first speed adjusting parameter to obtain a first predicted speed; and adjusting the second initial speed according to the second speed adjusting parameter to obtain a second predicted speed. Then, product calculation is carried out on the first prediction speed and the reporting time interval according to the handwriting coordinate prediction model, and a first coordinate adjustment parameter is obtained; and performing product operation on the second prediction speed and the reporting time interval to obtain a second coordinate adjustment parameter. Adjusting the first current coordinate value according to the first coordinate adjusting parameter to obtain a first predicted coordinate; and adjusting the second current coordinate value according to the second coordinate adjusting parameter to obtain a second predicted coordinate. And determining the predicted coordinates of the stylus according to the first predicted coordinates and the second predicted coordinates.
According to the embodiment, the first initial speed and the second initial speed are respectively calculated with the reporting time interval to obtain the first acceleration and the second acceleration of the handwriting pen; and then, according to the first acceleration, the second acceleration, the first initial speed, the second initial speed and the reporting time interval, the current coordinate point is adjusted to obtain the predicted coordinate of the handwriting pen, so that the accurate calculation of the acceleration of the handwriting pen is realized, and the coordinate of the handwriting pen can be rapidly and accurately predicted through the acceleration and the initial speed.
In some embodiments of the present application, the calculating 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 includes:
acquiring a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen in the direction of the second preset coordinate axis;
according to the first historical speed, the first initial speed and the reporting time interval, calculating to obtain a first original acceleration of the stylus in the direction of the first preset coordinate axis;
according to the second historical speed, the second initial speed and the reporting time interval, calculating to obtain a second original acceleration of the stylus in the direction of the second preset coordinate axis;
And respectively carrying out filtering processing on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.
In this embodiment, the first historical speed is the speed of the stylus at the time of the last point report in the direction of the first preset coordinate axis, and the second historical speed is the speed of the stylus at the time of the last point report in the direction of the second preset coordinate axis. The speed of the current point-reporting moment is calculated and stored when the handwriting pen reports the coordinate point every time, so that the speed of the handwriting pen corresponding to the last point-reporting moment stored by the handwriting pen can be directly obtained when the first historical speed of the handwriting pen in the first preset coordinate axis direction and the second historical speed of the handwriting pen in the second preset coordinate axis direction are obtained. When the first historical speed and the second historical speed are obtained, calculating a difference value between the first initial speed and the first historical speed; and calculating the ratio of the difference between the first initial speed and the first historical speed to the reporting time interval to obtain a first original acceleration of the stylus pen in the direction of a first preset coordinate axis. Calculating a difference between the second initial speed and the second historical speed; and calculating the ratio of the difference between the second initial speed and the second historical speed to the reporting time interval to obtain a second original acceleration of the stylus pen in the direction of a second preset coordinate axis.
The first original acceleration and the second original acceleration can be directly used as the first acceleration and the second acceleration corresponding to the handwriting pen respectively, and when the first original acceleration and the second original acceleration are obtained, the first original acceleration and the second original acceleration are respectively subjected to filtering processing to obtain final first acceleration and second acceleration so as to eliminate errors. Specifically, a first stored historical acceleration in a first preset coordinate axis direction and a second stored historical acceleration in a second preset coordinate axis direction are obtained; calculating the average value of the first historical acceleration and the first original acceleration to obtain the first original acceleration after filtering processing, namely the first acceleration; and carrying out average value calculation on the second historical acceleration and the second original acceleration to obtain a second original acceleration after filtering processing, namely the second acceleration.
According to the method, the first original acceleration is obtained through calculation of the first historical speed, the first initial speed and the point-reporting time interval, the second original acceleration is obtained through calculation of the second historical speed, the second initial speed and the point-reporting time interval, then the first original acceleration and the second original acceleration are subjected to filter calculation to obtain the first acceleration and the second acceleration, accurate calculation of the first acceleration and the second acceleration is achieved, and accuracy and prediction speed of handwriting coordinate prediction are further improved.
In some embodiments of the present application, the obtaining the first historical speed of the stylus in the first preset coordinate axis direction and the second historical speed of the stylus in the second preset coordinate axis direction includes:
collecting a second historical coordinate point associated with the first historical coordinate point;
and determining a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen 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.
In this embodiment, the second historical coordinate point is a coordinate point associated with the first historical coordinate point, and the reporting point time corresponding to the second historical coordinate point is the time immediately before the reporting point time corresponding to the first historical coordinate point, that is, the reporting point times of the second historical coordinate point and the first historical coordinate point are two adjacent reporting point times. And acquiring a second historical coordinate point associated with the first historical coordinate point, and determining a first historical speed of the handwriting pen in a first preset coordinate axis direction and a second historical speed of the handwriting pen in a second preset coordinate axis direction according to the first historical coordinate point, the second historical coordinate point and a point reporting time interval. Specifically, calculating a first coordinate difference value of a first historical coordinate point and a second historical coordinate point in a first preset coordinate axis direction and a second coordinate difference value of the first historical coordinate point and the second historical coordinate point in a second preset coordinate axis direction; and calculating the ratio of the first coordinate difference value to the point time interval to obtain a first historical speed, and calculating the ratio of the second coordinate difference value to the point time interval to obtain a second historical speed.
According to the method, the device and the system, the second historical coordinate points associated with the first historical coordinate points are collected, the first historical speed of the handwriting pen in the direction of the first preset coordinate axis and the second historical speed of the handwriting pen in the direction of the second preset coordinate axis are determined according to the first historical coordinate points, the second historical coordinate points and the reporting time interval, accurate acquisition of the historical speed is achieved, accurate prediction of the speed of the handwriting pen can be achieved through the historical speed, and accuracy of handwriting pen coordinate prediction is further improved.
In some embodiments of the present application, the filtering processing is performed on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration, including:
acquiring a current frame value corresponding to the current coordinate point of the handwriting pen and a frame acquisition range preset by the handwriting pen;
determining all first historical acceleration and second historical acceleration of the handwriting pen in the frame acquisition range based on the current frame value;
and filtering the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and filtering the second original acceleration according to all the second historical accelerations to obtain the second acceleration.
In this embodiment, the point time of the stylus is adapted to the frame value of the stylus, and the two adjacent point times of the stylus correspond to two adjacent frames on the stylus, and a frame of the stylus is displayed as a coordinate point on the display screen. When the first original acceleration and the second original acceleration are subjected to filtering processing, a current frame value corresponding to the current coordinate point of the handwriting pen and a preset frame acquisition range corresponding to the handwriting pen are obtained. The method comprises the steps of determining a current frame value, a preset frame acquisition range and a coordinate point acquisition range, wherein the current frame value is a frame value of a handwriting pen corresponding to the current coordinate point, the preset frame acquisition range is a preset frame acquisition range, and acquiring coordinate points corresponding to different frame values in the frame acquisition range.
When the current frame value and the frame acquisition range are obtained, all first historical accelerations and all second historical accelerations of the frame acquisition range are obtained from the current frame value, wherein the first historical accelerations are historical accelerations in the direction of a first preset coordinate axis, and the second historical accelerations are historical accelerations in the direction of a second preset coordinate axis. For example, when the current frame value is the fifth frame of the handwriting pen and the frame acquisition range is 2, the first historical acceleration and the second historical acceleration of the 2 frames are obtained from the fifth frame, namely the first historical acceleration and the second historical acceleration of the 4 th frame, and the first historical acceleration and the second historical acceleration of the 3 rd frame are obtained. Filtering the first original acceleration according to the obtained first historical accelerations, namely calculating the average value of the first historical accelerations and the first original acceleration to obtain the first acceleration; and filtering the second original acceleration according to the obtained second historical acceleration, namely calculating the average value of the second historical acceleration and the second original acceleration to obtain the second acceleration.
According to the method, the first original acceleration is filtered by collecting all the first historical accelerations, and the second original acceleration is filtered by collecting all the second historical accelerations, so that the prediction error of the handwriting coordinates is reduced, and the accuracy of handwriting coordinate prediction is improved.
In some embodiments of the present application, the adjusting the current coordinate point according to the first acceleration, the second acceleration, the first initial speed, the second initial speed, and the reporting time interval to obtain the predicted coordinate of the stylus includes:
acquiring a target prediction time sequence of each prediction coordinate, and determining a prediction sequence number of each prediction coordinate according to the target prediction time sequence;
based on the predicted sequence number, the first acceleration, the first initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the direction of the first preset coordinate axis to obtain a first predicted value of each predicted coordinate in the direction of the first preset coordinate axis;
based on the predicted sequence number, the second acceleration, the second initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the second preset coordinate axis direction to obtain a second predicted value of each predicted coordinate in the second preset coordinate axis direction;
And determining coordinate values of the predicted coordinates according to the first predicted value and the second predicted value.
In this embodiment, a plurality of predicted coordinates may be predicted to obtain predicted handwriting of the stylus on the display screen. Specifically, a target prediction time sequence of each prediction coordinate is obtained, wherein the target prediction time sequence is a time sequence of prediction display of each prediction coordinate on a display screen, and a prediction sequence number of each prediction coordinate is determined according to the target prediction time sequence. For example, the predicted coordinates displayed after the current coordinate point have a corresponding predicted sequence number of 1; the predicted coordinates displayed after the number 1 are 2, and so on.
When the predicted sequence number is obtained, the coordinate value of the current coordinate point in the direction of the first preset coordinate axis is adjusted according to the predicted sequence number, the first acceleration, the first initial speed and the reporting point time interval, and a first predicted value of each predicted coordinate in the direction of the first preset coordinate axis is obtained. Specifically, multiplying the predicted sequence number by the first acceleration to obtain a first parameter value; multiplying the first parameter value by the reporting time interval to obtain a second parameter value, and adding the second parameter value to the first initial speed to obtain a first predicted speed; and multiplying the first prediction speed by the reporting time interval to obtain a first coordinate adjustment parameter, and adding the first coordinate adjustment parameter and the coordinate value of the current coordinate point in the direction of the first preset coordinate axis to obtain a first prediction value. And similarly, adjusting coordinate values of the current coordinate point in the second preset coordinate axis direction according to the predicted sequence number, the second acceleration, the second initial speed and the reporting time interval to obtain a second predicted value of each predicted coordinate in the second preset coordinate axis direction. And determining coordinate values of all the predicted coordinates according to the first predicted value and the second predicted value, wherein the plurality of predicted coordinates form predicted handwriting of the handwriting pen on the display screen. Fig. 3 is a schematic diagram of predicted handwriting of a stylus according to an embodiment of the present application. The abscissa and the ordinate are coordinate values in the first preset coordinate direction and the second preset coordinate direction respectively.
According to the method, the first predicted value is determined through the predicted sequence number, the first acceleration, the first initial speed and the point time interval, the second predicted value is determined according to the predicted sequence number, the second acceleration, the second initial speed and the point time interval, accurate and lightweight prediction of a plurality of predicted coordinates is achieved, the accuracy of handwriting prediction is further improved, the complexity of handwriting prediction is reduced, the prediction duration is reduced, and the prediction efficiency is improved.
In some embodiments of the present application, the determining the current coordinate point corresponding to the stylus on the display screen includes:
acquiring a screen point of the handwriting pen on the display screen currently and a mapping ratio of the display screen to a target coordinate system;
mapping the screen point into the target coordinate system through the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;
and determining a current coordinate point corresponding to the handwriting pen on the display screen according to the first coordinate value and the second coordinate value.
In this embodiment, the target coordinate system is a preset coordinate system, and there is a mapping relationship between the display screen and the target coordinate system. And acquiring a screen point of the handwriting pen on the display screen and a mapping ratio of the display screen to the target coordinate system, wherein the screen point in the display screen can be mapped to the target coordinate system through the mapping ratio. The mapping ratio is a preset ratio between the screen pixels and the coordinate values, for example, 1:10, that is, the mapping ratio indicates that 1 screen pixel corresponds to 10 coordinate values. And according to the mapping ratio, the coordinate value of the current screen point in the target coordinate system can be determined. Specifically, determining an origin coordinate in the target coordinate system, wherein the origin coordinate corresponds to an original pixel point in a display screen; and calculating a first pixel distance between the current screen point and the original pixel point in the direction of a first preset coordinate axis and a second pixel distance between the current screen point and the original pixel point in the direction of a second preset coordinate axis. And then, respectively calculating the first pixel distance and the second pixel distance according to the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in a target coordinate system. And determining the corresponding current coordinate point of the handwriting pen on the display screen according to the first coordinate value and the second coordinate value.
According to the embodiment, the mapping ratio of the display screen to the target coordinate system is obtained, the screen points are mapped to the target coordinate system according to the mapping ratio, and the first coordinate value and the second coordinate value are obtained, so that the corresponding current coordinate point of the handwriting pen on the display screen is determined, and accurate acquisition of the current handwriting pen coordinates is achieved.
In order to facilitate better implementation of the stylus coordinate prediction method provided by the embodiment of the application, the embodiment of the application also provides a device based on the stylus coordinate prediction method. The meaning of the noun is the same as that in the handwriting coordinate prediction method, and specific implementation details can be referred to the description in the embodiment of the method.
For example, as shown in fig. 4, the stylus coordinate prediction apparatus may include: an acquisition module 301, a validation module 302 and a prediction module 303. Wherein,
the acquisition module 301 is configured to acquire a current coordinate point corresponding to a handwriting pen on a display screen, and a first historical coordinate point associated with the current coordinate point;
the confirmation module 302 is configured to 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;
And the predicting module 303 is configured to predict a predicted coordinate of the stylus according to the first initial speed, the second initial speed, and the reporting time interval calculation.
In an embodiment of the present application, the prediction module 303 includes:
the first confirmation subunit is used for calculating 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 handwriting pen;
and the second confirmation subunit is used for adjusting 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 coordinate of the handwriting pen.
In an embodiment of the present application, the first acknowledgement subunit includes:
a first acquiring unit, configured to acquire a first historical speed of the stylus in the first preset coordinate axis direction and a second historical speed of the stylus in the second preset coordinate axis direction;
the first confirmation unit is used for calculating and obtaining 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 reporting time interval;
The second confirmation unit is used for calculating and obtaining 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 reporting time interval;
the filtering unit is used for respectively filtering the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.
In an embodiment of the present application, the first obtaining unit includes:
the acquisition unit is used for acquiring a second historical coordinate point associated with the first historical coordinate point;
and the third confirmation unit is used for determining the first historical speed of the handwriting pen in the first preset coordinate axis direction and the second historical speed of the handwriting pen in the second preset coordinate axis direction according to the first historical coordinate point, the second historical coordinate point and the reporting point time interval.
In an embodiment of the present application, the filtering unit includes:
the second acquisition unit is used for acquiring a current frame value corresponding to the current coordinate point of the handwriting pen and a frame acquisition range preset by the handwriting pen;
a fourth confirmation unit, configured to determine, based on the current frame value, all first historical accelerations and second historical accelerations of the stylus within the frame acquisition range;
And the filtering subunit is used for filtering the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and filtering the second original acceleration according to all the second historical accelerations to obtain the second acceleration.
In an embodiment of the present application, the second acknowledgement subunit includes:
the third acquisition unit is used for acquiring a target prediction time sequence of each prediction coordinate and determining a prediction sequence number of each prediction coordinate according to the target prediction time sequence;
the first adjustment subunit is configured to adjust coordinate values of the current coordinate point in the first preset coordinate axis direction based on the predicted sequence number, the first acceleration, the first initial speed and the point reporting time interval, so as to obtain a first predicted value of each predicted coordinate in the first preset coordinate axis direction;
the second adjustment subunit is configured to adjust coordinate values of the current coordinate point in the second preset coordinate axis direction based on the predicted sequence number, the second acceleration, the second initial speed and the point reporting time interval, so as to obtain a second predicted value of each predicted coordinate in the second preset coordinate axis direction;
And a fifth confirmation unit, configured to determine coordinate values of the predicted coordinates according to the first predicted value and the second predicted value.
In an embodiment of the present application, the acquiring module 301 further includes:
a fourth obtaining unit, configured to obtain a screen point of the stylus currently on the display screen, and a mapping ratio of the display screen to a target coordinate system;
the mapping unit is used for mapping the screen point into the target coordinate system through the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;
and the coordinate confirming unit is used for confirming the current coordinate point corresponding to the handwriting pen on the display screen according to the first coordinate value and the second coordinate value.
According to the handwriting coordinate prediction device, the lightweight track prediction of handwriting coordinates is realized, the efficiency of handwriting coordinate prediction is improved, the prediction delay and the requirement on the system end load are reduced, the handwriting coordinate prediction device can be directly applied to a control chip of a handwriting device end, and the accurate and efficient prediction of handwriting coordinates can be realized without other optimization processing.
In the specific implementation, each module may be implemented as an independent entity, or may be combined arbitrarily, and implemented as the same entity or a plurality of entities, and the specific implementation and the corresponding beneficial effects of each module may be referred to the foregoing method embodiments, which are not described herein again.
The embodiment of the application also provides an electronic device, which may be a server or a terminal, as shown in fig. 5, and shows a schematic structural diagram of the electronic device according to the embodiment of the application, specifically:
the electronic device may include one or more processing cores 'processors 601, one or more computer-readable storage media's memory 602, power supply 603, and input unit 604, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 5 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 601 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing computer programs and/or modules stored in the memory 602, and invoking data stored in the memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601.
The memory 602 may be used to store computer programs and modules, and the processor 601 may execute various functional applications and data processing by executing the computer programs and modules stored in the memory 602. The memory 602 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, a computer program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 601.
The electronic device further comprises a power supply 603 for supplying power to the various components, preferably the power supply 603 may be logically connected to the processor 601 by a power management system, so that functions of managing charging, discharging, power consumption management and the like are achieved by the power management system. The power supply 603 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 604, which input unit 604 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 601 in the electronic device loads 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 executes the computer programs stored in the memory 602, so as to implement various functions, such as:
acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point;
determining 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 point time interval of the stylus;
and predicting the predicted coordinates of the handwriting pen according to the first initial speed, the second initial speed and the reporting point time interval calculation.
According to the electronic equipment, the lightweight track prediction of the handwriting coordinates is realized, the efficiency of the handwriting coordinate prediction is improved, the prediction delay and the requirement on the system end load are reduced, so that the electronic equipment can be directly applied to a control chip of a handwriting device end, and the accurate and efficient prediction of the handwriting coordinates can be realized without other optimization processing.
The specific embodiments and the corresponding beneficial effects of the above operations can be seen from the above detailed description of the stylus coordinate prediction method, and are not described herein.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a computer program that is capable of being loaded by a processor to perform the steps of any of the stylus coordinate prediction methods provided by embodiments of the present application. For example, the computer program may perform the steps of:
Acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point;
determining 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 point time interval of the stylus;
and predicting the predicted coordinates of the handwriting pen according to the first initial speed, the second initial speed and the reporting point time interval calculation.
The computer readable storage medium provided by the application realizes the lightweight track prediction of handwriting coordinates, improves the efficiency of handwriting coordinate prediction, reduces the prediction delay and the requirement on the system end load, can be directly applied to a control chip of a handwriting device end, and can realize the accurate and efficient prediction of handwriting coordinates without other optimization processing.
The specific embodiments and the corresponding beneficial effects of each of the above operations can be found in the foregoing embodiments, and are not described herein again.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the computer readable storage medium can execute the steps in any one of the methods for predicting coordinates of a stylus provided in the embodiments of the present application, the beneficial effects that any one of the methods for predicting coordinates of a stylus provided in the embodiments of the present application can be achieved, which are detailed in the previous embodiments and are not described herein.
Among other things, according to one aspect of the present application, a computer program product or computer program is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the stylus coordinate prediction method described above.
The foregoing describes in detail a method, an apparatus, an electronic device, and a computer storage medium for predicting handwriting coordinates provided in the embodiments of the present application, and specific examples are applied to illustrate principles and implementations of the present application, where the foregoing description of the embodiments is only for helping to understand the method and core ideas of the present application; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A stylus coordinate prediction method, comprising:
acquiring a current coordinate point corresponding to a handwriting pen on a display screen and a first historical coordinate point associated with the current coordinate point;
determining 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 point time interval of the stylus;
and predicting the predicted coordinates of the handwriting pen according to the first initial speed, the second initial speed and the reporting point time interval calculation.
2. The stylus coordinate prediction method according to claim 1, wherein predicting the predicted coordinates of the stylus based on the first initial velocity, the second initial velocity, and the reporting time interval calculation comprises:
calculating the first initial speed and the second initial speed with the point reporting time interval respectively to obtain a first acceleration and a second acceleration of the handwriting pen;
and adjusting 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 coordinate of the handwriting pen.
3. The method for predicting coordinates of a stylus according to claim 2, wherein calculating the first initial velocity and the second initial velocity at the reporting time interval to obtain a first acceleration and a second acceleration of the stylus includes:
acquiring a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen in the direction of the second preset coordinate axis;
according to the first historical speed, the first initial speed and the reporting time interval, calculating to obtain a first original acceleration of the stylus in the direction of the first preset coordinate axis;
according to the second historical speed, the second initial speed and the reporting time interval, calculating to obtain a second original acceleration of the stylus in the direction of the second preset coordinate axis;
and respectively carrying out filtering processing on the first original acceleration and the second original acceleration to obtain the first acceleration and the second acceleration.
4. The stylus coordinate prediction method according to claim 3, wherein the acquiring a first historical speed of the stylus in the first preset coordinate axis direction and a second historical speed of the stylus in the second preset coordinate axis direction includes:
Collecting a second historical coordinate point associated with the first historical coordinate point;
and determining a first historical speed of the handwriting pen in the direction of the first preset coordinate axis and a second historical speed of the handwriting pen 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.
5. The method for predicting coordinates of a stylus according to claim 3, wherein filtering the first raw acceleration and the second raw acceleration to obtain the first acceleration and the second acceleration, respectively, includes:
acquiring a current frame value corresponding to the current coordinate point of the handwriting pen and a frame acquisition range preset by the handwriting pen;
determining all first historical acceleration and second historical acceleration of the handwriting pen in the frame acquisition range based on the current frame value;
and filtering the first original acceleration according to all the first historical accelerations to obtain the first acceleration, and filtering the second original acceleration according to all the second historical accelerations to obtain the second acceleration.
6. The method for predicting coordinates of a stylus according to claim 2, wherein the predicting coordinates include a plurality of coordinates, and the 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 includes:
acquiring a target prediction time sequence of each prediction coordinate, and determining a prediction sequence number of each prediction coordinate according to the target prediction time sequence;
based on the predicted sequence number, the first acceleration, the first initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the direction of the first preset coordinate axis to obtain a first predicted value of each predicted coordinate in the direction of the first preset coordinate axis;
based on the predicted sequence number, the second acceleration, the second initial speed and the point reporting time interval, adjusting coordinate values of the current coordinate point in the second preset coordinate axis direction to obtain a second predicted value of each predicted coordinate in the second preset coordinate axis direction;
And determining coordinate values of the predicted coordinates according to the first predicted value and the second predicted value.
7. The stylus coordinate prediction method according to claim 1, wherein determining a current coordinate point corresponding to the stylus on a display screen comprises:
acquiring a screen point of the handwriting pen on the display screen currently and a mapping ratio of the display screen to a target coordinate system;
mapping the screen point into the target coordinate system through the mapping ratio to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system;
and determining a current coordinate point corresponding to the handwriting pen on the display screen according to the first coordinate value and the second coordinate value.
8. A stylus coordinate prediction apparatus, comprising:
the acquisition module is used for acquiring a current coordinate point corresponding to the handwriting pen on the display screen and a first historical coordinate point associated with the current coordinate point;
the confirmation module is used for determining a first initial speed of the handwriting pen in a first preset coordinate axis direction and a second initial speed of the handwriting pen in a second preset coordinate axis direction according to the current coordinate point, the first historical coordinate point and a preset point time interval of the handwriting pen;
And the prediction module is used for predicting the predicted coordinate of the handwriting pen according to the first initial speed, the second initial speed and the point-reporting time interval calculation.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to perform the stylus coordinate prediction method of any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that it stores a computer program adapted to be loaded by a processor for performing the stylus coordinate prediction method according to any one of claims 1 to 7.
CN202311253969.5A 2023-09-26 2023-09-26 Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium Pending CN117406904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311253969.5A CN117406904A (en) 2023-09-26 2023-09-26 Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311253969.5A CN117406904A (en) 2023-09-26 2023-09-26 Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN117406904A true CN117406904A (en) 2024-01-16

Family

ID=89491682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311253969.5A Pending CN117406904A (en) 2023-09-26 2023-09-26 Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN117406904A (en)

Similar Documents

Publication Publication Date Title
US10732853B2 (en) Dynamic memory management techniques
CN110968423A (en) Method and apparatus for distributing workload to accelerators using machine learning
CN108228057B (en) Touch inflection point correction method and device and touch screen
CN111144511A (en) Image processing method, system, medium and electronic terminal based on neural network
CN111858034A (en) Resource management method, system, device and medium
CN111427887A (en) Method, device and system for rapidly scanning HBase partition table
CN117406904A (en) Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium
WO2023155348A1 (en) Game data processing method and apparatus, computer device, and storage medium
CN116955271A (en) Method and device for storing data copy, electronic equipment and storage medium
Ju et al. Innovation trend of edge computing technology based on patent perspective
CN116059631A (en) Object rendering method, device, electronic equipment and computer readable storage medium
CN114143590A (en) Video playing method, server and storage medium
CN116360666B (en) Page sliding method and device, electronic equipment and computer storage medium
CN111818509A (en) Resource conversion method, device and equipment
CN109446287A (en) A kind of load of map, rendering method and system
CN103218040A (en) Electronic device, and control method
CN113837727B (en) Event reminding method, device, equipment and medium
CN116136882A (en) Data processing method, device, electronic equipment and computer readable storage medium
CN117041414A (en) Picture jitter compensation method and device, electronic equipment and computer storage medium
CN118229808A (en) Multi-grid image generation method based on single model and related products
CN117523042A (en) Special effect generation method, device, computer equipment and computer readable storage medium
CN113849107A (en) Screen projection control method and device, storage medium and electronic equipment
CN107230242B (en) Particle mapping method and device
CN117406869A (en) Control triggering method and device, electronic equipment and computer storage medium
CN116126245A (en) Data dynamic storage method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination