CN110851006A - Touch pen mode switching method, device and equipment and readable storage medium - Google Patents

Touch pen mode switching method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN110851006A
CN110851006A CN202010045126.6A CN202010045126A CN110851006A CN 110851006 A CN110851006 A CN 110851006A CN 202010045126 A CN202010045126 A CN 202010045126A CN 110851006 A CN110851006 A CN 110851006A
Authority
CN
China
Prior art keywords
touch
signal
pen
protocol
touch screen
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.)
Granted
Application number
CN202010045126.6A
Other languages
Chinese (zh)
Other versions
CN110851006B (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.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Shenzhen Qianfenyi Intelligent Technology 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 Shenzhen Qianfenyi Intelligent Technology Co Ltd filed Critical Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority to CN202010045126.6A priority Critical patent/CN110851006B/en
Publication of CN110851006A publication Critical patent/CN110851006A/en
Application granted granted Critical
Publication of CN110851006B publication Critical patent/CN110851006B/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/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

Landscapes

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

Abstract

The application discloses a method, a device, equipment and a readable storage medium for switching modes of a touch pen, wherein the method comprises the steps of sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode; acquiring a first scanning interval of the touch screen according to a first signal; judging whether the first scanning interval shows a periodic rule or not; if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol; according to the second signal, traversing a preset protocol set to judge whether a second touch pen protocol is matched with the touch screen; if not, the mode is switched to the general mode of the touch pen. And matching the touch screens through the first touch pen protocol, if the matching fails, obtaining and switching to the second touch pen protocol for matching, if the matching still fails, switching to a general mode, and realizing the compatibility of different touch screens through mode switching.

Description

Touch pen mode switching method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of touch technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for switching modes of a stylus.
Background
Along with the screen size of intelligent terminal is bigger and bigger, light depends on the finger to carry out touch-control operation and has been unable to satisfy the demand, and information such as pressure data, mobile data when the touch-control pen can gather the user and use simultaneously sends for touch-control equipment in order to simulate real writing experience or to accomplish more meticulous operation, so touch-control pen's use is more and more frequent. However, for different touch devices, because communication protocols set by manufacturers are different, the same stylus pen may not be compatible with different touch devices, and a user needs to purchase corresponding stylus pens for different touch devices. This may result in an increase in the cost of the user using the touch device.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a device and a readable storage medium for switching a mode of a stylus, and aims to solve the problem that the compatibility of the stylus with different devices is poor when the stylus is used.
In order to achieve the above object, the present application provides a method for switching modes of a stylus, where the method for switching modes of a stylus includes the following steps:
sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
acquiring a first scanning interval of the touch screen according to the first signal;
judging whether the first scanning interval shows a periodic rule or not;
if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol;
traversing the preset protocol set according to the second signal to judge whether a second touch pen protocol is matched with the touch screen;
if not, the mode is switched to the general mode of the touch pen.
Optionally, the step of sending a first signal to the touch screen according to the encoding characteristic of the first stylus protocol includes:
acquiring the intensity of a coding signal of a touch screen;
if the intensity of the code printing signal is greater than a first threshold value, determining the first coding characteristic according to the first touch control pen protocol;
and sending a first signal to the touch screen according to the first coding characteristic.
Optionally, the step of traversing the preset protocol set to determine whether the second stylus protocol is matched with the touch screen according to the second signal includes:
sending a second signal to the touch screen, and detecting a second scanning interval of the touch screen;
judging whether the second scanning interval has a periodic rule or not;
and if the periodic rule is not presented, acquiring a new second touch pen protocol which is not tried to be matched from the preset protocol set, executing the step of judging whether the second touch pen protocol is matched with the touch screen according to the second signal, and if the preset protocol set is traversed, judging that the second touch pen protocol in the preset protocol set is not matched with the touch screen.
Optionally, the step of switching to the universal mode of the stylus pen includes:
acquiring the mutual capacitance coding frequency of the touch screen;
and switching to a universal mode of the touch pen according to the mutual capacitance coding frequency.
Optionally, the step of determining whether the scanning time interval exhibits a periodic regularity is followed by:
if the periodical rule is presented, the touch screen is successfully paired;
and after the pairing is successful, switching the mode into a stylus mode.
Optionally, after the pairing is successful, the step of switching the mode to the stylus mode includes:
acquiring pressure data of a pressure sensor;
and sending a pressure signal to the touch screen according to the pressure data.
Optionally, the step of switching the mode to the stylus mode includes:
acquiring the intensity of a coding signal of the touch screen;
and if the intensity of the code printing signal is greater than a second threshold value, sending a wake-up signal to the touch screen.
The present application further provides a stylus mode switching device, the stylus mode switching device includes:
the first sending module is used for sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
the acquisition module is used for acquiring a first scanning interval of the touch screen according to the sending signal;
the first judging module is used for judging whether the first scanning interval shows a periodic rule or not;
the second sending module is used for acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol if the periodic rule is not presented;
the second judging module is used for traversing the preset protocol set to judge whether a second touch pen protocol is matched with the touch screen or not according to the second signal;
and the switching module is used for switching to the universal mode of the touch pen if the touch pen is not matched with the touch pen.
The present application further provides a stylus device, the stylus device comprising: the touch control pen mode switching method comprises a memory, a processor and a touch control pen mode switching program which is stored on the memory and can run on the processor, wherein when the touch control pen mode switching program is executed by the processor, the steps of the touch control pen mode switching method are realized.
The present application further provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the stylus mode switching method as described above.
The method comprises the steps that a first signal is sent to a touch screen according to a first coding characteristic of a first touch pen protocol when a touch pen is in a preset default mode; acquiring a first scanning interval of the touch screen according to the first signal; judging whether the first scanning interval shows a periodic rule or not; if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol; traversing the preset protocol set according to the second signal to judge whether a second touch pen protocol is matched with the touch screen; if not, the mode is switched to the general mode of the touch pen. The touch control pen has a plurality of different modes, signals are sent to the touch control screen according to the first coding characteristics of a first touch control pen protocol set in a default mode, after the touch control screen receives the signals of the touch control pen, if the modes are matched, the touch control screen scans according to corresponding periods to receive the sending signals of the touch control pen, if the modes are not matched, the scanning interval of the touch control screen is not periodic, all the touch control pen protocols in a traversal preset protocol set are not matched, and the touch control pen is switched into a general mode to complete matching. The touch control pen can automatically select the corresponding touch control mode according to different touch control screen devices, and the same touch control pen is compatible with different touch control devices.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present application;
FIG. 2 is a schematic flowchart illustrating a first embodiment of a stylus mode switching method according to the present application;
fig. 3 is a flowchart illustrating a detailed process of step S10 in fig. 2 according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a detailed process of step S50 in fig. 2 according to a third embodiment of the present invention;
fig. 5 is a schematic system structure diagram of a stylus mode switching apparatus according to an embodiment of the present disclosure.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present application.
The terminal in the embodiment of the application is a touch control pen device.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that turns off the display screen and/or the backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a stylus mode switching program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the stylus mode switching program stored in the memory 1005, and perform the following operations:
sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
acquiring a first scanning interval of the touch screen according to the first signal;
judging whether the first scanning interval shows a periodic rule or not;
if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol;
traversing the preset protocol set according to the second signal to judge whether a second touch pen protocol is matched with the touch screen;
if not, the mode is switched to the general mode of the touch pen.
Based on the above terminal hardware structure, various embodiments of the present application are provided.
The application provides a mode switching method of a touch pen.
Referring to fig. 2, in a first embodiment of a stylus mode method, the method includes:
step S10, when the touch pen is in a preset default mode, sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol;
currently, a stylus is mostly used for touch devices with large screens such as a tablet computer, and for different brands, a stylus corresponding to the device is provided, because touch connection protocols between the stylus of different brands and the touch device are different, in order to enable the stylus to adapt to different touch devices, different modes need to be set for the stylus, and each different mode corresponds to a different touch protocol. The preset default mode is a mode for trying to match a touch device to be used by using an existing touch pen protocol in the touch pen, in the default mode, the characteristic of a sending signal of the touch pen is determined according to the preset touch protocol, one important difference in different touch protocols is that coding characteristics are different, the coding characteristics mainly comprise information such as a sending signal frequency, a sending signal pulse and a sending signal time interval, therefore, for different modes, the time interval of the sending signal of the capacitive touch pen is different, and an actual first preset time interval is determined according to the current mode. The default mode includes a plurality of different touch protocols. The specific touch protocols involved may be set autonomously by the manufacturer of the stylus.
Step S20, acquiring a first scanning interval of the touch screen according to the first signal;
in the working principle of the touch device, a sending end for sending a signal and a receiving end for receiving the signal are required to be simultaneously arranged, the position of touch operation is judged by changing capacitance in a touch screen of the control device, most of existing touch pens can be used as the sending end for sending the signal, the touch screen is used as the receiving end for receiving the signal sent by the touch pen, and the receiving end needs to scan according to a certain time interval to determine whether the sending end sends a corresponding signal, so that the touch pen can obtain the scanning interval for scanning the touch screen. And meanwhile, the scanning frequency is also included, and if the current touch pen protocol is matched with the touch screen, the scanning frequency can also present certain regularity.
Step S30, judging whether the first scanning interval shows a periodic rule;
in different touch protocols, the sending time interval of the sending signal is matched with the scanning interval of the receiving end for scanning, therefore, when the signal sent by the stylus is matched with the signal which can be received by the touch screen, that is, the stylus and the touch screen adopt the same stylus protocol, the touch screen is switched to the corresponding scanning interval to receive the signal sent by the stylus, and at this time, the scanning interval of the touch screen is changed from the previous disordered random scanning to the periodic regular scanning. In order to judge whether the periodic regularity exists, the scanning signals of the touch screen are obtained for multiple times in corresponding types, and whether the periodic regularity exists is judged according to the time interval between every two adjacent scanning signals.
Step S40, if the periodicity is not present, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol;
and if the first touch pen protocol is not matched with the touch screen, acquiring a second touch pen protocol in a preset protocol set, similar to the first touch pen protocol, determining information such as the sending frequency, the sending time interval, the pulse characteristic of the sending signal and the like of the second signal according to a second coding characteristic of the second touch pen protocol, and sending the second signal to the touch screen.
Step S50, according to the second signal, traversing the preset protocol set to judge whether a second touch pen protocol is matched with the touch screen;
and after the stylus sends a second signal to the stylus, acquiring a second scanning interval of the stylus, judging whether a second stylus protocol is matched with the touch screen according to the second scanning interval, when the second scanning interval shows periodic change, the description is matched, and if the second scanning interval does not show periodic change, the description is not matched. And meanwhile, traversing to acquire the stylus protocol in the new preset protocol set as the second stylus protocol, and re-performing the step S40 and the step S50.
Step S60, if not, switching to the general mode of the touch pen;
after trying the touch protocol used in the default mode, if it is found that there is no periodic regularity in the scanning time interval of the touch screen, if the current mode is not matched with the touch screen, the mode needs to be switched to a general mode, the general mode is to simulate the operation of fingers on the touch screen, and for a touch pen, all touch screens support the touch operation of the fingers, only the fingers cannot complete the operations with high accuracy requirements such as writing and drawing like the touch pen, meanwhile, in the general mode, some special operations of the stylus, such as obtaining pressure data of the stylus, obtaining writing speed of the stylus, and the like, which need to be supported by corresponding data of the stylus, cannot be supported, but basic operations such as touch selection can be completed, and at this time, compatibility with all touch devices can be realized without distinguishing specific stylus protocols.
In this embodiment, a first signal is sent to the touch screen according to a first encoding characteristic of a first touch pen protocol when the touch pen is in a preset default mode; acquiring a first scanning interval of the touch screen according to the first signal; judging whether the first scanning interval shows a periodic rule or not; if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol; judging whether a second touch control pen protocol is matched with the touch control screen or not according to the second signal; if not, the mode is switched to the general mode of the touch pen. The touch control pen has a plurality of different modes, signals are sent to the touch control screen according to the coding characteristics of a first touch control pen protocol set in the first mode, after the touch control screen receives the signals of the touch control pen, if the modes are matched, the touch control screen scans according to corresponding periods to receive the signals sent by the touch control pen, if the modes are not matched, the touch control screen does not scan periodically, and the touch control pen is switched into a general mode to complete matching. The touch control pen can automatically select the corresponding touch control mode according to different touch control screen devices, and the same touch control pen is compatible with different touch control devices.
Further, referring to fig. 2 and 3, on the basis of the first embodiment of the stylus mode switching method of the present application, a second embodiment of the stylus mode switching method is provided, in which,
step S10 includes:
step S11, acquiring the intensity of the code printing signal of the touch screen;
the touch control pen and the touch control screen are connected through Bluetooth or other wireless connection modes, so that the touch control pen transmits various signals to the touch control screen, the touch control screen is provided with a plurality of electrodes, the electrodes can generate a code printing signal under the action of a low-voltage alternating current electric field, the touch control pen can receive the code printing signal of the touch control screen, and meanwhile, the distance between the touch control screen and the touch control screen can be judged according to the code printing signal strength of the touch control screen.
Step S12, if the intensity of the code signal is greater than a first threshold, determining the first encoding characteristic according to the first stylus protocol;
when the intensity of the code signal is greater than the first threshold, it indicates that the distance between the stylus and the touch screen is small, and the stylus may be in contact with the touch screen, and at this time, according to the current mode of the stylus, a corresponding stylus protocol is obtained, currently, more common stylus protocols include HPP, MPP, USI, and the like, and coding characteristics in different stylus protocols are different, and the coding characteristics may include a time interval for sending a signal and a pulse characteristic in a sending signal. The time intervals at which the stylus transmits signals, i.e., the frequency of the transmitted signals, are different, and the encoding characteristics, and thus the time intervals and frequency at which the signals are transmitted, are determined according to the corresponding stylus protocol in the mode.
Step S13, sending a first signal to the touch screen according to the first coding characteristic;
after the corresponding time interval and frequency of the sending signal are determined according to the help characteristic of the corresponding touch protocol, the signal is sent to the touch screen according to the corresponding time interval and frequency, and meanwhile, pulses in the sending signal can be set according to pulse characteristics in different touch pen protocols.
In this embodiment, when the intensity of the code signal received by the stylus on the touch screen exceeds the threshold and the distance between the stylus and the touch screen is small, the first preset time interval for the stylus to send the signal is determined according to the stylus protocol corresponding to the mode, and the signal is sent to the touch screen.
Further, referring to fig. 2 and 4, on the basis of the second embodiment of the stylus mode switching method of the present application, a third embodiment of the stylus mode switching method is provided, in which,
step S50 includes:
step S51, sending a second signal to the touch screen, and detecting a second scanning interval of the touch screen;
step S52, determining whether the second scanning time interval exhibits a periodic rule;
step S53, if the periodic rule is not presented, acquiring a new second touch pen protocol which is not tried to be matched from a preset protocol set and executing the step of judging whether the second touch pen protocol is matched with the touch screen according to the second signal, and if the preset protocol set is traversed, judging that the second touch pen protocol in the preset protocol set is not matched with the touch screen;
all modes stored with the touch control pen protocol are regarded as a preset protocol set in a default mode, the default mode is divided into different sub-modes according to different touch control pen protocols, the touch control protocol and the coding characteristic corresponding to each sub-mode are different, when a first touch control pen protocol in the default mode is not matched with the current touch control equipment, a second touch control protocol stored in the touch control pen preset protocol set is searched, the operation is carried out according to the same method as the previous touch control pen protocol, namely, a new coding characteristic and a signal sending time interval are determined according to the second touch control pen protocol, a signal is sent to the touch control screen according to the second coding characteristic, the scanning interval of the touch control screen after the signal is sent is obtained, similarly, if the protocols of the touch control pen and the touch control screen are matched, the scanning interval and the scanning frequency of the touch control screen are changed into regular periodic scanning, after the regular periodic scanning occurs, and if all the touch protocols stored in the touch pen in advance cannot be matched with the current touch equipment, the traversal process is also exited, and the touch pen protocols in the current preset protocol set are judged to be not matched with the touch screen.
In this embodiment, a plurality of common different touch protocol types are preset in the default mode, when a touch device is tried and a touch pen is used as a touch transmission medium, all preset touch pen protocols are tried, a signal is sent to the touch screen according to coding characteristics corresponding to the touch pen protocols, a scanning time interval of the touch screen is determined, and if all touch pen protocols are not matched with the current touch device, it is determined that all touch pen protocols in a preset protocol set are not matched with the touch screen.
Further, on the basis of the third embodiment of the stylus mode switching method of the present application, a fourth embodiment of the stylus mode switching method is provided, in which,
step S60 includes:
a1, acquiring the mutual capacitance coding frequency of the touch screen;
step A2, switching to a general mode of a touch pen according to the mutual capacitance coding frequency;
most touch screens are capacitive touch screens at present, and most touch pens at present are active capacitive touch pens. The capacitive screen itself now comprises an emitter electrode and a receiver electrode, and a touch is detected by measuring the coupling capacitance between the emitter electrode and the receiver electrode. The capacitance pen has active and passive components. The passive capacitive stylus, like a finger, can change the coupling capacitance described above. The active capacitive stylus acts as an emitter (so power is required), and the capacitive screen detects the active capacitive stylus and turns off its emitter. However, because the touch protocols of different touch pens are different, the emission frequency of the corresponding emitter needs to be found, and in a general mode, in order to achieve the effect that the touch pen does not simulate as a finger to touch the screen to achieve touch, the mutual capacitance coding frequency of the touch screen itself needs to be obtained, where the mutual capacitance coding frequency is the coding frequency for the finger, the touch pen is adjusted according to the mutual capacitance coding frequency, and a signal is sent to the touch screen according to the mutual capacitance coding frequency of the touch screen for the finger to pretend as the emitter of the touch screen itself, so that the touch pen can affect the coupling capacitance of the screen itself to enable the touch screen to detect the corresponding touch operation. Meanwhile, a common touch screen corresponds to two operation modes, namely a hand operation mode and a touch pen operation mode, and in order to prevent mistaken touch, most touch screens automatically shield one operation mode when detecting the other operation mode, so that only a finger can be simulated to perform touch operation after the common mode is switched. Therefore, the mutually compatible coding frequency needs to be acquired, because when the touch control pen is in the universal mode, the touch control pen is relative to the finger, and the touch control pen is simulated to be matched with the coding signal frequency of the touch control screen, and the sending signal frequency of the touch control pen is adjusted according to the coding signal frequency.
In this embodiment, the common mode is to simulate the operation of the finger on the touch screen to realize compatibility with all touch screens, obtain the mutual capacitance coding frequency of the touch screen, and adjust the transmitting frequency of the stylus according to the mutual capacitance coding frequency, so as to achieve compatibility with the touch screen.
Further, on the basis of the first embodiment of the single-touch-pen mode switching method of the present application, a fifth embodiment of the touch-pen mode switching method is provided, wherein in the fifth embodiment,
step S60 is followed by:
step B1, if the periodicity is present, the pairing with the touch screen is successful;
step B2, after the pairing is successful, the mode is switched to a touch pen mode;
if the scanning time interval of the touch screen is found to be periodic, it is indicated that the current touch pen protocol is matched with the touch screen, and the related functions of the touch pen can be used, and the touch pen can be used as a conventional touch pen. For example, most touch screens can only touch selected icons or handwriting basically when the fingers perform touch operation, because the contact area between the fingers and the touch screen is large, the touch screen can only roughly judge the position of the fingers performing touch operation according to the coupling voltage of the screen, and meanwhile, when the fingers perform multi-point touch, ghost touch phenomena may occur, namely, the touch screen cannot accurately judge the actual position of the finger touch, and the touch pen can be used as an emitter, so that the touch screen can determine the position of the touch pen according to signals emitted by the touch pen, and the touch operation is more accurate. Meanwhile, the touch pen can be used for sending data acquired by a sensor of the touch pen to the touch screen and processing the data according to the content in the touch pen protocol, such as the data of a pressure sensor, the moving speed of the touch pen and the like, so that the real writing effect is closer to the real writing effect during writing. And passing the priority of the current stylus protocol after the pairing is successful.
Wherein step B2 is followed by:
step B3, acquiring pressure data of the pressure sensor;
step B4, sending a pressure signal to the touch screen according to the pressure data;
present touch-control pen is experienced for more real anthropomorphic dummy writing on paper through the pen, can increase pressure sensor in the touch-control pen, judge the dynamics of user when using touch-control pen equipment through pressure sensor, when the user uses the touch-control pen to write or draw on the touch-control screen like this, can adjust the display effect of handwriting on the touch-control screen according to pressure sensor's data, the thickness of handwriting when writing, when painting for the painting during the drawing, according to different pressure sensor's data, can the depth of corresponding adjustment colour. And when in a touch pen mode, the data of the pressure sensor is sent to the touch screen through a touch pen protocol, so that a user obtains better touch experience.
In this embodiment, in the stylus mode, the user experience of performing a touch operation using the stylus is better than the experience of performing the touch operation using a finger, and particularly, after the pressure sensor is added, the user experience close to the real writing or drawing operation can be obtained through the data of the pressure sensor.
Further, on the basis of the fifth embodiment of the single-touch-pen mode switching method of the present application, a sixth embodiment of the touch-pen mode switching method is provided, wherein in the sixth embodiment,
step B2 then includes:
step C1, acquiring the intensity of the code printing signal of the touch screen;
step C2, if the intensity of the code printing signal is greater than a second threshold value, sending a wake-up signal to the touch screen;
because the stylus can be used as an emitter to emit a signal to the touch screen, the touch screen can be awakened in advance through the stylus, that is, when the distance between the stylus and the touch screen is small, the distance between the stylus and the touch screen is judged through the code printing signal intensity of the touch screen, although the stylus does not directly contact the touch screen, the user can be judged to want to use the stylus to operate the touch screen according to the intention of the user, and therefore whether the touch screen needs to be awakened in advance can be judged according to the code printing signal intensity of the touch screen. Meanwhile, the awakening signal can be sent to the touch screen, and the predicted contact position of the touch pen and the touch screen can be sent to the touch screen, so that the touch screen can respond more quickly according to the provided information.
In this embodiment, when the touch pen and the touch screen are successfully matched through the touch protocol, the distance between the touch pen and the touch screen is determined, and when the distance between the touch pen and the touch screen is smaller than a second preset distance, a wake-up signal is sent to the touch screen to light the touch screen in advance, so that the use experience of a user in using the touch pen is further improved.
In addition, referring to fig. 5, an embodiment of the present application further provides a stylus mode switching apparatus, where the stylus mode switching apparatus includes:
the first sending module is used for sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
the acquisition module is used for acquiring a first scanning interval of the touch screen according to the first signal;
the first judging module is used for judging whether the first scanning interval shows a periodic rule or not;
the second sending module is used for acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol if the periodic rule is not presented;
the second judging module is used for traversing the preset protocol set to judge whether a second touch pen protocol is matched with the touch screen or not according to the second signal;
and the switching module is used for switching to the universal mode of the touch pen if the touch pen is not matched with the touch pen.
Optionally, the first sending module is further configured to:
acquiring the intensity of a coding signal of the touch screen;
if the intensity of the code printing signal is greater than a first threshold value, determining a first coding characteristic according to a preset first touch control pen protocol;
and sending a first signal to the touch screen according to the first coding characteristic.
Optionally, the second determining module is further configured to:
sending a second signal to the touch screen, and detecting a second scanning interval of the touch screen;
judging whether the second scanning interval has a periodic rule or not;
and if the periodic rule is not presented, acquiring a new second touch pen protocol which is not tried to be matched from the preset protocol set, executing the step of judging whether the second touch pen protocol is matched with the touch screen according to the second signal, and if the preset protocol set is traversed, judging that the second touch pen protocol in the preset protocol set is not matched with the touch screen.
Optionally, the switching module is further configured to:
acquiring the mutual capacitance coding frequency of the touch screen;
and switching to a universal mode of the touch pen according to the mutual capacitance coding frequency.
Optionally, the switching module is further configured to:
if the periodical rule is presented, the touch screen is successfully paired;
and after the pairing is successful, switching the mode into a stylus mode.
Optionally, the first sending module is further configured to:
acquiring pressure data of a pressure sensor;
and sending a pressure signal to the touch screen according to the pressure data.
Optionally, the first sending module is further configured to:
acquiring the intensity of a coding signal of the touch screen;
and if the intensity of the code printing signal is greater than a second threshold value, sending a wake-up signal to the touch screen.
The specific implementation of the device and the readable storage medium (i.e., the computer readable storage medium) of the present application has substantially the same extension as that of the above embodiments of the stylus mode switching method, and thus, the detailed description thereof is omitted here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A stylus mode switching method is characterized by comprising the following steps:
sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
acquiring a first scanning interval of the touch screen according to the first signal;
judging whether the first scanning interval shows a periodic rule or not;
if the periodic rule is not presented, acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol;
traversing the preset protocol set according to the second signal to judge whether a second touch pen protocol is matched with the touch screen;
if not, the mode is switched to the general mode of the touch pen.
2. The stylus mode switching method of claim 1, wherein sending a first signal to the touch screen according to the encoding characteristic of the first stylus protocol comprises:
acquiring the intensity of a coding signal of the touch screen;
if the intensity of the code printing signal is greater than a first threshold value, determining the first coding characteristic according to the first touch control pen protocol;
and sending a first signal to the touch screen according to the first coding characteristic.
3. The method of claim 1, wherein the step of determining whether the second stylus protocol matches the touch screen according to the second signal by traversing the predetermined protocol set comprises:
sending a second signal to the touch screen, and detecting a second scanning interval of the touch screen;
judging whether the second scanning interval has a periodic rule or not;
and if the periodic rule is not presented, acquiring a new second touch pen protocol which is not tried to be matched from the preset protocol set, executing the step of judging whether the second touch pen protocol is matched with the touch screen according to the second signal, and if the preset protocol set is traversed, judging that the second touch pen protocol in the preset protocol set is not matched with the touch screen.
4. The method of claim 3, wherein the switching to the universal mode of the stylus comprises:
acquiring the mutual capacitance coding frequency of the touch screen;
and switching to a universal mode of the touch pen according to the mutual capacitance coding frequency.
5. The method of claim 1, wherein the step of determining whether the scanning time interval exhibits a periodic regularity is followed by the step of:
if the periodical rule is presented, the touch screen is successfully paired;
and after the pairing is successful, switching the mode into a stylus mode.
6. The method of claim 5, wherein the step of switching the mode to the stylus mode after the pairing is successful comprises:
acquiring pressure data of a pressure sensor;
and sending a pressure signal to the touch screen according to the pressure data.
7. The method of claim 5, wherein the step of switching mode to stylus mode comprises:
acquiring the intensity of a coding signal of the touch screen;
and if the intensity of the code printing signal is greater than a second threshold value, sending a wake-up signal to the touch screen.
8. A stylus mode switching apparatus, comprising:
the first sending module is used for sending a first signal to the touch screen according to a first coding characteristic of a first touch pen protocol when the touch pen is in a preset default mode;
the acquisition module is used for acquiring a first scanning interval of the touch screen according to the first signal;
the first judging module is used for judging whether the first scanning interval shows a periodic rule or not;
the second sending module is used for acquiring a second touch control pen protocol in the preset protocol set and sending a second signal to the touch control screen according to a second coding characteristic of the second touch control pen protocol if the periodic rule is not presented;
the second judging module is used for traversing the preset protocol set to judge whether a second touch pen protocol is matched with the touch screen or not according to the second signal;
and the switching module is used for switching to the universal mode of the touch pen if the touch pen is not matched with the touch pen.
9. A stylus device, the device comprising: memory, processor and a stylus mode switching program stored on the memory and executable on the processor, the stylus mode switching program when executed by the processor implementing the steps of the stylus mode switching method according to any one of claims 1 to 7.
10. A readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the stylus mode switching method according to any one of claims 1 to 7.
CN202010045126.6A 2020-01-16 2020-01-16 Touch pen mode switching method, device and equipment and readable storage medium Active CN110851006B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010045126.6A CN110851006B (en) 2020-01-16 2020-01-16 Touch pen mode switching method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010045126.6A CN110851006B (en) 2020-01-16 2020-01-16 Touch pen mode switching method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110851006A true CN110851006A (en) 2020-02-28
CN110851006B CN110851006B (en) 2020-05-19

Family

ID=69610842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010045126.6A Active CN110851006B (en) 2020-01-16 2020-01-16 Touch pen mode switching method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110851006B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111580690A (en) * 2020-04-28 2020-08-25 深圳市千分一智能技术有限公司 Stylus mode switching method and device, stylus and readable storage medium
WO2021184221A1 (en) * 2020-03-17 2021-09-23 深圳市汇顶科技股份有限公司 Coding control and coding method, coding system, chip, electronic device, and storage medium
CN114327102A (en) * 2021-12-06 2022-04-12 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114461092A (en) * 2021-08-19 2022-05-10 荣耀终端有限公司 Touch pen connection method and electronic equipment
WO2022094802A1 (en) * 2020-11-04 2022-05-12 深圳市汇顶科技股份有限公司 Active capacitive stylus and electronic terminal
CN114816139A (en) * 2022-06-24 2022-07-29 基合半导体(宁波)有限公司 Capacitive screen, capacitive screen and stylus interaction method and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140256250A1 (en) * 2013-03-11 2014-09-11 Barnesandnoble.Com Llc Peer-to-peer data transfer using near field communication (nfc)-enabled styluses
US20150054776A1 (en) * 2013-08-26 2015-02-26 Odd Magne Reitan Synchronization of Active Stylus and Touch Sensor
CN104484063A (en) * 2014-12-10 2015-04-01 北京汉王鹏泰科技有限公司 Active capacitance pen and touch device
CN104536596A (en) * 2014-12-17 2015-04-22 汉王科技股份有限公司 Active type capacitive pen, touch control device and method for automatically recognizing capacitive touch control panel
CN108139820A (en) * 2015-10-02 2018-06-08 微软技术许可有限责任公司 The stylus for communicate with digitizer with dynamic protocol selection
CN108780364A (en) * 2016-03-11 2018-11-09 微软技术许可有限责任公司 Stylus is matched
CN209297258U (en) * 2019-02-21 2019-08-23 精元电脑股份有限公司 Multi-mode writing pencil

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140256250A1 (en) * 2013-03-11 2014-09-11 Barnesandnoble.Com Llc Peer-to-peer data transfer using near field communication (nfc)-enabled styluses
US20150054776A1 (en) * 2013-08-26 2015-02-26 Odd Magne Reitan Synchronization of Active Stylus and Touch Sensor
CN104484063A (en) * 2014-12-10 2015-04-01 北京汉王鹏泰科技有限公司 Active capacitance pen and touch device
CN104536596A (en) * 2014-12-17 2015-04-22 汉王科技股份有限公司 Active type capacitive pen, touch control device and method for automatically recognizing capacitive touch control panel
CN108139820A (en) * 2015-10-02 2018-06-08 微软技术许可有限责任公司 The stylus for communicate with digitizer with dynamic protocol selection
CN108780364A (en) * 2016-03-11 2018-11-09 微软技术许可有限责任公司 Stylus is matched
CN209297258U (en) * 2019-02-21 2019-08-23 精元电脑股份有限公司 Multi-mode writing pencil

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021184221A1 (en) * 2020-03-17 2021-09-23 深圳市汇顶科技股份有限公司 Coding control and coding method, coding system, chip, electronic device, and storage medium
CN111580690A (en) * 2020-04-28 2020-08-25 深圳市千分一智能技术有限公司 Stylus mode switching method and device, stylus and readable storage medium
CN111580690B (en) * 2020-04-28 2023-09-08 深圳市千分一智能技术有限公司 Touch pen mode switching method and device, touch pen and readable storage medium
WO2022094802A1 (en) * 2020-11-04 2022-05-12 深圳市汇顶科技股份有限公司 Active capacitive stylus and electronic terminal
US11609666B2 (en) 2020-11-04 2023-03-21 Shenzhen GOODIX Technology Co., Ltd. Active capacitive pen for realizing touch operation under MPP protocol and USI protocol and electronic terminal
CN114461092A (en) * 2021-08-19 2022-05-10 荣耀终端有限公司 Touch pen connection method and electronic equipment
CN114461092B (en) * 2021-08-19 2022-10-11 荣耀终端有限公司 Touch pen connection method and electronic equipment
CN114327102A (en) * 2021-12-06 2022-04-12 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114327102B (en) * 2021-12-06 2023-07-21 深圳市千分一智能技术有限公司 Protocol switching method, device, equipment and computer readable storage medium
CN114816139A (en) * 2022-06-24 2022-07-29 基合半导体(宁波)有限公司 Capacitive screen, capacitive screen and stylus interaction method and storage medium
CN114816139B (en) * 2022-06-24 2022-11-01 基合半导体(宁波)有限公司 Capacitive screen, capacitive screen and stylus interaction method and storage medium

Also Published As

Publication number Publication date
CN110851006B (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN110851006B (en) Touch pen mode switching method, device and equipment and readable storage medium
CN111665967B (en) Method for executing in active pen and active pen
JP7473699B2 (en) Sensor Controller
CN111580690B (en) Touch pen mode switching method and device, touch pen and readable storage medium
US20230333676A1 (en) Active stylus communication with a digitizer
EP3343342A1 (en) Hand-written information processing apparatus, hand-written information processing method and hand-handwritten information processing program
CN109683733A (en) Stylus, touch panel, display device and sensing method of touch control
CN113076015B (en) Signal transmitting method for triggering display of handwriting and handwriting display method
US11392221B2 (en) Touch sensitive processing apparatus, system and operating method thereof for receiving electrical signals carrying pressure information
US20200064943A1 (en) Touch Sensitive Processing Apparatus, System and Operating Method Thereof for Receiving Electrical signals Carrying Pressure Information
KR20100070092A (en) Mobile telecommunication device embodying method using the navigation apparatus
US11409379B2 (en) Stylus and operating method thereof for transmitting electrical signals carrying pressure information
US11132073B1 (en) Stylus, touch electronic device, and touch system
TWI723708B (en) Stylus, method and system for updating stylus setting
CN109739396B (en) Execution method of touch instruction of mobile terminal, mobile terminal and readable storage medium
CN111367432B (en) Method and system for supporting active pen, touch control adapter plate and system chip
CN109085987B (en) Device control method, device, storage medium and electronic device
KR101887933B1 (en) Apparatus of pen-type inputting device and inputting method thereof
CN115712355A (en) Control method and device of stylus pen, stylus pen and storage medium
CN117616369A (en) Touch pen, control method thereof and touch writing system
KR20160045660A (en) Apparatus of pen-type inputting device and inputting method thereof

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