CN106843714B - Method and system for optimizing handwriting of touch pen - Google Patents

Method and system for optimizing handwriting of touch pen Download PDF

Info

Publication number
CN106843714B
CN106843714B CN201611021445.3A CN201611021445A CN106843714B CN 106843714 B CN106843714 B CN 106843714B CN 201611021445 A CN201611021445 A CN 201611021445A CN 106843714 B CN106843714 B CN 106843714B
Authority
CN
China
Prior art keywords
data
pressure
pressure sensing
interval
sensitive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611021445.3A
Other languages
Chinese (zh)
Other versions
CN106843714A (en
Inventor
李响
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201611021445.3A priority Critical patent/CN106843714B/en
Publication of CN106843714A publication Critical patent/CN106843714A/en
Priority to PCT/CN2017/103814 priority patent/WO2018090736A1/en
Application granted granted Critical
Publication of CN106843714B publication Critical patent/CN106843714B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • 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
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • 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
    • G06F3/0416Control or interface arrangements specially adapted for digitisers

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Character Discrimination (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The invention discloses a method and a system for optimizing handwriting of a touch pen, wherein the method comprises the following steps: sequentially reading pressure-sensitive data of a touch pen, and forming a pressure-sensitive data group by using the obtained pressure-sensitive data; expanding a data interval of the pressure-sensitive data set, wherein the data interval is an interval consisting of maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data set; and when the difference value between two continuous pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is larger than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, supplementing new pressure-sensitive data between the two continuous pressure-sensitive data. The method firstly enlarges the data interval, supplements new pressure sensing data between two continuous times of pressure sensing data when the difference value of the two continuous times of pressure sensing data in the pressure sensing data group after the data interval is enlarged is larger, and finally changes the pressure sensing data in the original pressure sensing data group more smoothly, so that the handwriting change is not abrupt any more, thereby realizing better writing effect.

Description

Method and system for optimizing handwriting of touch pen
Technical Field
The invention relates to the technical field of touch control, in particular to a method and a system for optimizing handwriting of a touch pen.
Background
With the progress of science and technology and the continuous development of the internet industry, touch technology has become popular. Currently, touch pens can be roughly classified into two types: resistive and capacitive styluses, different types of styluses being suitable for resistive and capacitive touch screen terminals, respectively. The stylus head is made of a conductive material, so that the stylus head can replace hands to easily, quickly and accurately input information on a screen of the touch screen terminal; stylus pens have become widely accepted by users because of their fine, accurate and smooth operation.
The touch screen terminal identifies the touch pen by acquiring a series of pressure-sensitive data sent by the touch pen when the touch pen contacts the touch screen terminal, due to the limitation of hardware adjustment or process limitation of the touch pen, obvious data jitter often occurs in the using process, and the upper layer is applied to the process of identifying and displaying the pressure-sensitive data with larger jitter, obvious bamboo joint effect can occur, namely the handwriting changes suddenly, so that the writing effect is poor.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, an object of the present invention is to provide a method for optimizing handwriting of a stylus, which solves the problems of abrupt change of handwriting and poor writing effect in the prior art.
The method for optimizing the handwriting of the stylus comprises the following steps:
sequentially reading pressure-sensitive data of a touch pen, and forming a pressure-sensitive data group by using the obtained pressure-sensitive data;
expanding a data interval of the pressure-sensitive data set, wherein the data interval is an interval consisting of maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data set;
and when the difference value between two continuous pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is larger than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, supplementing new pressure-sensitive data between the two continuous pressure-sensitive data.
According to the optimization method of the handwriting of the stylus pen, the defects and the limitations of the hardware of the stylus pen can be solved from the software perspective, firstly, the data interval of the original pressure-sensitive data set is expanded, when the difference value of two continuous times of pressure-sensitive data in the pressure-sensitive data set after the data interval is expanded is large, the two continuous times of pressure-sensitive data are directly supplemented with new pressure-sensitive data, finally, the pressure-sensitive data in the original pressure-sensitive data set are changed to be smoother, and the handwriting change is not sharp any more after the optimized pressure-sensitive data are received by the upper layer application, so that the better writing effect is realized.
In addition, the method for optimizing the handwriting of the stylus according to the above embodiment of the present invention may further have the following additional technical features:
further, in an embodiment of the present invention, when a difference between two consecutive pressure-sensitive data in the pressure-sensitive data set after the data interval is expanded is greater than a preset maximum interval in the pressure-sensitive data set after the data interval is expanded, the step of supplementing new pressure-sensitive data between the two consecutive pressure-sensitive data specifically includes:
the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is directly inserted into a to-be-sent blocking queue, and the data in the to-be-sent blocking queue is used for sending to an upper application;
comparing the difference value between the current pressure sensing data and the previous pressure sensing data and the size of the maximum interval from the second pressure sensing data in the pressure sensing data group with the expanded data interval;
and when the difference value between the current pressure sensing data and the previous pressure sensing data is larger than the maximum interval, supplementing new pressure sensing data with the data interval of A/(A/G +1) and the number of (A/G +1) between the current pressure sensing data and the previous pressure sensing data, and inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent congestion queue, wherein A is the difference value between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval.
Further, in an embodiment of the present invention, after the step of comparing the difference between the current pressure sensitivity data and the previous pressure sensitivity data with the size of the maximum interval from the second pressure sensitivity data in the pressure sensitivity data group after the expanding of the data interval, the method further includes:
and when the difference value between the current pressure sensing data and the last pressure sensing data is less than or equal to the maximum interval, directly inserting the current pressure sensing data into the to-be-sent blocking queue.
Further, in an embodiment of the present invention, after the step of supplementing new pressure-sensitive data between two consecutive times of pressure-sensitive data, the method further includes:
and fitting the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data according to the data correlation degree in the pressure-sensitive data group supplemented with the new pressure-sensitive data.
Further, in an embodiment of the present invention, the step of fitting the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data according to the data correlation specifically includes:
defining an initial data group and a relevancy weight array;
and sequentially substituting the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data into the initial data group, and balancing the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data according to the correlation degree weight array so as to obtain balanced pressure sensitivity data.
The invention also aims to provide an optimization system of the handwriting of the touch pen, which solves the problems of abrupt handwriting change and poor writing effect in the prior art.
The system for optimizing the handwriting of the stylus according to the embodiment of the invention comprises the following steps:
the reading module is used for sequentially reading pressure-sensitive data of the touch pen and forming a pressure-sensitive data group by the acquired pressure-sensitive data;
the expansion module is used for expanding a data interval of the pressure-sensitive data group acquired by the reading module, wherein the data interval is an interval formed by maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data group;
and the supplementing module is used for supplementing new pressure sensing data between the two related pressure sensing data when the difference value of the two continuous pressure sensing data in the pressure sensing data group after the data interval is expanded is larger than the preset maximum interval in the pressure sensing data group after the data interval is expanded.
In addition, the system for optimizing the stylus handwriting according to the above embodiment of the present invention may further have the following additional technical features:
further, in one embodiment of the present invention, the supplementary module includes a first insertion module, a comparison module, a supplementary sub-module, and a second insertion module;
the first inserting module is used for directly inserting the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded into a to-be-sent blocking queue, and the data in the to-be-sent blocking queue is used for sending to an upper application;
the comparison module is used for comparing the difference value between the current pressure sensing data and the previous pressure sensing data and the size of the maximum interval from the second pressure sensing data in the pressure sensing data group after the data interval is expanded;
the supplementary submodule is used for supplementing new pressure sensing data with a data interval of A/(A/G +1) and a quantity of (A/G +1) between the current pressure sensing data and the previous pressure sensing data when the difference value between the current pressure sensing data and the previous pressure sensing data is larger than the maximum interval, wherein A is the difference value between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval;
the second inserting module is used for inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent blocking queue after the supplementing submodule supplements new pressure sensing data.
Further, in an embodiment of the present invention, the optimization system further includes:
and the third inserting module is used for directly inserting the current pressure sensing data into the to-be-sent blocking queue when the comparison module compares that the difference value between the current pressure sensing data and the previous pressure sensing data is smaller than or equal to the maximum interval.
Further, in an embodiment of the present invention, the optimization system further includes:
and the fitting module is used for fitting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the data correlation degree in the pressure sensing data group supplemented with the new pressure sensing data.
Further, in an embodiment of the present invention, the defining module is configured to define an initial data set and a relevancy weight array;
the balance module is used for sequentially substituting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data into the initial data group, and balancing the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the correlation weight array so as to obtain balanced pressure sensing data.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of a method of optimizing stylus handwriting according to an embodiment of the invention;
FIG. 2 is a flow chart of a method of optimizing stylus handwriting according to another embodiment of the invention;
FIG. 3 is a flow chart of FIG. 2 for supplementing new pressure sensitive data between two times;
FIG. 4 is a schematic diagram of a system for optimizing stylus handwriting according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for optimizing a handwriting of a stylus according to an embodiment of the present invention at least includes the following steps:
s101, sequentially reading pressure-sensitive data of a touch pen, and forming a pressure-sensitive data group by using the obtained pressure-sensitive data;
the touch pen is used for inputting instructions to terminal equipment with a touch screen, such as a computer screen, mobile equipment, a drawing board and the like, a user can select a file or drawing by clicking the touch screen of the terminal equipment through the touch pen, a pressure-sensitive data set consisting of a series of pressure-sensitive data is generated when the touch pen contacts the touch screen, the pressure-sensitive data set is generated in the process from the moment that the touch pen just contacts the touch screen to the moment that the touch pen leaves the touch screen, the pressure-sensitive data set is originally binary data, application software in the terminal equipment has a thread for reading the pressure-sensitive data set, the binary data can be analyzed according to a related protocol, the binary data is converted into more easily processed 10-system data, and finally the data is converted into upper-layer required data and sent out.
S102, expanding a data interval of the pressure-sensitive data set, wherein the data interval is an interval formed by maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data set;
wherein, the data interval is an interval formed by the maximum pressure-sensitive data and the minimum pressure-sensitive data in the pressure-sensitive data set, for example, if the pressure-sensitive data in one pressure-sensitive data set includes 0,1,3,13,28,35,39,47,50,36,30,26,22,18,15,1,0, the data interval of the pressure-sensitive data set is [0,50], the data stretching method is adopted to expand the interval of the original data to achieve the purpose of making the data finer, the data interval of the pressure-sensitive data set is specifically expanded by integral multiple [0,50], it can be understood that, when expanding the data interval of the pressure-sensitive data set, the expansion multiple can be selected according to the actual processing capability of the terminal equipment, for the terminal equipment with good performance and strong processing capability, the expansion multiple can be higher, otherwise, the expansion multiple should be smaller, for example, if the entire data interval is expanded by 4 times, the expanded data interval is [0,200], and the pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded becomes 0,4,12,52,112,140,156,188,200,144,120,104,88,72,60,4, 0.
And S103, when the difference value between two continuous pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is larger than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, supplementing new pressure-sensitive data between the two continuous pressure-sensitive data.
In S103, a maximum interval is defined for the expanded data interval, where the maximum interval may be determined according to the actual processing capability of the terminal device, and for a terminal device with good performance and strong processing capability, the data value of the maximum interval may be smaller, so that the optimized data may be smoother. And comparing the difference value of the two continuous pressure-sensitive data in the pressure-sensitive data group with the maximum interval, and supplementing new pressure-sensitive data between the two continuous pressure-sensitive data by a program intelligent point supplementing method.
According to the optimization method of the handwriting of the stylus pen, the defects and the limitations of the hardware of the stylus pen can be solved from the software perspective, firstly, the data interval of the original pressure-sensitive data set is expanded, when the difference value of two continuous times of pressure-sensitive data in the pressure-sensitive data set after the data interval is expanded is large, the two continuous times of pressure-sensitive data are directly supplemented with new pressure-sensitive data, finally, the pressure-sensitive data in the original pressure-sensitive data set are changed to be smoother, and the handwriting change is not sharp any more after the optimized pressure-sensitive data are received by the upper layer application, so that the better writing effect is realized.
Referring to fig. 2, a method for optimizing a handwriting of a stylus according to another embodiment of the present invention at least includes the following steps:
s201, sequentially reading pressure-sensitive data of a touch pen, and forming a pressure-sensitive data group by using the obtained pressure-sensitive data;
the application software of the terminal device includes a thread for reading the pressure data of the stylus, and the pressure data is analyzed according to the protocol, where the data comes from the stylus hardware, and for example, the pressure data sent by the stylus is sequentially read to be 0,1,3,13,28,35,39,47,50,36,30,26,22,18,15,1, 0.
S202, expanding a data interval of the pressure-sensitive data set, wherein the data interval is an interval formed by maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data set;
in this case, the data stretching method is used, the range of the original data is expanded, for example, the whole range is expanded by 4 times, the expanded data range is [0,200], and the pressure-sensitive data in the pressure-sensitive data set after the data range is expanded corresponds to 0,4,12,52,112,140,156,188,200,144,120,104,88,72,60,4, 0.
S203, when the difference value between two continuous pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is larger than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, supplementing new pressure-sensitive data between the two continuous pressure-sensitive data;
in this case, a maximum interval G is first defined for the expanded data segment, for example, the maximum interval G is defined as 10, and then when the difference between two pieces of pressure-sensitive data in the pressure-sensitive data group after the data segment is expanded is greater than 10, new pressure-sensitive data is supplemented between the two pieces of pressure-sensitive data.
Referring to fig. 3, in the present embodiment, step S203 includes:
s2031, directly inserting the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded into a to-be-sent blocking queue, where the data in the to-be-sent blocking queue is used to send to an upper application;
in specific implementation, a variable R may be further defined to record last pressure-sensitive data, and then a queue Q to be blocked by pressure-sensitive data is defined, where data in the queue Q is sent to an upper-layer application, and when the first pressure-sensitive data is received, the value is assigned to R, and a value is inserted into the queue (the data is immediately sent to the application).
S2032, comparing the difference between the current pressure-sensitive data and the previous pressure-sensitive data and the size of the maximum interval from the second pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded;
s2033, when the difference between the current pressure sensing data and the previous pressure sensing data is greater than the maximum interval, adding new pressure sensing data between the current pressure sensing data and the previous pressure sensing data, where the new pressure sensing data has an interval of a/(a/G +1) and a quantity of (a/G +1), and inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent congestion queue, where a is the difference between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval.
In specific implementation, when the second pressure sensing data is received, comparing the difference value A between the current pressure sensing data and the previous pressure sensing data R with the maximum interval G;
if A is smaller than or equal to the maximum interval G, the current pressure-sensitive data is directly inserted into the to-be-sent blocking queue;
and if A is larger than the maximum interval G, supplementing new pressure sensing data with the data interval A/(A/G +1) and the number of (A/G +1) between the current pressure sensing data and the previous pressure sensing data, wherein based on a data processing mechanism of a computer, when the calculation result of A/(A/G +1) or (A/G +1) is not an integer, only integer bits before decimal point are taken.
The following gives a detailed explanation based on specific pressure-sensitive data in the present embodiment:
the raw pressure data is: 0,1,3,13,28,35,39,47,50,36,30,26,22,18,15,1,0, data interval [1,50 ];
the expanded data interval is [1,200], and the pressure-sensitive data after the data interval is expanded is: 0,4,12,52,112,140,156,188,200,144,120,104,88,72,60,4,0.
The maximum interval value G is defined as 10,
for the first pressure sensing data 0, directly inserting the queue Q;
for the second pressure-sensitive data 4, a-4-0-4 < G, the queue Q is directly inserted;
for the third pressure-sensitive data 12, a-12-4-8 < G, the queue Q is directly inserted;
for the fourth pressure-sensitive data 52, a-52-12-40G requires 5 points for addition a/G + 1-40/10 +1, and a supplementation interval G-a/(a/G +1) -8 supplements 20,28,36,44,52
.....
And so on;
the final pressure-sensitive data becomes:
0,4,12,20,28,36,44,52,52,60,68,76,84,92,100,108,112,121,130,139,140,148,156,164,172,180,188,194,200,191,182,173,164,155,146,144,136,128,120,112,104,96,88,80,72,66,60,51,42,33,24,15,6,4,0。
it can be seen that the pressure-sensitive data becomes smoother, according to the method for optimizing the handwriting of the stylus of this embodiment, defects and limitations in terms of hardware of the stylus can be solved from a software perspective, first, by expanding the data interval of the original pressure-sensitive data set, when the difference value of two times of pressure-sensitive data in the pressure-sensitive data set after the data interval is expanded is large, the two times of pressure-sensitive data directly supplement new pressure-sensitive data, and finally, the pressure-sensitive data in the original pressure-sensitive data set becomes smoother, and after the upper layer is applied to the pressure-sensitive data after the optimization is received, the handwriting change is not abrupt, so that a better writing effect is achieved.
And S204, fitting the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data according to the data correlation degree in the pressure-sensitive data group supplemented with the new pressure-sensitive data.
In this embodiment, the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data may be further optimized, and the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data may be fitted according to the data correlation, so that the pressure-sensitive data may be smoother.
Wherein, step S204 specifically includes:
defining an initial data group and a relevancy weight array;
and sequentially substituting the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data into the initial data group, and balancing the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data according to the correlation degree weight array so as to obtain balanced pressure sensitivity data.
In a specific implementation, an array of length L is first saved (the length should be fixed in one software setting at a time), and each value in the array represents the correlation degree of the latest L elements, for example, the length L of the array is 5, which represents the correlation between the current value and the latest five values. The array length and the relevancy weight can be adjusted according to the performance and the requirement of the machine. Specifically, in this embodiment, the total number of correlations is n powers of 2, for example, the total number of correlations is 5 powers of 2, that is, the total number of correlations is 32, and the respective values of the correlations are 2,4,7,7, and 12. Firstly, a pressure-sensitive data queue is stored, each new value of the queue is generated by multiplying each new value by respective weight according to 5 values and performing right shift by n bits, and handwriting can be smoothly and naturally written by using the data.
The following is detailed with a specific data set:
the received pressure data of the stylus are:
0,4,12,19,26,33,40,47,52,60,74,76,84,92, 100; among them, the pressure-sensitive data 74 at the 11 th position is mutation data.
Defining an initial data array as [0,0,0,0,0], and defining a weight array as [2,4,7,7,12 ];
substituting the 1 st pressure-sensitive data 0 into the initial data array to obtain a data array [0,0,0, 0], wherein the balanced pressure-sensitive data is (0 x 0)/2 ═ 0;
substituting the 2 nd pressure-sensitive data 4 into the data array to obtain a data array [0,4,0,0,0], wherein the balanced pressure-sensitive data is (0 × 2+4 × 4)/6 ═ 2;
substituting the 3 rd pressure-sensitive data 12 into the data array to obtain a data array [0,4,12,0,0], wherein the balanced pressure-sensitive data is (0 × 2+4+ 12 × 7)/(2+4+7) ═ 7;
substituting the 4 th pressure-sensitive data 19 into the data array to obtain a data array [0,4,12,19,0], wherein the balanced pressure-sensitive data is (0 × 2+4+ 12 × 7+19 × 7)/(2+4+7+7) ═ 11;
substituting the 5 th pressure-sensitive data 26 into the data array to obtain a data array [0,4,12,19,26], wherein the balanced pressure-sensitive data is (0 × 2+4+ 12 × 7+19 × 7+26 × 12)/32 ═ 17;
substituting the 6 th pressure-sensitive data 33 into the data array to obtain a data array [4,12,19,26,33], wherein the balanced pressure-sensitive data is (4 × 2+12 × 4+19 × 7+26 × 7+33 × 12)/32 ═ 23;
substituting the 7 th pressure-sensitive data 40 into the data array to obtain a data array [12,19,26,33,40], wherein the balanced pressure-sensitive data is (12 × 2+19 × 4+26 × 7+33 × 7+40 × 12)/32 ═ 31;
substituting the 8 th pressure-sensitive data 47 into the data array to obtain a data array [19,26,33,40,47], wherein the balanced pressure-sensitive data is (19 × 2+26 × 4+33 × 7+40 × 7+47 × 12)/32 ═ 38;
substituting the 9 th pressure-sensitive data 52 into the data array to obtain a data array [26,33,40,47,52], wherein the balanced pressure-sensitive data is (26 × 2+33 × 4+40 × 7+47 × 7+52 × 12)/32 ═ 44;
substituting the 10 th pressure-sensitive data 60 into the data array to obtain a data array [33,40,47,52,60], wherein the balanced pressure-sensitive data is (33 × 2+40 × 4+47 × 7+52 × 7+60 × 12)/32 ═ 51;
substituting the 11 th pressure-sensitive data 74 into the data array to obtain a data array [40,47,52,60,74], wherein the balanced pressure-sensitive data is (40 × 2+47 × 4+52 × 7+60 × 7+74 × 12)/32 × 60;
substituting the 12 th pressure-sensitive data 76 into the data array to obtain a data array [47,52,60,74,76], wherein the balanced pressure-sensitive data is (47 × 2+52 × 4+60 × 7+74 × 7+76 × 12)/32 ═ 67;
substituting the 13 th pressure-sensitive data 84 into the data array to obtain a data array [52,60,74,76,84], wherein the balanced pressure-sensitive data is (52 × 2+60 × 4+74 × 7+76 × 7+84 × 12)/32 × 75;
substituting the 14 th pressure-sensitive data 92 into the data array to obtain a data array [60,74,76,84,92], wherein the balanced pressure-sensitive data is (60 × 2+74 × 4+76 × 7+84 × 7+92 × 12)/32 ═ 82;
the 15 th pressure-sensitive data 100 was substituted into the data array to obtain the data array [74,76,84,92,100], and the balanced pressure-sensitive data was (74 × 2+76 × 4+84 × 7+92 × 7+100 × 12)/32 ═ 90.
The final balanced pressure data is: 0,2,7,11,17,23,31,38,44,51,60,67,75,82,90, it can be seen that mutation data 74 at position 11 is well balanced. Finally, the pressure-sensitive data is further optimized, and writing is smoother.
It can be understood that, since the weight array influences the final pressure data, the operation can be performed between two pressure data of the balanced pressure data set by performing a vector between the two pressure data, and if the change is too large, the weight array can be dynamically adjusted to make the final pressure data more approximate to a natural writing state.
Referring to fig. 4, based on the same inventive concept, another embodiment of the present invention provides a system for optimizing a handwriting of a stylus, including:
the reading module is used for sequentially reading pressure-sensitive data of the touch pen and forming a pressure-sensitive data group by the acquired pressure-sensitive data;
the expansion module is used for expanding a data interval of the pressure-sensitive data group acquired by the reading module, wherein the data interval is an interval formed by maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data group;
and the supplementing module is used for supplementing new pressure sensing data between the two related pressure sensing data when the difference value of the two continuous pressure sensing data in the pressure sensing data group after the data interval is expanded is larger than the preset maximum interval in the pressure sensing data group after the data interval is expanded.
In this embodiment, the supplementary module includes a first plug-in module, a comparison module, a supplementary sub-module, and a second plug-in module;
the first inserting module is used for directly inserting the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded into a to-be-sent blocking queue, and the data in the to-be-sent blocking queue is used for sending to an upper application;
the comparison module is used for comparing the difference value between the current pressure sensing data and the previous pressure sensing data and the size of the maximum interval from the second pressure sensing data in the pressure sensing data group after the data interval is expanded;
the supplementary submodule is used for supplementing new pressure sensing data with a data interval of A/(A/G +1) and a quantity of (A/G +1) between the current pressure sensing data and the previous pressure sensing data when the difference value between the current pressure sensing data and the previous pressure sensing data is larger than the maximum interval, wherein A is the difference value between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval;
the second inserting module is used for inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent blocking queue after the supplementing submodule supplements new pressure sensing data.
In this embodiment, the optimization system further includes:
and the third inserting module is used for directly inserting the current pressure sensing data into the to-be-sent blocking queue when the comparison module compares that the difference value between the current pressure sensing data and the previous pressure sensing data is smaller than or equal to the maximum interval.
In this embodiment, the optimization system further includes:
and the fitting module is used for fitting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the data correlation degree in the pressure sensing data group supplemented with the new pressure sensing data.
In this embodiment, the fitting module includes a defining module and a balancing module;
the definition module is used for defining an initial data group and a relevancy weight array;
the balance module is used for sequentially substituting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data into the initial data group, and balancing the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the correlation weight array so as to obtain balanced pressure sensing data.
The system for optimizing the handwriting of the stylus provided by the embodiment can overcome defects and limitations in terms of hardware of the stylus from a software perspective, and firstly, by expanding a data interval of an original pressure-sensitive data set, when a difference value of two times of pressure-sensitive data in the pressure-sensitive data set after the data interval is expanded is large, new pressure-sensitive data is directly supplemented to the two times of pressure-sensitive data, so that the pressure-sensitive data in the original pressure-sensitive data set is finally changed to be smoother, and after the upper layer is applied to the pressure-sensitive data after the optimized data is received, the handwriting change is not abrupt any more, so that a better writing effect is realized.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (8)

1. A method for optimizing handwriting of a stylus, comprising:
sequentially reading pressure-sensitive data of a touch pen, and forming a pressure-sensitive data group by using the obtained pressure-sensitive data;
expanding a data interval of the pressure-sensitive data set by a data stretching method, wherein the data interval is an interval consisting of maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data set;
when the difference value between two continuous pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is larger than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, supplementing new pressure-sensitive data between the two continuous pressure-sensitive data;
when the difference between two consecutive pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is greater than the preset maximum interval in the pressure-sensitive data group after the data interval is expanded, the step of supplementing new pressure-sensitive data between two consecutive pressure-sensitive data specifically includes:
the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded is directly inserted into a to-be-sent blocking queue, and the data in the to-be-sent blocking queue is used for sending to an upper application;
comparing the difference value between the current pressure sensing data and the previous pressure sensing data and the size of the maximum interval from the second pressure sensing data in the pressure sensing data group with the expanded data interval;
and when the difference value between the current pressure sensing data and the previous pressure sensing data is larger than the maximum interval, supplementing new pressure sensing data with the data interval of A/(A/G +1) and the number of (A/G +1) between the current pressure sensing data and the previous pressure sensing data, and inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent congestion queue, wherein A is the difference value between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval.
2. A method for optimizing stylus handwriting according to claim 1, wherein after the step of comparing the difference between the current pressure data and the previous pressure data with the size of the maximum interval from the second pressure data in the pressure data set after the expanding data interval, the method further comprises:
and when the difference value between the current pressure sensing data and the last pressure sensing data is less than or equal to the maximum interval, directly inserting the current pressure sensing data into the to-be-sent blocking queue.
3. A method of optimizing stylus writing according to claim 1 or 2, wherein after the step of supplementing new pressure-sensitive data between the two consecutive times, the method further comprises:
and fitting the pressure-sensitive data in the pressure-sensitive data group supplemented with the new pressure-sensitive data according to the data correlation degree in the pressure-sensitive data group supplemented with the new pressure-sensitive data.
4. The method for optimizing stylus handwriting according to claim 3, wherein the step of fitting the pressure-sensitive data in the pressure-sensitive data group supplemented with new pressure-sensitive data according to data correlation specifically comprises:
defining an initial data group and a relevancy weight array;
and sequentially substituting the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data into the initial data group, and balancing the pressure sensitivity data in the pressure sensitivity data group supplemented with the new pressure sensitivity data according to the correlation degree weight array so as to obtain balanced pressure sensitivity data.
5. A system for optimizing stylus writing, comprising:
the reading module is used for sequentially reading pressure-sensitive data of the touch pen and forming a pressure-sensitive data group by the acquired pressure-sensitive data;
the expansion module is used for expanding a data interval of the pressure-sensitive data group acquired by the reading module by a data stretching method, wherein the data interval is an interval consisting of maximum pressure-sensitive data and minimum pressure-sensitive data in the pressure-sensitive data group;
the supplement module is used for supplementing new pressure sensing data between two continuous times of pressure sensing data when the difference value of the two continuous times of pressure sensing data in the pressure sensing data group after the data interval is expanded is larger than the preset maximum interval in the pressure sensing data group after the data interval is expanded;
the supplementary module comprises a first plug-in module, a comparison module, a supplementary submodule and a second plug-in module;
the first inserting module is used for directly inserting the first pressure-sensitive data in the pressure-sensitive data group after the data interval is expanded into a to-be-sent blocking queue, and the data in the to-be-sent blocking queue is used for sending to an upper application;
the comparison module is used for comparing the difference value between the current pressure sensing data and the previous pressure sensing data and the size of the maximum interval from the second pressure sensing data in the pressure sensing data group after the data interval is expanded;
the supplementary submodule is used for supplementing new pressure sensing data with a data interval of A/(A/G +1) and a quantity of (A/G +1) between the current pressure sensing data and the previous pressure sensing data when the difference value between the current pressure sensing data and the previous pressure sensing data is larger than the maximum interval, wherein A is the difference value between the current pressure sensing data and the previous pressure sensing data, and G is the maximum interval;
the second inserting module is used for inserting the new pressure sensing data and the current pressure sensing data into the to-be-sent blocking queue after the supplementing submodule supplements new pressure sensing data.
6. The system for optimizing stylus writing according to claim 5, the optimization system further comprising:
and the third inserting module is used for directly inserting the current pressure sensing data into the to-be-sent blocking queue when the comparison module compares that the difference value between the current pressure sensing data and the previous pressure sensing data is smaller than or equal to the maximum interval.
7. The system for optimizing stylus writing according to claim 5 or 6, further comprising:
and the fitting module is used for fitting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the data correlation degree in the pressure sensing data group supplemented with the new pressure sensing data.
8. The system for optimizing stylus handwriting according to claim 7, wherein said fitting module comprises a definition module and a balancing module;
the definition module is used for defining an initial data group and a relevancy weight array;
the balance module is used for sequentially substituting the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data into the initial data group, and balancing the pressure sensing data in the pressure sensing data group supplemented with the new pressure sensing data according to the correlation weight array so as to obtain balanced pressure sensing data.
CN201611021445.3A 2016-11-15 2016-11-15 Method and system for optimizing handwriting of touch pen Active CN106843714B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611021445.3A CN106843714B (en) 2016-11-15 2016-11-15 Method and system for optimizing handwriting of touch pen
PCT/CN2017/103814 WO2018090736A1 (en) 2016-11-15 2017-09-27 Optimization method and system for handwriting of stylus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611021445.3A CN106843714B (en) 2016-11-15 2016-11-15 Method and system for optimizing handwriting of touch pen

Publications (2)

Publication Number Publication Date
CN106843714A CN106843714A (en) 2017-06-13
CN106843714B true CN106843714B (en) 2020-05-12

Family

ID=59145732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611021445.3A Active CN106843714B (en) 2016-11-15 2016-11-15 Method and system for optimizing handwriting of touch pen

Country Status (2)

Country Link
CN (1) CN106843714B (en)
WO (1) WO2018090736A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843714B (en) * 2016-11-15 2020-05-12 广州视源电子科技股份有限公司 Method and system for optimizing handwriting of touch pen
CN115705104A (en) * 2021-08-09 2023-02-17 广州视源电子科技股份有限公司 Writing effect processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521855A (en) * 2011-11-22 2012-06-27 广东威创视讯科技股份有限公司 Handwriting regulation method and device based on touch platform
CN104049874A (en) * 2014-06-10 2014-09-17 广州视睿电子科技有限公司 Touch chirography generation method and system of touch pen
CN104252306A (en) * 2013-06-27 2014-12-31 宏碁股份有限公司 Brush stroke display method
CN104346091A (en) * 2013-07-31 2015-02-11 北京壹人壹本信息科技有限公司 Handwriting displaying method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101295217B (en) * 2008-06-05 2010-06-09 中兴通讯股份有限公司 Hand-written input processing equipment and method
TWI470490B (en) * 2012-02-17 2015-01-21 Wistron Corp Stroke display method of handwriting input and electronic device
CN104662496B (en) * 2012-09-11 2017-07-07 平蛙实验室股份公司 Touch force in the projection type touch-sensing device based on FTIR is estimated
CN103064554A (en) * 2012-12-17 2013-04-24 上海海知信息技术有限公司 Chirography smoothing method of handwriting input method and handwriting input method
WO2015059930A1 (en) * 2013-10-25 2015-04-30 Wacom Co., Ltd. Dynamic handwriting verification, handwriting-baseduser authentication, handwriting data generation, and handwriting data preservation
CN106843714B (en) * 2016-11-15 2020-05-12 广州视源电子科技股份有限公司 Method and system for optimizing handwriting of touch pen

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521855A (en) * 2011-11-22 2012-06-27 广东威创视讯科技股份有限公司 Handwriting regulation method and device based on touch platform
CN104252306A (en) * 2013-06-27 2014-12-31 宏碁股份有限公司 Brush stroke display method
CN104346091A (en) * 2013-07-31 2015-02-11 北京壹人壹本信息科技有限公司 Handwriting displaying method and device
CN104049874A (en) * 2014-06-10 2014-09-17 广州视睿电子科技有限公司 Touch chirography generation method and system of touch pen

Also Published As

Publication number Publication date
WO2018090736A1 (en) 2018-05-24
CN106843714A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
US10175852B2 (en) Information processing methods and electronic devices for classifying applications
US8347232B1 (en) Interactive user interface
US9035887B1 (en) Interactive user interface
US8314801B2 (en) Visual state manager for control skinning
EP2869174A1 (en) Method and device for text input and display of intelligent terminal
CN105117062A (en) Screen luminance regulation method and mobile terminal
US8749586B2 (en) Method and apparatus for providing folder item information based on touch operation
CN110321054A (en) Writing brush person&#39;s handwriting method for drafting, device, equipment and readable storage medium storing program for executing
CN108549518B (en) Music information display method and device and terminal equipment
CN106843714B (en) Method and system for optimizing handwriting of touch pen
CN110377215B (en) Model display method and device and terminal equipment
US20170123603A1 (en) Touch display apparatus and wallpaper replacing method thereof
CN108460819A (en) The method and apparatus for controlling the playback speed of animated message in mobile terminal
CN112394838A (en) Handwriting determining method and touch display device
CN108491152B (en) Touch screen terminal control method, terminal and medium based on virtual cursor
CN106020712B (en) Touch gesture recognition method and device
CN103809909A (en) Information processing method and electronic devices
CN105739995A (en) Playing simulating method and playing simulating module
CN109062496A (en) Method and device for adjusting operation area, mobile terminal and storage medium
CN105487801B (en) Progress bar adjusting method and mobile terminal
CN108762637A (en) Control method, apparatus and system
CN110874567B (en) Color value judging method and device, electronic equipment and storage medium
US9311725B2 (en) Systems and methods for creating an electronic signature
US9274703B2 (en) Method for inputting instruction and portable electronic device and computer readable recording medium
CN111325299A (en) Two-dimensional code image generation method and device, computer equipment and storage medium

Legal Events

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