Movatterモバイル変換


[0]ホーム

URL:


WO2025066575A1 - Stylus coordinate prediction method and apparatus, and electronic device and computer storage medium - Google Patents

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

Info

Publication number
WO2025066575A1
WO2025066575A1PCT/CN2024/110821CN2024110821WWO2025066575A1WO 2025066575 A1WO2025066575 A1WO 2025066575A1CN 2024110821 WCN2024110821 WCN 2024110821WWO 2025066575 A1WO2025066575 A1WO 2025066575A1
Authority
WO
WIPO (PCT)
Prior art keywords
coordinate
stylus
historical
acceleration
speed
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
PCT/CN2024/110821
Other languages
French (fr)
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 LtdfiledCriticalHuizhou TCL Mobile Communication Co Ltd
Publication of WO2025066575A1publicationCriticalpatent/WO2025066575A1/en
Pendinglegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Definitions

Landscapes

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.

Description

Translated fromChinese
手写笔坐标预测方法、装置、电子设备及计算机存储介质Handwriting pen coordinate prediction method, device, electronic device and computer storage medium

本申请要求于2023年09月26日提交中国专利局、申请号为202311253969.5、申请名称为“手写笔坐标预测方法、装置、电子设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of 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”, all contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及人工智能技术领域,具体涉及一种手写笔坐标预测方法、装置、电子设备及计算机存储介质。The present application relates to the field of artificial intelligence technology, and in particular to a handwriting pen coordinate prediction method, device, electronic device and computer storage medium.

背景技术Background Art

手写笔在电子产品中越来越常见,从传统的电容式被动笔到电容式主动笔、电磁笔,这些手写笔可以给用户提供书写功能从而广泛应用于手机、平板和会议白板等设备。受限于电子系统(如安卓、Linux等)的运行效率以及屏幕刷新率等原因,手写笔的跟手性一直被人诟病,并严重影响到用户体验。当前手写笔跟手性较差的主要原因是系统和硬件本身存在固有的延时,由此导致在设备屏幕上显示的笔迹慢于实际的笔尖移动轨迹的问题。Styluses are becoming more and more common in electronic products, from traditional capacitive passive pens to capacitive active pens and electromagnetic pens. These styluses can provide users with writing functions and are widely used in mobile phones, tablets, conference whiteboards and other devices. Limited by the operating efficiency of electronic systems (such as Android, Linux, etc.) and screen refresh rates, the hand tracking of styluses has been criticized and seriously affects the user experience. The main reason for the poor hand tracking of current styluses is the inherent delay of the system and hardware itself, which causes the handwriting displayed on the device screen to be slower than the actual pen tip movement trajectory.

为了降低手写延时提升手写跟手性从而优化手写用户体验,当前领域内通常的做法是从硬件端提升手写笔报点率、提升显示刷新率,或使用更高性能的处理器平台,在软件端对系统内的手写事件做优化以降低系统延迟;但系统内的优化空间有限而硬件端的优化会直接影响到硬件成本,因此行业在逐步通过引入手写笔轨迹预测以提升手写跟手性能。In order to reduce handwriting delay, improve handwriting tracking performance and thus optimize the handwriting user experience, the common practice in the current field is to increase the handwriting pen reporting rate, increase the display refresh rate, or use a higher-performance processor platform from the hardware side, and optimize the handwriting events in the system on the software side to reduce system delay; but the optimization space within the system is limited and the optimization on the hardware side will directly affect the hardware cost, so the industry is gradually introducing handwriting pen trajectory prediction to improve handwriting tracking performance.

技术问题Technical issues

当前行业的手写轨迹预测通常是依据已有轨迹,而后基于最小二乘法对已有的轨迹曲线进行拟合,得到曲线函数,之后根据曲线函数获得预测点。但是,因为手写轨迹变化多端,不同曲率和不同规则的曲线使用最小二乘法拟合时采用的目标函数也不相同,因此往往还需加入一些人工智能算法对轨迹形状做判断。而这也加大了算法复杂度,由于复杂的算法本身带来的延迟也会更严重。The current industry's handwriting trajectory prediction is usually based on the existing trajectory, and then the existing trajectory curve is fitted based on the least squares method to obtain the curve function, and then the prediction point is obtained based on the curve function. However, because the handwriting trajectory varies greatly, the objective function used when fitting curves with different curvatures and different rules using the least squares method is also different, so it is often necessary to add some artificial intelligence algorithms to judge 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

本申请实施例提供一种手写笔坐标预测方法、装置、电子设备及计算机存储介质,可以解决当前手写笔坐标预测延迟高的技术问题。The embodiments of the present application provide a stylus coordinate prediction method, device, electronic device and computer storage medium, which can solve the current technical problem of high delay in stylus coordinate prediction.

本申请实施例提供一种手写笔坐标预测方法,包括:The present application embodiment provides a method for predicting handwriting pen coordinates, including:

获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.

进一步的,上述根据所述第一初始速度、所述第二初始速度和所述报点时间间隔计算,预测所述手写笔的预测坐标,包括:Furthermore, the above-mentioned calculation based on the first initial speed, the second initial speed and the time interval of reporting points to predict the predicted coordinates of the stylus pen includes:

将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度;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.

进一步的,上述将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度,包括: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:

获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度;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.

进一步的,上述获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度,包括:Furthermore, the above-mentioned obtaining of 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.

进一步的,上述对所述第一原始加速度和所述第二原始加速度分别进行滤波处理,得到所述第一加速度和所述第二加速度,包括:Furthermore, the filtering process is performed on the first original acceleration and the second original acceleration respectively to obtain the first acceleration and the second acceleration, including:

获取所述手写笔在所述当前坐标点对应的当前帧值,以及所述手写笔预设的帧采集范围;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.

进一步的,上述预测坐标有多个,所述根据所述第一加速度、所述第二加速度、所述第一初始速度、所述第二初始速度和所述报点时间间隔,对所述当前坐标点进行调整,得到所述手写笔的预测坐标,包括:Furthermore, there are multiple predicted coordinates, and the current coordinate point is adjusted 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, including:

获取各所述预测坐标的目标预测时间顺序,根据所述目标预测时间顺序确定各所述预测坐标的预测序号;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.

进一步的,上述确定所述手写笔在显示屏幕上对应的当前坐标点,包括:Furthermore, the above-mentioned determining 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;

根据所述第一坐标值和所述第二坐标值,确定所述手写笔在所述显示屏幕上对应的当前坐标点。According to the first coordinate value and the second coordinate value, determine the current position of the stylus on the display screen Previous coordinate point.

相应地,本申请实施例提供一种手写笔坐标预测装置,包括:Accordingly, an embodiment of the present application provides a stylus coordinate prediction device, comprising:

获取模块,用于获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.

此外,本申请实施例还提供一种电子设备,包括处理器和存储器,上述存储器存储有计算机程序,上述处理器用于运行上述存储器内的计算机程序实现本申请实施例提供的手写笔坐标预测方法。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 used to run the computer program in the memory to implement the stylus coordinate prediction method provided in the embodiment of the present application.

此外,本申请实施例还提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序适于处理器进行加载,以执行本申请实施例所提供的任一种手写笔坐标预测方法。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.

此外,本申请实施例还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现本申请实施例所提供的任一种手写笔坐标预测方法。In addition, an embodiment of the present application further provides a computer program product, including a computer program, and when the computer program is executed by a processor, any one of the stylus coordinate prediction methods provided in the embodiments of the present application is implemented.

有益效果Beneficial Effects

在本申请实施例中,通过获取手写笔在显示屏幕上对应的当前坐标点,以及与当前坐标点关联的第一历史坐标点,实现了对手写笔当前坐标点的精确获取;而后,根据当前坐标点、第一历史坐标点和手写笔预设的报点时间间隔,确定手写笔在第一预设坐标轴方向上的第一初始速度,以及在第二预设坐标轴方向上的第二初始速度,实现了对手写笔速度的确定,使得通过该手写笔速度能够对手写笔坐标的快速预测;最后,根据第一初始速度、第二初始速度和报点时间间隔计算,预测手写笔的预测坐标,实现了对手写坐标的轻量级轨迹预测,提高了手写笔坐标预测的效率,降低了预测延迟以及对系统端负载的要求,使其能够直接应用于手写器件端的控制芯片中,无需其他优化处理,即可实现对手写坐标的精确和高效预测。In an embodiment of the present application, by acquiring the current coordinate point corresponding to the stylus on the display screen and the first historical coordinate point associated with the current coordinate point, accurate acquisition of the current coordinate point of the stylus is achieved; then, according to the current coordinate point, the first historical coordinate point and the preset reporting time interval of the stylus, the first initial speed of the stylus in the direction of the first preset coordinate axis and the second initial speed in the direction of the second preset coordinate axis are determined, thereby determining the speed of the stylus, so that the coordinates of the stylus can be quickly predicted through the speed of the stylus; finally, according to the first initial speed, the second initial speed and the reporting time interval, the predicted coordinates of the stylus are predicted, and lightweight trajectory prediction of the handwritten coordinates is achieved, the efficiency of the stylus coordinate prediction is improved, the prediction delay and the requirements for the system end load are reduced, so that it can be directly applied to the control chip at the handwriting device end, and accurate and efficient prediction of the handwritten coordinates can be achieved without other optimization processing.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.

图1是本申请提供的手写笔坐标预测方法的流程示意图;FIG1 is a schematic diagram of a flow chart of a stylus coordinate prediction method provided by the present application;

图2是本申请提供的手写笔坐标预测方法的另一实施例的流程示意图;FIG2 is a schematic flow chart of another embodiment of a method for predicting stylus coordinates provided by the present application;

图3是本申请提供的手写笔的预测笔迹的示意图;FIG3 is a schematic diagram of predicted handwriting of a stylus provided in the present application;

图4是本申请提供的手写笔坐标预测装置的结构示意图;FIG4 is a schematic diagram of the structure of a stylus coordinate prediction device provided by the present application;

图5是本申请提供的电子设备的结构示意图。FIG5 is a schematic diagram of the structure of an electronic device provided in the present application.

本申请的实施方式Embodiments of the present application

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are All of them belong to the scope of protection of this application.

本申请实施例提供一种手写笔坐标预测方法、装置、电子设备及计算机存储介质。该手写笔坐标预测装置可以集成在电子设备中,该电子设备可以是服务器,也可以是终端等设备。The present application provides a stylus coordinate prediction method, device, electronic device and computer storage medium. The stylus coordinate prediction device can be integrated in an electronic device, which can be a server or a terminal.

其中,服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、网络加速服务(Content Delivery Network,CDN)、以及大数据和人工智能平台等基础云计算服务的云服务器。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.

终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能音箱、智能手表等,但并不局限于此。终端以及服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。The terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

另外,本申请实施例中的“多个”指两个或两个以上。本申请实施例中的“第一”和“第二”等用于区分描述,而不能理解为暗示相对重要性。In addition, the term "plurality" 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 as implying relative importance.

以下分别进行详细说明。需要说明的是,以下实施例的描述顺序不作为对实施例优选顺序的限定。It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

请参阅图1,图1是本申请一实施例提供的手写笔坐标预测方法的流程示意图。该手写笔坐标预测方法可以包括:Please refer to FIG1 , 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:

S101、获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点。S101: 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.

在本实施例中,手写笔的当前坐标点为手写笔在当前报点时刻上报的坐标点,确定当前报点时刻对应的最近一次报点时刻,获取该最近一次报点时刻手写笔的坐标点,该最近一次报点时刻的坐标点即为第一历史坐标点。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.

S102、根据所述当前坐标点、所述第一历史坐标点和所述手写笔预设的报点时间间隔,确定所述手写笔在第一预设坐标轴方向上的第一初始速度,以及在第二预设坐标轴方向上的第二初始速度。S102: 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.

在本实施例中,手写笔在显示屏幕上运动时,每间隔预设的报点时间间隔会向系统端上报其当前所在的坐标点。该预设的报点时间间隔小于显示屏幕的刷新频率,在显示屏幕的刷新频率内手写笔可以上报多次坐标点。手写笔预设的报点时间间隔可以通过获取手写笔的坐标点采集速率得到。具体地,坐标点采集速率为笔写设备固有的报点率,如240hz;对该坐标点采集速率进行时间单位的计算,即得到当前手写笔的报点时间间隔。例如,手写笔的报点率为240hz,计算该报点率的倒数,即得到该手写笔的报点时间间隔为4.1667ms。第一预设坐标轴方向为与第二预设坐标轴方向垂直的坐标轴方向,若第一预设坐标轴方向为x轴,则第二预设坐标轴方向为y轴;若第一预设坐标轴方向为y轴,则第二预设坐标轴方向为x轴。In this embodiment, when the stylus moves on the display screen, the coordinate point at which it is currently located will be reported to the system end at every preset reporting time interval. The preset reporting time interval is less than the refresh frequency of the display screen, and the stylus can report multiple coordinate points within the refresh frequency of the display screen. The preset reporting time interval of the stylus can be obtained by obtaining the coordinate point acquisition rate of the stylus. Specifically, the coordinate point acquisition rate is the inherent reporting rate of the pen writing device, such as 240hz; the coordinate point acquisition rate is calculated by the time unit to obtain the reporting time interval of the current stylus. For example, the reporting rate of the stylus is 240hz, and the inverse of the reporting rate is calculated to obtain the reporting time interval of the stylus as 4.1667ms. The first preset coordinate axis direction is the coordinate axis direction perpendicular to the second preset coordinate axis direction. If the first preset coordinate axis direction is the x-axis, the second preset coordinate axis direction is the 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 time interval for reporting points are obtained, the first initial speed of the stylus in the direction of the first preset coordinate axis and the second initial speed in the direction of the second preset coordinate axis are determined according to the current coordinate point, the first historical coordinate point, and the time interval for reporting 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 the first current coordinate value and the first historical coordinate value; the first current coordinate value and the first historical coordinate value are subtracted to obtain the first difference; the ratio of the first difference and the time interval for reporting points is calculated to obtain the first initial speed 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 the second current coordinate value and the second historical coordinate value; the second current coordinate value and the second historical coordinate value are subtracted to obtain the second difference; the ratio of the second difference and the time interval for reporting points is calculated to obtain the second initial speed of the stylus in the direction of the second preset coordinate axis.

S103、根据所述第一初始速度、所述第一初始速度和所述报点时间间隔计算,预测所述手写笔的预测坐标。S103: predicting the predicted coordinates of the stylus pen according to the first initial speed, the first initial speed and the time interval for reporting points.

在本实施例中,在得到第一初始速度和第二初始速度时,获取该手写笔在最近一次报点时刻计算得到的第一历史速度和第二历史速度,该第一历史速度为最近一次报点时刻该手写笔在第一预设坐标轴方向上的速度,该第二历史速度为最近一次报点时刻该手写笔在第二预设坐标轴方向上的速度。根据该第一初始速度和第二初始速度分别与报点时间间隔进行计算,得到第一坐标调整参数和第二坐标调整参数。基于该第一坐标调整参数对当前坐标点在第一预设坐标轴方向上的第一当前坐标值进行调整,得到第一预测坐标;基于该第二坐标调整参数对当前坐标点在第二预设坐标轴方向上的第二当前坐标值进行调整,得到第二预测坐标。根据该第一预测坐标和第二预测坐标,即可确定该手写笔的预测坐标。In this embodiment, when the first initial speed and the second initial speed are obtained, the first historical speed and the second historical speed calculated by the stylus at the most recent time of reporting a point are obtained, the first historical speed is the speed of the stylus in the direction of the first preset coordinate axis at the most recent time of reporting a point, and the second historical speed is the speed of the stylus in the direction of the second preset coordinate axis at the most recent time of reporting a point. The first coordinate adjustment parameter and the second coordinate adjustment parameter are calculated based on the first initial speed and the second initial speed and the time interval of reporting a point, respectively. 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 the 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 the second predicted coordinate. According to the first predicted coordinate and the second predicted coordinate, the predicted coordinate of the stylus can be determined.

本申请提出的手写笔坐标预测方法,通过获取手写笔在显示屏幕上对应的当前坐标点,以及与当前坐标点关联的第一历史坐标点;之后,根据当前坐标点、第一历史坐标点和手写笔预设的报点时间间隔,确定手写笔在第一预设坐标轴方向上的第一初始速度,以及在第二预设坐标轴方向上的第二初始速度;而后,根据第一初始速度、第二初始速度和报点时间间隔计算,预测手写笔的预测坐标,实现了对手写坐标的轻量级轨迹预测,提高了手写笔坐标预测的效率,降低了预测延迟以及对系统端负载的要求,使其能够直接应用于手写器件端的控制芯片中,无需其他优化处理,即可实现对手写坐标的精确和高效预测。The handwriting pen coordinate prediction method proposed in the present application obtains the current coordinate point corresponding to the handwriting pen on 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 the preset reporting time interval of the handwriting pen, determines the first initial speed of the handwriting pen in the direction of the first preset coordinate axis, and the second initial speed in the direction of the second preset coordinate axis; then, according to the first initial speed, the second initial speed and the reporting time interval, predicts the predicted coordinates of the handwriting pen, realizes lightweight trajectory prediction of the handwriting coordinates, improves the efficiency of the handwriting pen coordinate prediction, reduces 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 no other optimization processing is required, so as to realize accurate and efficient prediction of the handwriting coordinates.

图2是本申请提供的手写笔坐标预测方法的另一实施例的流程示意图,在本申请一些实施例中,上述根据所述第一初始速度、所述第二初始速度和所述报点时间间隔计算,预测所述手写笔的预测坐标,包括:FIG2 is a flow chart of another embodiment of the handwriting pen coordinate prediction method provided by the present application. In some embodiments of the present application, the method of predicting the handwriting pen coordinates by calculating according to the first initial speed, the second initial speed and the time interval of reporting points includes:

S201、将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度;S201, 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;

S202、根据所述第一加速度、所述第二加速度、所述第一初始速度、所述第二初始速度和所述报点时间间隔,对所述当前坐标点进行调整,得到所述手写笔的预测坐标。S202: Adjust the current coordinate point according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity, and the point reporting time interval to obtain predicted coordinates of the stylus.

在本实施例中,在得到该第一历史速度和第二历史速度时,计算该第一初始速度与该第一历史速度的差值,将该第一初始速度与该第一历史速度的差值与报点时间间隔进行比值计算,即得到手写笔的第一加速度;计算该第二初始速度与该第二历史速度的差值,将该第二初始速度与该第二历史速度的差值与报点时间间隔进行比值计算,即得到手写笔的第二加速度。在得到第一加速度和第二加速度时,根据该第一加速度、第二加速度、第一初始速度、第二初始速度和报点时间间隔,对当前坐标点进行调整,得到手写笔的预测坐标。In this embodiment, when the first historical speed and the second historical speed are obtained, the difference between the first initial speed and the first historical speed is calculated, and the difference between the first initial speed and the first historical speed is calculated by ratio with the time interval for reporting points, so as to obtain the first acceleration of the stylus; the difference between the second initial speed and the second historical speed is calculated, and the difference between the second initial speed and the second historical speed is calculated by ratio with the time interval for reporting points, so as to obtain the second acceleration of the stylus. 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 time interval for reporting points, so as to obtain the predicted coordinates of the stylus.

具体地,基于该第一加速度、第二加速度、第一初始速度、第二初始速度和报点时间间隔可以构建预设的预测模型,该预测模型包括手写笔速度预测模型和手写笔坐标预测模型。根据该手写笔速度预测模型将该第一加速度和报点时间间隔作乘积计算,得到第一速度调整参数;将该第二加速度和报点时间间隔作乘积运算,得到第二速度调整参数。根据该第一速度调整参数对第一初始速度进行调整,得到第一预测速度;根据该第二速度调整参数对第二初始速度进行调整,得到第二预测速度。而后,根据手写笔坐标预测模型对第一预测速度和报点时间间隔进行乘积计算,得到第一坐标调整参数;将该第二预测速度和报点时间间隔作乘积运算,得到第二坐标调整参数。根据该第一坐标调整参数对第一当前坐标值进行调整,得到第一预测坐标;根据该第二坐标调整参数对第二当前坐标值进行调整,得到第二预测坐标。根据该第一预测坐标和第二预测坐标,即可确定该手写笔的预测坐标。Specifically, a preset prediction model can be constructed based on the first acceleration, the second acceleration, the first initial speed, the second initial speed and the time interval for reporting points, and the prediction model includes a stylus speed prediction model and a stylus coordinate prediction model. 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; the second acceleration and the time interval for reporting points are multiplied to obtain a second speed adjustment parameter. According to the first speed adjustment parameter, the first initial speed is adjusted to obtain a first predicted speed; according to the second speed adjustment parameter, the second initial speed is adjusted to obtain a second predicted speed. Then, according to the stylus coordinate prediction model, the first predicted speed and the time interval for reporting points are multiplied to obtain a first coordinate adjustment parameter; the second predicted speed and the time interval for reporting points are multiplied to obtain a second coordinate adjustment parameter. According to the first coordinate adjustment parameter, the first current coordinate value is adjusted to obtain a first predicted coordinate; according to the second coordinate adjustment parameter, the second current coordinate value is adjusted to obtain a second predicted coordinate. According to the first predicted coordinate and the second predicted coordinate, the predicted coordinate of the stylus can be determined.

本实施例通过将第一初始速度和第二初始速度,分别与报点时间间隔计算,得到手写笔的第一加速度和第二加速度;之后,根据第一加速度、第二加速度、第一初始速度、第二初始速度和报点时间间隔,对当前坐标点进行调整,得到手写笔的预测坐标,实现了对手写笔加速度的精确计算,使得通过该加速度和初始速度能够对手写笔的坐标进行快速而精确地预测。In this embodiment, the handwriting speed is obtained by calculating the first initial speed and the second initial speed with the time interval of the reporting point. The first acceleration and the second acceleration of the pen; then, according to the first acceleration, the second acceleration, the first initial velocity, the second initial velocity and the reporting time interval, the current coordinate point is adjusted to obtain the predicted coordinates of the stylus, thereby realizing the accurate calculation of the acceleration of the stylus, so that the coordinates of the stylus can be quickly and accurately predicted through the acceleration and the initial velocity.

在本申请一些实施例中,上述将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度,包括:In some embodiments of the present application, 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:

获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度;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.

在本实施例中,第一历史速度为最近一次报点时刻手写笔在第一预设坐标轴方向上的速度,第二历史速度为最近一次报点时刻手写笔在第二预设坐标轴方向上的速度。手写笔在每一次上报坐标点时,均会对当前报点时刻的速度进行计算并存储,因此,在获取手写笔在第一预设坐标轴方向上的第一历史速度,以及手写笔在第二预设坐标轴方向上的第二历史速度时,可直接根据手写笔存储的最近一次报点时刻对应的手写笔速度得到。在得到第一历史速度和第二历史速度时,计算该第一初始速度和第一历史速度的差值;将该第一初始速度和第一历史速度的差值与报点时间间隔作比值计算,得到手写笔在第一预设坐标轴方向上的第一原始加速度。计算该第二初始速度和第二历史速度的差值;将该第二初始速度和第二历史速度的差值与报点时间间隔作比值计算,得到手写笔在第二预设坐标轴方向上的第二原始加速度。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 reporting point, 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 reporting point. Each time the stylus reports a coordinate point, the speed at the current reporting point will be calculated and stored. 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 according to the stylus speed corresponding to the most recent reporting point stored by the stylus. When obtaining the first historical speed and the second historical speed, the difference between the first initial speed and the first historical speed is calculated; the difference between the first initial speed and the first historical speed is calculated by ratio with the reporting time interval 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; the difference between the second initial speed and the second historical speed is calculated by ratio with the reporting time interval to obtain the second original acceleration of the stylus in the direction of the 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 stylus, respectively. When the first original acceleration and the second original acceleration are obtained, the first original acceleration and the second original acceleration can be filtered to obtain the final first acceleration and the second acceleration to eliminate errors. Specifically, the first historical acceleration in the direction of the first preset coordinate axis and the second historical acceleration in the direction of the second preset coordinate axis are obtained; the first historical acceleration and the first original acceleration are averaged to obtain the first original acceleration after filtering, that is, the first acceleration; the second historical acceleration and the second original acceleration are averaged to obtain the second original acceleration after filtering, that is, the second acceleration.

本实施例通过第一历史速度、第一初始速度和报点时间间隔计算得到第一原始加速度,根据第二历史速度、第二初始速度和报点时间间隔计算得到第二原始加速度,之后对第一原始加速度和第二原始加速度进行滤波计算,得到第一加速度和第二加速度,实现了对第一加速度和第二加速度的精确计算,进一步提高了手写笔坐标预测的准确率和预测速度。This embodiment calculates the first original acceleration through the first historical speed, the first initial speed and the time interval of reporting points, and calculates the second original acceleration according to the second historical speed, the second initial speed and the time interval of reporting points. Then, the first original acceleration and the second original acceleration are filtered and calculated to obtain the first acceleration and the second acceleration, thereby achieving accurate calculation of the first acceleration and the second acceleration, and further improving the accuracy and prediction speed of the stylus coordinate prediction.

在本申请一些实施例中,上述获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度,包括: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:

采集与所述第一历史坐标点关联的第二历史坐标点;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.

在本实施例中,第二历史坐标点为与第一历史坐标点关联的坐标点,该第二历史坐标点对应的报点时刻为该第一历史坐标点对应的报点时刻的上一时刻,即第二历史坐标点和第一历史坐标点的报点时刻为相邻的两次报点时刻。采集与第一历史坐标点关联的第二历史坐标点,根据该第一历史坐标点、第二历史坐标点和报点时间间隔,确定手写笔在第一预设坐标轴方向上的第一历史速度,以及在第二预设坐标轴方向上的第二历史速度。具体地,计算第一历史坐标点和第二历史坐标点在第一预设坐标轴方向上的第一坐标差值,以及该第一历史坐标点和第二历史坐标点在第二预设坐标轴方向上的第二坐标差值;将该第一坐标差值和报点时间间隔作比值计算,得到第一历史速度,将该第二坐标差值和报点时间间隔作比值计算,得到第二历史速度。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 second historical coordinate point and The reporting time of the first historical coordinate point is two adjacent reporting times. The second historical coordinate point associated with the first historical coordinate point is collected, and 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 according to the first historical coordinate point, the second historical coordinate point and the reporting time interval. 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 as a ratio to the reporting time interval to obtain the first historical speed, and the second coordinate difference is calculated as a ratio to the reporting time interval to obtain the second historical speed.

本实施例通过采集与第一历史坐标点关联的第二历史坐标点,根据该第一历史坐标点、第二历史坐标点和报点时间间隔,确定手写笔在第一预设坐标轴方向上的第一历史速度,以及在第二预设坐标轴方向上的第二历史速度,实现了对历史速度的精确获取,使得通过该历史速度能够对手写笔的速度进行精确预测,进一步提高了手写笔坐标预测的准确率。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 according to the first historical coordinate point, the second historical coordinate point and the reporting time interval, thereby achieving accurate acquisition of the historical speed, so that the speed of the stylus can be accurately predicted through the historical speed, further improving the accuracy of the stylus coordinate prediction.

在本申请一些实施例中,上述对所述第一原始加速度和所述第二原始加速度分别进行滤波处理,得到所述第一加速度和所述第二加速度,包括: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:

获取所述手写笔在所述当前坐标点对应的当前帧值,以及所述手写笔预设的帧采集范围;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.

在本实施例中,手写笔的报点时刻与手写笔的帧值相适应,手写笔相邻的两次报点时刻对应手写笔上相邻的两帧,手写笔的一帧在显示屏幕上即显示为一个坐标点。在对第一原始加速度和第二原始加速度进行滤波处理时,获取手写笔在当前坐标点对应的当前帧值,以及该手写笔对应的预设的帧采集范围。其中,当前帧值为当前坐标点对应的手写笔的帧值,预设的帧采集范围为预先设定的帧的采集范围,在该帧采集范围内对不同帧值对应的坐标点进行采集。In this embodiment, the point reporting time of the stylus is adapted to the frame value of the stylus, and two adjacent point reporting times of the stylus correspond to two adjacent frames on the stylus, and one frame of the stylus is displayed as a coordinate point on the display screen. When filtering the first original acceleration and the second original acceleration, the current frame value corresponding to the current coordinate point of the stylus and the preset frame acquisition range corresponding to the stylus are obtained. Among them, the current frame value is the frame value of the stylus corresponding to the current coordinate point, and the preset frame acquisition range is a pre-set frame acquisition range, and the coordinate points corresponding to different frame values are collected within the frame acquisition range.

在得到当前帧值和帧采集范围时,从当前帧值开始向前获取该帧采集范围的所有的第一历史加速度和所有的第二历史加速度,其中,第一历史加速度为第一预设坐标轴方向上的历史加速度,第二历史加速度为第二预设坐标轴方向上的历史加速度。例如,当前帧值为手写笔的第五帧,帧采集范围为2,则从第五帧开始向前获取2帧的第一历史加速度和第二历史加速度,即得到第4帧的第一历史加速度和第二历史加速度,以及第3帧的第一历史加速度和第二历史加速度。根据得到所有第一历史加速度对第一原始加速度进行滤波处理,即计算所有第一历史加速度和第一原始加速度的均值,得到第一加速度;根据得到所有第二历史加速度对第二原始加速度进行滤波处理,即计算所有第二历史加速度和第二原始加速度的均值,得到第二加速度。When the current frame value and the frame acquisition range are obtained, all the first historical accelerations and all the second historical accelerations in the frame acquisition range are obtained from the current frame value, wherein 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 of 2 frames are obtained from the fifth frame, that is, the first historical acceleration and the second historical acceleration of the fourth frame, and the first historical acceleration and the second historical acceleration of the third frame are obtained. According to all the first historical accelerations, the first original acceleration is filtered, that is, the average of all the first historical accelerations and the first original acceleration is calculated to obtain the first acceleration; according to all the second historical accelerations, the second original acceleration is filtered, that is, the average of all the second historical accelerations and the second original acceleration is calculated to obtain the second acceleration.

本实施例通过采集所有第一历史加速度对第一原始加速度进行滤波处理,采集所有第二历史加速度对第二原始加速度进行滤波处理,减少了手写笔坐标的预测误差,提高了手写笔坐标预测的准确率。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.

在本申请一些实施例中,上述预测坐标有多个,所述根据所述第一加速度、所述第二加速度、所述第一初始速度、所述第二初始速度和所述报点时间间隔,对所述当前坐标点进行调整,得到所述手写笔的预测坐标,包括: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:

获取各所述预测坐标的目标预测时间顺序,根据所述目标预测时间顺序确定各所述预测坐标的预测序号;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.

在本实施例中,可对多个预测坐标进行预测,得到手写笔在显示屏幕上的预测笔迹。具体地,获取各预测坐标的目标预测时间顺序,其中,目标预测时间顺序为各预测坐标在显示屏幕上预测显示的时间顺序,根据该目标预测时间顺序确定各预测坐标的预测序号。例如,在当前坐标点之后显示的预测坐标,其对应的预测序号即为1;在该序号1之后显示的预测坐标,其对应的预测序号即为2,依次类推。In this embodiment, multiple predicted coordinates can be predicted to obtain the predicted handwriting of the stylus on the display screen. Specifically, the target prediction time sequence of each predicted coordinate is obtained, wherein the target prediction time sequence is the time sequence in which each predicted coordinate is predicted to be displayed on the display screen, and the prediction sequence number of each predicted coordinate is determined according to the target prediction time sequence. For example, the predicted coordinate displayed after the current coordinate point has a corresponding prediction sequence number of 1; the predicted coordinate displayed after the sequence number 1 has a corresponding prediction sequence number of 2, and so on.

在得到预测序号时,则根据预测序号、第一加速度、第一初始速度和报点时间间隔,对当前坐标点在所述第一预设坐标轴方向上的坐标值进行调整,得到各预测坐标在所述第一预设坐标轴方向上的第一预测值。具体地,将该预测序号与第一加速度进行相乘,得第一参数值;将该第一参数值与报点时间间隔相乘,得到第二参数值,而后,将该第二参数值与第一初始速度进行相加,得到第一预测速度;将该第一预测速度与报点时间间隔进行相乘,即得到第一坐标调整参数,之后,将该第一坐标调整参数与当前坐标点在所述第一预设坐标轴方向上的坐标值进行相加,得到第一预测值。同理,根据预测序号、第二加速度、第二初始速度和报点时间间隔,对当前坐标点在所述第二预设坐标轴方向上的坐标值进行调整,得到各预测坐标在所述第二预设坐标轴方向上的第二预测值。根据该第一预测值和第二预测值,即可确定各预测坐标的坐标值,该多个预测坐标即构成手写笔在显示屏幕上的预测笔迹。图3是本申请实施例提供的手写笔的预测笔迹的示意图。其中,横坐标和纵坐标为分别为第一预设坐标方向和第二预设坐标方向上的坐标值。When the prediction 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 prediction sequence number, the first acceleration, the first initial speed and the time interval for reporting points, so as to obtain the first prediction value of each predicted coordinate in the direction of the first preset coordinate axis. Specifically, the prediction sequence number is multiplied by the first acceleration to obtain the first parameter value; the first parameter value is multiplied by the time interval for reporting points to obtain the second parameter value, and then the second parameter value is added to the first initial speed to obtain the first prediction speed; the first prediction speed is multiplied by the time interval for reporting points to obtain the first coordinate adjustment parameter, and then the first coordinate adjustment parameter is added to the coordinate value of the current coordinate point in the direction of the first preset coordinate axis to obtain the first prediction value. Similarly, according to the prediction sequence number, the second acceleration, the second initial speed and the time interval for reporting points, the coordinate value of the current coordinate point in the direction of the second preset coordinate axis is adjusted to obtain the second prediction value of each predicted coordinate in the direction of the second preset coordinate axis. According to the first prediction value and the second prediction value, the coordinate value of each predicted coordinate can be determined, and the multiple predicted coordinates constitute the predicted handwriting of the stylus on the display screen. Fig. 3 is a schematic diagram of predicted handwriting of a stylus provided in 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.

本实施例通过预测序号、第一加速度、第一初始速度和报点时间间隔,确定第一预测值,根据预测序号、第二加速度、第二初始速度和报点时间间隔,确定第二预测值,实现了对多个预测坐标的精确和轻量级预测,进一步提高了手写笔迹的预测准确率,并降低了手写笔迹的预测复杂度,减少了预测时长,提高了预测效率。This embodiment determines the first prediction value by predicting the sequence number, the first acceleration, the first initial speed and the time interval between reporting points, and determines the second prediction value according to the prediction sequence number, the second acceleration, the second initial speed 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.

在本申请一些实施例中,上述确定所述手写笔在显示屏幕上对应的当前坐标点,包括:In some embodiments of the present application, the above-mentioned determining 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.

在本实施例中,目标坐标系为预先设定的坐标系,显示屏幕与该目标坐标系存在映射关系。获取手写笔在显示屏幕上的屏幕点,以及显示屏幕和目标坐标系的映射比值,通过映射比值可以将显示屏幕中的屏幕点映射至目标坐标系。其中,该映射比值为屏幕像素与坐标值之间预先设定的比值,如1:10,即表示1个屏幕像素对应10个坐标值。根据该映射比值可以确定当前的屏幕点在目标坐标系中的坐标值。具体地,确定该目标坐标系中的原点坐标,以及该原点坐标对应显示屏幕中的原像素点;计算当前的屏幕点与该原像素点在第一预设坐标轴方向上的第一像素距离,以及当前屏幕点与该原像素点在第二预设坐标轴方向上的第二像素距离。之后,根据该映射比值分别与该第一像素距离和第二像素距离进行计算,得到该屏幕点在目标坐标系中的第一坐标值和第二坐标值。根据该第一坐标值和第二坐标值,即确定手写笔在显示屏幕上对应的当前坐标点。In this embodiment, the target coordinate system is a pre-set coordinate system, and there is a mapping relationship between the display screen and the target coordinate system. The screen point of the stylus on the display screen, as well as the mapping ratio between the display screen and the target coordinate system are obtained. The screen point in the display screen can be mapped to the target coordinate system through the mapping ratio. Among them, the mapping ratio is a pre-set ratio between screen pixels and coordinate values, such as 1:10, which means that 1 screen pixel corresponds to 10 coordinate values. According to the mapping ratio, the coordinate value of the current screen point in the target coordinate system can be determined. Specifically, determine the origin coordinates in the target coordinate system, and the original pixel point in the display screen corresponding to the origin coordinates; calculate the first pixel distance between the current screen point and the original pixel point in the direction of the first preset coordinate axis, and the second pixel distance between the current screen point and the original pixel point in the direction of the second preset coordinate axis. Afterwards, the first pixel distance and the second pixel distance are respectively mapped according to the mapping ratio. Calculation is performed to obtain a first coordinate value and a second coordinate value of the screen point in the target coordinate system. According to the first coordinate value and the second coordinate value, the current coordinate point corresponding to the stylus on the display screen is determined.

本实施例通过获取显示屏幕和目标坐标系的映射比值,根据映射比值将屏幕点映射至目标坐标系,得到第一坐标值和第二坐标值,由此确定手写笔在显示屏幕上对应的当前坐标点,实现了对当前手写笔坐标的精确获取。This embodiment obtains the mapping ratio of 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, thereby achieving accurate acquisition of the current stylus coordinates.

为便于更好的实施本申请实施例提供的手写笔坐标预测方法,本申请实施例还提供一种基于上述手写笔坐标预测方法的装置。其中名词的含义与上述手写笔坐标预测方法中相同,具体实现细节可以参考方法实施例中的说明。In order to better implement the stylus coordinate prediction method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above stylus coordinate prediction method. The meanings of the terms are the same as those in the above stylus coordinate prediction method, and the specific implementation details can refer to the description in the method embodiment.

例如,如图4所示,该手写笔坐标预测装置可以包括:获取模块301、确认模块302和预测模块303。其中,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.

获取模块301,用于获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;An acquisition module 301 is 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;

确认模块302,用于根据所述当前坐标点、所述第一历史坐标点和所述手写笔预设的报点时间间隔,确定所述手写笔在第一预设坐标轴方向上的第一初始速度,以及在第二预设坐标轴方向上的第二初始速度;A confirmation module 302 is used to determine 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;

预测模块303,用于根据所述第一初始速度、所述第二初始速度和所述报点时间间隔计算,预测所述手写笔的预测坐标。The prediction module 303 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.

在本申请一实施例中,上述预测模块303包括:In one embodiment of the present application, the prediction module 303 includes:

第一确认子单元,用于将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度;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.

在本申请一实施例中,上述第一确认子单元包括:In one embodiment of the present application, the first confirmation subunit includes:

第一获取单元,用于获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度;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.

在本申请一实施例中,上述第一获取单元包括:In an embodiment of the present application, the first acquisition 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.

在本申请一实施例中,上述滤波单元包括:In one embodiment of the present application, the filtering unit includes:

第二获取单元,用于获取所述手写笔在所述当前坐标点对应的当前帧值,以及所述手写笔预设的帧采集范围;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, configured to filter the first original acceleration according to all the first historical accelerations. The first acceleration is obtained by filtering the second original acceleration according to all the second historical accelerations to obtain the second acceleration.

在本申请一实施例中,上述第二确认子单元包括:In one embodiment of the present application, the second confirmation subunit includes:

第三获取单元,用于获取各所述预测坐标的目标预测时间顺序,根据所述目标预测时间顺序确定各所述预测坐标的预测序号;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.

在本申请一实施例中,上述获取模块301,还包括:In an embodiment of the present application, the acquisition module 301 further includes:

第四获取单元,用于获取当前所述手写笔在所述显示屏幕上的屏幕点,以及所述显示屏幕和目标坐标系的映射比值;a fourth acquisition unit, configured to acquire a screen point of the stylus currently on the display screen, and a mapping ratio between the display screen and a target coordinate system;

映射单元,用于通过所述映射比值将所述屏幕点映射至所述目标坐标系中,得到所述屏幕点在所述目标坐标系中的第一坐标值和第二坐标值;a mapping unit, configured to map 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 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.

本申请提出的手写笔坐标预测装置,实现了对手写坐标的轻量级轨迹预测,提高了手写笔坐标预测的效率,降低了预测延迟以及对系统端负载的要求,能够直接应用于手写器件端的控制芯片中,无需其他优化处理,即可实现对手写坐标的精确和高效预测。The handwriting pen coordinate prediction device proposed in the present application realizes lightweight trajectory prediction of handwriting coordinates, improves the efficiency of handwriting pen 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 realize accurate and efficient prediction of handwriting coordinates without other optimization processing.

具体实施时,以上各个模块可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个模块的具体实施方式以及对应的有益效果可参见前面的方法实施例,在此不再赘述。In specific implementation, the above modules can be implemented as independent entities, or 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, which will not be repeated here.

本申请实施例还提供一种电子设备,该电子设备可以是服务器或终端等,如图5所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:The embodiment of the present application further 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:

该电子设备可以包括一个或者一个以上处理核心的处理器601、一个或一个以上计算机可读存储介质的存储器602、电源603和输入单元604等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中: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 in the figure, or combine certain components, or arrange the components differently. Among them:

处理器601是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器602内的计算机程序和/或模块,以及调用存储在存储器602内的数据,执行电子设备的各种功能和处理数据。可选的,处理器601可包括一个或多个处理核心;优选的,处理器601可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器601中。The processor 601 is the control center of the electronic device, which uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing computer programs and/or modules stored in the memory 602, and calling 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 mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 601.

存储器602可用于存储计算机程序以及模块,处理器601通过运行存储在存储器602的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器602可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器602还可以包括存储器控制器,以提供处理器601对存储器602的访问。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 can mainly include a program storage area and a data storage area. The program storage area can 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 can 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 The memory, for example, at least one 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 the processor 601 with access to the memory 602 .

电子设备还包括给各个部件供电的电源603,优选的,电源603可以通过电源管理系统与处理器601逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源603还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 603 for supplying power to each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 603 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

该电子设备还可包括输入单元604,该输入单元604可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。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.

尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器601会按照如下的指令,将一个或一个以上的计算机程序的进程对应的可执行文件加载到存储器602中,并由处理器601来运行存储在存储器602中的计算机程序,从而实现各种功能,比如:Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. 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, thereby realizing various functions, such as:

获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.

本申请提出的电子设备,实现了对手写坐标的轻量级轨迹预测,提高了手写笔坐标预测的效率,降低了预测延迟以及对系统端负载的要求,使其能够直接应用于手写器件端的控制芯片中,无需其他优化处理,即可实现对手写坐标的精确和高效预测。The electronic device proposed in the present 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 realize accurate and efficient prediction of handwritten coordinates without other optimization processing.

以上各个操作的具体实施方式以及对应的有益效果可参见上文对手写笔坐标预测方法的详细描述,在此不作赘述。The specific implementation methods and corresponding beneficial effects of the above operations can be found in the detailed description of the stylus coordinate prediction method above, which will not be elaborated here.

本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过计算机程序来完成,或通过计算机程序控制相关的硬件来完成,该计算机程序可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed 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.

为此,本申请实施例提供一种计算机可读存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种手写笔坐标预测方法中的步骤。例如,该计算机程序可以执行如下步骤:To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any one of the stylus coordinate prediction methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.

本申请提出的计算机可读存储介质,实现了对手写坐标的轻量级轨迹预测,提高了手写笔坐标预测的效率,降低了预测延迟以及对系统端负载的要求,使其能够直接应用于手写器件端的控制芯片中,无需其他优化处理,即可实现对手写坐标的精确和高效预测。The computer-readable storage medium 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.

以上各个操作的具体实施方式以及对应的有益效果可参见前面的实施例,在此不再赘述。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.

其中,该计算机可读存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Among them, the computer readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or CD, etc.

由于该计算机可读存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种手写笔坐标预测方法中的步骤,因此,可以实现本申请实施例所提供的任一种手写笔坐标预测方法所能实现的有益效果,详见前面的实施例,在此不再赘述。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.

其中,根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述手写笔坐标预测方法。According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned stylus coordinate prediction method.

以上对本申请实施例所提供的一种手写笔坐标预测方法、装置、电子设备及计算机存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The above is a detailed introduction to a handwriting pen coordinate prediction method, device, electronic device and computer storage medium provided in the embodiments of the present application. Specific examples are used in this article 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 technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims (20)

Translated fromChinese
一种手写笔坐标预测方法,其中,包括:A handwriting pen coordinate prediction method, comprising:获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.根据权利要求1所述的手写笔坐标预测方法,其中,所述根据所述第一初始速度、所述第二初始速度和所述报点时间间隔计算,预测所述手写笔的预测坐标,包括:The handwriting pen coordinate prediction method according to claim 1, wherein the step of calculating the predicted coordinates of the handwriting pen according to the first initial velocity, the second initial velocity and the time interval of reporting points 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.根据权利要求2所述的手写笔坐标预测方法,其中,所述将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度,包括:The handwriting pen coordinate prediction method according to claim 2, wherein the first initial velocity and the second initial velocity are calculated with the reporting time interval respectively to obtain the first acceleration and the second acceleration of the handwriting pen, comprising:获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度;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.根据权利要求3所述的手写笔坐标预测方法,其中,所述获取所述手写笔在所述第一预设坐标轴方向上的第一历史速度,以及在所述第二预设坐标轴方向上的第二历史速度,包括:The handwriting pen coordinate prediction method according to claim 3, wherein the 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 comprises:采集与所述第一历史坐标点关联的第二历史坐标点;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.根据权利要求3所述的手写笔坐标预测方法,其中,所述对所述第一原始加速度和所述第二原始加速度分别进行滤波处理,得到所述第一加速度和所述第二加速度,包括:The handwriting pen coordinate prediction method according to claim 3, wherein 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, comprising:获取所述手写笔在所述当前坐标点对应的当前帧值,以及所述手写笔预设的帧采集范围;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.根据权利要求2所述的手写笔坐标预测方法,其中,所述预测坐标有多个,所述根据所述第一加速度、所述第二加速度、所述第一初始速度、所述第二初始速度和所述报点时间间隔,对所述当前坐标点进行调整,得到所述手写笔的预测坐标,包括:The handwriting pen coordinate prediction method according to claim 2, wherein the predicted coordinates are multiple, and the first acceleration, the second acceleration, the first initial velocity, the second initial velocity and the reported point are used to predict the handwriting pen coordinates. The method further comprises: adjusting the current coordinate point at a time interval to obtain the predicted coordinates of the stylus pen, including:获取各所述预测坐标的目标预测时间顺序,根据所述目标预测时间顺序确定各所述预测坐标的预测序号;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.根据权利要求1所述的手写笔坐标预测方法,其中,所述确定所述手写笔在显示屏幕上对应的当前坐标点,包括:The handwriting pen coordinate prediction method according to claim 1, wherein the step of determining the current coordinate point corresponding to the handwriting pen on the display screen comprises:获取当前所述手写笔在所述显示屏幕上的屏幕点,以及所述显示屏幕和目标坐标系的映射比值;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.根据权利要求1所述的手写笔坐标预测方法,其中,所述与所述当前坐标点关联的第一历史坐标点包括当前报点时刻对应的最近一次报点时刻的手写笔的坐标点。The handwriting pen coordinate prediction method according to claim 1, wherein the first historical coordinate point associated with the current coordinate point comprises the coordinate point of the handwriting pen at the most recent reporting time corresponding to the current reporting time.根据权利要求1所述的手写笔坐标预测方法,其中,所述报点时间间隔为对坐标点采集速率进行时间单位的计算得到的。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.根据权利要求1所述的手写笔坐标预测方法,其中,所述根据所述当前坐标点、所述第一历史坐标点和所述手写笔预设的报点时间间隔,确定所述手写笔在第一预设坐标轴方向上的第一初始速度,以及在第二预设坐标轴方向上的第二初始速度,包括:The handwriting pen coordinate prediction method according to claim 1, wherein the step of determining a first initial velocity of the handwriting pen in a first preset coordinate axis direction and a second initial velocity 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 time interval of the handwriting pen comprises:获取所述当前坐标点和所述第一历史坐标点在第一预设坐标轴方向分别对应的坐标值,得到第一当前坐标值和第一历史坐标值;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.根据权利要求2所述的手写笔坐标预测方法,其中,所述将所述第一初始速度和所述第二初始速度,分别与所述报点时间间隔计算,得到所述手写笔的第一加速度和第二加速度,包括:The handwriting pen coordinate prediction method according to claim 2, wherein the first initial velocity and the second initial velocity are calculated with the reporting time interval respectively to obtain the first acceleration and the second acceleration of the handwriting pen, comprising:计算所述第一初始速度与所述第一历史速度的差值;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.根据权利要求11所述的手写笔坐标预测方法,其中,所述根据所述第一加速度、所述第二加速度、所述第一初始速度、所述第二初始速度和所述报点时间间隔,对所述当前坐标点进行调整,得到所述手写笔的预测坐标,包括:The handwriting pen coordinate prediction method according to claim 11, wherein 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 to obtain the predicted coordinates of the handwriting pen comprises:根据手写笔速度预测模型,将所述第一加速度和所述报点时间间隔作乘积计算,得到第一速度调整参数,以及,将所述第二加速度和所述报点时间间隔作乘积运算,得到第二速度调整参数;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.一种手写笔坐标预测装置,其中,包括:A handwriting pen coordinate prediction device, comprising:获取模块,用于获取手写笔在显示屏幕上对应的当前坐标点,以及与所述当前坐标点关联的第一历史坐标点;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.根据权利要求13所述的手写笔坐标预测装置,其中,所述预测模块包括: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.根据权利要求14所述的手写笔坐标预测装置,其中,所述第一确认子单元包括: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.根据权利要求15所述的手写笔坐标预测装置,其中,所述第一获取单元包括:The handwriting pen coordinate prediction device according to claim 15, wherein the first acquisition unit comprises:采集单元,用于采集与所述第一历史坐标点关联的第二历史坐标点;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.根据权利要求15所述的手写笔坐标预测装置,其中,所述滤波单元包括: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.根据权利要求14所述的手写笔坐标预测装置,其中,所述第二确认子单元包括: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.一种电子设备,其中,包括处理器和存储器,所述存储器存储有计算机程序,所述处理器用于运行所述存储器内的计算机程序,以执行权利要求1至12任一项所述的手写笔坐标预测方法。An electronic device, comprising 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.一种计算机可读存储介质,其中,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行权利要求1至12任一项所述的手写笔坐标预测方法。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.
PCT/CN2024/1108212023-09-262024-08-08Stylus coordinate prediction method and apparatus, and electronic device and computer storage mediumPendingWO2025066575A1 (en)

Applications Claiming Priority (2)

Application NumberPriority DateFiling DateTitle
CN202311253969.5ACN117406904A (en)2023-09-262023-09-26Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium
CN202311253969.52023-09-26

Publications (1)

Publication NumberPublication Date
WO2025066575A1true WO2025066575A1 (en)2025-04-03

Family

ID=89491682

Family Applications (1)

Application NumberTitlePriority DateFiling Date
PCT/CN2024/110821PendingWO2025066575A1 (en)2023-09-262024-08-08Stylus coordinate prediction method and apparatus, and electronic device and computer storage medium

Country Status (2)

CountryLink
CN (1)CN117406904A (en)
WO (1)WO2025066575A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117406904A (en)*2023-09-262024-01-16惠州Tcl移动通信有限公司Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2000268130A (en)*1999-03-182000-09-29Sanyo Electric Co LtdCharacter locus detection method and device and storage medium
US20150355778A1 (en)*2013-02-192015-12-10Lg Electronics Inc.Mobile terminal and touch coordinate predicting method thereof
CN112835455A (en)*2019-11-222021-05-25华为技术有限公司 A method and device for predicting points drawn by a stylus
WO2021190314A1 (en)*2020-03-252021-09-30华为技术有限公司Sliding response control method and apparatus of touch screen, and electronic device
US20230051541A1 (en)*2021-07-292023-02-16Samsung Electronics Co., Ltd.Electronic device and method for input coordinate prediction
CN116560555A (en)*2022-01-272023-08-08荣耀终端有限公司 Handwriting input display method, electronic device and storage medium
CN117406904A (en)*2023-09-262024-01-16惠州Tcl移动通信有限公司Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2000268130A (en)*1999-03-182000-09-29Sanyo Electric Co LtdCharacter locus detection method and device and storage medium
US20150355778A1 (en)*2013-02-192015-12-10Lg Electronics Inc.Mobile terminal and touch coordinate predicting method thereof
CN112835455A (en)*2019-11-222021-05-25华为技术有限公司 A method and device for predicting points drawn by a stylus
WO2021190314A1 (en)*2020-03-252021-09-30华为技术有限公司Sliding response control method and apparatus of touch screen, and electronic device
US20230051541A1 (en)*2021-07-292023-02-16Samsung Electronics Co., Ltd.Electronic device and method for input coordinate prediction
CN116560555A (en)*2022-01-272023-08-08荣耀终端有限公司 Handwriting input display method, electronic device and storage medium
CN117406904A (en)*2023-09-262024-01-16惠州Tcl移动通信有限公司Handwriting pen coordinate prediction method and device, electronic equipment and computer storage medium

Also Published As

Publication numberPublication date
CN117406904A (en)2024-01-16

Similar Documents

PublicationPublication DateTitle
US10732853B2 (en)Dynamic memory management techniques
CN103403665B (en) A method for terminal equipment to obtain instructions and terminal equipment
CN112329740A (en)Image processing method, image processing apparatus, storage medium, and electronic device
CN110909034B (en)Service data distribution method and device, terminal equipment and storage medium
WO2025066575A1 (en)Stylus coordinate prediction method and apparatus, and electronic device and computer storage medium
US20160117046A1 (en)Data Reporting Method and Apparatus, and Terminal Device
CN106534281A (en) A data request response method, device and system
CN108549581A (en)A kind of layer-stepping real-time drawing rendering intent and system
CN111797079A (en) Data processing method, device, storage medium and electronic device
CN106775461A (en)Hot spot data determines method, equipment and device
WO2021164164A1 (en)Storage service quality control method, apparatus and device, and storage medium
WO2023213037A1 (en)Hair virtual model rendering method and apparatus, computer device, and storage medium
WO2024094118A1 (en)Point cloud data processing method and apparatus, electronic device, and storage medium
CN107920129A (en)A kind of method, apparatus, equipment and the cloud storage system of data storage
CN112631517A (en)Data storage method and device, electronic equipment and storage medium
CN114844911B (en)Data storage method, device, electronic equipment and computer readable storage medium
WO2021092806A1 (en)Screen parameter adjustment method and apparatus, and terminal device
CN118427220A (en)Data processing method and device, electronic equipment and storage medium
CN119201444B (en)Computing resource allocation method and system
CN114860448A (en)Calculation force distribution method and calculation force distribution device
CN113901312A (en)Interest point aggregation method and device
CN112783860A (en)Method and device for constructing mirror database, storage medium and computer equipment
CN109669528B (en)Terminal processing component control method and device, computer equipment and storage medium
CN117938950A (en) A learning content push system based on mobile phone startup screen
CN111738539A (en) A picking task assignment method, device, equipment and medium

Legal Events

DateCodeTitleDescription
121Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number:24870123

Country of ref document:EP

Kind code of ref document:A1


[8]ページ先頭

©2009-2025 Movatter.jp