WO2019222998A1 - 一种数据处理方法、手写笔及存储介质 - Google Patents

一种数据处理方法、手写笔及存储介质 Download PDF

Info

Publication number
WO2019222998A1
WO2019222998A1 PCT/CN2018/088454 CN2018088454W WO2019222998A1 WO 2019222998 A1 WO2019222998 A1 WO 2019222998A1 CN 2018088454 W CN2018088454 W CN 2018088454W WO 2019222998 A1 WO2019222998 A1 WO 2019222998A1
Authority
WO
WIPO (PCT)
Prior art keywords
stylus
writing
state
length
contact
Prior art date
Application number
PCT/CN2018/088454
Other languages
English (en)
French (fr)
Inventor
周政霖
Original Assignee
深圳市柔宇科技有限公司
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 深圳市柔宇科技有限公司 filed Critical 深圳市柔宇科技有限公司
Priority to PCT/CN2018/088454 priority Critical patent/WO2019222998A1/zh
Priority to CN201880093895.4A priority patent/CN112513868A/zh
Publication of WO2019222998A1 publication Critical patent/WO2019222998A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition

Definitions

  • the present invention relates to the technical field of data processing, and in particular, to a data processing method, a stylus, and a storage medium.
  • Embodiments of the present invention provide a data processing method, a stylus pen, and a storage medium, which can timely update the remaining ink information of the stylus pen.
  • a first aspect of the embodiments of the present invention provides a data processing method, which is applied to a writing system composed of a stylus pen and a writing board, and the method includes:
  • a second aspect of the embodiments of the present invention provides a stylus pen, which is applied to a writing system composed of a stylus pen and a writing board.
  • the stylus pen includes a processor, and the processor is configured to:
  • a third aspect of the embodiments of the present invention provides a storage medium.
  • the storage medium stores data processing instructions.
  • the computer is caused to execute the data processing method according to the first aspect. .
  • the remaining ink information of the stylus pen is first obtained, and then the process from when the stylus pen is used to start writing on the tablet to when the pen is lifted to stop writing is obtained.
  • FIG. 1 is a schematic architecture diagram of a writing system according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a data processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a data processing method according to another embodiment of the present invention.
  • FIG. 4 is a block diagram of a stylus pen according to an embodiment of the present invention.
  • FIG. 1 is a schematic structural diagram of a writing system according to an embodiment of the present invention.
  • the writing system includes: a writing pad 101 and a stylus pen 102, and a communication connection is established between the writing pad 101 and the stylus pen 102.
  • a Bluetooth (Bluetooth) connection may be established between the tablet 101 and the stylus 102, or a Bluetooth Low Energy (BLE) connection may be established.
  • BLE Bluetooth Low Energy
  • a communication connection may also be established between the tablet 101 and the stylus pen 102 through other communication methods, which is not limited in the embodiment of the present invention.
  • the data processing method provided by the embodiment of the present invention is applied to the writing system shown in FIG. 1 and can update the remaining ink information of the stylus in time, which will be described in detail below respectively.
  • FIG. 2 is a schematic flowchart of a data processing method according to a first embodiment of the present invention.
  • the data processing method is applied to the writing system shown in FIG. 1 and includes the following steps:
  • the stylus when the stylus is in a dormant state or in a shutdown state, the stylus may detect the pressure exerted by an external object (such as a tablet) on the stylus is greater than a preset pressure threshold, and the stylus is switched from the dormant state or The shutdown state is switched to the awake state. It can also be when the stylus detects that an external object (such as a user) triggers the power button of the stylus, for example, when it is detected that the external object presses the power button for a period longer than a first preset duration threshold (such as 1s), the stylus is switched from sleep to The state or shutdown state is switched to the awake state. Among them, the wake-up state is also the working state.
  • the power button of the stylus can be a physical power button or a virtual power button.
  • the tablet may send a wake-up instruction to the stylus, and when the stylus receives the wake-up instruction, the stylus is switched from the sleep state or the off state Is awake.
  • the first preset key may be a physical or virtual key; the first preset key may be a key provided on a tablet, or may be a stylus pen installed on the tablet to perform Buttons in controlled applications.
  • the remaining ink information of the stylus is the remaining ink amount of the refill of the stylus. Because after the stylus finishes writing on the tablet once, or after each refill is replaced, the remaining ink information of the stylus will change. Therefore, when the stylus is switched from the sleep state or the off state to the awake state, the stylus acquires the current remaining ink information to obtain the current remaining ink amount of the stylus.
  • the stylus is preset with a storage space for storing ink information and power information of the stylus. The stylus can obtain the remaining ink information and remaining power information of the stylus from the storage space.
  • the stylus acquires a writing trajectory from a time when the stylus is used to start writing on the writing board to a time when the stylus is raised to stop writing.
  • the stylus in the process of writing on the tablet with a stylus, acquires a writing trajectory from the time when the stylus is used to start writing on the tablet to the time when the pen is lifted to stop writing.
  • the writing track includes at least two touch points generated when writing on the tablet with a stylus.
  • the stylus pen acquires contact data of the at least two contacts, and the contact data includes data such as contact coordinates, contact size, and contact generation time.
  • the stylus After the stylus obtains the writing track, the length of the writing track is calculated.
  • the stylus first connects the at least two contacts with straight line segments, and then calculates the length of each straight line segment.
  • the two endpoints of a straight line segment are A and B, and the coordinates of endpoint A are (X (t-1), Y (t-1)), and the coordinates of endpoint B are (Xt, Yt), then the line segment
  • the length of AB can be calculated by using formula (1), and the form of formula (1) is as follows:
  • the sqrt function represents the square root; Li represents the length of the line segment A-B.
  • L represents the length of the writing track
  • Li represents the length of the line segment
  • n represents the number of line segments.
  • the writing track includes at least three touch points generated when writing on a tablet with a stylus.
  • the stylus pen first determines a contact between two contacts among the at least three contacts as a target contact, and the target contact is an arc formed by any one of the at least three contacts with an adjacent contact. Contacts greater than the radian threshold. In other words, the target contact is a contact between the at least three contacts, and an included angle of a line segment formed by being connected to two adjacent contacts is greater than a preset angle threshold.
  • the stylus then obtains the first contact and the second contact adjacent to the target contact from among the at least three contacts, and determines the target contact, the first contact, and the second contact Commonly defined Bezier curve. Finally, calculate the length of the Bezier curve. The length of the writing track is calculated according to the length of the Bezier curve.
  • the target contact is located between the first contact and the second contact, or the first contact is a contact whose writing time is earlier than the corresponding writing time of the target contact, and the second The contact is a contact whose writing time is later than the writing time corresponding to the target contact.
  • the first contact may be a contact adjacent to the target contact, and the second contact may be a contact adjacent to the target contact.
  • the first contact may also be a contact adjacent to the left of the target contact, and the second contact may also be a contact adjacent to the right of the target contact.
  • the first contact may be one or more contacts, and the second contact may also be one or more contacts.
  • the third contact is connected with the adjacent contact by a straight line segment and calculated The length of each line segment.
  • the length of the writing track is calculated according to the length of each line segment and the length of each Bezier curve.
  • the method of calculating the length of the Bezier curve is described below by way of example. Assume that contacts A, B, and C are the three contacts that pass in this writing track in sequence, that is, the writing time corresponding to contact A is t1, the writing time corresponding to contact B is t2, and the writing time corresponding to contact C is t3, and t1 ⁇ t2 ⁇ t3. If the angle between the line segment AB formed by the contacts A and B and the line segment BC formed by the contacts B and C is greater than a preset angle threshold, then the point B is the target contact, and the distance between the contacts A, B and C is determined. Need to use Bezier curve for radian optimization.
  • the stylus first obtains the midpoint A1 of the line segments A-B and the midpoint B1 of the line segments B-C. Then using point A1 as the starting point, contact B as the target contact, and point B1 as the end point, a second-order Bezier curve defined by point A1, contact B, and point B1 is determined.
  • the function of the second-order Bezier curve is shown in equation (3):
  • the value range of the parameter t in formula (3) is [0,1]. When t is equal to 0, it indicates that it is located at the starting point A1 of the second-order Bezier curve. When t is equal to 1, it indicates that it is located at the second-order. End point B1 of the Bezier curve. Assuming that t takes 0.1 as the progress, 11 points including the start point A1 and the end point B1 can be determined from the second-order Bezier curve. The coordinates of the 11 points can be calculated by using formulas (4) and (5). The forms of formulas (4) and (5) are as follows:
  • t is a parameter and the value is [0,1]; A1 [0], B [0], and B1 [0] are the abscissas of points A1, B, and B1, respectively; A1 [1], B [1 ] And B1 [1] are the ordinates of points A1, B, and B1, respectively; x is the abscissa, and y is the ordinate.
  • the horizontal and vertical coordinates of the second point among the 11 points are:
  • 10 line segments can be obtained. Then calculate the length of the 10 line segments according to the coordinates of the 11 points, and add up the lengths of the 10 line segments to obtain the length of the second-order Bezier curve, that is, obtain the points A1, B, and B1. The length of the curve. The length between the point A and the point A1 may be the length of the line segment A-A1.
  • the stylus can also directly calculate the curve length of the second-order Bezier curve according to a function of the second-order Bezier curve.
  • the stylus updates the remaining ink information according to a length of the writing track.
  • the stylus pen when the stylus pen is switched from the sleep state or the off state to the awake state, it is assumed that the remaining ink amount of the pen core at this time corresponds to the writing length S.
  • the stylus calculates the length of the writing track, it is assumed that the length of the writing track is L.
  • the stylus pen may determine the writing length M corresponding to the current remaining ink amount of the pen core as the latest remaining ink information of the stylus pen, and update the remaining ink information of the stylus pen according to the writing length M.
  • the percentage between M and N may also be determined as the latest remaining ink information of the stylus, and the remaining ink information of the stylus may be updated according to the percentage, where N is the total writing corresponding to the ink amount of the refill length.
  • the stylus pen updates the remaining ink information according to the length of the writing track, it sends the updated remaining ink information to the tablet.
  • the tablet receives the updated remaining ink information sent by the stylus, it updates the displayed remaining ink information of the stylus.
  • the tablet can display the remaining ink information of the stylus pen at its first preset position in real time, or can send the remaining ink information to an electronic device such as a mobile phone, a tablet computer, etc. through wireless communication and install it on the electronic device.
  • an electronic device such as a mobile phone, a tablet computer, etc.
  • real-time display of remaining ink information of the stylus pen is performed.
  • the remaining ink information can also be directly sent to the electronic device for display by a stylus.
  • the tablet can display the value corresponding to the remaining ink information, and can also display the remaining ink information of the stylus with the related icon image.
  • the remaining ink information of the stylus pen can be updated in time, so that the user can obtain the latest remaining ink information of the stylus pen in time, and the user can prepare a corresponding replacement pen in advance before the ink of the stylus pen runs out. core.
  • the stylus pen is provided with a display unit for displaying the remaining ink information of the stylus pen.
  • the display unit may display a value corresponding to the remaining ink information, and may also display the stylus pen using related icon images. Remaining ink information. Thereby, the remaining ink information of the stylus pen can be directly displayed on the stylus pen.
  • the writing track in the process of writing on the tablet with a stylus, can be obtained by the tablet from the time when the stylus is used to start writing on the tablet to the time when the pen is lifted to stop writing. After obtaining the writing track, the writing track is sent to the stylus. After the stylus receives the writing track, it calculates the length of the writing track, and updates its remaining ink information according to the length of the writing track. In one embodiment, after the writing board obtains the writing track, it calculates the length of the writing track and sends the length of the writing track to the stylus. After the stylus receives the length of the writing track, it updates its remaining ink information according to the length of the writing track.
  • the tablet when the stylus is switched from the sleep state or the shutdown state to the awake state, the tablet acquires the remaining ink information of the stylus, and after the tablet acquires the writing track, calculates the length of the writing track, and The length of the writing track updates the remaining ink information of the stylus.
  • the writing track generated by the stylus on the tablet when the stylus is used to write on the tablet with a large pressure, the writing track generated by the stylus on the tablet will be thicker, which will consume more ink from the stylus. Conversely, when using a stylus to write with less pressure on the tablet, the writing track generated by the stylus on the tablet will be thinner, which will consume less ink from the stylus. Therefore, the ink consumption of the stylus pen is also related to the thickness of the writing track.
  • the stylus can obtain the track thickness of the writing track according to the contact size of at least two contacts or at least three contacts included in the writing track. Therefore, the stylus first obtains the length of the writing track and the contact size of the at least two contacts or at least three contacts, and then according to the length of the writing track and the contact size of the at least two contacts Update the stylus's remaining ink information.
  • the remaining ink information of the stylus pen is first obtained, and then the process from when the stylus pen is used to start writing on the tablet to when the pen is lifted to stop writing Writing track in; finally, the remaining ink information is updated according to the length of the writing track. Thereby, the remaining ink information of the stylus pen can be updated in time.
  • FIG. 3 is a schematic flowchart of a data processing method according to a second embodiment of the present invention.
  • the data processing method is applied to the writing system shown in FIG. 1 and includes the following steps:
  • the stylus when the stylus is previously switched from the awake state to the sleep state or the off state, the stylus records the time t1 and the remaining power information Q when the stylus is switched to the hibernation state or the off state.
  • the stylus acquires the time t2 when it is switched to the awake state.
  • the stylus pen is in the sleep state or the off time T1.
  • the stylus when the stylus is in the awake state, the stylus may automatically wake up the stylus from the time when the stylus detects that an external object lifts the stylus off the tablet for a time longer than a second preset duration threshold (for example, 10s).
  • the state switches to hibernation or shutdown. It can also be when the stylus detects that an external object triggers the power button of the stylus, for example, when the power button is pressed for longer than a third preset duration threshold (for example, 3s), the stylus is switched from the awake state to the hibernation state or the off state .
  • the tablet sends a sleep or shutdown command to the stylus, and when the stylus receives the sleep or shutdown command, it switches the stylus from the awake state to the sleep state or shuts down status.
  • the second preset key may be a physical or virtual key; the second preset key may be a key provided on a writing board, or may be a stylus pen installed on the writing board. Buttons in controlled applications.
  • the stylus records a wake-up time when the stylus is in the awake state.
  • the stylus when the stylus is in the awake state, the stylus records the wake-up time T2 when the stylus is in the awake state at a preset time interval (for example, 2 min).
  • the wake-up time may be a product of a preset time interval and the number of recordings.
  • the stylus when the stylus is switched from the awake state to the hibernation state or the off state again, the stylus records the time t3 when it is switched to the hibernation state or the off state.
  • the stylus calculates the total wake-up time T3 of the stylus according to the recorded time t3 when it is switched to the sleep state or the off state, and the time t2 when it is switched to the awake state.
  • the stylus updates the remaining power of the stylus according to the wake-up time and the working power of the stylus in the awake state.
  • the stylus multiplies the total wake-up time T3 by the stylus's working power P2 in the awake state, and calculates the total of the stylus in the awake state.
  • the stylus After each time the stylus updates the remaining power information, it sends the updated remaining power information to the tablet. After the tablet receives the updated remaining power information sent by the stylus, it updates the displayed remaining power information of the stylus.
  • the tablet can display the remaining power information of the stylus in real time at its second preset position, or it can send the remaining power information to electronic devices, such as mobile phones and tablet computers, through wireless communication. On the application interface for displaying related information of the writing pen, real-time information of the remaining power of the stylus pen is displayed. Of course, the remaining power information can also be directly sent to the electronic device for display through a stylus.
  • the tablet can display the value corresponding to the remaining power information, and can also display the remaining power information of the stylus using the related icon image.
  • the remaining power information of the stylus can be updated in time, so that the user can obtain the latest remaining power information of the stylus in time, and the user can prepare a corresponding battery replacement in advance before the stylus power is exhausted. , Or charge the stylus.
  • the stylus pen is provided with a display unit for displaying the remaining power amount information of the stylus pen.
  • the display unit may display a value corresponding to the remaining power amount information, and may also display the stylus pen by using related icon images. The remaining battery information. Thereby, the remaining power information of the stylus can be directly displayed on the stylus.
  • the remaining power of the stylus is first obtained, and then the wake-up time of the stylus in the awake state is recorded; finally, according to the wake-up time and the stylus
  • the working power in the awake state updates the remaining power information of the stylus, so that the remaining power information of the stylus can be updated in time.
  • FIG. 4 is a schematic diagram of a stylus module provided by an embodiment of the present invention.
  • the stylus described in the embodiment of the present invention is applied to a writing system composed of a stylus and a tablet.
  • the stylus includes: processing 401, a communication interface 402, and a memory 403.
  • the processor 401, the communication interface 402, and the memory 403 may be connected through a bus or other manners. In the embodiment of the present invention, connection through a bus is used as an example.
  • the processor 401 may be a central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), or a combination of a CPU, a GPU, and an NP.
  • the processor 401 may also be a core used in a multi-core CPU, a multi-core GPU, or a multi-core NP for implementing communication identifier binding.
  • the processor 401 may be a hardware chip.
  • the above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • the above-mentioned communication interface 402 may be used for receiving and transmitting information or signaling, and receiving and transmitting signals.
  • the communication interface 402 may be a transceiver.
  • the above memory 403 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system and a storage program required by at least one function (such as a text storage function, a location storage function, etc.); the storage data area may store data according to The data (such as image data and text data) created by the use of the stylus can include application storage programs and the like.
  • the memory 403 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the memory 403 is also used to store program instructions.
  • the processor 401 may call the program instructions stored in the memory 403 to implement the data processing method as shown in the embodiment of the present invention.
  • the processor 401 calls the program instructions stored in the memory 403 to perform the following steps:
  • the writing track includes at least two contacts generated when the stylus is used to write on the writing board; the processor 401 is further configured to:
  • the writing track includes at least three contacts generated when the stylus is used to write on the writing board; the processor 401 is further configured to:
  • a contact located between two contacts among the at least three contacts is determined as a target contact, and the target contact is that an arc formed by the at least three contacts and an adjacent contact is greater than an arc threshold Contact
  • the length of the writing track is calculated according to the length of the Bezier curve.
  • the processor 401 is further configured to:
  • the specific manner in which the processor 401 obtains the remaining power information of the stylus is:
  • Determining the remaining power information of the stylus according to the duration and the working power of the stylus in the sleep state or the off state.
  • the stylus pen establishes a communication connection with the tablet through the communication interface 402, and the processor 401 is further configured to:
  • the remaining ink information and the remaining power information of the stylus pen are sent to the writing pad through the communication connection, so that the writing pad displays the remaining ink information and the remaining power amount information of the stylus pen in real time.
  • the processor 401, the communication interface 402, and the memory 403 described in the embodiment of the present invention may implement the implementation manner of the stylus described in a data processing method provided by the embodiment of the present invention, and details are not described herein again. .
  • the processor when the stylus is switched from the sleep state or the off state to the awake state, the processor first obtains the remaining ink information and the remaining power information of the stylus, and then obtains information from the time when the stylus is used to write on the tablet to The writing track during the process of lifting the pen to stop writing, and recording the wake-up time of the stylus when it is awake; finally, the remaining ink information is updated according to the length of the writing track, and the handwriting is updated according to the wake-up time and the working power of the stylus in awake Information about the remaining power of the pen, so that the remaining ink information and remaining power information of the stylus can be updated in time.
  • the present invention also provides a computer-readable storage medium.
  • the computer-readable storage medium stores data processing instructions. When the data processing instructions are run on a computer, the computer is caused to perform the data processing described in the foregoing method embodiment. method.
  • the steps in the method of the embodiment of the present invention can be adjusted, combined, and deleted according to actual needs.
  • the functional units in the device according to the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
  • the program may be stored in a computer-readable storage medium.
  • the storage medium may include: Flash disk, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • User Interface Of Digital Computer (AREA)
  • Position Input By Displaying (AREA)

Abstract

一种数据处理方法、手写笔及存储介质,应用于手写笔和写字板组成的书写系统,其中方法包括:当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;根据所述书写轨迹的长度更新所述剩余墨水信息。本发明实施例可以及时更新手写笔的剩余墨水信息。

Description

一种数据处理方法、手写笔及存储介质 技术领域
本发明涉及数据处理技术领域,尤其涉及一种数据处理方法、手写笔及存储介质。
背景技术
随着电子技术的发展,由写字板和手写笔组成的书写系统应运而生,且已广泛应用于用户的日常学习和工作中。书写系统的出现,增加了用户输入文字等信息的方式,给用户的日常学习和工作带来了便利。由于目前还没有一种确定手写笔的剩余墨水信息的方式,从而会导致用户不能及时更换手写笔笔芯的问题。因此,如何确定手写笔的剩余墨水信息是目前亟需解决的问题。
发明内容
本发明实施例提供了一种数据处理方法、手写笔及存储介质,可以及时更新手写笔的剩余墨水信息。
本发明实施例第一方面提供了一种数据处理方法,应用于手写笔和写字板组成的书写系统,所述方法包括:
当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;
获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;
根据所述书写轨迹的长度更新所述剩余墨水信息。
本发明实施例第二方面提供了一种手写笔,应用于手写笔和写字板组成的书写系统,所述手写笔包括处理器,所述处理器用于:
当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;
获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;
根据所述书写轨迹的长度更新所述剩余墨水信息。
本发明实施例第三方面提供了一种存储介质,所述存储介质中存储有数据处理指令,当所述数据处理指令在计算机上运行时,使得计算机执行上述第一方面所述的数据处理方法。
本发明实施例中,当手写笔由休眠状态或关机状态切换为唤醒状态时,首先获取手写笔的剩余墨水信息,然后获取从利用手写笔在写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;最后根据书写轨迹的长度更新剩余墨水信息。从而可以及时更新手写笔的剩余墨水信息。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明一实施例提供的书写系统的架构示意图;
图2是本发明一实施例提供的数据处理方法的流程示意图;
图3是本发明另一实施例提供的数据处理方法的流程示意图;
图4是本发明一实施例提供的手写笔的模块示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
请一并参阅图1,图1为本发明一实施例提供的一种书写系统的架构示意图。该书写系统包括:写字板101和手写笔102,该写字板101和该手写笔102之间建立有通信连接。该写字板101和该手写笔102之间可以是建立有蓝牙(Bluetooth)连接,也可以是建立有蓝牙低功耗(Bluetooth Low Energy,BLE)连接。需要说明的是,该写字板101和该手写笔102之间还可以是通过其他通信方式建立通信连接,本发明实施例不作限定。本发明实施例提供的数据处理方法,应用于如图1所示的书写系统中,可以及时更新手写笔的剩余墨水信息, 以下分别进行详细说明。
请参阅图2,图2为本发明第一实施例提供的一种数据处理方法的流程示意图。该数据处理方法应用于如图1所示的书写系统中,包括以下步骤:
S201、当手写笔由休眠状态或关机状态切换为唤醒状态时,所述手写笔获取所述手写笔的剩余墨水信息。
本发明实施例中,在手写笔处于休眠状态或关机状态时,可以是手写笔检测到外部对象(例如写字板)对手写笔施加的压力大于预设压力阈值时,将手写笔由休眠状态或关机状态切换为唤醒状态。也可以是手写笔检测到外部对象(例如用户)触发手写笔的电源键时,例如检测到外部对象按压该电源键的时长大于第一预设时长阈值(例如1s)时,将手写笔由休眠状态或关机状态切换为唤醒状态。其中,唤醒状态也即是工作状态。手写笔的电源键可以是物理的电源按键,也可以是虚拟的电源按键。在一实施方式中,还可以是当用户触发写字板的第一预设按键时,写字板向手写笔发送唤醒指令,手写笔接收到该唤醒指令时,将手写笔由休眠状态或关机状态切换为唤醒状态。其中,该第一预设按键可以是物理的,也可以是虚拟的;该第一预设按键可以是设置于写字板上的按键,也可以是安装于写字板上的用于对手写笔进行控制的应用中的按键。
本发明实施例中,手写笔的剩余墨水信息也即是手写笔的笔芯的剩余墨量。由于手写笔在写字板上完成一次书写之后,或者在每一次更换完笔芯之后,手写笔的剩余墨水信息就会发生变化。所以当手写笔由休眠状态或关机状态切换为唤醒状态时,手写笔获取当前的剩余墨水信息,以得到手写笔当前剩余的墨量。其中,手写笔上预置有用于存储手写笔的墨水信息和电量信息的存储空间。手写笔可以从该存储空间中获取手写笔的剩余墨水信息和剩余电量信息。
S202、所述手写笔获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹。
本发明实施例中,在利用手写笔在写字板上进行书写的过程中,手写笔获取从利用手写笔在写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹。该书写轨迹包括利用手写笔在写字板上书写时产生的至少两个触点。进一步地,手写笔获取该至少两个触点的触点数据,该触点数据包括触点坐标、触 点大小以及触点生成时间等数据。
进一步地,手写笔获取到该书写轨迹之后,计算该书写轨迹的长度。在一实施方式中,手写笔首先将该至少两个触点用直线线段连接,然后计算得到各个直线线段的长度。假设某一直线线段的两个端点分别为A和B,且端点A的坐标为(X(t-1),Y(t-1)),端点B的坐标为(Xt,Yt),则线段A-B的长度可以采用式(1)计算得到,式(1)的形式如下:
Li=sqrt[(Xt-X(t-1))*(Xt-X(t-1))+(Yt-Y(t-1))*(Yt-Y(t-1))] (1)
其中,sqrt函数表示开平方根;Li表示线段A-B的长度。
最后,手写笔将计算得到的各个直线线段的长度相加,得到该书写轨迹的长度。计算公式如式(2)所示:
Figure PCTCN2018088454-appb-000001
其中,L表示书写轨迹的长度,Li表示线段的长度,n表示线段的数目。
其中,当利用手写笔在写字板上书写较快时,获取到的该书写轨迹中的触点会变得稀疏,如果此时仅仅通过直线线段连接稀疏的触点,则在有弧度的地方容易出现棱角,导致计算得到的该书写轨迹的长度会有一定的误差。本发明实施例利用贝塞尔曲线对有弧度的地方进行弧度优化,从而可以模拟手写笔的真实书写效果,提高计算该书写轨迹长度的准确性。在一实施方式中,该书写轨迹包括利用手写笔在写字板上书写时产生的至少三个触点。手写笔首先从该至少三个触点中位于两个触点间的触点确定为目标触点,该目标触点为该至少三个触点中,任意一个与相邻的触点形成的弧度大于弧度阈值的触点。或者说,该目标触点为该至少三个触点之间,与相邻的两个触点分别连接形成的线段的夹角大于预设角度阈值的触点。然后,手写笔从该至少三个触点之间获取与该目标触点相邻的第一触点和第二触点,并确定该目标触点、该第一触点和该第二触点共同定义的贝塞尔曲线。最后,计算该贝塞尔曲线的长度。并根据该贝塞尔曲线的长度计算得到该书写轨迹的长度。
需要说明的是,该目标触点位于第一触点和第二触点之间,或者说,第一触点为书写时间与目标触点对应的书写时间相比在先的触点,第二触点为书写时间与目标触点对应的书写时间相比在后的触点。第一触点可以是与目标触点 上相邻的触点,第二触点可以是与目标触点下相邻的触点。第一触点也可以是与目标触点左相邻的触点,第二触点也可以是与目标触点右相邻的触点。第一触点可以是一个或者多个触点,第二触点也可以是一个或者多个触点。针对该至少三个触点之间,与相邻的触点形成的弧度小于或等于弧度阈值的第三触点,将该第三触点与相邻的触点用直线线段连接,并计算得到各个线段的长度。根据该各个线段的长度和各个贝塞尔曲线的长度计算得到该书写轨迹的长度。
下面举例对计算贝塞尔曲线长度的方式进行说明。假设触点A、B和C为该书写轨迹中依次经过的三个触点,即触点A对应的书写时间为t1,触点B对应的书写时间为t2,触点C对应的书写时间为t3,且t1<t2<t3。如果触点A和B形成的线段A-B,与触点B和C形成的线段B-C之间的夹角大于预设角度阈值,则B点为目标触点,确定触点A、B和C之间需要利用贝塞尔曲线进行弧度优化。手写笔首先获取线段A-B的中点A1,线段B-C的中点B1。然后将点A1作为起点,触点B作为目标触点,点B1作为终点,确定出点A1、触点B和点B1共同定义的二阶贝塞尔曲线。其中,该二阶贝塞尔曲线的函数表示如式(3)所示:
B(t)=(1-t)*(1-t)*A1+2*t*(1-t)*B+t*t*B1; (3)
最后,计算该二阶贝塞尔曲线的长度。其中,式(3)中参数t的取值范围是[0,1],当t等于0时,表示位于该二阶贝塞尔曲线的起点A1,当t等于1时,表示位于该二阶贝塞尔曲线的终点B1。假设t取0.1为进度,则可以从该二阶贝塞尔曲线中确定出包括起点A1和终点B1在内的11个点。该11个点的坐标可以采用式(4)和式(5)计算得到,式(4)和式(5)的形式如下:
x=(1-t)*(1-t)*A1[0]+2*t*(1-t)*B[0]+t*t*B1[0]; (4)
y=(1-t)*(1-t)*A1[1]+2*t*(1-t)*B[1]+t*t*B1[1]; (5)
其中,t为参数,且取值为[0,1];A1[0]、B[0]和B1[0]分别为点A1、B和B1的横坐标;A1[1]、B[1]和B1[1]分别为点A1、B和B1的纵坐标;x表示横坐标,y表示纵坐标。例如,该11个点中第二个点的横纵坐标分别为:
x=(1-0.1)*(1-0.1)*A1[0]+2*0.1*(1-0.1)*B[0]+0.1*0.1*B1[0];
y=(1-0.1)*(1-0.1)*A1[1]+2*0.1*(1-0.1)*B[1]+0.1*0.1*B1[1];
进一步地,将该11个点用直线线段依次连接,可以得到10个线段。然后根据该11个点的坐标分别计算得到该10个线段的长度,并将该10个线段的长度累 加,得到该二阶贝塞尔曲线的长度,也即是得到点A1、B和B1之间的曲线长度。其中,点A和点A1之间的长度可以是线段A-A1的长度。
需要说明的是,手写笔也可以直接根据该二阶贝塞尔曲线的函数计算得到该二阶贝塞尔曲线的曲线长度。本发明实施例也可直接将触点A作为起点,触点B作为目标触点,触点C作为终点,确定出触点A、B和C之间形成的贝塞尔曲线,并计算得到该贝塞尔曲线的曲线长度。然后根据该贝塞尔曲线的曲线长度得到该书写轨迹的长度。
S203、所述手写笔根据所述书写轨迹的长度更新所述剩余墨水信息。
本发明实施例中,当手写笔由休眠状态或关机状态切换为唤醒状态时,假设此时该笔芯的剩余墨量对应书写长度S。当手写笔计算得到该书写轨迹的长度之后,假设该书写轨迹的长度为L。则手写笔可以确定笔芯的当前剩余墨量对应的书写长度M=S-L。进一步地,手写笔可以将笔芯的当前剩余墨量对应的书写长度M,确定为该手写笔的最新的剩余墨水信息,并根据该书写长度M更新该手写笔的剩余墨水信息。也可以将M和N之间的百分比,确定为该手写笔的最新的剩余墨水信息,并根据该百分比更新该手写笔的剩余墨水信息,其中,N为该笔芯的墨量对应的总书写长度。
进一步地,手写笔根据该书写轨迹的长度更新剩余墨水信息之后,将更新后的剩余墨水信息发送给写字板。写字板接收到手写笔发送的更新后的剩余墨水信息之后,对显示的手写笔的剩余墨水信息进行更新。其中,写字板可以在其第一预设位置处实时显示手写笔的剩余墨水信息,也可以是通过无线通信将剩余墨水信息发送给电子装置,如手机、平板电脑等,通过电子装置在其安装的用于显示写字笔的相关信息的应用界面上,实时显示手写笔的剩余墨水信息。当然,也可以通过手写笔直接将剩余墨水信息发送给电子装置进行显示。写字板可以显示该剩余墨水信息对应的数值,也可以利用相关图标形象的显示该手写笔的剩余墨水信息。采用上述方式,可以及时对显示的手写笔的剩余墨水信息进行更新,以便于用户及时获取到手写笔的最新剩余墨水信息,可以让用户在手写笔的墨水消耗完之前,提前准备相应的更换笔芯。
在一实施方式中,手写笔配置有显示单元,该显示单元用于显示手写笔的剩余墨水信息,该显示单元可以显示该剩余墨水信息对应的数值,也可以利用 相关图标形象的显示该手写笔的剩余墨水信息。从而可以在手写笔上直接显示手写笔的剩余墨水信息。
在一实施方式中,在利用手写笔在写字板上进行书写的过程中,可以由写字板获取从利用手写笔在写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹,写字板获取到该书写轨迹之后,将该书写轨迹发送给手写笔。手写笔接收到该书写轨迹之后,计算该书写轨迹的长度,并根据该书写轨迹的长度更新其剩余墨水信息。在一实施方式中,写字板获取到该书写轨迹之后,计算该书写轨迹的长度,并将该书写轨迹的长度发送给手写笔。手写笔接收到该书写轨迹的长度之后,根据该书写轨迹的长度更新其剩余墨水信息。在一实施方式中,当手写笔由休眠状态或关机状态切换为唤醒状态时,写字板获取该手写笔的剩余墨水信息,写字板获取到该书写轨迹之后,计算该书写轨迹的长度,并根据该书写轨迹的长度对该手写笔的剩余墨水信息进行更新。
在一实施方式中,由于当利用手写笔在写字板上使用较大压力书写时,手写笔在写字板上生成的书写轨迹会较粗,会消耗手写笔较多的墨量。反之,当利用手写笔在写字板上使用较小压力书写时,手写笔在写字板上生成的书写轨迹会较细,会消耗手写笔较少的墨量。所以,手写笔的墨量消耗还与该书写轨迹的粗细相关。手写笔根据该书写轨迹包括的至少两个触点或者至少三个触点的触点大小可以获取书写轨迹的轨迹粗细。因此,手写笔首先获取该书写轨迹的长度,以及获取该至少两个触点或者至少三个触点的触点大小,然后根据该书写轨迹的长度、以及该至少两个触点的触点大小更新手写笔的剩余墨水信息。
本发明实施例中,当手写笔由休眠状态或关机状态切换为唤醒状态时,首先获取手写笔的剩余墨水信息,然后获取从利用手写笔在写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;最后根据书写轨迹的长度更新剩余墨水信息。从而可以及时更新手写笔的剩余墨水信息。
请参阅图3,图3为本发明第二实施例提供的一种数据处理方法的流程示意图。该数据处理方法应用于如图1所示的书写系统中,包括以下步骤:
S301、当手写笔由休眠状态或关机状态切换为唤醒状态时,所述手写笔获取所述手写笔的剩余电量信息。
本发明实施例中,当手写笔之前由唤醒状态切换为休眠状态或关机状态时,手写笔记录其切换为休眠状态或关机状态时的时间t1和剩余电量信息Q。当手写笔由休眠状态或关机状态切换为唤醒状态时,手写笔获取其切换为唤醒状态时的时间t2。手写笔根据记录的其切换为休眠状态或关机状态时的时间t1,以及其切换为唤醒状态时的时间t2,计算得到手写笔处于休眠状态或关机状态下的时长T1。手写笔将该时长T1乘以手写笔在休眠状态或关机状态下的工作功率P1,计算得到手写笔处于休眠状态或关机状态下的功耗W1。也即是说W1=P1*T1。假设功耗W1对应的电量消耗为Q1,则确定手写笔由休眠状态或关机状态切换为唤醒状态时,将手写笔的剩余电量信息更新为Q2。其中,Q2=Q-Q1,剩余电量信息可以是当前剩余电量占手写笔总电量的百分比。
本发明实施例中,在手写笔处于唤醒状态时,可以是手写笔检测到外部对象将手写笔抬离写字板的时长大于第二预设时长阈值(例如10s)时,自动将手写笔由唤醒状态切换为休眠状态或关机状态。也可以是手写笔检测到外部对象触发手写笔的电源键时,例如按压该电源键的时长大于第三预设时长阈值(例如3s)时,将手写笔由唤醒状态切换为休眠状态或关机状态。还可以是当用户触发写字板的第二预设按键时,写字板向手写笔发送休眠或关机指令,手写笔接收到该休眠或关机指令时,将手写笔由唤醒状态切换为休眠状态或关机状态。其中,该第二预设按键可以是物理的,也可以是虚拟的;该第二预设按键可以是设置于写字板上的按键,也可以是安装于写字板上的用于对手写笔进行控制的应用中的按键。
S302、所述手写笔记录所述手写笔处于所述唤醒状态下的唤醒时长。
本发明实施例中,在手写笔处于唤醒状态下,手写笔每隔预设时间间隔(例如2min)记录一次手写笔处于唤醒状态下的唤醒时长T2。其中,该唤醒时长可以为预设时间间隔与记录次数的乘积。
进一步地,当手写笔再次由唤醒状态切换为休眠状态或关机状态时,手写笔记录其切换为休眠状态或关机状态时的时间t3。手写笔根据记录的其切换为休眠状态或关机状态时的时间t3,以及其切换为唤醒状态时的时间t2,计算得到手写笔的总唤醒时长T3。
S303、所述手写笔根据所述唤醒时长和所述手写笔在所述唤醒状态下的工 作功率更新所述手写笔的剩余电量信息。
本发明实施例中,手写笔每一次获取到其处于唤醒状态下的唤醒时长之后,将该唤醒时长T2乘以手写笔在唤醒状态下的工作功率P2,计算得到手写笔处于唤醒状态下的当前功耗W2。假设功耗W2对应的电量消耗为Q3,则将手写笔的剩余电量信息更新为Q4,其中,Q4=Q2-Q3。
进一步地,当手写笔再次由唤醒状态切换为休眠状态或关机状态时,手写笔将该总唤醒时长T3乘以手写笔在唤醒状态下的工作功率P2,计算得到手写笔处于唤醒状态下的总功耗W3。假设功耗W3对应的电量消耗为Q5,则将手写笔的剩余电量信息更新为Q6,其中,Q6=Q2-Q5。
进一步地,手写笔每一次更新剩余电量信息之后,将更新后的剩余电量信息发送给写字板。写字板接收到手写笔发送的更新后的剩余电量信息之后,对显示的手写笔的剩余电量信息进行更新。其中,写字板可以在其第二预设位置处实时显示手写笔的剩余电量信息,也可以是通过无线通信将剩余电量信息发送给电子装置,如手机、平板电脑等,通过电子装置在其安装的用于显示写字笔的相关信息的应用界面上,实时显示手写笔的剩余电量信息。当然,也可以通过手写笔直接将剩余电量信息发送给电子装置进行显示。写字板可以显示该剩余电量信息对应的数值,也可以利用相关图标形象的显示该手写笔的剩余电量信息。采用上述方式,可以及时对显示的手写笔的剩余电量信息进行更新,以便于用户及时获取到手写笔的最新剩余电量信息,可以让用户在手写笔的电量消耗完之前,提前准备相应的更换电池,或者对手写笔进行充电。
在一实施方式中,手写笔配置有显示单元,该显示单元用于显示手写笔的剩余电量信息,该显示单元可以显示该剩余电量信息对应的数值,也可以利用相关图标形象的显示该手写笔的剩余电量信息。从而可以在手写笔上直接显示手写笔剩余电量信息。
本发明实施例中,当手写笔由休眠状态或关机状态切换为唤醒状态时,首先获取手写笔的剩余电量信息,然后记录手写笔处于唤醒状态下的唤醒时长;最后根据该唤醒时长和手写笔在唤醒状态下的工作功率更新手写笔的剩余电量信息,从而可以及时更新手写笔的剩余电量信息。
请参见图4,图4为本发明实施例提供的一种手写笔的模块的示意图,本发明实施例中所描述的手写笔应用于手写笔和写字板组成的书写系统,手写笔包括:处理器401、通信接口402、存储器403。其中,处理器401、通信接口402、存储器403可通过总线或其他方式连接,本发明实施例以通过总线连接为例。
处理器401可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP),图形处理器(graphics processing unit,GPU),或者CPU、GPU和NP的组合。处理器401也可以是多核CPU、多核GPU或多核NP中用于实现通信标识绑定的核。
上述处理器401可以是硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
上述通信接口402可用于收发信息或信令的交互,以及信号的接收和传递,通信接口402可以是收发器。上述存储器403可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的存储程序(比如文字存储功能、位置存储功能等);存储数据区可存储根据手写笔的使用所创建的数据(比如图像数据、文字数据)等,并可以包括应用存储程序等。此外,存储器403可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
上述存储器403还用于存储程序指令。上述处理器401可以调用上述存储器403存储的程序指令,实现如本发明实施例所示的数据处理方法。
具体地,上述处理器401调用存储在上述存储器403中的程序指令执行以下步骤:
当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;
获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;
根据所述书写轨迹的长度更新所述剩余墨水信息。
在一实施方式中,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少两个触点;所述处理器401还用于:
将所述至少两个触点用线段连接,并计算各个线段的长度;
将所述各个线段的长度相加,得到所述书写轨迹的长度。
在一实施方式中,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少三个触点;所述处理器401还用于:
从所述至少三个触点中位于两个触点间的触点确定为目标触点,所述目标触点为所述至少三个触点中与相邻的触点形成的弧度大于弧度阈值的触点;
获取与所述目标触点相邻的第一触点和第二触点;
计算所述目标触点、所述第一触点和所述第二触点共同定义的贝塞尔曲线的长度;
根据所述贝塞尔曲线的长度计算所述书写轨迹的长度。
在一实施方式中,所述处理器401还用于:
当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取所述手写笔的剩余电量信息;
记录所述手写笔处于所述唤醒状态下的唤醒时长;
根据所述唤醒时长和所述手写笔在所述唤醒状态下的工作功率更新所述手写笔的剩余电量信息。
在一实施方式中,当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,所述处理器401获取所述手写笔的剩余电量信息的具体方式为:
当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取记录的所述手写笔处于所述休眠状态或关机状态下的时长;
根据所述时长和所述手写笔在所述休眠状态或关机状态下的工作功率确定所述手写笔的剩余电量信息。
在一实施方式中,所述手写笔通过所述通信接口402与所述写字板建立有通信连接,所述处理器401还用于:
通过所述通信连接将所述手写笔的剩余墨水信息和剩余电量信息发送给所述写字板,以便于所述写字板实时显示所述手写笔的剩余墨水信息和剩余电 量信息。
具体实现中,本发明实施例中所描述的处理器401、通信接口402、存储器403可执行本发明实施例提供的一种数据处理方法中所描述的手写笔的实现方式,在此不再赘述。
本发明实施例中,当手写笔由休眠状态或关机状态切换为唤醒状态时,处理器首先获取手写笔的剩余墨水信息和剩余电量信息,然后获取从利用手写笔在写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹,以及记录手写笔处于唤醒状态下的唤醒时长;最后根据书写轨迹的长度更新剩余墨水信息,以及根据唤醒时长和手写笔在唤醒状态下的工作功率更新手写笔的剩余电量信息,从而可以及时更新手写笔的剩余墨水信息和剩余电量信息。
本发明还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有数据处理指令,当所述数据处理指令在计算机上运行时,使得计算机执行上述方法实施例所述的数据处理方法。
需要说明的是,对于前述的各个方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某一些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
本发明实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。本发明实施例装置中的功能单元可以根据实际需要进行合并、划分和删减。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(Random Access Memory,RAM)、磁盘或光盘等。
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,本领域普通技术人员可以理解实现上述实施例的全部或部分流程,并依本发明权利要求所作的等同变化,仍属于发明所涵盖的范围。

Claims (13)

  1. 一种数据处理方法,应用于手写笔和写字板组成的书写系统,其特征在于,所述方法包括:
    当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;
    获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;
    根据所述书写轨迹的长度更新所述剩余墨水信息。
  2. 根据权利要求1所述的方法,其特征在于,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少两个触点;
    所述根据所述书写轨迹的长度更新所述剩余墨水信息之前,所述方法还包括:
    将所述至少两个触点用线段连接,并计算各个线段的长度;
    将所述各个线段的长度相加,得到所述书写轨迹的长度。
  3. 根据权利要求1所述的方法,其特征在于,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少三个触点;
    所述根据所述书写轨迹的长度更新所述剩余墨水信息之前,所述方法还包括:
    从所述至少三个触点中位于两个触点间的触点确定为目标触点,所述目标触点为所述至少三个触点中与相邻的触点形成的弧度大于弧度阈值的触点;
    获取与所述目标触点相邻的第一触点和第二触点;
    计算所述目标触点、所述第一触点和所述第二触点共同定义的贝塞尔曲线的长度;
    根据所述贝塞尔曲线的长度计算所述书写轨迹的长度。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取所 述手写笔的剩余电量信息;
    记录所述手写笔处于所述唤醒状态下的唤醒时长;
    根据所述唤醒时长和所述手写笔在所述唤醒状态下的工作功率更新所述手写笔的剩余电量信息。
  5. 根据权利要求4所述的方法,其特征在于,所述当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取所述手写笔的剩余电量信息,包括:
    当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取记录的所述手写笔处于所述休眠状态或关机状态下的时长;
    根据所述时长和所述手写笔在所述休眠状态或关机状态下的工作功率确定所述手写笔的剩余电量信息。
  6. 根据权利要求4或5所述的方法,其特征在于,所述手写笔与所述写字板建立有通信连接,所述方法还包括:
    通过所述通信连接将所述手写笔的剩余墨水信息和剩余电量信息发送给所述写字板,以便于所述写字板实时显示所述手写笔的剩余墨水信息和剩余电量信息。
  7. 一种手写笔,应用于手写笔和写字板组成的书写系统,其特征在于,所述手写笔包括处理器,所述处理器用于:
    当所述手写笔由休眠状态或关机状态切换为唤醒状态时,获取所述手写笔的剩余墨水信息;
    获取从利用所述手写笔在所述写字板上下笔开始书写至抬笔停止书写的过程中的书写轨迹;
    根据所述书写轨迹的长度更新所述剩余墨水信息。
  8. 根据权利要求7所述的手写笔,其特征在于,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少两个触点;所述处理器还用于:
    将所述至少两个触点用线段连接,并计算各个线段的长度;
    将所述各个线段的长度相加,得到所述书写轨迹的长度。
  9. 根据权利要求7所述的手写笔,其特征在于,所述书写轨迹包括利用所述手写笔在所述写字板上书写时产生的至少三个触点;所述处理器还用于:
    从所述至少三个触点中位于两个触点间的触点确定为目标触点,所述目标触点为所述至少三个触点中与相邻的触点形成的弧度大于弧度阈值的触点;
    获取与所述目标触点相邻的第一触点和第二触点;
    计算所述目标触点、所述第一触点和所述第二触点共同定义的贝塞尔曲线的长度;
    根据所述贝塞尔曲线的长度计算所述书写轨迹的长度。
  10. 根据权利要求7所述的手写笔,其特征在于,所述处理器还用于:
    当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取所述手写笔的剩余电量信息;
    记录所述手写笔处于所述唤醒状态下的唤醒时长;
    根据所述唤醒时长和所述手写笔在所述唤醒状态下的工作功率更新所述手写笔的剩余电量信息。
  11. 根据权利要求10所述的手写笔,其特征在于,所述处理器具体用于:
    当所述手写笔由所述休眠状态或关机状态切换为所述唤醒状态时,获取记录的所述手写笔处于所述休眠状态或关机状态下的时长;
    根据所述时长和所述手写笔在所述休眠状态或关机状态下的工作功率确定所述手写笔的剩余电量信息。
  12. 根据权利要求10或11所述的手写笔,其特征在于,所述手写笔还包括通信接口,所述手写笔通过所述通信接口与所述写字板建立有通信连接,所述处理器还用于:
    通过所述通信连接将所述手写笔的剩余墨水信息和剩余电量信息发送给 所述写字板,以便于所述写字板实时显示所述手写笔的剩余墨水信息和剩余电量信息。
  13. 一种存储介质,其特征在于,所述存储介质中存储有数据处理指令,当所述数据处理指令在计算机上运行时,使得计算机执行如权利要求1至6中任一项所述的数据处理方法。
PCT/CN2018/088454 2018-05-25 2018-05-25 一种数据处理方法、手写笔及存储介质 WO2019222998A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/088454 WO2019222998A1 (zh) 2018-05-25 2018-05-25 一种数据处理方法、手写笔及存储介质
CN201880093895.4A CN112513868A (zh) 2018-05-25 2018-05-25 一种数据处理方法、手写笔及存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/088454 WO2019222998A1 (zh) 2018-05-25 2018-05-25 一种数据处理方法、手写笔及存储介质

Publications (1)

Publication Number Publication Date
WO2019222998A1 true WO2019222998A1 (zh) 2019-11-28

Family

ID=68616311

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/088454 WO2019222998A1 (zh) 2018-05-25 2018-05-25 一种数据处理方法、手写笔及存储介质

Country Status (2)

Country Link
CN (1) CN112513868A (zh)
WO (1) WO2019222998A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022213936A1 (zh) * 2021-04-07 2022-10-13 广州视源电子科技股份有限公司 书写笔迹的调整方法、装置、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104156111A (zh) * 2014-08-06 2014-11-19 苏州佳世达电通有限公司 手写输入系统及手写输入方法
CN104714711A (zh) * 2013-12-11 2015-06-17 汉王科技股份有限公司 电磁式记事本以及自动换页方法
US20170270357A1 (en) * 2016-03-15 2017-09-21 Microsoft Technology Licensing, Llc Handwritten auto-completion
CN107608619A (zh) * 2017-09-20 2018-01-19 广州视源电子科技股份有限公司 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质
CN207302006U (zh) * 2017-09-15 2018-05-01 上海真灼科技股份有限公司 电子手写本

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101408566A (zh) * 2008-11-19 2009-04-15 深圳创维-Rgb电子有限公司 一种用电量的显示方法、系统及电子设备
JP2016207067A (ja) * 2015-04-27 2016-12-08 ブラザー工業株式会社 情報入力装置およびプログラム
CN105225260B (zh) * 2015-09-25 2019-01-08 中国电子科技集团公司第三十二研究所 一种手写原笔迹实现方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714711A (zh) * 2013-12-11 2015-06-17 汉王科技股份有限公司 电磁式记事本以及自动换页方法
CN104156111A (zh) * 2014-08-06 2014-11-19 苏州佳世达电通有限公司 手写输入系统及手写输入方法
US20170270357A1 (en) * 2016-03-15 2017-09-21 Microsoft Technology Licensing, Llc Handwritten auto-completion
CN207302006U (zh) * 2017-09-15 2018-05-01 上海真灼科技股份有限公司 电子手写本
CN107608619A (zh) * 2017-09-20 2018-01-19 广州视源电子科技股份有限公司 用于触控屏的笔迹曲线生成方法、装置、设备和存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022213936A1 (zh) * 2021-04-07 2022-10-13 广州视源电子科技股份有限公司 书写笔迹的调整方法、装置、电子设备

Also Published As

Publication number Publication date
CN112513868A (zh) 2021-03-16

Similar Documents

Publication Publication Date Title
WO2021036594A1 (zh) 一种应用于投屏场景的控制方法以及相关设备
WO2020019913A1 (zh) 一种人脸图像处理方法、装置及存储介质
WO2019183786A1 (zh) 一种提示信息的显示方法及电子设备
US10423264B2 (en) Screen enabling method and apparatus, and electronic device
EP3407163A1 (en) Mobile terminal device, operation method, program, and storage medium
WO2021109875A1 (zh) 实现游戏应用的方法、装置、存储介质及电子设备
CN112596648B (zh) 页面处理方法、装置、电子设备及可读存储介质
CN104238877A (zh) 控制图标的方法和终端
US10459737B2 (en) Waking and sleeping a display among a plurality of displays using gestures
WO2020192322A1 (zh) 显示方法及终端设备
WO2020192298A1 (zh) 图像处理方法及终端设备
WO2020134566A1 (zh) 移动终端的Doze模式的控制方法、存储介质及移动终端
US20200193694A1 (en) Image Processing Method and Apparatus
CN112996089A (zh) 数据传输方法、装置、存储介质及电子设备
WO2019071594A1 (zh) 一种显示处理方法及电子设备
WO2023046101A1 (zh) 图标显示方法、装置及电子设备
WO2024037415A1 (zh) 投屏内容显示方法、装置、设备及存储介质
WO2020238496A1 (zh) 图标管理方法及终端设备
US20190019488A1 (en) Method for Controlling Interference in Audio Service and Terminal
WO2019222998A1 (zh) 一种数据处理方法、手写笔及存储介质
WO2019047129A1 (zh) 一种移动应用图标的方法及终端
US11487388B2 (en) Anti-accidental touch detection method and apparatus, and terminal
CN111949187B (zh) 电子白板内容编辑共享方法、系统、设备以及服务器
CN112379964A (zh) 用户界面的显示控制方法、装置、计算机设备及存储介质
WO2023030267A1 (zh) 弹框显示方法、装置、电子设备及可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18919897

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18919897

Country of ref document: EP

Kind code of ref document: A1