WO2020133227A1 - Handwriting data processing method, input device and handwriting system - Google Patents

Handwriting data processing method, input device and handwriting system Download PDF

Info

Publication number
WO2020133227A1
WO2020133227A1 PCT/CN2018/124920 CN2018124920W WO2020133227A1 WO 2020133227 A1 WO2020133227 A1 WO 2020133227A1 CN 2018124920 W CN2018124920 W CN 2018124920W WO 2020133227 A1 WO2020133227 A1 WO 2020133227A1
Authority
WO
WIPO (PCT)
Prior art keywords
handwriting
sampling interval
relative
information
point
Prior art date
Application number
PCT/CN2018/124920
Other languages
French (fr)
Chinese (zh)
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/124920 priority Critical patent/WO2020133227A1/en
Priority to CN201880097607.2A priority patent/CN113168248A/en
Publication of WO2020133227A1 publication Critical patent/WO2020133227A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means

Definitions

  • the present application relates to the field of input devices, in particular to a handwriting data processing method, input device and handwriting system.
  • the input device (such as a tablet) of the existing handwriting system collects the data of the sampling point when the user writes and sends it to the terminal device for display, but due to the transmission rate limitation of Bluetooth and other transmission methods, in some occasions such as classrooms or conferences When the room is waiting, multiple handwriting boards are simultaneously transmitted to a display terminal, so that the amount of data transmitted exceeds the transmission rate of Bluetooth and other transmission methods, resulting in data loss, which affects the display effect of the terminal device.
  • the embodiments of the present application provide a handwriting data processing method, an input device, and a handwriting system, which can compress the data transmitted by the handwriting system, reduce data packet loss, and ensure the display effect of the terminal device.
  • the present application provides a handwriting data processing method, which is applied to an input device.
  • the handwriting data processing method includes: acquiring specific parameters of the input device and a transmission format of the input device and a terminal device during data transmission; The specific parameters and the transmission format determine the sampling point of the writing point; determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point; calculate the current sampling The relative change amount of the handwriting information of the point and the reference point; determine the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encode the relative handwriting information according to the transmission format Is the encoded data of the current sampling point; and sending the encoded data of the current sampling point to the terminal device.
  • the present application also provides an input device.
  • the input device includes a processor, and the processor is used to acquire specific parameters of the input device and a transmission format of the input device and the terminal device when performing data transmission.
  • the specific parameters and the transmission format determine the sampling point of the writing point, determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and acquire the handwriting information of the current sampling point and calculate the current sampling point
  • the relative change amount of the handwriting information of the reference point and the handwriting information of the reference point, the relative handwriting information of the current sampling point is determined according to the sampling interval and the relative change amount, and the relative handwriting information is encoded according to the transmission format as The encoded data of the current sampling point, and sending the encoded data of the current sampling point to the terminal device.
  • the present application also provides a handwriting system.
  • the handwriting system includes a terminal device and the input device of the foregoing embodiment.
  • the terminal device is in communication connection with the input device, and the terminal device is used to receive input sent by the input device
  • the data is displayed according to the input data.
  • the handwriting data processing method, input device, and handwriting system compress the handwriting information through relative encoding to obtain the relative change amount of the current sampling point, and further compress the relative change amount through the sampling interval to obtain relative handwriting information , Not only reduces the amount of data transmission, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data packet loss, thus ensuring the display effect of the terminal device.
  • the relative change amount is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods
  • the problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved.
  • FIG. 1 is a schematic flowchart of a handwriting data processing method according to some embodiments of the present application.
  • FIG. 2 is a schematic structural diagram of a handwriting system according to some embodiments of the present application.
  • FIG. 3 is a schematic diagram of a transmission format that is not processed by the handwriting data processing method.
  • FIG. 4 is a schematic diagram of a transmission format of a current collection point in some embodiments of the present application.
  • FIG. 5 is a schematic diagram of a transmission format of a reference point in some embodiments of the present application.
  • FIG. 6 is a schematic diagram of principles of a handwriting data processing method according to some embodiments of the present application.
  • FIG. 7 to 14 are schematic flowcharts of a handwriting data processing method according to some embodiments of the present application.
  • the handwriting data processing method according to the embodiment of the present application is applied to the input device 10, and the handwriting data processing method includes the following steps:
  • 010 Obtain the specific parameters of the input device 10 and the transmission format of the input device 10 and the terminal device 20 when performing data transmission;
  • 030 Determine the reference point of the writing handwriting, and collect the writing points on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point;
  • 050 Determine the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encode the relative handwriting information as the encoded data of the current sampling point according to the transmission format;
  • 060 Send the encoded data of the current sampling point to the terminal device 20.
  • the input device 10 includes a processor 16, and the processor 16 is used to obtain specific parameters of the input device 10 and the transmission format of the input device 10 and the terminal device 20 during data transmission, according to the specific parameters and the transmission format Determine the sampling interval of the writing point, determine the reference point of the handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point, calculate the relative of the handwriting information of the current sampling point and the reference point
  • the change amount, the relative handwriting information of the current sampling point is determined according to the sampling interval and the relative change amount, the relative handwriting information is encoded according to the transmission format as the encoded data of the current sampling point, and the encoded data of the current sampling point is sent to the terminal device 20.
  • the input device 10 may be a tablet 12, a stylus 14, etc. It can be understood that the input device 10 may also be other devices such as a touch screen of the terminal device 20, which is not limited herein. In the embodiment of the present application, the input device 10 12 for the tablet.
  • step 010, step 020, step 030, step 040, step 050, and step 060 may be executed by the tablet 12.
  • the processor 16 of the tablet 12 first obtains the specific parameters of the tablet 12 itself (such as resolution, size and other parameter information) and the transmission format for data transmission with the terminal device 20.
  • the transmission format of the absolute encoding method is generally shown in FIG. 3, where the handwriting information includes position information, pressure information, and time information.
  • the position information refers to It is the coordinate value of the collection point in the input area of the tablet 12.
  • FIG. 3 is a schematic diagram of a transmission format in the prior art.
  • the transmission bit number required for position information S1 is 32 bits
  • the transmission bit number for pressure information S2 is 16 bits
  • the transmission bit number for time information S3 It is 32 bits.
  • the real writing area only occupies a very small part of the tablet 12.
  • the tablet 12 samples according to the sampling interval to obtain the first sampling point and use it as a reference point.
  • the next The sampling point has only a small change in position and pressure relative to the reference point, and the change in the time interval from the previous sampling point is also small. Therefore, the handwriting board 12 according to the embodiment of the present application may use a relative encoding method to compress the handwriting information. After the handwriting information is compressed using the relative encoding method, there is no need to transmit the handwriting information with a larger number of transmission bits required during transmission. Instead, it is sufficient to transmit the relative handwriting information with a smaller transmission bit number.
  • FIG. 4 is a schematic diagram of a transmission format in a relative encoding format provided by one embodiment of this application.
  • the number of transmission bits required for position information S1 is 16 bits
  • the number of transmission bits required for pressure information S2 is 8 bits
  • the number of transmission bits required for time information S3 is 8 bits.
  • the handwriting information is transmitted using the transmission format of FIG. 4, in a scenario where multiple people write and display at the same time in a meeting or classroom teaching, assuming 40 people, an average of 300 sampling points are collected every 300ms at the sampling rate Collecting a word, and according to the frequency of Chinese character usage, each word averages about 7.3 strokes.
  • the transmission bit number required for the position information S1 is 32 bits
  • the transmission bit number required for the pressure information S2 is 16 bits
  • the transmission bit number required for the time information S3 is 8 bits.
  • the transmission is performed according to a larger number of transmission bits to ensure that the handwriting information of the reference point can be accurately encoded.
  • the reference point is transmitted with a larger number of transmission bits, since the reference point only occupies a very small part of the entire handwriting, it basically has no effect on the final transmission bandwidth, so the handwriting information is encoded using a relative encoding method After that, the data compression ratio can still be close to 40%.
  • the upper left corner of the writing area of the tablet 12 is the coordinate origin O(0,0)
  • the short side of the tablet 12 is the X axis
  • the tablet The long side of 12 establishes a coordinate system XOY (hereinafter referred to as the absolute coordinate system) for the Y axis.
  • the tablet 12 samples each writing point on the writing track to form a sample
  • the first sampling point on the writing track is used as a reference point.
  • the position information includes coordinate values.
  • the resolution of the tablet 12 is 1080P (that is, 1920*1080).
  • the tablet 12 collects the user’s writing track.
  • a sampling point P1 is used as a reference point, assuming that the coordinate value of P1 is (510, 400), the relative change in the position of the collection point after P1 (ie, the relative change in coordinates) is relative to the reference point P1 in the absolute coordinate system
  • the relative coordinate value calculated by the coordinate value of the current point for example, the coordinate value of the current collection point P2 in the absolute coordinate system is (600, 500), then the relative change of the coordinate of the current collection point P2 relative to the reference point P1 is (90,100); If the coordinate value of the current collection point is transmitted, the encoding of the abscissa 600 in binary requires 10 digits of transmission, and the encoding of the ordinate in binary requires 9 digits of transmission, coordinate value Encoding in binary requires a total of 19 transmission digits.
  • the relative change amount of the coordinate When the relative change amount of the coordinate is transmitted, 90 bits of the relative change amount of the abscissa is encoded in the binary system, and 7 bits of transmission are required. The quantity only needs 14 bits, and the required number of transmission bits is greatly reduced; for another example, the pressure information includes the pressure value, the pressure value of the reference point P1 is 100, and the pressure value of the current collection point P2 is 120, then the relative value of the current collection point P2 The relative change of pressure at the reference point P1 is 20.
  • coding in binary requires 7 digits
  • when transmitting the relative change of pressure coding in binary requires only 5 digits.
  • the time information includes the time value, for example, the time value of the reference point P1 is 22:40:10 (because the time interval between the two acquisition points is basically impossible to differ by more than one day, so only the transmission of hours, minutes and seconds Information only), the time value of the collection point P2 is 22:41:15, the relative change in time is 0:1:5, and the number of digits required for encoding in binary when transmitting the time value is as follows: 22 Encoding in binary requires 5 bits of transmission, 41 minutes in binary requires 6 bits of transmission, 15 seconds in binary requires 4 bits of transmission, and the total value of P2 It requires 15 bits of transmission, and when the relative change of transmission time is 0, encoding 1 minute and 5 seconds in binary system only needs 5 bits of transmission, and the number of transmission bits required is greatly reduced. Therefore, the use of relative coding can greatly reduce the number of transmission bits of each sampling point, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods,
  • the above-mentioned relative encoding method reduces the number of encoding bits, in extreme cases, the relative change of the two sampling points during writing due to the difference in the user's writing habits and usage patterns exceeds the encoding range corresponding to the relative encoding method. As a result, the sampling accuracy is affected.
  • the encoding of the abscissa when using fewer transmission digits (for example, 8 digits), its maximum range can only support [-255, 255].
  • the actual writing range of is more than 256 pixels, and the collection points of more than 256 cannot be accurately encoded, and the maximum can only be encoded to 255, so it will cause the accuracy of the handwriting information of the sampling point to be lost.
  • the relative change of the coordinates of the current sampling point is (15, 299).
  • the processor 16 encodes the coordinates of the current sampling point as (15, 255), that is, beyond the scope of accurate encoding
  • the coordinates of the boundary value of will be encoded according to the corresponding boundary value, where greater than 255 is encoded in 255, and less than -255 is encoded in -255, which causes an error in the relative change in coordinates; for example, pressure information is transmitted less
  • the number of digits for example, 8 bits
  • the relative change in pressure at the current sampling point is 300.
  • the processor 16 When encoding, the processor 16 encodes the pressure data at the current sampling point by 255, which causes an error in the pressure information; for example, When the time information uses fewer transmission bits (for example, 8 bits), it is assumed that the time occupies 1 bit, the minute occupies 1 bit, and the second occupies 6 bits. When the relative change of the current sampling point time is 2 minutes and 10 seconds, where The minute has exceeded the encoding range of the transmission digits of the minute by 1 bit [0,1]. When encoding, the processor 16 encodes the minute in the time value of the current sampling point by 1, that is, the relative change in time becomes 1 Minutes and 10 seconds, there is an error in the relative change in time.
  • the processor 16 is affected by the sampling accuracy.
  • the specific parameters and the transmission format determine the sampling interval of the writing point, wherein the specific parameters of the tablet 12 may be the resolution, size, preset pressure threshold, preset time threshold and other parameters of the tablet 12, in this embodiment, the specific parameters Including resolution, preset pressure threshold, and preset time threshold.
  • the processor 16 can calculate the sampling interval according to the specific parameters and the number of bits of the corresponding handwriting information in the transmission format, for example, the sampling interval includes the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval, the resolution Including the number of horizontal pixels and the number of vertical pixels, the sampling interval of the horizontal coordinate can be calculated according to the number of transmission bits (such as 8 bits) corresponding to the number of horizontal pixels and the horizontal coordinate, and the sampling interval of the vertical coordinate can be corresponding to the number of vertical pixels and the vertical coordinate value
  • the number of transmission bits (such as 8 bits) is calculated
  • the pressure sampling interval can be calculated according to the preset pressure threshold and the corresponding number of transmission bits (such as 8 bits)
  • the time sampling interval can be calculated according to the preset time threshold and time value
  • the number of transmission bits (such as 8 bits) is calculated, so that the processor 16 can calculate the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval, respectively
  • the relative handwriting information also includes relative position handwriting information, relative pressure handwriting information, and relative time.
  • Handwriting information for example, the relative change amount of coordinates includes the relative change amount of the abscissa and the relative change amount of the ordinate, the relative change amount of the abscissa is compressed according to the sampling interval of the abscissa, and the relative change amount of the ordinate is compressed according to the sampling interval of the ordinate, Compress the relative change of pressure according to the pressure sampling interval, and compress the relative change of time according to the time sampling interval.
  • the compression method can be the relative change divided by the corresponding sampling interval.
  • the compression method can also be other methods, which are not done here. Restrictions.
  • the compression method is the relative change amount divided by the corresponding sampling interval. Due to space limitations, the following will only take the compression of the relative change amount of the abscissa as an example according to the sampling interval of the abscissa.
  • the relative change amount of the ordinate is compressed according to the sampling interval of the ordinate, and the relative change of pressure is compressed according to the pressure sampling interval.
  • the principle of compressing the relative change of time according to the time sampling interval is similar to that of compressing the relative change of the abscissa according to the sampling interval of the abscissa, which will not be repeated here.
  • the relative change of the abscissa is 300
  • the resolution of the tablet 12 is 1080P (that is, 1920*1080), that is, the number of horizontal pixels is 1080.
  • the number of transmission bits of the relative change of the coordinate is 8 bits
  • the corresponding coding range is [-255, 255].
  • the abscissa When the relative change is 300, the coding range corresponding to 8-bit transmission digits has been exceeded [-255, 255], and the relative position handwriting information can be obtained by dividing the relative change of the abscissa by the sampling interval (ie, 300/5)
  • the relative handwriting information is encoded according to the transmission format to obtain the encoded data of the current sampling point, and then the encoded data is sent to the terminal device 20 to control the terminal device 20 to display the corresponding written content.
  • the handwriting data processing method and handwriting board 12 of the embodiment of the present application compress the handwriting information through relative encoding to obtain the relative change of the current sampling point, and further compress the relative change through the sampling interval to obtain the relative handwriting Information, not only reduces the amount of data transmission, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data loss, and thus ensure the display effect of the terminal device 20.
  • the relative change amount is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods
  • the problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved.
  • the number of transmission digits of the abscissa is N
  • the number of transmission ordinates is M
  • the number of pressure transmissions is J
  • the number of time transmissions is K
  • N, M, J and K are all positive integers
  • sampling interval includes abscissa sampling interval, ordinate sampling interval, pressure sampling interval and time sampling interval
  • specific parameters include resolution, preset pressure threshold, and preset time threshold
  • step 020 include:
  • the processor 16 is used to determine that the horizontal sampling interval is equal to the number of horizontal pixels divided by the Nth power of 2, the vertical sampling interval is equal to the number of vertical pixels divided by the Mth power of 2, and to determine the pressure sampling interval Is equal to the preset pressure threshold divided by the power of J; and the determined time sampling interval is equal to the preset time threshold divided by the power of K.
  • step 0202, step 0204, step 0206, and step 0208 may be implemented by the processor 16.
  • the sampling interval can be determined according to the specific parameters and the transmission format.
  • the sampling interval on the abscissa is equal to the number of horizontal pixels divided by 2.
  • Power of N the sampling interval of the ordinate is equal to the number of vertical pixels divided by the power of M.
  • the relative coordinate change amount is the same as the number of vertical pixels, and it is also within the coding range corresponding to the transmission format after dividing by the sampling interval to obtain relative handwriting information, that is, the collection point where the user writes in any writing area of the handwriting board 12
  • the handwriting information can be accurately encoded.
  • the pressure sampling interval is equal to the preset pressure threshold divided by the power of J
  • the time sampling interval is equal to the preset time threshold divided by the power of K
  • the preset pressure threshold can be based on the two collection points when the user writes normally
  • the maximum pressure difference between the two is determined
  • the preset time threshold can be determined according to the maximum time difference between the two collection points when the user normally writes, or the redundancy can be retained to increase the preset pressure threshold and the preset time threshold appropriately to make the collection
  • the relative change in pressure between the two collection points will not exceed the preset pressure threshold, and the relative change in time will not exceed the preset time threshold, so as to ensure that the handwriting information of the collection point collected in the extreme writing situation of the user can also be Code accurately.
  • step 030 includes:
  • 0302 Record the first point of the writing points on the writing handwriting as the reference point and obtain the handwriting information of the reference point;
  • 0306 Send the encoded data of the reference point to the terminal device 20.
  • the processor 16 is also used to record the first point of the writing points on the writing handwriting as a reference point and acquire the handwriting information of the reference point, encode the handwriting information of the reference point and record the encoding of the reference point
  • the data and the encoded data of the transmission reference point are sent to the terminal device 20.
  • the processor 16 takes the first point of the writing point of the handwriting as a reference point and collects the handwriting information of the reference point. After the reference point is determined, since the relative encoding method is adopted, the tablet 12 The handwriting information of the sampling points collected in the subsequent transmission all transmit relative handwriting information, that is, the handwriting information of other sampling points are determined based on the handwriting information of the reference point. If the handwriting information of the reference point deviates, it will Affect the accuracy of the handwriting information of all sampling points. Therefore, the reference point needs to directly transmit handwriting information instead of relative handwriting information.
  • the handwriting information of the reference point can be encoded according to the larger transmission bit number. As shown in the transmission format of the reference point shown in FIG. 5, the position information S1 occupies 32 bits, the pressure information S2 occupies 16 bits, and the time information S3 occupies 8 bits.
  • the terminal device 20 Since the terminal device 20 only needs to know the sequence of each sampling point to connect in order to display the stroke trajectory, that is, the terminal device 20 does not know the time information of the reference point, nor will it affect the stroke trajectory, and the latter sampling
  • the relative change in time of the point must be greater than the relative change in time of the previous sampling point, so the time information of the reference point can be encoded with 0, and then the writing order of the collection point can be determined according to the magnitude of the relative change in time. Therefore, the number of transmission bits required to transmit the handwriting information of the reference point is reduced.
  • the reference point is transmitted with a larger number of transmission bits, since the reference point occupies only a very small part of the entire handwriting, it basically has no effect on the transmission bandwidth of the handwriting information.
  • the processor 16 sends the encoded data of the reference point to the terminal device 20.
  • step 030 further includes:
  • the processor 16 is also used to determine whether a confirmation signal fed back by the terminal device 20 is received within a preset time.
  • the confirmation signal is that the terminal device 20 receives the encoded data of the reference point and returns it to the tablet 12 Signal; and if the confirmation signal of the terminal device 20 is not received within a preset time, the encoded data of the reference point is retransmitted.
  • step 0307 and step 0308 can be implemented by the processor 16.
  • the terminal device 20 may control the processor 16 to start sending the encoded intermediate writing data to the terminal device 20.
  • the handwriting pad 12 may collect a sampling point and obtain the encoded intermediate writing data immediately.
  • the intermediate writing data is sent to the terminal device 20, or the encoded intermediate writing data of multiple sampling points can be obtained and sent together, which can be determined according to the data processing capability of the terminal device 20.
  • After sending the encoded intermediate writing data of the absolute sampling point since the current sampling point is obtained based on the absolute sampling point, in order to ensure the accuracy of the writing data of the entire stroke, it is necessary to ensure that the terminal device 20 receives the absolute sampling point encoding
  • the processor 16 determines whether the terminal device 20 has received the absolute sampling point encoded intermediate writing data.
  • the processor 16 determines that the absolute sampling point encoded intermediate writing data has not been received, it controls the processor 16 to send the absolute sampling point again. After the encoded intermediate writing data is ensured, the terminal device 20 receives the absolute sampling point encoded intermediate writing data, and then controls the processor 16 to send the subsequent intermediate sampling data after encoding. Since each stroke has an absolute sampling point, each time the tablet 12 receives the encoded intermediate writing data that ends the sampling point (that is, the last sampling point of each stroke), the processor 16 will judge the terminal again Whether the device 20 receives the encoded intermediate writing data of the absolute sampling point of the next stroke, thereby ensuring that the encoded intermediate writing data of the absolute sampling point of each stroke is received by the terminal device 20.
  • the sampling interval includes an abscissa sampling interval, an ordinate sampling interval, a pressure sampling interval, and a time sampling interval; step 030 further includes:
  • 0309 Collect the writing points on the writing handwriting according to one of the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval.
  • the handwriting board 12 samples the handwriting according to a predetermined sampling rate, so it can only be determined according to one of the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval
  • the sampling rate is used to collect the writing points on the writing handwriting, where the sampling rate refers to the number of sampling points collected per second by the tablet 12, such as 300 sampling points per second.
  • the sampling rate is 300 sampling points per second, and the sampling interval of the abscissa is 5, and the sampling rate is determined according to the sampling interval of the abscissa.
  • the sampling rate is the original sampling rate divided by the sampling interval of the abscissa, that is, the actual sampling The rate becomes 60 sampling points per second, for example, the sampling rate is 300 sampling points per second, the ordinate sampling interval is 6, and the sampling rate is determined according to the ordinate sampling interval refers to: the sampling rate is the original The sampling rate is divided by the ordinate sampling interval, that is, the actual sampling rate becomes 50 sampling points per second; for another example, the sampling rate is 300 sampling points per second, and the pressure sampling interval is 3, according to the pressure sampling interval Determining the sampling rate refers to: the sampling rate is the original sampling rate divided by the pressure sampling interval, that is, the actual sampling rate becomes 100 sampling points per second; for another example, the sampling rate is 300 sampling points per second, The time sampling interval is 3, and determining the sampling rate according to the time sampling interval refers to: the sampling rate is the original sampling rate divided by the time sampling interval, that is, the actual sampling rate becomes 100 sampling points per second.
  • the resolution of the current terminal device 20 is generally higher, even if the actual sampling rate is 1/5 of the original sampling rate (that is, one sampling point is collected every 4 sampling points), when the terminal device 20 displays, Will not have a big impact on the display effect. Moreover, after reducing the sampling rate by the sampling interval, the number of sampling points required to be transmitted per second is reduced, thereby further compressing the amount of data transmitted and increasing the data compression ratio.
  • the user can customize the sampling rate.
  • the user is not satisfied with the display effect obtained at the current sampling rate, and may feel that the display effect of the handwriting obtained by the small sampling rate is not delicate enough, and the user can manually adjust the sampling at this time Rate, for example, the tablet has a sampling rate adjustment knob, the user can adjust the knob to adjust the sampling rate of the tablet, or the terminal device setting interface includes the sampling rate setting, the user can adjust the sampling rate through the terminal device, the terminal device controls the tablet to The sampling rate set by the user is used for sampling.
  • the relative change includes the position relative change, the pressure relative change and the time relative change
  • step 040 includes:
  • the processor 16 is used to record the difference between the coordinate value in the position information of the current sampling point and the coordinate value in the position information of the reference point as the relative change in position, and the pressure information of the current sampling point The difference between the pressure value in the pressure value and the pressure information in the reference point is recorded as the relative change in pressure, and the difference between the time value in the time information of the current sampling point and the time value in the time information of the reference point is recorded as the time relative The amount of change.
  • step 0402, step 0404, and step 0406 may be implemented by the processor 16.
  • the processor 16 calculates the relative change amount of the handwriting information of the current collection point and the handwriting information of the reference point, where the relative position change amount is the coordinate value and the reference point in the position information of the current sampling point.
  • the difference of the coordinate value in the position information of the relative pressure is the difference between the pressure value in the pressure information of the current sampling point and the pressure value in the pressure information of the reference point
  • the relative time change is the time information of the current sampling point
  • the processor 16 obtains the relative change by calculating the difference between the handwriting information of the current collection point and the handwriting information of the reference point. accurate.
  • the handwriting data processing method further includes:
  • 021 Send the specific parameters and sampling interval of the input device 10 to the terminal device 20 communicatively connected to the input device 10.
  • the processor 16 is used to send the specific parameters and sampling interval of the input device 10 to the terminal device 20 that is in communication connection with the input device 10.
  • step 021 can be implemented by the processor 16.
  • the tablet 12 when writing, the tablet 12 needs to communicate with the terminal device 20 before data can be transmitted.
  • the tablet 12 first establishes a communication connection with the terminal device 20.
  • the communication connection can be either a wired connection or a wireless connection. Wired connection such as USB connection, etc., wireless connection such as Bluetooth connection, etc.
  • the processor 16 sends the specific parameters and sampling interval of the tablet 12 to the terminal device 20.
  • specific parameters such as the resolution of the tablet 12 are sent to the terminal device 20, and the terminal device 20 can zoom or enlarge the writing content on the tablet 12 according to the resolution of the tablet 12 and its own resolution, so as not to The written content becomes too small or too large when displayed on the terminal device 20 to ensure the display effect.
  • the terminal device 20 may be determined according to the ratio of the relative change in pressure at the current sampling point to the preset pressure threshold and/or the ratio of the relative change in time to the preset time threshold according to the preset pressure threshold and the preset time threshold in the specific parameter
  • the thickness, transparency and other attributes of the handwriting can more accurately adjust the display effect of the handwriting.
  • the sending sampling interval is because the relative handwriting information is obtained by compressing the relative position change, pressure relative change and time relative change respectively according to the corresponding sampling interval, so the terminal device 20 acquires the encoded relative handwriting information to In order to restore the relative handwriting information to the corresponding relative change in the generated encoded data, the terminal device 20 decodes the obtained relative handwriting information after acquiring the encoded data, and then corresponds the relative change in position, the relative change in pressure and the relative change in time The relative handwriting information is restored at the corresponding sampling intervals to obtain the relative position change, pressure relative change and time relative change before compression, thereby ensuring the accuracy of the sampling points acquired by the terminal device 20.
  • the relative change amount of the abscissa of the sampling point is 510
  • the compression and reduction of the relative change of the ordinate, the relative change of pressure and the relative change of time are the same as the compression and reduction of the relative change of the abscissa and will not be repeated here.
  • the relative position change includes the relative change of the abscissa and the relative change of the ordinate
  • the relative handwriting information includes relative position handwriting information, relative pressure handwriting information and relative time handwriting information ;
  • Step 050 includes:
  • the processor 16 is used to divide the relative change of the abscissa by the value of the sampling interval of the abscissa and the value of the relative change of the ordinate to the sampling interval of the ordinate as the relative position handwriting information, the pressure The value of the relative change amount divided by the pressure sampling interval is recorded as relative pressure handwriting information, and the value of the time relative change amount divided by the time sampling interval is recorded as relative time handwriting information.
  • step 0502, step 0504, and step 0506 may be implemented by the processor 16.
  • the relative change amount of the abscissa is divided by the value of the sampling interval of the abscissa and the ordinate
  • the value of the relative change divided by the ordinate sampling interval is recorded as relative position handwriting information
  • the value of the relative change in pressure divided by the pressure sampling interval is recorded as relative pressure handwriting information
  • the value of the relative time change is divided by the time sampling interval
  • the relative change of the abscissa, the relative change of the ordinate, the relative change of pressure and the relative change of time are divided by the corresponding sampling interval
  • the sampling interval is based on the specific parameters of the tablet 12 and the tablet 12
  • the number of transmission bits during data transmission with the terminal device 20 is obtained.
  • the coding range be dynamically expanded, but also the data compression ratio can be further improved.
  • the dynamic expansion of the coding range refers to: the number of transmission digits of the tablet 12 during actual data transmission does not increase, but the relative handwriting information is compressed according to the sampling interval before transmission, and after transmission, according to the sampling interval The relative handwriting information is restored, so as to dynamically expand the coding range, that is, the coding range of the handwriting information becomes larger, but the actual number of transmission bits remains unchanged.
  • the input device 10 (handwriting board 12) includes a memory 122, and after step 050, the handwriting data processing method further includes:
  • the processor 16 is also used to cache the encoded data of the current sampling point into the memory 122 of the input device 10.
  • step 070 may be implemented by the processor 16.
  • the encoded data is cached in the memory 122.
  • the processor 16 may collect the encoded data of the collection point after the tablet 12 collects an acquisition point Cache to the memory 122 and then send to the terminal device 20; for another example, the processor 16 also caches the encoded data of the multiple collection points in the memory 122 after collecting multiple collection points on the tablet 12 and then collectively sends multiple collections together
  • the encoded data of the point is given to the terminal device 20; the encoded data of the collected point is buffered through the memory 122, and can be easily taken out when needed.
  • the sampling point further includes an end sampling point, and the end sampling point is a sampling point whose pressure data is less than a preset pressure value.
  • the user writing is generally based on strokes, so the pressure of the sampling point collected at the end of a stroke written by the user is generally less than or equal to the preset pressure value (for example, the preset pressure value is 0), so the tablet
  • the preset pressure value for example, the preset pressure value is 0
  • the tablet When the pressure data is less than or equal to the preset pressure value, the point will be marked as the end sampling point, that is, the last sampling point of a stroke, the sampling is also in stroke units, so the reference point is each stroke when the user writes The first sampling point or the first sampling point collected after the end of the sampling point.
  • the pen tablet can accurately break the pen to ensure the accuracy of the writing data of each stroke transmitted to the terminal device.
  • the current sampling point is recorded As a reference point.
  • the handwriting board collects the handwriting information of the sampling point to obtain the relative change and judges Whether the relative change of the abscissa, the relative change of the ordinate, the relative change of the pressure or the relative change of the time of the current sampling point are within the corresponding coding range, for example, the relative change of position includes the relative change of the abscissa and the relative change of the ordinate Amount, the relative change of the abscissa, the relative change of the ordinate, the relative change of pressure and the relative change of time all correspond to the 8-bit coded digits (ie, the coding range [-255, 255]); when the relative change of the abscissa is 280 indicates that the relative change of the abscissa is outside the coding range [-255,255], and the relative change of the abscissa cannot be accurately coded according to
  • the current sampling point is transmitted as the reference point, and the current sampling point is transmitted.
  • the handwriting information without transmitting the relative handwriting information, thereby preventing the deterioration of the accuracy of the written data caused by some extreme situations, and because the probability of extreme situations is small, the number of reference points will not become too much.
  • the effect of compression ratio is small.
  • the handwriting system 100 includes a terminal device 20 and the input device 10 of any of the foregoing embodiments.
  • the terminal device 20 is communicatively connected to the input device 10, and the terminal device 20 is used to receive input data sent by the input device 10 and display it according to the input data.
  • the handwriting system 100 of the embodiment of the present application compresses the handwriting information through relative encoding to obtain the relative change amount of the current sampling point, and further compresses the relative change amount through the sampling interval to obtain relative handwriting information, which not only reduces the data transmission The amount of data, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data packet loss, thereby ensuring the display effect of the terminal device.
  • the relative change is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods
  • the problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved.
  • the terminal device 20 can restore the relative handwriting information according to the sampling interval to ensure the accuracy of the handwriting information of the sampling point.
  • the handwriting system 100 further includes a stylus 14, and the handwriting board 12 is used to receive the writing operation of the stylus 14 to form writing data.
  • the user can restore the real writing experience by holding the stylus 14 for writing operation.
  • the stylus 14 includes a pressure sensor 142.
  • the pressure sensor 142 is disposed at the position of the pen tip.
  • the pressure sensor 142 can collect pressure data when the stylus 14 performs a writing operation on the tablet 12.
  • the handwriting board 12 can calculate the pressure value of the sampling point according to the correspondence between the pressure data and the sampling point.
  • the stylus 14 detects the pressure, it is only necessary to detect the pressure of the component (ie, the pen tip) that the stylus 14 is in contact with the tablet 12. Compared with detecting the pressure of the entire writing area through the tablet 12, the detection accuracy is higher.

Abstract

A handwriting data processing method, an input device (10) and a handwriting system (100). The handwriting data processing method is applied to the input device (10), and the handwriting data processing method comprises: acquiring specific parameters of the input device (10) and the transmission format when carrying out data transmission between the input device (10) and a terminal device (20); determining the sampling interval of writing points according to the specific parameters and the transmission format; determining a reference point for written handwriting, collecting writing points on the written handwriting according to the sampling interval, and obtaining handwriting information of a current sampling point; calculating the relative variation between the handwriting information of the current sampling point and the handwriting information of the reference point; determining relative handwriting information of the current sampling point according to the sampling interval and the relative variation, and encoding the relative handwriting information as encoded data of the current sampling point according to the transmission format; and sending the encoded data of the current sampling point to the terminal device (20).

Description

笔迹数据处理方法、输入设备和手写系统Handwriting data processing method, input device and handwriting system 技术领域Technical field
本申请涉及输入设备领域,特别涉及一种笔迹数据处理方法、输入设备和手写系统。The present application relates to the field of input devices, in particular to a handwriting data processing method, input device and handwriting system.
背景技术Background technique
现有手写系统的输入设备(如手写板)通过采集用户手写时的采样点的数据并发送给终端设备进行显示,但由于蓝牙等传输方式的传输速率的限制,在某些场合如教室或会议室等时,多个手写板同时传输给一个显示终端,使得传输的数据量超出了蓝牙等传输方式的传输速率,导致数据丢包,从而影响终端设备的显示效果。The input device (such as a tablet) of the existing handwriting system collects the data of the sampling point when the user writes and sends it to the terminal device for display, but due to the transmission rate limitation of Bluetooth and other transmission methods, in some occasions such as classrooms or conferences When the room is waiting, multiple handwriting boards are simultaneously transmitted to a display terminal, so that the amount of data transmitted exceeds the transmission rate of Bluetooth and other transmission methods, resulting in data loss, which affects the display effect of the terminal device.
发明内容Summary of the invention
本申请的实施方式提供一种笔迹数据处理方法、输入设备和手写系统,能够压缩手写系统传输的数据,减少数据丢包,保证终端设备的显示效果。The embodiments of the present application provide a handwriting data processing method, an input device, and a handwriting system, which can compress the data transmitted by the handwriting system, reduce data packet loss, and ensure the display effect of the terminal device.
本申请提供一种笔迹数据处理方法,应用于输入设备,所述笔迹数据处理方法包括:获取所述输入设备的特定参数以及所述输入设备和终端设备在进行数据传输时的传输格式;根据所述特定参数和所述传输格式确定书写点的采样间隔;确定书写笔迹的基准点,并根据所述采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息;计算所述当前采样点的笔迹信息与所述基准点的笔迹信息的相对变化量;根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,根据所述传输格式编码所述相对笔迹信息为所述当前采样点的编码数据;及将所述当前采样点的编码数据发送至所述终端设备。The present application provides a handwriting data processing method, which is applied to an input device. The handwriting data processing method includes: acquiring specific parameters of the input device and a transmission format of the input device and a terminal device during data transmission; The specific parameters and the transmission format determine the sampling point of the writing point; determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point; calculate the current sampling The relative change amount of the handwriting information of the point and the reference point; determine the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encode the relative handwriting information according to the transmission format Is the encoded data of the current sampling point; and sending the encoded data of the current sampling point to the terminal device.
本申请还提供一种输入设备,所述输入设备包括处理器,所述处理器用于获取所述输入设备的特定参数以及所述输入设备和终端设备在进行数据传输时的传输格式、根据所述特定参数和所述传输格式确定书写点的采样间隔、确定书写笔迹的基准点,并根据所述采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息、计算所述当前采样点的笔迹信息与所述基准点的笔迹信息的相对变化量、根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,根据所述传输格式编码所述相对笔迹信息为所述当前采样点的编码数据、及将所述当前采样点的编码数据发送至所述终端设备。The present application also provides an input device. The input device includes a processor, and the processor is used to acquire specific parameters of the input device and a transmission format of the input device and the terminal device when performing data transmission. The specific parameters and the transmission format determine the sampling point of the writing point, determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and acquire the handwriting information of the current sampling point and calculate the current sampling point The relative change amount of the handwriting information of the reference point and the handwriting information of the reference point, the relative handwriting information of the current sampling point is determined according to the sampling interval and the relative change amount, and the relative handwriting information is encoded according to the transmission format as The encoded data of the current sampling point, and sending the encoded data of the current sampling point to the terminal device.
本申请还提供一种手写系统,所述手写系统包括终端设备和上述实施方式的输入设备,所述终端设备与所述输入设备通信连接,所述终端设备用于接收所述输入设备发送的输入数据并根据所述输入数据进行显示。The present application also provides a handwriting system. The handwriting system includes a terminal device and the input device of the foregoing embodiment. The terminal device is in communication connection with the input device, and the terminal device is used to receive input sent by the input device The data is displayed according to the input data.
本申请实施方式的笔迹数据处理方法、输入设备和手写系统通过相对编码的方式对笔 迹信息进行压缩以得到当前采样点的相对变化量,并通过采样间隔对相对变化量进一步压缩以得到相对笔迹信息,不仅减少了数据的传输量,使得传输的数据速率基本不会超出蓝牙等传输方式的传输速率限制,防止数据丢包,从而保证了终端设备的显示效果。且通过采样间隔对相对变化量进一步压缩,在不增加相对编码位数的基础上,动态扩大了编码范围,使得由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围导致采样精度受到影响的问题得到解决。The handwriting data processing method, input device, and handwriting system according to the embodiments of the present application compress the handwriting information through relative encoding to obtain the relative change amount of the current sampling point, and further compress the relative change amount through the sampling interval to obtain relative handwriting information , Not only reduces the amount of data transmission, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data packet loss, thus ensuring the display effect of the terminal device. Moreover, the relative change amount is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods The problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved.
本申请的实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实施方式的实践了解到。Additional aspects and advantages of the embodiments of the present application will be partially given in the following description, and some will become apparent from the following description, or be learned through practice of the embodiments of the present application.
附图说明BRIEF DESCRIPTION
本申请的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
图1是本申请某些实施方式的笔迹数据处理方法的流程示意图。FIG. 1 is a schematic flowchart of a handwriting data processing method according to some embodiments of the present application.
图2是本申请某些实施方式的手写系统的结构示意图。2 is a schematic structural diagram of a handwriting system according to some embodiments of the present application.
图3是未经本笔迹数据处理方法处理的传输格式的示意图。FIG. 3 is a schematic diagram of a transmission format that is not processed by the handwriting data processing method.
图4是本申请某些实施方式的当前采集点的传输格式示意图。4 is a schematic diagram of a transmission format of a current collection point in some embodiments of the present application.
图5是本申请某些实施方式的基准点的传输格式示意图。5 is a schematic diagram of a transmission format of a reference point in some embodiments of the present application.
图6是本申请某些实施方式的笔迹数据处理方法的原理示意图。FIG. 6 is a schematic diagram of principles of a handwriting data processing method according to some embodiments of the present application.
图7至图14是本申请某些实施方式的笔迹数据处理方法的流程示意图。7 to 14 are schematic flowcharts of a handwriting data processing method according to some embodiments of the present application.
具体实施方式detailed description
下面详细描述本申请的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the drawings, in which the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are exemplary, and are only used to explain the present application, and cannot be construed as limiting the present application.
请参阅图1和图2,本申请实施方式的笔迹数据处理方法应用于输入设备10,笔迹数据处理方法包括以下步骤:1 and 2, the handwriting data processing method according to the embodiment of the present application is applied to the input device 10, and the handwriting data processing method includes the following steps:
010:获取输入设备10的特定参数以及输入设备10和终端设备20在进行数据传输时的传输格式;010: Obtain the specific parameters of the input device 10 and the transmission format of the input device 10 and the terminal device 20 when performing data transmission;
020:根据特定参数和传输格式确定书写点的采样间隔;020: Determine the sampling interval of writing points according to specific parameters and transmission format;
030:确定书写笔迹的基准点,并根据采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息;030: Determine the reference point of the writing handwriting, and collect the writing points on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point;
040:计算当前采样点的笔迹信息与基准点的笔迹信息的相对变化量;040: Calculate the relative change between the handwriting information of the current sampling point and the reference point;
050:根据采样间隔和相对变化量确定当前采样点的相对笔迹信息,根据传输格式编码相对笔迹信息为当前采样点的编码数据;及050: Determine the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encode the relative handwriting information as the encoded data of the current sampling point according to the transmission format; and
060:将当前采样点的编码数据发送至终端设备20。060: Send the encoded data of the current sampling point to the terminal device 20.
在某些实施方式中,输入设备10包括处理器16,处理器16用于获取输入设备10的特定参数以及输入设备10和终端设备20在进行数据传输时的传输格式、根据特定参数和传输格式确定书写点的采样间隔、确定书写笔迹的基准点,并根据采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息、计算当前采样点的笔迹信息与基准点的笔迹信息的相对变化量、根据采样间隔和相对变化量确定当前采样点的相对笔迹信息,根据传输格式编码相对笔迹信息为当前采样点的编码数据、及将当前采样点的编码数据发送至终端设备20。In some embodiments, the input device 10 includes a processor 16, and the processor 16 is used to obtain specific parameters of the input device 10 and the transmission format of the input device 10 and the terminal device 20 during data transmission, according to the specific parameters and the transmission format Determine the sampling interval of the writing point, determine the reference point of the handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point, calculate the relative of the handwriting information of the current sampling point and the reference point The change amount, the relative handwriting information of the current sampling point is determined according to the sampling interval and the relative change amount, the relative handwriting information is encoded according to the transmission format as the encoded data of the current sampling point, and the encoded data of the current sampling point is sent to the terminal device 20.
输入设备10可以是手写板12、手写笔14等,可以理解,输入设备10还可以是其他装置如终端设备20的触控屏等,在此不做限制,本申请实施方式中,输入设备10为手写板12。The input device 10 may be a tablet 12, a stylus 14, etc. It can be understood that the input device 10 may also be other devices such as a touch screen of the terminal device 20, which is not limited herein. In the embodiment of the present application, the input device 10 12 for the tablet.
也即是说,步骤010、步骤020、步骤030、步骤040、步骤050和步骤060可以由手写板12执行。That is to say, step 010, step 020, step 030, step 040, step 050, and step 060 may be executed by the tablet 12.
具体地,手写板12的处理器16首先获取手写板12自身的特定参数(如分辨率、尺寸等参数信息)和与终端设备20进行数据传输的传输格式,在使用绝对编码方式对采集点的笔迹信息进行编码时,为了保障所有笔迹信息均可以被准确地被编码,绝对编码方式的传输格式一般如图3所示,其中,笔迹信息包括位置信息、压力信息和时间信息,位置信息指的是采集点在手写板12的输入区域的坐标值。Specifically, the processor 16 of the tablet 12 first obtains the specific parameters of the tablet 12 itself (such as resolution, size and other parameter information) and the transmission format for data transmission with the terminal device 20. When handwriting information is encoded, in order to ensure that all handwriting information can be accurately encoded, the transmission format of the absolute encoding method is generally shown in FIG. 3, where the handwriting information includes position information, pressure information, and time information. The position information refers to It is the coordinate value of the collection point in the input area of the tablet 12.
请参照图3,图3为现有技术的一种传输格式的示意图,位置信息S1所需的传输位数为32位,压力信息S2的传输位数为16位,时间信息S3的传输位数为32位,若使用图3的传输格式进行笔迹信息的传输,在会议或课堂教学等多人同时在线书写和展示场景下,假定40人,按采样率为平均每300ms采集300个采样点对一个字进行采集,且按中文字使用频率统计,每个字平均是7.3笔左右,则理论上需要近3.2Mbps的带宽的才能进行流畅书写。也即是说,采用图3的传输格式进行数据传输时,每个采集点所需的编码位数较大,在一些如会议或课堂教学等场景会占用过多带宽,容易超出蓝牙等传输方式的传输速率限制,导致数据丢包,进而影响终端设备20的显示效果。Please refer to FIG. 3, which is a schematic diagram of a transmission format in the prior art. The transmission bit number required for position information S1 is 32 bits, the transmission bit number for pressure information S2 is 16 bits, and the transmission bit number for time information S3 It is 32 bits. If handwriting information is transmitted using the transmission format of FIG. 3, in a scenario where multiple people write and display at the same time in a meeting or classroom teaching, assuming 40 people, an average of 300 sampling point pairs are collected every 300ms at the sampling rate. One word is collected and counted according to the frequency of Chinese characters. The average of each word is about 7.3 strokes. In theory, a bandwidth of nearly 3.2Mbps is required to write smoothly. That is to say, when using the transmission format of Figure 3 for data transmission, the number of coding bits required for each collection point is large, and in some scenarios such as conferences or classroom teaching, it will occupy too much bandwidth and easily exceed Bluetooth and other transmission methods. The transmission rate limitation of , results in data packet loss, which in turn affects the display effect of the terminal device 20.
然而,真实的书写区域只占手写板12的极小一部分,用户在书写时,手写板12根据采样间隔进行采样得到第一个采样点并作为基准点,针对每一笔书写而言,下一个采样点相对于基准点,位置和压力都只发生很小的变化,时间间隔上相对于上一个采样点的变化也很小。因此,本申请实施方式的手写板12可以采用相对编码方式来对笔迹信息进行压缩, 在使用相对编码方式对笔迹信息进行压缩后,在传输时无需传输所需传输位数较大的笔迹信息,而是传输所需传输位数较小的相对笔迹信息即可。However, the real writing area only occupies a very small part of the tablet 12. When the user writes, the tablet 12 samples according to the sampling interval to obtain the first sampling point and use it as a reference point. For each writing, the next The sampling point has only a small change in position and pressure relative to the reference point, and the change in the time interval from the previous sampling point is also small. Therefore, the handwriting board 12 according to the embodiment of the present application may use a relative encoding method to compress the handwriting information. After the handwriting information is compressed using the relative encoding method, there is no need to transmit the handwriting information with a larger number of transmission bits required during transmission. Instead, it is sufficient to transmit the relative handwriting information with a smaller transmission bit number.
请参照图4,图4为本申请其中一实施例提供的相对编码格式下的传输格式的示意图。在本实施例中,位置信息S1所需的传输位数为16位,压力信息S2所需的传输位数为8位,时间信息S3所需的传输位数为8位。同样的,此时若使用图4的传输格式进行笔迹信息的传输,在会议或课堂教学等多人同时在线书写和展示场景下,假定40人,按采样率为平均每300ms采集300个采样点对一个字进行采集,且按中文字使用频率统计,每个字平均是7.3笔左右,则理论上只需要1.3Mbps的带宽就能进行流畅书写,数据压缩比能达到近40%。当然,如图5所示的基准点的传输格式,位置信息S1所需的传输位数为32位,压力信息S2所需的传输位数为16位,时间信息S3所需的传输位数为8位。为了保证基准点的笔迹信息的准确性,在传输基准点的笔迹信息时,按照较大的传输位数进行传输,保证基准点的笔迹信息可以被准确地编码。可以理解,虽然基准点以较大的传输位数进行传输,但由于基准点仅占整个书写笔迹的极小一部分,对最终传输时的带宽基本没有影响,所以在笔迹信息使用相对编码方式进行编码后,数据压缩比依旧可接近40%。Please refer to FIG. 4, which is a schematic diagram of a transmission format in a relative encoding format provided by one embodiment of this application. In this embodiment, the number of transmission bits required for position information S1 is 16 bits, the number of transmission bits required for pressure information S2 is 8 bits, and the number of transmission bits required for time information S3 is 8 bits. Similarly, if the handwriting information is transmitted using the transmission format of FIG. 4, in a scenario where multiple people write and display at the same time in a meeting or classroom teaching, assuming 40 people, an average of 300 sampling points are collected every 300ms at the sampling rate Collecting a word, and according to the frequency of Chinese character usage, each word averages about 7.3 strokes. In theory, only 1.3Mbps of bandwidth can be used to write smoothly, and the data compression ratio can reach nearly 40%. Of course, as shown in the transmission format of the reference point shown in FIG. 5, the transmission bit number required for the position information S1 is 32 bits, the transmission bit number required for the pressure information S2 is 16 bits, and the transmission bit number required for the time information S3 is 8 bits. In order to ensure the accuracy of the handwriting information of the reference point, when the handwriting information of the reference point is transmitted, the transmission is performed according to a larger number of transmission bits to ensure that the handwriting information of the reference point can be accurately encoded. It can be understood that although the reference point is transmitted with a larger number of transmission bits, since the reference point only occupies a very small part of the entire handwriting, it basically has no effect on the final transmission bandwidth, so the handwriting information is encoded using a relative encoding method After that, the data compression ratio can still be close to 40%.
在使用相对编码方式对笔迹信息进行压缩时,如图6所示,以手写板12的书写区域的左上角为坐标原点O(0,0),手写板12的短边为X轴,手写板12的长边为Y轴建立坐标系XOY(下称,绝对坐标系),当用户在手写板12的书写区域内进行书写时,手写板12对书写轨迹上的各书写点进行采样以形成采样点,以书写轨迹上中的第一个采样点作为基准点,例如,位置信息包括坐标值,手写板12的分辨率为1080P(即,1920*1080),手写板12采集用户的书写轨迹第一个采样点P1作为基准点,假定P1的坐标值为(510,400),P1之后的采集点的位置相对变化量(即,坐标相对变化量)均是相对于基准点P1在绝对坐标系下的坐标值计算得到的相对坐标值,例如,当前采集点P2的在绝对坐标系下的坐标值为(600,500),则当前采集点P2的相对于基准点P1的坐标相对变化量为(90,100);若传输当前采集点的坐标值,则横坐标值600以2进制进行编码需要10位传输位数,纵坐标以2进制进行编码需要9位传输位数,坐标值以2进制进行编码共需要19位传输位数。而传输坐标相对变化量时,横坐标相对变化量的90以2进制进行编码需要7位传输位数,纵坐标相对变化量以2进制进行编码需要7位传输位数,则坐标相对变化量只需要14位,所需的传输位数大幅减少;再例如,压力信息包括压力值,基准点P1的压力值为100,当前采集点P2的压力值为120,则当前采集点P2的相对于基准点P1的压力相对变化量为20,传输压力值时,以2进制进行编码需要7位,而传输压力相对变化量时,以2进制进行编码只需要5位,所需的传输位数大幅减少;再例如,时间信息包括时间值,例如基准点P1的时间值是22时40分10秒(由于两个采集点的时间间隔基本不可能相差一天以上,所以 只需传输时分秒信息即可),采集点P2的时间值为22时41分15秒,则时间相对变化量为0时1分5秒,传输时间值时,以2进制进行编码所需位数如下:22时以2进制进行编码需要5位传输位数,41分以2进制进行编码需要6位传输位数,15秒以2进制进行编码需要4位传输位数,传输P2的时间值总共需要15位传输位数,而传输时间相对变化量0时,以2进制对1分5秒进行编码仅需要5位传输位数即可,所需的传输位数大幅减少。因此,使用相对编码可大幅度减小每个采样点的传输位数,从而使得传输的数据速率基本不会超出蓝牙等传输方式的传输速率限制,防止数据丢包,从而保证了终端设备20的显示效果。When the handwriting information is compressed using a relative coding method, as shown in FIG. 6, the upper left corner of the writing area of the tablet 12 is the coordinate origin O(0,0), the short side of the tablet 12 is the X axis, and the tablet The long side of 12 establishes a coordinate system XOY (hereinafter referred to as the absolute coordinate system) for the Y axis. When the user writes in the writing area of the tablet 12, the tablet 12 samples each writing point on the writing track to form a sample The first sampling point on the writing track is used as a reference point. For example, the position information includes coordinate values. The resolution of the tablet 12 is 1080P (that is, 1920*1080). The tablet 12 collects the user’s writing track. A sampling point P1 is used as a reference point, assuming that the coordinate value of P1 is (510, 400), the relative change in the position of the collection point after P1 (ie, the relative change in coordinates) is relative to the reference point P1 in the absolute coordinate system The relative coordinate value calculated by the coordinate value of the current point, for example, the coordinate value of the current collection point P2 in the absolute coordinate system is (600, 500), then the relative change of the coordinate of the current collection point P2 relative to the reference point P1 is (90,100); If the coordinate value of the current collection point is transmitted, the encoding of the abscissa 600 in binary requires 10 digits of transmission, and the encoding of the ordinate in binary requires 9 digits of transmission, coordinate value Encoding in binary requires a total of 19 transmission digits. When the relative change amount of the coordinate is transmitted, 90 bits of the relative change amount of the abscissa is encoded in the binary system, and 7 bits of transmission are required. The quantity only needs 14 bits, and the required number of transmission bits is greatly reduced; for another example, the pressure information includes the pressure value, the pressure value of the reference point P1 is 100, and the pressure value of the current collection point P2 is 120, then the relative value of the current collection point P2 The relative change of pressure at the reference point P1 is 20. When transmitting the pressure value, coding in binary requires 7 digits, and when transmitting the relative change of pressure, coding in binary requires only 5 digits. The required transmission The number of digits is greatly reduced; for another example, the time information includes the time value, for example, the time value of the reference point P1 is 22:40:10 (because the time interval between the two acquisition points is basically impossible to differ by more than one day, so only the transmission of hours, minutes and seconds Information only), the time value of the collection point P2 is 22:41:15, the relative change in time is 0:1:5, and the number of digits required for encoding in binary when transmitting the time value is as follows: 22 Encoding in binary requires 5 bits of transmission, 41 minutes in binary requires 6 bits of transmission, 15 seconds in binary requires 4 bits of transmission, and the total value of P2 It requires 15 bits of transmission, and when the relative change of transmission time is 0, encoding 1 minute and 5 seconds in binary system only needs 5 bits of transmission, and the number of transmission bits required is greatly reduced. Therefore, the use of relative coding can greatly reduce the number of transmission bits of each sampling point, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, preventing data loss, thereby ensuring the terminal device 20 display effect.
使用上述相对编码的方式虽然缩减了编码位数,但是在极端情况下,由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围,导致采样精度受到影响。以横坐标值编码为例,在采用较少的传输位数(例如8位)时,它的最大范围只能支持[-255,255],由于不同用户的书写习惯不同,就会有部分用户的实际写字范围超过256个像素点,而超过256的采集点是无法准确编码的,最大只能编码为255,所以会导致采样点的笔迹信息的精度丢失。例如,当前采样点的坐标相对变化量为(15,299),处理器16在进行编码时会将该当前采样点的坐标值按(15,255)进行编码,即超出可准确进行编码的范围的边界值的坐标会按对应的边界值进行编码,其中,大于255则以255编码,小于-255则以-255编码,使得坐标相对变化量出现误差;再例如,压力信息采用较少的传输位数(例如8位)时,当前采样点的压力相对变化量为300,处理器16在进行编码时会将该当前采样点的压力数据按255进行编码,使得压力信息出现误差;再例如,时间信息采用较少的传输位数(例如8位)时,假定时占1位、分占1位、秒占6位,当前采样点的时间相对变化量为2分10秒时,其中,2分已经超出分的传输位数1位的编码范围[0,1],处理器16在进行编码时会将该当前采样点的时间值中的分按1进行编码,即时间相对变化量变为1分10秒,时间相对变化量出现误差。Although the above-mentioned relative encoding method reduces the number of encoding bits, in extreme cases, the relative change of the two sampling points during writing due to the difference in the user's writing habits and usage patterns exceeds the encoding range corresponding to the relative encoding method. As a result, the sampling accuracy is affected. Taking the encoding of the abscissa as an example, when using fewer transmission digits (for example, 8 digits), its maximum range can only support [-255, 255]. Due to the different writing habits of different users, there will be some users The actual writing range of is more than 256 pixels, and the collection points of more than 256 cannot be accurately encoded, and the maximum can only be encoded to 255, so it will cause the accuracy of the handwriting information of the sampling point to be lost. For example, the relative change of the coordinates of the current sampling point is (15, 299). When encoding, the processor 16 encodes the coordinates of the current sampling point as (15, 255), that is, beyond the scope of accurate encoding The coordinates of the boundary value of will be encoded according to the corresponding boundary value, where greater than 255 is encoded in 255, and less than -255 is encoded in -255, which causes an error in the relative change in coordinates; for example, pressure information is transmitted less When the number of digits (for example, 8 bits), the relative change in pressure at the current sampling point is 300. When encoding, the processor 16 encodes the pressure data at the current sampling point by 255, which causes an error in the pressure information; for example, When the time information uses fewer transmission bits (for example, 8 bits), it is assumed that the time occupies 1 bit, the minute occupies 1 bit, and the second occupies 6 bits. When the relative change of the current sampling point time is 2 minutes and 10 seconds, where The minute has exceeded the encoding range of the transmission digits of the minute by 1 bit [0,1]. When encoding, the processor 16 encodes the minute in the time value of the current sampling point by 1, that is, the relative change in time becomes 1 Minutes and 10 seconds, there is an error in the relative change in time.
为了解决上述由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围,导致采样精度受到影响的问题,处理器16根据手写板12的特定参数与传输格式确定书写点的采样间隔,其中,手写板12的特定参数可以是手写板12的分辨率、尺寸、预设压力阈值、预设时间阈值等参数,本实施方式中,特定参数包括分辨率、预设压力阈值、及预设时间阈值。处理器16根据特定参数以及对应的笔迹信息在传输格式所占的位数可计算得到采样间隔,例如,采样间隔包括横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔,分辨率包括横向像素数和纵向像素数,则横坐标采样间隔可根据横向像素数和横坐标值对应的传输位数(如8位)计算得到,纵坐标采样间隔可根据纵向像素数和纵坐标值对应的传输位数(如8位)计算得到,压力采样间隔可根据预设压力阈值和压力值对应的传输位数(如8位)计算得到,时间采样间 隔可根据预设时间阈值和时间值对应的传输位数(如8位)计算得到,如此,处理器16可分别计算得到横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔。In order to solve the problem that the relative variation of the two sampling points during writing exceeds the coding range corresponding to the relative encoding mode due to the differences in the user's writing habits and usage methods, the processor 16 is affected by the sampling accuracy. The specific parameters and the transmission format determine the sampling interval of the writing point, wherein the specific parameters of the tablet 12 may be the resolution, size, preset pressure threshold, preset time threshold and other parameters of the tablet 12, in this embodiment, the specific parameters Including resolution, preset pressure threshold, and preset time threshold. The processor 16 can calculate the sampling interval according to the specific parameters and the number of bits of the corresponding handwriting information in the transmission format, for example, the sampling interval includes the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval, the resolution Including the number of horizontal pixels and the number of vertical pixels, the sampling interval of the horizontal coordinate can be calculated according to the number of transmission bits (such as 8 bits) corresponding to the number of horizontal pixels and the horizontal coordinate, and the sampling interval of the vertical coordinate can be corresponding to the number of vertical pixels and the vertical coordinate value The number of transmission bits (such as 8 bits) is calculated, the pressure sampling interval can be calculated according to the preset pressure threshold and the corresponding number of transmission bits (such as 8 bits), and the time sampling interval can be calculated according to the preset time threshold and time value The number of transmission bits (such as 8 bits) is calculated, so that the processor 16 can calculate the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval, respectively.
在计算得到采样间隔后,在计算得到相对变化量的基础上,根据采样间隔对相对变化量进行进一步压缩以得到相对笔迹信息,相对笔迹信息同样包括相对位置笔迹信息、相对压力笔迹信息以及相对时间笔迹信息,例如,坐标相对变化量包括横坐标相对变化量和纵坐标相对变化量,根据横坐标采样间隔对横坐标相对变化量进行压缩,根据纵坐标采样间隔对纵坐标相对变化量进行压缩,根据压力采样间隔对压力相对变化量进行压缩,根据时间采样间隔对时间相对变化量进行压缩,压缩方式可以是相对变化量除以对应的采样间隔,压缩方式还可以是其他方式,在此不做限制,本实施方式中,压缩方式为相对变化量除以对应的采样间隔。由于篇幅限制,以下仅以根据横坐标采样间隔对横坐标相对变化量进行压缩为例进行说明,根据纵坐标采样间隔对纵坐标相对变化量进行压缩,根据压力采样间隔对压力相对变化量进行压缩,根据时间采样间隔对时间相对变化量进行压缩时与根据横坐标采样间隔对横坐标相对变化量进行压缩的原理类似,在此不再赘述。例如,横坐标相对变化量为300,手写板12的分辨率为1080P(即,1920*1080),也即是说,横向像素数为1080个,以如图4的传输格式传输数据时,横坐标相对变化量的传输位数为8位,则对应的编码范围为[-255,255],计算横坐标采样间隔为1080/2 8=5(结果保留整数),若不进行压缩则横坐标相对变化量为300时就已经超出8位传输位数对应的编码范围[-255,255],在将横坐标相对变化量除以采样间隔(即,300/5)后可得到相对位置笔迹信息的横坐标值60,此时,相对位置笔迹信息的横坐标值60处于8位传输位数对应的编码范围[-255,255]内,则相对位置笔迹信息的横坐标值60可被准确编码,也即是说,原本不在编码范围内的当前采集点的相对变化量在经过采样间隔压缩后也可以被准确地编码,且采样间隔根据特定参数和传输位数得到,可使得相对变化量的值即使达到最大(例如横坐标相对变化量达到1080的最大值,在压缩后为216依然处于8位传输位数对应的编码范围[-255,255]内)也可以被准确地编码,从而使得用户在手写板12的整个书写区域内采集的采集点的笔迹信息均可以被准确地编码,动态扩展了编码范围,解决了上述由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围,导致采样精度受到影响的问题。 After calculating the sampling interval, on the basis of calculating the relative change, the relative change is further compressed according to the sampling interval to obtain relative handwriting information. The relative handwriting information also includes relative position handwriting information, relative pressure handwriting information, and relative time. Handwriting information, for example, the relative change amount of coordinates includes the relative change amount of the abscissa and the relative change amount of the ordinate, the relative change amount of the abscissa is compressed according to the sampling interval of the abscissa, and the relative change amount of the ordinate is compressed according to the sampling interval of the ordinate, Compress the relative change of pressure according to the pressure sampling interval, and compress the relative change of time according to the time sampling interval. The compression method can be the relative change divided by the corresponding sampling interval. The compression method can also be other methods, which are not done here. Restrictions. In this embodiment, the compression method is the relative change amount divided by the corresponding sampling interval. Due to space limitations, the following will only take the compression of the relative change amount of the abscissa as an example according to the sampling interval of the abscissa. The relative change amount of the ordinate is compressed according to the sampling interval of the ordinate, and the relative change of pressure is compressed according to the pressure sampling interval. The principle of compressing the relative change of time according to the time sampling interval is similar to that of compressing the relative change of the abscissa according to the sampling interval of the abscissa, which will not be repeated here. For example, the relative change of the abscissa is 300, and the resolution of the tablet 12 is 1080P (that is, 1920*1080), that is, the number of horizontal pixels is 1080. When transmitting data in the transmission format as shown in FIG. 4, The number of transmission bits of the relative change of the coordinate is 8 bits, and the corresponding coding range is [-255, 255]. The sampling interval for calculating the abscissa is 1080/2 8 = 5 (result integer is reserved). If compression is not performed, the abscissa When the relative change is 300, the coding range corresponding to 8-bit transmission digits has been exceeded [-255, 255], and the relative position handwriting information can be obtained by dividing the relative change of the abscissa by the sampling interval (ie, 300/5) The abscissa value 60 of the relative position handwriting information at this time, the abscissa value 60 of the relative position handwriting information is within the coding range [-255, 255] corresponding to the 8-bit transmission bit number, then the abscissa value 60 of the relative position handwriting information can be accurately encoded , That is to say, the relative change of the current collection point that was not within the coding range can be accurately encoded after the compression of the sampling interval, and the sampling interval is obtained according to specific parameters and the number of transmission bits, which can make the relative change of Even if the value reaches the maximum (for example, the relative change of the abscissa reaches the maximum value of 1080, 216 is still within the coding range [-255, 255] corresponding to the 8-bit transmission number after compression), it can be accurately encoded, so that The handwriting information of the collection points collected by the user in the entire writing area of the handwriting board 12 can be accurately encoded, and the coding range is dynamically expanded, which solves the above two samplings during writing due to the differences in the user's writing habits and usage methods The relative change amount of the point exceeds the coding range corresponding to the relative coding method, which leads to the problem that the sampling accuracy is affected.
最后,在根据传输格式对相对笔迹信息进行编码后得到当前采样点的编码数据,然后将编码数据发送至终端设备20以控制终端设备20显示对应的书写内容。Finally, the relative handwriting information is encoded according to the transmission format to obtain the encoded data of the current sampling point, and then the encoded data is sent to the terminal device 20 to control the terminal device 20 to display the corresponding written content.
综上,本申请实施方式的笔迹数据处理方法和手写板12通过相对编码的方式对笔迹信息进行压缩以得到当前采样点的相对变化量,并通过采样间隔对相对变化量进一步压缩以得到相对笔迹信息,不仅减少了数据的传输量,使得传输的数据速率基本不会超出蓝牙等 传输方式的传输速率限制,防止数据丢包,从而保证了终端设备20的显示效果。且通过采样间隔对相对变化量进一步压缩,在不增加相对编码位数的基础上,动态扩大了编码范围,使得由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围导致采样精度受到影响的问题得到解决。In summary, the handwriting data processing method and handwriting board 12 of the embodiment of the present application compress the handwriting information through relative encoding to obtain the relative change of the current sampling point, and further compress the relative change through the sampling interval to obtain the relative handwriting Information, not only reduces the amount of data transmission, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data loss, and thus ensure the display effect of the terminal device 20. Moreover, the relative change amount is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods The problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved.
请参阅图2和图7,在某些实施方式中,传输格式中横坐标传输位数为N,纵坐标传输位数为M,压力传输位数为J,时间传输位数为K,N、M、J和K均为正整数;采样间隔包括横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔;特定参数包括分辨率、预设压力阈值、及预设时间阈值,步骤020包括:Please refer to FIG. 2 and FIG. 7, in some embodiments, the number of transmission digits of the abscissa is N, the number of transmission ordinates is M, the number of pressure transmissions is J, and the number of time transmissions is K, N, M, J and K are all positive integers; sampling interval includes abscissa sampling interval, ordinate sampling interval, pressure sampling interval and time sampling interval; specific parameters include resolution, preset pressure threshold, and preset time threshold, step 020 include:
0202:确定横坐标采样间隔等于横向像素数除以2的N次幂;0202: Determine that the horizontal coordinate sampling interval is equal to the number of horizontal pixels divided by 2 to the Nth power;
0204:确定纵坐标采样间隔等于纵向像素数除以2的M次幂;0204: Determine that the ordinate sampling interval is equal to the number of vertical pixels divided by the Mth power of 2;
0206:确定压力采样间隔等于预设压力阈值除以2的J次幂;及0206: Determine that the pressure sampling interval is equal to the preset pressure threshold divided by the power of 2; and
0208:确定时间采样间隔等于预设时间阈值除以2的K次幂。0208: Determine that the time sampling interval is equal to the preset time threshold divided by the power of K.
在某些实施方式中,处理器16用于确定横坐标采样间隔等于横向像素数除以2的N次幂、确定纵坐标采样间隔等于纵向像素数除以2的M次幂、确定压力采样间隔等于预设压力阈值除以2的J次幂;及确定时间采样间隔等于预设时间阈值除以2的K次幂。In some embodiments, the processor 16 is used to determine that the horizontal sampling interval is equal to the number of horizontal pixels divided by the Nth power of 2, the vertical sampling interval is equal to the number of vertical pixels divided by the Mth power of 2, and to determine the pressure sampling interval Is equal to the preset pressure threshold divided by the power of J; and the determined time sampling interval is equal to the preset time threshold divided by the power of K.
也即是说,步骤0202、步骤0204、步骤0206和步骤0208可以由处理器16实现。That is to say, step 0202, step 0204, step 0206, and step 0208 may be implemented by the processor 16.
具体地,在获取到手写板12的特定参数以及手写板12与终端设备20进行数据传输的传输格式后,可根据特定参数和传输格式确定采样间隔,横坐标采样间隔等于横向像素数除以2的N次幂,纵坐标采样间隔等于纵向像素数除以2的M次幂,在采集点的位置相对变化量根据采样间隔进行压缩后,即使横坐标相对变化量达到与横向像素数相同,纵坐标相对变化量与纵向像素数相同,在除以采样间隔以得到相对笔迹信息后也处于传输格式对应的编码范围内,即用户在手写板12的任意书写区域进行书写的以采集到的采集点的笔迹信息均可以被准确编码。压力采样间隔等于预设压力阈值除以2的J次幂,时间采样间隔等于预设时间阈值除以2的K次幂,其中,预设压力阈值可根据用户正常书写时的两个采集点之间的最大压力差确定,预设时间阈值可根据用户正常书写时的两个采集点之间的最大时间差确定,也可以保留冗余量适当增大预设压力阈值和预设时间阈值以使得采集的两个采集点之间的压力相对变化量不会超过预设压力阈值、时间相对变化量也不会超过预设时间阈值,从而保证在用户极端书写情况采集的采集点的笔迹信息也能被准确地编码。Specifically, after the specific parameters of the tablet 12 and the transmission format for data transmission between the tablet 12 and the terminal device 20 are obtained, the sampling interval can be determined according to the specific parameters and the transmission format. The sampling interval on the abscissa is equal to the number of horizontal pixels divided by 2. Power of N, the sampling interval of the ordinate is equal to the number of vertical pixels divided by the power of M. After the relative change in the position of the collection point is compressed according to the sampling interval, even if the relative change in the horizontal coordinate reaches the same as the number of horizontal pixels, the vertical The relative coordinate change amount is the same as the number of vertical pixels, and it is also within the coding range corresponding to the transmission format after dividing by the sampling interval to obtain relative handwriting information, that is, the collection point where the user writes in any writing area of the handwriting board 12 The handwriting information can be accurately encoded. The pressure sampling interval is equal to the preset pressure threshold divided by the power of J, and the time sampling interval is equal to the preset time threshold divided by the power of K, where the preset pressure threshold can be based on the two collection points when the user writes normally The maximum pressure difference between the two is determined, and the preset time threshold can be determined according to the maximum time difference between the two collection points when the user normally writes, or the redundancy can be retained to increase the preset pressure threshold and the preset time threshold appropriately to make the collection The relative change in pressure between the two collection points will not exceed the preset pressure threshold, and the relative change in time will not exceed the preset time threshold, so as to ensure that the handwriting information of the collection point collected in the extreme writing situation of the user can also be Code accurately.
请参阅图2和图8,在某些实施方式中,步骤030包括:Please refer to FIGS. 2 and 8. In some embodiments, step 030 includes:
0302:将书写笔迹上的书写点中的第一个点记为基准点并获取基准点的笔迹信息;0302: Record the first point of the writing points on the writing handwriting as the reference point and obtain the handwriting information of the reference point;
0304:编码基准点的笔迹信息并记录基准点的编码数据;及0304: Encode the handwriting information of the reference point and record the encoded data of the reference point; and
0306:发送基准点的编码数据至终端设备20。0306: Send the encoded data of the reference point to the terminal device 20.
在某些实施方式中,处理器16还用于将书写笔迹上的书写点中的第一个点记为基准点并获取基准点的笔迹信息、编码基准点的笔迹信息并记录基准点的编码数据、及发送基准点的编码数据至终端设备20。In some embodiments, the processor 16 is also used to record the first point of the writing points on the writing handwriting as a reference point and acquire the handwriting information of the reference point, encode the handwriting information of the reference point and record the encoding of the reference point The data and the encoded data of the transmission reference point are sent to the terminal device 20.
具体地,在用户书写时,处理器16将书写笔迹的书写点的第一个点作为基准点并采集基准点的笔迹信息,在确定了基准点后,由于采用相对编码方式,所以手写板12后续采集的采样点的笔迹信息在传输时均传输的是相对笔迹信息,即,其他采样点的笔迹信息都是基于基准点的笔迹信息进行确定的,如果基准点的笔迹信息发生偏差,则会影响所有采样点的笔迹信息的准确性,因此,基准点需直接传输笔迹信息而不是相对笔迹信息,由于基准点的传输的不是相对笔迹信息,为了保证基准点的笔迹信息均可准确地进行编码,基准点的笔迹信息可按照较大的传输位数进行编码,如图5所示的基准点的传输格式,位置信息S1占32位,压力信息S2占16位,时间信息S3占8位,由于终端设备20只需要知道每一个采样点的先后顺序依次连接即可显示笔画的轨迹,即,终端设备20不知道基准点的时间信息,也不会对笔画的轨迹产生影响,且后一个采样点的时间相对变化量肯定是大于前一个采样点的时间相对变化量的,所以,基准点的时间信息可以以0编码,然后根据时间相对变化量的大小即可确定采集点的书写先后顺序,从而减少传输基准点的笔迹信息所需的传输位数。另外,虽然基准点以较大的传输位数进行传输,但由于基准点仅占整个书写笔迹的极小一部分,对笔迹信息的传输带宽基本没有影响。最后,在处理器16对基准点的笔迹信息进行编码并记录编码数据后,处理器16将基准点的编码数据发送给终端设备20。Specifically, when the user writes, the processor 16 takes the first point of the writing point of the handwriting as a reference point and collects the handwriting information of the reference point. After the reference point is determined, since the relative encoding method is adopted, the tablet 12 The handwriting information of the sampling points collected in the subsequent transmission all transmit relative handwriting information, that is, the handwriting information of other sampling points are determined based on the handwriting information of the reference point. If the handwriting information of the reference point deviates, it will Affect the accuracy of the handwriting information of all sampling points. Therefore, the reference point needs to directly transmit handwriting information instead of relative handwriting information. Since the reference point does not transmit relative handwriting information, in order to ensure that the reference point handwriting information can be accurately encoded The handwriting information of the reference point can be encoded according to the larger transmission bit number. As shown in the transmission format of the reference point shown in FIG. 5, the position information S1 occupies 32 bits, the pressure information S2 occupies 16 bits, and the time information S3 occupies 8 bits. Since the terminal device 20 only needs to know the sequence of each sampling point to connect in order to display the stroke trajectory, that is, the terminal device 20 does not know the time information of the reference point, nor will it affect the stroke trajectory, and the latter sampling The relative change in time of the point must be greater than the relative change in time of the previous sampling point, so the time information of the reference point can be encoded with 0, and then the writing order of the collection point can be determined according to the magnitude of the relative change in time. Therefore, the number of transmission bits required to transmit the handwriting information of the reference point is reduced. In addition, although the reference point is transmitted with a larger number of transmission bits, since the reference point occupies only a very small part of the entire handwriting, it basically has no effect on the transmission bandwidth of the handwriting information. Finally, after the processor 16 encodes the handwriting information of the reference point and records the encoded data, the processor 16 sends the encoded data of the reference point to the terminal device 20.
在某些实施方式中,请参阅图2和9,在步骤0306后,步骤030还包括:In some embodiments, please refer to FIGS. 2 and 9, after step 0306, step 030 further includes:
0307:判断在预设时间内是否接收到终端设备20反馈回来的确认信号,确认信号为终端设备20接收到基准点的编码数据后返送给手写板12的信号;及0307: Determine whether a confirmation signal fed back by the terminal device 20 is received within a preset time, and the confirmation signal is a signal returned to the tablet 12 after the terminal device 20 receives the encoded data of the reference point; and
0308:若在预设时间内没有接收到终端设备20的确认信号,则重新发送基准点的编码数据。0308: If the confirmation signal of the terminal device 20 is not received within the preset time, the encoded data of the reference point is retransmitted.
在某些实施方式中,处理器16还用于判断在预设时间内是否接收到终端设备20反馈回来的确认信号,确认信号为终端设备20接收到基准点的编码数据后返送给手写板12的信号;及若在预设时间内没有接收到终端设备20的确认信号,则重新发送基准点的编码数据。In some embodiments, the processor 16 is also used to determine whether a confirmation signal fed back by the terminal device 20 is received within a preset time. The confirmation signal is that the terminal device 20 receives the encoded data of the reference point and returns it to the tablet 12 Signal; and if the confirmation signal of the terminal device 20 is not received within a preset time, the encoded data of the reference point is retransmitted.
也即是说,步骤0307和步骤0308可以由处理器16实现。That is to say, step 0307 and step 0308 can be implemented by the processor 16.
具体地,终端设备20可以控制处理器16开始向终端设备20发送编码后的中间书写数据,在用户进行书写操作时,手写板12可以在采集一个采样点并得到编码后的中间书写数据后即向终端设备20发送该中间书写数据,或者可以得到多个采样点的编码后的中间书写 数据后一起发送,可根据终端设备20的数据处理能力确定。在发送绝对采样点的编码后的中间书写数据后,由于当前采样点都是基于绝对采样点得到,所以为保证整个笔画的书写数据的准确性,需要确保终端设备20接收到了绝对采样点编码后的中间书写数据,处理器16判断终端设备20是否接收到绝对采样点编码后的中间书写数据,若是判断未接收到绝对采样点编码后的中间书写数据,就控制处理器16再次发送绝对采样点编码后的中间书写数据,在确保终端设备20接收到绝对采样点编码后的中间书写数据后,才控制处理器16进行后续当前采样点编码后的中间书写数据的发送。由于每一笔画的都有一个绝对采样点,所以手写板12每次接收到结束采样点(即每个笔画的最后一个采样点)的编码后的中间书写数据时,处理器16会再次判断终端设备20是否接收到下一笔画的绝对采样点编码后的中间书写数据,从而确保每一笔画的绝对采样点的编码后的中间书写数据都被终端设备20接收到。Specifically, the terminal device 20 may control the processor 16 to start sending the encoded intermediate writing data to the terminal device 20. When the user performs a writing operation, the handwriting pad 12 may collect a sampling point and obtain the encoded intermediate writing data immediately. The intermediate writing data is sent to the terminal device 20, or the encoded intermediate writing data of multiple sampling points can be obtained and sent together, which can be determined according to the data processing capability of the terminal device 20. After sending the encoded intermediate writing data of the absolute sampling point, since the current sampling point is obtained based on the absolute sampling point, in order to ensure the accuracy of the writing data of the entire stroke, it is necessary to ensure that the terminal device 20 receives the absolute sampling point encoding The processor 16 determines whether the terminal device 20 has received the absolute sampling point encoded intermediate writing data. If it determines that the absolute sampling point encoded intermediate writing data has not been received, it controls the processor 16 to send the absolute sampling point again. After the encoded intermediate writing data is ensured, the terminal device 20 receives the absolute sampling point encoded intermediate writing data, and then controls the processor 16 to send the subsequent intermediate sampling data after encoding. Since each stroke has an absolute sampling point, each time the tablet 12 receives the encoded intermediate writing data that ends the sampling point (that is, the last sampling point of each stroke), the processor 16 will judge the terminal again Whether the device 20 receives the encoded intermediate writing data of the absolute sampling point of the next stroke, thereby ensuring that the encoded intermediate writing data of the absolute sampling point of each stroke is received by the terminal device 20.
在某些实施方式中,请参阅图2和图10,采样间隔包括横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔;步骤030还包括:In some embodiments, please refer to FIGS. 2 and 10, the sampling interval includes an abscissa sampling interval, an ordinate sampling interval, a pressure sampling interval, and a time sampling interval; step 030 further includes:
0309:根据横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔其中之一采集书写笔迹上的书写点。0309: Collect the writing points on the writing handwriting according to one of the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval.
具体地,手写板12在对书写笔迹进行采样时是按照一个预定的采样率进行采样的,所以只能根据横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔其中之一确定的采样率来采集书写笔迹上的书写点,其中,采样率指的是手写板12每秒钟采集的采样点的个数,如每秒钟采集300个采样点。例如,采样率为每秒钟采集300个采样点,横坐标采样间隔为5,根据横坐标采样间隔确定采样率指的是:采样率为原采样率除以横坐标采样间隔,即实际的采样率变为每秒钟采集60个采样点,再例如,采样率为每秒钟采集300个采样点,纵坐标采样间隔为6,根据纵坐标采样间隔确定采样率指的是:采样率为原采样率除以纵坐标采样间隔,即实际的采样率变为每秒钟采集50个采样点;再例如,采样率为每秒钟采集300个采样点,压力采样间隔为3,根据压力采样间隔确定采样率指的是:采样率为原采样率除以压力采样间隔,即实际的采样率变为每秒钟采集100个采样点;再例如,采样率为每秒钟采集300个采样点,时间采样间隔为3,根据时间采样间隔确定采样率指的是:采样率为原采样率除以时间采样间隔,即实际的采样率变为每秒钟采集100个采样点。且由于目前的终端设备20分辨率一般较高,即使实际的采样率为原采样率的1/5(即,每隔4个采样点采集一个采样点),在终端设备20进行显示时,也不会对显示效果产生较大影响。而且,按采样间隔减小采样率后,每秒所需传输的采样点数量减少,从而进一步压缩传输的数据量,提升数据压缩比。Specifically, the handwriting board 12 samples the handwriting according to a predetermined sampling rate, so it can only be determined according to one of the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval, and the time sampling interval The sampling rate is used to collect the writing points on the writing handwriting, where the sampling rate refers to the number of sampling points collected per second by the tablet 12, such as 300 sampling points per second. For example, the sampling rate is 300 sampling points per second, and the sampling interval of the abscissa is 5, and the sampling rate is determined according to the sampling interval of the abscissa. The sampling rate is the original sampling rate divided by the sampling interval of the abscissa, that is, the actual sampling The rate becomes 60 sampling points per second, for example, the sampling rate is 300 sampling points per second, the ordinate sampling interval is 6, and the sampling rate is determined according to the ordinate sampling interval refers to: the sampling rate is the original The sampling rate is divided by the ordinate sampling interval, that is, the actual sampling rate becomes 50 sampling points per second; for another example, the sampling rate is 300 sampling points per second, and the pressure sampling interval is 3, according to the pressure sampling interval Determining the sampling rate refers to: the sampling rate is the original sampling rate divided by the pressure sampling interval, that is, the actual sampling rate becomes 100 sampling points per second; for another example, the sampling rate is 300 sampling points per second, The time sampling interval is 3, and determining the sampling rate according to the time sampling interval refers to: the sampling rate is the original sampling rate divided by the time sampling interval, that is, the actual sampling rate becomes 100 sampling points per second. And because the resolution of the current terminal device 20 is generally higher, even if the actual sampling rate is 1/5 of the original sampling rate (that is, one sampling point is collected every 4 sampling points), when the terminal device 20 displays, Will not have a big impact on the display effect. Moreover, after reducing the sampling rate by the sampling interval, the number of sampling points required to be transmitted per second is reduced, thereby further compressing the amount of data transmitted and increasing the data compression ratio.
在某些实施方式中,用户可自定义设置采样率。In some embodiments, the user can customize the sampling rate.
具体地,根据不同用户对显示效果的不同需求,用户对当前采样率下得到的显示效果并不满意,可能会觉得小的采样率得到的书写笔迹显示效果不够细腻,此时用户可手动调节采样率,例如手写板具有采样率调节旋钮,用户调节旋钮即可调节手写板的采样率,或者,终端设备的设置界面包括采样率设置,用户可通过终端设备调节采样率,终端设备控制手写板以用户设置好的采样率进行采样。Specifically, according to the different needs of different users for the display effect, the user is not satisfied with the display effect obtained at the current sampling rate, and may feel that the display effect of the handwriting obtained by the small sampling rate is not delicate enough, and the user can manually adjust the sampling at this time Rate, for example, the tablet has a sampling rate adjustment knob, the user can adjust the knob to adjust the sampling rate of the tablet, or the terminal device setting interface includes the sampling rate setting, the user can adjust the sampling rate through the terminal device, the terminal device controls the tablet to The sampling rate set by the user is used for sampling.
在某些实施方式中,请参阅图2和图11,相对变化量包括位置相对变化量、压力相对变化量和时间相对变化量,步骤040包括:In some embodiments, please refer to FIGS. 2 and 11, the relative change includes the position relative change, the pressure relative change and the time relative change, and step 040 includes:
0402:将当前采样点的位置信息中的坐标值与基准点的位置信息中的坐标值之差记为位置相对变化量;0402: The difference between the coordinate value in the position information of the current sampling point and the coordinate value in the position information of the reference point is recorded as the relative change in position;
0404:将当前采样点的压力信息中的压力值与基准点的压力信息中的压力值之差记为压力相对变化量;及0404: The difference between the pressure value in the pressure information of the current sampling point and the pressure information in the reference point is recorded as the relative change in pressure; and
0406:将当前采样点的时间信息中的时间值与基准点的时间信息中的时间值之差记为时间相对变化量。0406: The difference between the time value in the time information of the current sampling point and the time value in the time information of the reference point is recorded as the relative change in time.
在某些实施方式中,处理器16用于将当前采样点的位置信息中的坐标值与基准点的位置信息中的坐标值之差记为位置相对变化量、将当前采样点的压力信息中的压力值与基准点的压力信息中的压力值之差记为压力相对变化量、及将当前采样点的时间信息中的时间值与基准点的时间信息中的时间值之差记为时间相对变化量。In some embodiments, the processor 16 is used to record the difference between the coordinate value in the position information of the current sampling point and the coordinate value in the position information of the reference point as the relative change in position, and the pressure information of the current sampling point The difference between the pressure value in the pressure value and the pressure information in the reference point is recorded as the relative change in pressure, and the difference between the time value in the time information of the current sampling point and the time value in the time information of the reference point is recorded as the time relative The amount of change.
也即是说,步骤0402、步骤0404、步骤0406可以由处理器16实现。That is to say, step 0402, step 0404, and step 0406 may be implemented by the processor 16.
具体地,在确定基准点后,处理器16计算当前采集点的笔迹信息与基准点的笔迹信息的相对变化量,其中,位置相对变化量为当前采样点的位置信息中的坐标值与基准点的位置信息中的坐标值之差,压力相对变化量为当前采样点的压力信息中的压力值与基准点的压力信息中的压力值之差,时间相对变化量为当前采样点的时间信息中的时间值与基准点的时间信息中的时间值之差,也即是说,处理器16通过计算当前采集点的笔迹信息与基准点的笔迹信息的的差量以得到相对变化量,计算较为准确。Specifically, after determining the reference point, the processor 16 calculates the relative change amount of the handwriting information of the current collection point and the handwriting information of the reference point, where the relative position change amount is the coordinate value and the reference point in the position information of the current sampling point The difference of the coordinate value in the position information of the relative pressure is the difference between the pressure value in the pressure information of the current sampling point and the pressure value in the pressure information of the reference point, and the relative time change is the time information of the current sampling point The difference between the time value of the time and the time value of the time information of the reference point, that is to say, the processor 16 obtains the relative change by calculating the difference between the handwriting information of the current collection point and the handwriting information of the reference point. accurate.
在某些实施方式中,请参阅图2和图12,笔迹数据处理方法还包括:In some embodiments, please refer to FIGS. 2 and 12, the handwriting data processing method further includes:
021:将输入设备10的特定参数和采样间隔发送至与输入设备10通信连接的终端设备20。021: Send the specific parameters and sampling interval of the input device 10 to the terminal device 20 communicatively connected to the input device 10.
在某些实施方式中,处理器16用于将输入设备10的特定参数和采样间隔发送至与输入设备10通信连接的终端设备20。In some embodiments, the processor 16 is used to send the specific parameters and sampling interval of the input device 10 to the terminal device 20 that is in communication connection with the input device 10.
也即是说,步骤021可以由处理器16实现。That is to say, step 021 can be implemented by the processor 16.
具体地,在进行书写时,手写板12需要先与终端设备20进行通信连接才可以传输数据,手写板12首先与终端设备20建立通信连接,通信连接既可以是有线连接也可以是无 线连接,有线连接如USB连接等,无线连接如蓝牙连接等。然后在手写板12与终端设备20通信连接后,处理器16将手写板12的特定参数和采样间隔发送给终端设备20。其中,特定参数如手写板12的分辨率,发送给终端设备20后,终端设备20可以根据手写板12的分辨率和自身的分辨率将在手写板12上的书写内容缩放或放大显示,以免书写内容在终端设备20上显示时变得过小或者过大,保证显示效果。终端设备20根据特定参数中的预设压力阈值和预设时间阈值,可以根据当前采样点的压力相对变化量与预设压力阈值的比值和/或时间相对变化量与预设时间阈值的比值确定笔迹的粗细、透明度等属性,更准确地调节笔迹的显示效果。Specifically, when writing, the tablet 12 needs to communicate with the terminal device 20 before data can be transmitted. The tablet 12 first establishes a communication connection with the terminal device 20. The communication connection can be either a wired connection or a wireless connection. Wired connection such as USB connection, etc., wireless connection such as Bluetooth connection, etc. Then, after the tablet 12 communicates with the terminal device 20, the processor 16 sends the specific parameters and sampling interval of the tablet 12 to the terminal device 20. Among them, specific parameters such as the resolution of the tablet 12 are sent to the terminal device 20, and the terminal device 20 can zoom or enlarge the writing content on the tablet 12 according to the resolution of the tablet 12 and its own resolution, so as not to The written content becomes too small or too large when displayed on the terminal device 20 to ensure the display effect. The terminal device 20 may be determined according to the ratio of the relative change in pressure at the current sampling point to the preset pressure threshold and/or the ratio of the relative change in time to the preset time threshold according to the preset pressure threshold and the preset time threshold in the specific parameter The thickness, transparency and other attributes of the handwriting can more accurately adjust the display effect of the handwriting.
发送采样间隔则是因为相对笔迹信息是通过位置相对变化量、压力相对变化量和时间相对变化量分别按照对应的采样间隔进行了压缩以得到的,所以终端设备20获取的是编码相对笔迹信息以生成的编码数据,为了将相对笔迹信息还原为对应的相对变化量,终端设备20获取到编码数据后先解码得到相对笔迹信息,然后将位置相对变化量、压力相对变化量和时间相对变化量对应的相对笔迹信息分别按对应的采样间隔进行还原以得到压缩前的位置相对变化量、压力相对变化量和时间相对变化量,从而保证了终端设备20获取的采样点的精度。例如,采样点的横坐标相对变化量为510,在按照横坐标采样间隔(如横坐标采样间隔为2)压缩后得到横坐标的相对笔迹信息510/2=255,终端设备20获取到横坐标的相对笔迹信息510/2=255后按横坐标采样间隔进行还原得到横坐标相对变化量255*2=510,既可以在传输时对数据进行压缩保证传输效率,还可以准确的还原压缩前的笔迹信息。纵坐标相对变化量、压力相对变化量及时间相对变化量的压缩和还原与上述横坐标相对变化量的压缩与还原的原理相同,在此不再赘述。The sending sampling interval is because the relative handwriting information is obtained by compressing the relative position change, pressure relative change and time relative change respectively according to the corresponding sampling interval, so the terminal device 20 acquires the encoded relative handwriting information to In order to restore the relative handwriting information to the corresponding relative change in the generated encoded data, the terminal device 20 decodes the obtained relative handwriting information after acquiring the encoded data, and then corresponds the relative change in position, the relative change in pressure and the relative change in time The relative handwriting information is restored at the corresponding sampling intervals to obtain the relative position change, pressure relative change and time relative change before compression, thereby ensuring the accuracy of the sampling points acquired by the terminal device 20. For example, the relative change amount of the abscissa of the sampling point is 510, and the relative handwriting information of the abscissa is obtained after being compressed according to the sampling interval of the abscissa (such as the sampling interval of the abscissa is 2) 510/2=255, and the terminal device 20 obtains the abscissa The relative handwriting information of 510/2=255 is restored at the sampling interval of the abscissa to obtain the relative change of the abscissa 255*2=510, which can not only compress the data during transmission to ensure the transmission efficiency, but also accurately restore the data before compression Handwriting information. The compression and reduction of the relative change of the ordinate, the relative change of pressure and the relative change of time are the same as the compression and reduction of the relative change of the abscissa and will not be repeated here.
在某些实施方式中,请参阅图2和图13,位置相对变化量包括横坐标相对变化量和纵坐标相对变化量,相对笔迹信息包括相对位置笔迹信息、相对压力笔迹信息和相对时间笔迹信息;步骤050包括:In some embodiments, please refer to FIG. 2 and FIG. 13, the relative position change includes the relative change of the abscissa and the relative change of the ordinate, and the relative handwriting information includes relative position handwriting information, relative pressure handwriting information and relative time handwriting information ; Step 050 includes:
0502:将横坐标相对变化量除以横坐标采样间隔的值以及将纵坐标相对变化量除以纵坐标采样间隔的值记为相对位置笔迹信息。0502: The value of dividing the relative change amount of the abscissa by the sampling interval of the abscissa and the value of the relative change amount of the ordinate by the sampling interval of the ordinate is recorded as relative position handwriting information.
0504:将压力相对变化量除以压力采样间隔的值记为相对压力笔迹信息;及0504: The value of the relative pressure change divided by the pressure sampling interval is recorded as relative pressure handwriting information; and
0506:将时间相对变化量除以时间采样间隔的值记为相对时间笔迹信息。0506: The value of the relative change in time divided by the time sampling interval is recorded as relative time handwriting information.
在某些实施方式中,处理器16用于将横坐标相对变化量除以横坐标采样间隔的值以及将纵坐标相对变化量除以纵坐标采样间隔的值记为相对位置笔迹信息、将压力相对变化量除以压力采样间隔的值记为相对压力笔迹信息、及将时间相对变化量除以时间采样间隔的值记为相对时间笔迹信息。In some embodiments, the processor 16 is used to divide the relative change of the abscissa by the value of the sampling interval of the abscissa and the value of the relative change of the ordinate to the sampling interval of the ordinate as the relative position handwriting information, the pressure The value of the relative change amount divided by the pressure sampling interval is recorded as relative pressure handwriting information, and the value of the time relative change amount divided by the time sampling interval is recorded as relative time handwriting information.
也即是说,步骤0502、步骤0504和步骤0506可以由处理器16实现。That is to say, step 0502, step 0504, and step 0506 may be implemented by the processor 16.
具体地,在计算得到当前采样点的相对变化量后,为了进一步对当前采样点的笔迹信息进行压缩并动态扩大编码范围,将横坐标相对变化量除以横坐标采样间隔的值以及将纵坐标相对变化量除以纵坐标采样间隔的值记为相对位置笔迹信息、将压力相对变化量除以压力采样间隔的值记为相对压力笔迹信息、及将时间相对变化量除以时间采样间隔的值记为相对时间笔迹信息,对横坐标相对变化量、纵坐标相对变化量、压力相对变化量和时间相对变化量分别除以对应的采样间隔,且采样间隔根据手写板12的特定参数和手写板12与终端设备20进行数据传输时的传输位数得到,当前采样点的笔迹信息根据采样间隔压缩后,不仅可动态扩大编码范围,而且还进一步提升了数据压缩比。其中,动态扩大编码范围指的是:手写板12在实际传输数据时的传输位数并未变大,而是在传输前按照采样间隔对相对笔迹信息进行压缩,在传输后,再根据采样间隔对相对笔迹信息进行还原,从而实现动态扩大编码范围,即,笔迹信息可编码的范围变大了,但实际传输位数却不变。Specifically, after calculating the relative change amount of the current sampling point, in order to further compress the handwriting information of the current sampling point and dynamically expand the encoding range, the relative change amount of the abscissa is divided by the value of the sampling interval of the abscissa and the ordinate The value of the relative change divided by the ordinate sampling interval is recorded as relative position handwriting information, the value of the relative change in pressure divided by the pressure sampling interval is recorded as relative pressure handwriting information, and the value of the relative time change is divided by the time sampling interval Recorded as relative time handwriting information, the relative change of the abscissa, the relative change of the ordinate, the relative change of pressure and the relative change of time are divided by the corresponding sampling interval, and the sampling interval is based on the specific parameters of the tablet 12 and the tablet 12 The number of transmission bits during data transmission with the terminal device 20 is obtained. After the handwriting information of the current sampling point is compressed according to the sampling interval, not only can the coding range be dynamically expanded, but also the data compression ratio can be further improved. Among them, the dynamic expansion of the coding range refers to: the number of transmission digits of the tablet 12 during actual data transmission does not increase, but the relative handwriting information is compressed according to the sampling interval before transmission, and after transmission, according to the sampling interval The relative handwriting information is restored, so as to dynamically expand the coding range, that is, the coding range of the handwriting information becomes larger, but the actual number of transmission bits remains unchanged.
在某些实施方式中,请参阅图2和图14,输入设备10(手写板12)包括存储器122,在步骤050之后,笔迹数据处理方法还包括:In some embodiments, referring to FIG. 2 and FIG. 14, the input device 10 (handwriting board 12) includes a memory 122, and after step 050, the handwriting data processing method further includes:
070:将当前采样点的编码数据缓存至输入设备10的存储器122中。070: Cache the encoded data of the current sampling point into the memory 122 of the input device 10.
在某些实施方式中,处理器16还用于将当前采样点的编码数据缓存至输入设备10的存储器122中。In some embodiments, the processor 16 is also used to cache the encoded data of the current sampling point into the memory 122 of the input device 10.
也即是说,步骤070可以由处理器16实现。That is to say, step 070 may be implemented by the processor 16.
具体地,在处理器16对相对笔迹信息编码以得到编码数据后,将该编码数据缓存到存储器122中,例如,处理器16可在手写板12采集一个采集点后将该采集点的编码数据缓存到存储器122,然后发送给终端设备20;再例如,处理器16还在手写板12采集多个采集点后将多个采集点的编码数据缓存在存储器122中,再集中一起发送多个采集点的编码数据给终端设备20;通过存储器122对采集点的编码数据进行缓存,可以在需要时方便的取出。Specifically, after the processor 16 encodes the relative handwriting information to obtain the encoded data, the encoded data is cached in the memory 122. For example, the processor 16 may collect the encoded data of the collection point after the tablet 12 collects an acquisition point Cache to the memory 122 and then send to the terminal device 20; for another example, the processor 16 also caches the encoded data of the multiple collection points in the memory 122 after collecting multiple collection points on the tablet 12 and then collectively sends multiple collections together The encoded data of the point is given to the terminal device 20; the encoded data of the collected point is buffered through the memory 122, and can be easily taken out when needed.
在某些实施方式中,采样点还包括结束采样点,结束采样点为压力数据小于预设压力值的采样点。In some embodiments, the sampling point further includes an end sampling point, and the end sampling point is a sampling point whose pressure data is less than a preset pressure value.
具体地,用户书写一般是以笔画为单位的,所以在用户书写一个笔画快结束时采集到的采样点的压力一般小于或等于预设压力值(例如预设压力值为0),所以手写板在得到压力数据小于或等于预设压力值时会将该点标记为结束采样点,即一个笔画的最后一个采样点,采样也是以笔画为单位的,所以基准点就是用户书写时每一笔画的第一个采样点或结束采样点后采集的第一个采样点。如此,手写板可准确的进行断笔,保证传输到终端设备每一笔画的书写数据的精度。Specifically, the user writing is generally based on strokes, so the pressure of the sampling point collected at the end of a stroke written by the user is generally less than or equal to the preset pressure value (for example, the preset pressure value is 0), so the tablet When the pressure data is less than or equal to the preset pressure value, the point will be marked as the end sampling point, that is, the last sampling point of a stroke, the sampling is also in stroke units, so the reference point is each stroke when the user writes The first sampling point or the first sampling point collected after the end of the sampling point. In this way, the pen tablet can accurately break the pen to ensure the accuracy of the writing data of each stroke transmitted to the terminal device.
在某些实施方式中,在当前采样点的横坐标相对变化量、纵坐标相对变化量、压力相 对变化量或时间相对变化量处于相对编码方式对应的编码范围之外时,将当前采样点记为基准点。In some embodiments, when the relative change in the abscissa, the relative change in the ordinate, the relative change in pressure, or the relative change in time is outside the coding range corresponding to the relative coding method, the current sampling point is recorded As a reference point.
具体地,在相对编码方式下,以位置信息、压力信息和时间信息对应的编码位数分别为16、8、8为例,手写板在采集采样点的笔迹信息以得到相对变化量后,判断当前采样点的横坐标相对变化量、纵坐标相对变化量、压力相对变化量或时间相对变化量是否处于对应的编码范围内,例如,位置相对变化量包括横坐标相对变化量和纵坐标相对变化量,横坐标相对变化量、纵坐标相对变化量、压力相对变化量和时间相对变化量均对应8位编码位数(即,编码范围[-255,255]);当横坐标相对变化量为280时表示横坐标相对变化量处于编码范围[-255,255]之外,按当前的8位编码位数已经无法准确地对横坐标相对变化量进行编码,同样的,当纵坐标相对变化量、压力相对变化量或时间相对变化量处于编码范围[-255,255]之外,按当前的8位编码位数已经无法准确地对纵坐标相对变化量、压力相对变化量或时间相对变化量进行编码,从而影响终端设备获取的笔迹信息的精度。因此,当当前采样点的横坐标相对变化量、纵坐标相对变化量、压力相对变化量或时间相对变化量处于对应的编码范围之外时将当前采样点作为基准点后,传输的当前采样点的笔迹信息而不传输相对笔迹信息,从而防止某些极端情况导致的书写数据精度的下降的情况,而且由于出现极端情况的几率较小,所以基准点的数量不会变得过多,对数据压缩率的影响较小。Specifically, in the relative encoding mode, taking the number of encoded bits corresponding to position information, pressure information and time information as 16, 8, and 8 respectively, the handwriting board collects the handwriting information of the sampling point to obtain the relative change and judges Whether the relative change of the abscissa, the relative change of the ordinate, the relative change of the pressure or the relative change of the time of the current sampling point are within the corresponding coding range, for example, the relative change of position includes the relative change of the abscissa and the relative change of the ordinate Amount, the relative change of the abscissa, the relative change of the ordinate, the relative change of pressure and the relative change of time all correspond to the 8-bit coded digits (ie, the coding range [-255, 255]); when the relative change of the abscissa is 280 indicates that the relative change of the abscissa is outside the coding range [-255,255], and the relative change of the abscissa cannot be accurately coded according to the current 8-bit coding digits. Similarly, when the relative change and pressure of the ordinate The relative change or time relative change is outside the coding range [-255,255], and it is no longer possible to accurately encode the relative change in ordinate, the relative change in pressure, or the relative change in time according to the current 8-bit coding digits, thus Affect the accuracy of the handwriting information acquired by the terminal device. Therefore, when the relative change amount of the abscissa, the relative change amount of the ordinate, the relative change amount of pressure, or the relative change of time of the current sampling point is outside the corresponding coding range, the current sampling point is transmitted as the reference point, and the current sampling point is transmitted The handwriting information without transmitting the relative handwriting information, thereby preventing the deterioration of the accuracy of the written data caused by some extreme situations, and because the probability of extreme situations is small, the number of reference points will not become too much. The effect of compression ratio is small.
请再次参阅图2,本申请实施方式的手写系统100包括终端设备20和上述任一实施方式的输入设备10。终端设备20与输入设备10通信连接,终端设备20用于接收输入设备10发送的输入数据并根据输入数据进行显示。Please refer to FIG. 2 again. The handwriting system 100 according to an embodiment of the present application includes a terminal device 20 and the input device 10 of any of the foregoing embodiments. The terminal device 20 is communicatively connected to the input device 10, and the terminal device 20 is used to receive input data sent by the input device 10 and display it according to the input data.
本申请实施方式的手写系统100通过相对编码的方式对笔迹信息进行压缩以得到当前采样点的相对变化量,并通过采样间隔对相对变化量进一步压缩以得到相对笔迹信息,不仅减少了数据的传输量,使得传输的数据速率基本不会超出蓝牙等传输方式的传输速率限制,防止数据丢包,从而保证了终端设备的显示效果。且通过采样间隔对相对变化量进一步压缩,在不增加相对编码位数的基础上,动态扩大了编码范围,使得由于用户的书写习惯、使用方式的差异导致的书写时两个采样点的相对变化量超过相对编码方式对应的编码范围导致采样精度受到影响的问题得到解决。且终端设备20可根据采样间隔对相对笔迹信息进行还原,保证了采样点的笔迹信息的准确性。The handwriting system 100 of the embodiment of the present application compresses the handwriting information through relative encoding to obtain the relative change amount of the current sampling point, and further compresses the relative change amount through the sampling interval to obtain relative handwriting information, which not only reduces the data transmission The amount of data, so that the transmission data rate will basically not exceed the transmission rate limit of Bluetooth and other transmission methods, to prevent data packet loss, thereby ensuring the display effect of the terminal device. Moreover, the relative change is further compressed through the sampling interval, and the coding range is dynamically expanded without increasing the relative number of encoding bits, so that the relative change of the two sampling points during writing due to the difference in user's writing habits and usage methods The problem that the amount exceeds the coding range corresponding to the relative coding mode and the sampling accuracy is affected is solved. Moreover, the terminal device 20 can restore the relative handwriting information according to the sampling interval to ensure the accuracy of the handwriting information of the sampling point.
在某些实施方式中,请继续参阅图2,手写系统100还包括手写笔14,手写板12用于接收手写笔14的书写操作以形成书写数据。用户通过握持手写笔14进行书写操作,可还原真实的书写体验。In some embodiments, please continue to refer to FIG. 2, the handwriting system 100 further includes a stylus 14, and the handwriting board 12 is used to receive the writing operation of the stylus 14 to form writing data. The user can restore the real writing experience by holding the stylus 14 for writing operation.
在某些实施方式中,请继续参阅图2,手写笔14包括压力传感器142,压力传感器142设置在笔尖的位置,压力传感器142可以采集手写笔14在手写板12上进行书写操作时的 压力数据,手写板12根据压力数据与采样点的对应关系即可计算得到采样点的压力值。手写笔14检测压力时,只需检测手写笔14与手写板12接触的部件(即笔尖)的压力即可,相较于通过手写板12检测整个书写区域的压力而言,检测精度较高。In some embodiments, please continue to refer to FIG. 2. The stylus 14 includes a pressure sensor 142. The pressure sensor 142 is disposed at the position of the pen tip. The pressure sensor 142 can collect pressure data when the stylus 14 performs a writing operation on the tablet 12. The handwriting board 12 can calculate the pressure value of the sampling point according to the correspondence between the pressure data and the sampling point. When the stylus 14 detects the pressure, it is only necessary to detect the pressure of the component (ie, the pen tip) that the stylus 14 is in contact with the tablet 12. Compared with detecting the pressure of the entire writing area through the tablet 12, the detection accuracy is higher.
尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施方式进行变化、修改、替换和变型,本申请的范围由权利要求及其等同物限定。Although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and cannot be construed as limitations to the present application. Those of ordinary skill in the art can The embodiments are changed, modified, replaced, and modified, and the scope of the present application is defined by the claims and their equivalents.

Claims (25)

  1. 一种笔迹数据处理方法,应用于输入设备,其特征在于,所述笔迹数据处理方法包括:A handwriting data processing method applied to an input device, characterized in that the handwriting data processing method includes:
    获取所述输入设备的特定参数以及所述输入设备和终端设备在进行数据传输时的传输格式;Obtain the specific parameters of the input device and the transmission format of the input device and the terminal device during data transmission;
    根据所述特定参数和所述传输格式确定书写点的采样间隔;Determine the sampling interval of the writing point according to the specific parameter and the transmission format;
    确定书写笔迹的基准点,并根据所述采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息;Determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point;
    计算所述当前采样点的笔迹信息与所述基准点的笔迹信息的相对变化量;Calculating the relative change of the handwriting information of the current sampling point and the reference point;
    根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,根据所述传输格式编码所述相对笔迹信息为所述当前采样点的编码数据;及Determining the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encoding the relative handwriting information as the encoded data of the current sampling point according to the transmission format; and
    将所述当前采样点的编码数据发送至所述终端设备。Sending the encoded data of the current sampling point to the terminal device.
  2. 根据权利要求1所述的笔迹数据处理方法,其特征在于,所述笔迹信息包括位置信息、压力信息和时间信息。The handwriting data processing method according to claim 1, wherein the handwriting information includes position information, pressure information, and time information.
  3. 根据权利要求2所述的笔迹数据处理方法,其特征在于,所述相对变化量包括位置相对变化量、压力相对变化量和时间相对变化量,所述计算所述当前采样点的笔迹信息与所述基准点的笔迹信息的相对变化量,包括:The handwriting data processing method according to claim 2, wherein the relative change includes a relative change in position, a relative change in pressure and a relative change in time, and the calculation of the handwriting information of the current sampling point and the The relative change of the handwriting information of the reference point includes:
    将所述当前采样点的位置信息中的坐标值与所述基准点的位置信息中的坐标值之差记为所述位置相对变化量;Record the difference between the coordinate value in the position information of the current sampling point and the coordinate value in the position information of the reference point as the relative change in position;
    将所述当前采样点的压力信息中的压力值与所述基准点的压力信息中的压力值之差记为所述压力相对变化量;及Recording the difference between the pressure value in the pressure information at the current sampling point and the pressure value in the pressure information at the reference point as the relative change in pressure; and
    将所述当前采样点的时间信息中的时间值与所述基准点的时间信息中的时间值之差记为所述时间相对变化量。The difference between the time value in the time information of the current sampling point and the time value in the time information of the reference point is recorded as the relative change in time.
  4. 根据权利要求1所述的笔迹数据处理方法,其特征在于,所述确定书写笔迹的基准点,还包括:The handwriting data processing method according to claim 1, wherein the determination of the reference point of the handwriting further comprises:
    将所述书写笔迹上的书写点中的第一个点记为所述基准点并获取所述基准点的笔迹信息;Record the first point of the writing points on the writing handwriting as the reference point and obtain handwriting information of the reference point;
    编码所述基准点的笔迹信息并记录所述基准点的编码数据;及Encode the handwriting information of the reference point and record the encoded data of the reference point; and
    发送所述基准点的编码数据至所述终端设备。Sending the encoded data of the reference point to the terminal device.
  5. 根据权利要求4所述的笔迹数据处理方法,其特征在于,在所述发送所述基准点的编码数据至所述终端设备之后,还包括:The handwriting data processing method according to claim 4, wherein after the sending the encoded data of the reference point to the terminal device, further comprising:
    判断在预设时间内是否接收到所述终端设备反馈回来的确认信号,所述确认信号为所述终端设备接收到所述基准点的编码数据后返送给所述手写板的信号;及Judging whether a confirmation signal fed back by the terminal device is received within a preset time, and the confirmation signal is a signal returned to the handwriting board after the terminal device receives the encoded data of the reference point; and
    若在所述预设时间内没有接收到所述终端设备的所述确认信号,则重新发送所述基准点的编码数据。If the confirmation signal of the terminal device is not received within the preset time, the encoded data of the reference point is retransmitted.
  6. 根据权利要求1所述的笔迹数据处理方法,其特征在于,所述采样间隔包括横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔;所述根据所述采样间隔采集书写笔迹上的书写点,包括:根据所述横坐标采样间隔、所述纵坐标采样间隔、所述压力采样间隔和所述时间采样间隔其中之一采集书写笔迹上的书写点。The handwriting data processing method according to claim 1, wherein the sampling interval includes an abscissa sampling interval, an ordinate sampling interval, a pressure sampling interval, and a time sampling interval; and the writing handwriting is collected according to the sampling interval The writing point of includes collecting the writing point on the writing handwriting according to one of the abscissa sampling interval, the ordinate sampling interval, the pressure sampling interval and the time sampling interval.
  7. 根据权利要求3所述的笔迹数据处理方法,其特征在于,所述传输格式中横坐标传输位数为N,纵坐标传输位数为M,N和M为正整数;所述特定参数包括所述输入设备的分辨率,所述分辨率包括横向像素数和纵向像素数;所述采样间隔包括横坐标采样间隔和纵坐标采样间隔;所述根据所述特定参数和所述传输格式确定书写点的采样间隔,包括:The handwriting data processing method according to claim 3, characterized in that, in the transmission format, the number of transmission digits of the abscissa is N, the number of transmission digits of the ordinate is M, and N and M are positive integers; the specific parameters include all The resolution of the input device, the resolution includes the number of horizontal pixels and the number of vertical pixels; the sampling interval includes the horizontal coordinate sampling interval and the vertical coordinate sampling interval; and the writing point is determined according to the specific parameter and the transmission format Sampling interval, including:
    确定所述横坐标采样间隔等于所述横向像素数除以2的N次幂;及Determining that the horizontal coordinate sampling interval is equal to the number of horizontal pixels divided by the Nth power of 2; and
    确定所述纵坐标采样间隔等于所述纵向像素数除以2的M次幂。It is determined that the ordinate sampling interval is equal to the number of longitudinal pixels divided by the Mth power of 2.
  8. 根据权利要求7所述的笔迹数据处理方法,其特征在于,所述位置相对变化量包括横坐标相对变化量和纵坐标相对变化量,所述相对笔迹信息包括相对位置笔迹信息;所述根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,包括:The handwriting data processing method according to claim 7, wherein the relative change amount of the position includes the relative change amount of the abscissa and the relative change amount of the ordinate, the relative handwriting information includes the relative position handwriting information; The sampling interval and the relative amount of change determine the relative handwriting information of the current sampling point, including:
    将所述横坐标相对变化量除以所述横坐标采样间隔的值以及将所述纵坐标相对变化量除以所述纵坐标采样间隔的值记为相对位置笔迹信息。The value of dividing the relative change amount of the abscissa by the sampling interval of the abscissa and the value of the relative change amount of the ordinate by the sampling interval of the ordinate is recorded as relative position handwriting information.
  9. 根据权利要求3所述的笔迹数据处理方法,其特征在于,所述传输格式中压力传输位数为J,时间传输位数为K,J和K为正整数;所述特定参数包括预设压力阈值和预设时间阈值;所述采样间隔包括压力采样间隔和时间采样间隔;所述根据所述特定参数和所述传输格式确定书写点的采样间隔,包括:The handwriting data processing method according to claim 3, wherein the number of pressure transmission digits in the transmission format is J, the number of time transmission digits is K, and J and K are positive integers; the specific parameter includes a preset pressure A threshold and a preset time threshold; the sampling interval includes a pressure sampling interval and a time sampling interval; and the sampling interval for determining a writing point according to the specific parameter and the transmission format includes:
    确定所述压力采样间隔等于所述预设压力阈值除以2的J次幂;及Determining that the pressure sampling interval is equal to the preset pressure threshold divided by a power of 2; and
    确定所述时间采样间隔等于所述预设时间阈值除以2的K次幂。It is determined that the time sampling interval is equal to the preset time threshold divided by a power of two.
  10. 根据权利要求9所述的笔迹数据处理方法,其特征在于,所述相对笔迹信息包括相对压力笔迹信息和相对时间笔迹信息;所述根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,包括:The handwriting data processing method according to claim 9, wherein the relative handwriting information includes relative pressure handwriting information and relative time handwriting information; and the current sampling is determined according to the sampling interval and the relative change amount Relative handwriting information of points, including:
    将所述压力相对变化量除以所述压力采样间隔的值记为相对压力笔迹信息;及Dividing the relative change in pressure by the pressure sampling interval as relative pressure handwriting information; and
    将所述时间相对变化量除以所述时间采样间隔的值记为相对时间笔迹信息。The value of the relative change in time divided by the time sampling interval is recorded as relative time handwriting information.
  11. 根据权利要求1所述的笔迹数据处理方法,其特征在于,在所述根据所述传输格式编码所述相对笔迹信息为所述当前采样点的编码数据的步骤之后,还包括:The handwriting data processing method according to claim 1, wherein after the step of encoding the relative handwriting information as the encoded data of the current sampling point according to the transmission format, further comprising:
    将所述当前采样点的编码数据缓存至所述输入设备的存储器中。Cache the encoded data of the current sampling point into the memory of the input device.
  12. 根据权利要求1所述的笔迹数据处理方法,其特征在于,所述笔迹数据处理方法还包括:The handwriting data processing method according to claim 1, wherein the handwriting data processing method further comprises:
    将所述输入设备的特定参数和所述采样间隔发送至与所述输入设备通信连接的所述终端设备。Sending the specific parameter of the input device and the sampling interval to the terminal device communicatively connected to the input device.
  13. 一种输入设备,所述输入设备包括处理器,其特征在于,所述处理器用于获取所述输入设备的特定参数以及所述输入设备和终端设备在进行数据传输时的传输格式;根据所述特定参数和所述传输格式确定书写点的采样间隔;确定书写笔迹的基准点,并根据所述采样间隔采集书写笔迹上的书写点,以及获取当前采样点的笔迹信息、计算所述当前采样点的笔迹信息与所述基准点的笔迹信息的相对变化量;根据所述采样间隔和所述相对变化量确定所述当前采样点的相对笔迹信息,根据所述传输格式编码所述相对笔迹信息为所述当前采样点的编码数据;及将所述当前采样点的编码数据发送至所述终端设备。An input device, the input device includes a processor, characterized in that the processor is used to obtain specific parameters of the input device and the transmission format of the input device and the terminal device during data transmission; according to the The specific parameters and the transmission format determine the sampling interval of the writing point; determine the reference point of the writing handwriting, and collect the writing point on the writing handwriting according to the sampling interval, and obtain the handwriting information of the current sampling point and calculate the current sampling point The relative change amount of the handwriting information of the reference point and the handwriting information of the reference point; determine the relative handwriting information of the current sampling point according to the sampling interval and the relative change amount, and encode the relative handwriting information according to the transmission format as The encoded data of the current sampling point; and sending the encoded data of the current sampling point to the terminal device.
  14. 根据权利要求13所述的输入设备,其特征在于,所述笔迹信息包括位置信息、压力信息和时间信息。The input device according to claim 13, wherein the handwriting information includes position information, pressure information, and time information.
  15. 根据权利要求14所述的输入设备,其特征在于,所述相对变化量包括位置相对变化量、压力相对变化量和时间相对变化量,所述处理器还用于将所述当前采样点的位置信息中的坐标值与所述基准点的位置信息中的坐标值之差记为所述位置相对变化量、将所述当前采样点的压力信息中的压力值与所述基准点的压力信息中的压力值之差记为所述压力相对变化量、及将所述当前采样点的时间信息中的时间值与所述基准点的时间信息中的时间值之差记为所述时间相对变化量。The input device according to claim 14, wherein the relative change includes a relative change in position, a relative change in pressure and a relative change in time, and the processor is further configured to convert the position of the current sampling point The difference between the coordinate value in the information and the coordinate value in the position information of the reference point is recorded as the relative change in position, and the pressure value in the pressure information of the current sampling point and the pressure information in the reference point are The difference between the pressure values is recorded as the relative change in pressure, and the difference between the time value in the time information of the current sampling point and the time value in the time information of the reference point is recorded as the relative change in time .
  16. 根据权利要求13所述的输入设备,其特征在于,所述处理器还用于将所述书写笔迹上的书写点中的第一个点记为所述基准点并获取所述基准点的笔迹信息、编码所述基准点的笔迹信息并记录所述基准点的编码数据、及发送所述基准点的编码数据至所述终端设备。The input device according to claim 13, wherein the processor is further configured to record the first point of the writing points on the writing handwriting as the reference point and acquire the handwriting of the reference point Information, handwriting information encoding the reference point and recording the encoded data of the reference point, and sending the encoded data of the reference point to the terminal device.
  17. 根据权利要求16所述的输入设备,其特征在于,所述处理器还用于判断在预设时间内是否接收到所述终端设备反馈回来的确认信号,所述确认信号为所述终端设备接收到所述基准点的编码数据后返送给所述输入设备的信号、及若在所述预设时间内没有接收到所述终端设备的所述确认信号,则重新发送所述基准点的编码数据。The input device according to claim 16, wherein the processor is further configured to determine whether a confirmation signal fed back by the terminal device is received within a preset time, and the confirmation signal is received by the terminal device The signal returned to the input device after the encoded data to the reference point, and if the confirmation signal of the terminal device is not received within the preset time, re-transmit the encoded data of the reference point .
  18. 根据权利要求13所述的输入设备,其特征在于,所述采样间隔包括横坐标采样间隔、纵坐标采样间隔、压力采样间隔和时间采样间隔;所述处理器还用于根据所述横坐标采样间隔、所述纵坐标采样间隔、所述压力采样间隔和所述时间采样间隔其中之一采集书写笔迹上的书写点。The input device according to claim 13, wherein the sampling interval includes an abscissa sampling interval, an ordinate sampling interval, a pressure sampling interval, and a time sampling interval; the processor is further configured to sample according to the abscissa One of the interval, the ordinate sampling interval, the pressure sampling interval and the time sampling interval collects the writing points on the writing handwriting.
  19. 根据权利要求15所述的输入设备,其特征在于,所述传输格式中横坐标传输位数为N,纵坐标传输位数为M,N和M为正整数;所述特定参数包括所述输入设备的分辨率,所述分辨率包括横向像素数和纵向像素数;所述采样间隔包括横坐标采样间隔和纵坐标采样间隔;所述处理器还用于确定所述横坐标采样间隔等于所述横向像素数除以2的N次幂、及确定所述纵坐标采样间隔等于所述纵向像素数除以2的M次幂。The input device according to claim 15, wherein in the transmission format, the number of transmission digits on the abscissa is N, the number of transmission digits on the ordinate is M, and N and M are positive integers; the specific parameter includes the input The resolution of the device, the resolution includes the number of horizontal pixels and the number of vertical pixels; the sampling interval includes an abscissa sampling interval and an ordinate sampling interval; the processor is further configured to determine that the abscissa sampling interval is equal to the The number of horizontal pixels is divided by the Nth power of 2, and it is determined that the ordinate sampling interval is equal to the number of vertical pixels divided by the Mth power of 2.
  20. 根据权利要求19所述的输入设备,其特征在于,所述位置相对变化量包括横坐标相对变化量和纵坐标相对变化量,所述相对笔迹信息包括相对位置笔迹信息;所述处理器还用于将所述横坐标相对变化量除以所述横坐标采样间隔的值以及将所述纵坐标相对变化量除以所述纵坐标采样间隔的值记为相对位置笔迹信息。The input device according to claim 19, wherein the relative change amount of the position includes the relative change amount of the abscissa and the relative change amount of the ordinate, and the relative handwriting information includes relative position handwriting information; the processor further uses For dividing the relative change amount of the abscissa by the value of the sampling interval of the abscissa and dividing the relative change amount of the ordinate by the sampling interval of the ordinate, the relative position handwriting information is recorded.
  21. 根据权利要求15所述的输入设备,其特征在于,所述传输格式中压力传输位数为J,时间传输位数为K,J和K为正整数;所述特定参数包括预设压力阈值和预设时间阈值;所述采样间隔包括压力采样间隔和时间采样间隔;所述处理器还用于确定所述压力采样间隔等于所述预设压力阈值除以2的J次幂、及所述时间采样间隔等于所述预设时间阈值除以2的K次幂。The input device according to claim 15, wherein the number of pressure transmission digits in the transmission format is J, the number of time transmission digits is K, and J and K are positive integers; the specific parameters include a preset pressure threshold and A preset time threshold; the sampling interval includes a pressure sampling interval and a time sampling interval; the processor is further used to determine that the pressure sampling interval is equal to the preset pressure threshold divided by a power of 2 J, and the time The sampling interval is equal to the preset time threshold divided by 2 to the power of K.
  22. 根据权利要求21所述的输入设备,其特征在于,所述相对笔迹信息包括相对压力笔迹信息和相对时间笔迹信息;所述处理器还用于将所述压力相对变化量除以所述压力采样间隔的值记为相对压力笔迹信息、及将所述时间相对变化量除以所述时间采样间隔的值记为相对时间笔迹信息。The input device according to claim 21, wherein the relative handwriting information includes relative pressure handwriting information and relative time handwriting information; the processor is further configured to divide the relative change in pressure by the pressure sampling The value of the interval is recorded as relative pressure handwriting information, and the value of the relative change in time divided by the time sampling interval is recorded as relative time handwriting information.
  23. 根据权利要求13所述的输入设备,其特征在于,所述输入设备包括存储器,所述处理器还用于将所述当前采样点的编码数据缓存至所述存储器中。The input device according to claim 13, wherein the input device includes a memory, and the processor is further configured to cache the encoded data of the current sampling point into the memory.
  24. 根据权利要求13所述的输入设备,其特征在于,所述处理器还用于将所述输入设备的特定参数和所述采样间隔发送至与所述输入设备通信连接的所述终端设备。The input device according to claim 13, wherein the processor is further configured to send specific parameters of the input device and the sampling interval to the terminal device communicatively connected to the input device.
  25. 一种手写系统,其特征在于,所述手写系统包括权利要求13-24任一项所述的输入设备和终端设备,所述终端设备与所述输入设备通信连接,所述终端设备用于接收所述输入设备发送的输入数据并根据所述输入数据进行显示。A handwriting system, characterized in that the handwriting system includes the input device and the terminal device according to any one of claims 13-24, the terminal device is in communication connection with the input device, and the terminal device is used for receiving The input data sent by the input device is displayed according to the input data.
PCT/CN2018/124920 2018-12-28 2018-12-28 Handwriting data processing method, input device and handwriting system WO2020133227A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/124920 WO2020133227A1 (en) 2018-12-28 2018-12-28 Handwriting data processing method, input device and handwriting system
CN201880097607.2A CN113168248A (en) 2018-12-28 2018-12-28 Handwriting data processing method, input device and handwriting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/124920 WO2020133227A1 (en) 2018-12-28 2018-12-28 Handwriting data processing method, input device and handwriting system

Publications (1)

Publication Number Publication Date
WO2020133227A1 true WO2020133227A1 (en) 2020-07-02

Family

ID=71126719

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124920 WO2020133227A1 (en) 2018-12-28 2018-12-28 Handwriting data processing method, input device and handwriting system

Country Status (2)

Country Link
CN (1) CN113168248A (en)
WO (1) WO2020133227A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436320A (en) * 2011-07-29 2012-05-02 中兴通讯股份有限公司 Transmission method, terminal and system for handwritten information
JP2016126476A (en) * 2014-12-26 2016-07-11 株式会社リコー Handwriting system and program

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101167765B1 (en) * 2009-11-06 2012-07-24 삼성전자주식회사 Apparatus and method for playing handwriting message using handwriting data
US9235748B2 (en) * 2013-11-14 2016-01-12 Wacom Co., Ltd. Dynamic handwriting verification and handwriting-based user authentication
CN105117054B (en) * 2015-08-12 2018-04-17 珠海优特物联科技有限公司 A kind of recognition methods of handwriting input and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102436320A (en) * 2011-07-29 2012-05-02 中兴通讯股份有限公司 Transmission method, terminal and system for handwritten information
JP2016126476A (en) * 2014-12-26 2016-07-11 株式会社リコー Handwriting system and program

Also Published As

Publication number Publication date
CN113168248A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
WO2019052582A1 (en) Audio encoding and decoding method and device, and audio encoding and decoding system
TWI667619B (en) Method and computer system for dynamic handwriting verification
WO2018227819A1 (en) Handwriting data synchronization method and device, storage medium and terminal device
KR101199701B1 (en) Apparatus and method for transmitting handwriting message including time information
CN108600668B (en) Screen recording frame rate adjusting method and mobile terminal
WO2013113191A1 (en) Method and system for rapid video image transmission
CN113747194B (en) Remote video transmission method, transmission device, storage medium and electronic equipment
RU2624641C2 (en) Method and device for video quality control based on network environment
CN108737884B (en) Content recording method and equipment, storage medium and electronic equipment
WO2022057789A1 (en) Video definition identification method, electronic device, and storage medium
CN101895788B (en) Method and system for objectively evaluating video coding performance
CN115460414B (en) Video compression method and system of baseboard management control chip and related components
JP2005287035A (en) Method and system for displaying multimedia data
WO2022001559A1 (en) Video encoding method and apparatus, electronic device and machine-readable storage medium
CN103905821A (en) Video coding method and device allowing human face to be recognized
WO2018032696A1 (en) Method and system for desktop screenshot control
WO2020133227A1 (en) Handwriting data processing method, input device and handwriting system
EP2661083A2 (en) Video encoding system, method and computer readable medium thereof
CN108282674B (en) Video transmission method, terminal and system
CN106713739A (en) Identification method of two-dimensional code displayed based on electronic screen
CN107360386A (en) Reduce the method for multi-medium file size
CN105554375A (en) Method and device of video preview in digital video recorder
CN104469400A (en) Image data compression method based on RFB protocol
US20110161514A1 (en) Method and apparatus for delegating computationally intensive functions
KR101247770B1 (en) An apparatus for processing virtual whiteboard data and the method thereof

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: 18945332

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: 18945332

Country of ref document: EP

Kind code of ref document: A1