WO2023273526A1 - 笔迹绘制方法、装置、电子设备和可读存储介质 - Google Patents

笔迹绘制方法、装置、电子设备和可读存储介质 Download PDF

Info

Publication number
WO2023273526A1
WO2023273526A1 PCT/CN2022/087496 CN2022087496W WO2023273526A1 WO 2023273526 A1 WO2023273526 A1 WO 2023273526A1 CN 2022087496 W CN2022087496 W CN 2022087496W WO 2023273526 A1 WO2023273526 A1 WO 2023273526A1
Authority
WO
WIPO (PCT)
Prior art keywords
stylus
threshold
touch screen
electronic device
sensor
Prior art date
Application number
PCT/CN2022/087496
Other languages
English (en)
French (fr)
Other versions
WO2023273526A9 (zh
Inventor
李航
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to US18/271,468 priority Critical patent/US20240053880A1/en
Publication of WO2023273526A1 publication Critical patent/WO2023273526A1/zh
Publication of WO2023273526A9 publication Critical patent/WO2023273526A9/zh

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
    • 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/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • 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/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • G06F3/0383Signal control means within the pointing device
    • 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
    • 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
    • G06F3/04162Control or interface arrangements specially adapted for digitisers for exchanging data with external devices, e.g. smart pens, via the digitiser sensing hardware
    • 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/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • 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/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0442Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means using active external devices, e.g. active pens, for transmitting changes in electrical potential to be received by the digitiser
    • 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
    • G06F3/04883Interaction 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 for inputting data by handwriting, e.g. gesture or text

Definitions

  • the embodiment of the present application relates to terminal technologies, and in particular to a handwriting drawing method, device, electronic equipment and readable storage medium.
  • touch technology With the development of touch technology, more and more electronic devices adopt touch mode for human-computer interaction.
  • the user can operate the touch screen of the electronic device through the stylus to provide input to the electronic device, and the electronic device performs corresponding operations based on the input of the stylus.
  • electronic devices can display the handwriting of the stylus on the touch screen based on the pressure-sensitive signal of the tip of the stylus and the touch (touch panel, TP) signal from the stylus, so as to realize writing, painting etc.
  • the response speed of electronic equipment to draw handwriting is slow, the control precision is low, and it is prone to phenomena such as poor writing and ink leakage.
  • the embodiments of the present application provide a handwriting drawing method, device, electronic equipment and readable storage medium, which can improve the response speed and control precision of handwriting drawing by the electronic equipment.
  • the embodiment of the present application provides a handwriting drawing method.
  • the execution subject of the method may be an electronic device, or a chip in the electronic device.
  • the following description takes the electronic device as an example for execution.
  • the electronic device includes a touch screen, and the touch screen includes a touch sensor TP sensor.
  • the first threshold and the second threshold of the capacitance variation of the TP sensor may be preset, and the first threshold and the second threshold are different.
  • the electronic device can detect the capacitance change of the TP sensor, and judge whether to execute the operation of drawing handwriting. Wherein, the electronic device performs the operation of drawing handwriting in response to detecting that the capacitance change of the TP sensor is greater than or the first threshold, and stops performing the operation of drawing handwriting in response to detecting that the capacitance change of the TP sensor is less than the second threshold.
  • the electronic device because the electronic device is not based on the pressure-sensitive signal of the tip of the stylus, but judges whether to execute the operation of drawing handwriting based on the capacitance change of the TP sensor, it can avoid the time delay of Bluetooth transmission and improve the electronic device.
  • the response speed of drawing handwriting can also avoid the problem of low control precision of electronic equipment due to the inherent defect of the pressure sensor at the tip of the stylus.
  • the electronic device judges whether to execute the operation of drawing handwriting based on the capacitance change of the TP sensor, it can also truly realize the zero pressure of the stylus, that is, when the user holds the stylus and touches the touch screen lightly or tilts to write , to achieve the purpose of electronic equipment drawing handwriting.
  • the embodiment of the present application sets the first threshold for the electronic device to draw handwriting when the stylus is close to the touch screen, and sets the second threshold for the electronic device to stop drawing handwriting when the stylus is away from the touch screen, which can avoid the ping-pong effect of the electronic device when drawing handwriting .
  • the first threshold preset in the embodiment of the present application is the threshold value of the capacitance change when the user puts down the pen (that is, the stylus is close to the touch screen), and the second threshold is the value when the user lifts the pen (that is, touches the touch screen).
  • the electronic device may perform the operation of drawing handwriting in response to detecting that the stylus is close to the touch screen, and the capacitance change of the TP sensor is greater than or equal to a first threshold;
  • the stylus is far away from the touch screen, and the capacitance variation of the TP sensor is less than a second threshold, and the operation of drawing handwriting is stopped, and the first threshold is different from the second threshold.
  • the electronic device performing the operation of drawing handwriting can be understood as water coming out of the stylus pen
  • the electronic device stopping the operation of drawing handwriting can be understood as water coming out of the stylus pen.
  • the first threshold and the second threshold are obtained based on "the capacitance change of the TP sensor when the stylus touches the touch screen", and the first threshold is the TP sensor when the distance between the stylus and the touch screen is the first distance Capacitance variation, the second threshold is the capacitance variation of the TP sensor when the distance between the stylus and the touch screen is the second distance.
  • the first distance is 0.2 mm
  • the second distance is 0.5 mm.
  • the ratio of the first threshold to the "capacitance change of the TP sensor when the stylus touches the touch screen” is the first ratio
  • the ratio of the second threshold to the "capacitance change of the TP sensor when the stylus touches the touch screen” is the second ratio.
  • the purpose of setting the first threshold and the second threshold differently is to avoid the ping-pong effect of the electronic device performing the operation of drawing handwriting, and it can also be understood that it can prevent the stylus from going back and forth between water outlet and water outlet Toggle to avoid the ping-pong effect of the stylus.
  • the first threshold is set to be greater than the second threshold.
  • the TP sensor is composed of multiple electrodes. Due to the influence of the electrode manufacturing process, when the stylus touches different positions of the touch screen of the electronic device, the capacitance of the TP sensor changes differently. This will lead to a large difference in the height of the stylus pen coming out of the water and the height of the pen out of the water at different positions of the touch screen, and the user experience is poor.
  • the embodiment of the present application can pre-test and obtain the first threshold and the second threshold of each position of the touch screen during the manufacturing stage of the electronic device, and then store the first threshold and the second threshold of each position of the touch screen in the electronic device.
  • second threshold That is to say, the first threshold of the stylus at the first position of the touch screen is different from the first threshold of the stylus at the second position of the touch screen.
  • Both the first location and the second location are locations on the touch screen.
  • the electronic device can self-learn the first threshold and the second threshold of each position of the touch screen, and store the first threshold and the second threshold of each position of the touch screen.
  • the electronic device may detect the position of the stylus on the touch screen in response to detecting that the stylus is close to the touch screen, and then query the stylus based on the first position of the stylus on the touch screen.
  • the first threshold of the first position in response to the capacitance variation of the TP sensor at the first position being greater than or equal to the first threshold of the first position, the operation of drawing handwriting is performed.
  • the electronic device in response to detecting that the stylus is far away from the touch screen, detects the position of the stylus on the touch screen; based on the first position of the stylus on the touch screen, query The second threshold at the first position; in response to the capacitance change of the TP sensor at the first position being less than the second threshold at the first position, stop performing the operation of drawing handwriting.
  • the electronic device can use the first threshold and the second threshold at the first position to determine whether to perform the operation of drawing handwriting.
  • it can ensure that different positions of the touch screen
  • the height of the stylus pen out of the water is the same as that of the pen out of the water, and on the other hand, the control accuracy of the electronic device for drawing handwriting can be improved.
  • the electronic device may divide the touch screen into a first area and a second area, the first area includes at least one first location, and the second area includes at least one second location. It should be understood that the size, shape, etc. of the first region and the second region may be the same or different.
  • the electronic device may record a first threshold value of the first area in response to the stylus touching the first position, and record a first threshold of the second area in response to detecting that the stylus touches the second position .
  • the electronic device may record the second threshold value of the first area in response to the stylus touching the first position, and record the second threshold value of the second area in response to detecting that the stylus touches the second position. the second threshold.
  • the electronic device may use the first threshold of the first area as the first threshold of the first location.
  • the electronic device may record the third position in response to detecting that the stylus touches the third position.
  • the first threshold of the area to which the location belongs, the third location is located outside the first area and the second area, that is, the first location is located outside the area to which the third location belongs.
  • the electronic device has self-learned the first threshold of the third area, but has not learned the first thresholds of the first area and the second area.
  • the electronic device when the electronic device responds to the first position of the stylus on the touch screen and inquires about the first threshold at the first position, the stored first threshold cannot be found. Therefore, the electronic device may set the preset Set the first threshold as the first threshold of the first position. In an embodiment, if the electronic device cannot find the stored first threshold, the electronic device may also use the first threshold of the location closest to the first location among the stored first thresholds as the first threshold. The first threshold of position.
  • the manner of recording the first threshold value of the first area may be: the electronic device responds to detecting that the stylus touches the first position, acquiring the The capacitance change of the TP sensor at the first position; based on the capacitance change and the first ratio of the TP sensor at the first position, the first threshold of the first region is obtained.
  • the electronic device can obtain the first position of the first area corresponding to each first position based on the capacitance variation of the TP sensor at each first position and the first ratio.
  • Threshold based on the first threshold of the first area corresponding to each first position, the first threshold of the first area is acquired.
  • the first threshold value of the first region is acquired based on the first threshold value of the first region corresponding to each first position, such as by adopting an average method or a weighted average method.
  • the capacitance change of the TP sensor can be preprocessed to improve the capacitance change of the TP sensor. Accuracy, thereby improving the accuracy of the first threshold and the second threshold.
  • the electronic device when it detects that the stylus touches the first position, it may also receive a pressure-sensitive signal and a touch TP signal from the stylus. The electronic device may respond to detecting that the stylus touches the first position, and the number of times of the pressure-sensitive signal is greater than a preset number, the number of reported points of the TP signal is greater than a preset number, and the stylus The angle between the touch screen and the touch screen is within a preset angle range, and the capacitance variation of the TP sensor at the first position is acquired.
  • Such a setting can ensure that the stylus stays on the touch screen for a long enough time, so that the electronic device can more accurately obtain the capacitance change of the TP sensor when the stylus touches the position, so as to improve the first threshold and the second threshold of the position. Threshold Accuracy.
  • the user may touch the first position, the second position, etc. multiple times.
  • the electronic device may obtain the first threshold value of the first position based on the capacitance variation of the TP sensor each time the first position is touched, and then update the first threshold value of the first position.
  • the electronic device may use the second threshold in the first area as the second threshold in the first position.
  • the electronic device may record the third position in response to detecting that the stylus touches the third position.
  • a second threshold of the area to which the location belongs, the third location is outside the first area and the second area.
  • the electronic device has self-learned the second threshold in the third area, but has not learned the second thresholds in the first area and the second area.
  • the electronic device inquires about the second threshold of the first position in response to the stylus at the first position of the touch screen, the stored second threshold cannot be found. Therefore, the electronic device may use the preset second threshold as the The second threshold for the first position.
  • the electronic device may also use the second threshold value of the position closest to the first position among the stored second threshold values as the first threshold value.
  • the second threshold for position may also use the second threshold value of the position closest to the first position among the stored second threshold values as the first threshold value.
  • the manner of recording the second threshold value of the first area may be: the electronic device responds to detecting that the stylus touches the first position, acquiring the The capacitance change amount of the TP sensor at the first position; based on the capacitance change amount and the second ratio of the TP sensor at the first position, the second threshold value of the first region is obtained.
  • the electronic device can obtain the second value of the first area corresponding to each first position based on the capacitance variation of the TP sensor at each first position and the second ratio.
  • Threshold based on the second threshold of the first area corresponding to each first position, the second threshold of the first area is acquired.
  • the second threshold value of the first region is acquired based on the second threshold value of the first region corresponding to each first position, such as using an average method or a weighted average method.
  • the capacitance change of the TP sensor can be preprocessed to improve the capacitance change of the TP sensor. Accuracy, thereby improving the second threshold and the accuracy of the second threshold.
  • the electronic device when it detects that the stylus touches the first position, it may also receive a pressure-sensitive signal and a touch TP signal from the stylus. The electronic device may respond to detecting that the stylus touches the first position, and the number of times of the pressure-sensitive signal is greater than a preset number, the number of reported points of the TP signal is greater than a preset number, and the stylus The angle between the touch screen and the touch screen is within a preset angle range, and the capacitance variation of the TP sensor at the first position is acquired.
  • Such a setting can ensure that the stylus stays on the touch screen for a long enough time, so that the electronic device can more accurately obtain the capacitance change of the TP sensor when the stylus touches the position, so as to improve the second threshold and the second threshold of the position. Threshold Accuracy.
  • the electronic device can obtain the second threshold value of the first position based on the capacitance variation of the TP sensor each time the first position is touched, and then update the second threshold value of the first position.
  • the angle between the stylus and the touch screen will affect the capacitance variation of the TP sensor, and then affect the first threshold and the second threshold of the first position.
  • the angle between the stylus and the touch screen may be considered.
  • the electronic device may obtain a first angle between the stylus and the touch screen, and then record the first angle in the first area.
  • the first threshold under the corner Specifically, in response to detecting that the stylus touches the first position, the electronic device may detect that the angle between the stylus and the touch screen is a first angle, and the capacitance of the TP sensor changes. quantity.
  • the electronic device can obtain the first threshold value of the first region by the capacitance change amount and the first ratio of the TP sensor at the first position, and record correspondingly with the first included angle at the same time, that is, obtain the first threshold value under the first included angle in the first region.
  • first threshold is
  • the electronic device can detect that the angle between the stylus and the touch screen is the second angle, and the capacitance of the TP sensor can be detected in response to detecting that the stylus touches the second position. amount of change.
  • the electronic device can obtain the first threshold value of the second area by the capacitance change amount and the first ratio of the TP sensor at the second position, and simultaneously record it corresponding to the first included angle, that is, obtain the second included angle in the second area. the first threshold of .
  • the electronic device can acquire the angle between the touch pen and the touch screen in response to the first position of the touch pen on the touch screen;
  • the included angle between the touch screens is the first included angle, and the first threshold value under the first included angle in the first area is used as the first threshold value under the first included angle at the first position.
  • the electronic device may use the preset first threshold value as the first position The first threshold value under the first included angle of .
  • the electronic device may use the first threshold value in the first area and the first included angle The first threshold at the included angle with the smallest difference is used as the first threshold at the first included angle at the first position.
  • the electronic device may set the distance closest to the first position, and the The first threshold under the angle with the same angle or the minimum difference is used as the first threshold under the first angle at the first position.
  • the electronic device when the electronic device self-learns the first threshold and the second threshold of each area of the touch screen, considering the influence of the included angle between the stylus and the touch screen, it can learn the lower and lower values of each included angle in each area of the touch screen.
  • the first threshold and the second threshold of the stylus and then when the stylus draws handwriting, the electronic device can query the first threshold under the angle of the stylus based on the position of the stylus on the touch screen and the angle between the stylus and the touch screen.
  • the first threshold and the second threshold can further improve the control accuracy of the drawing comparison operation.
  • the embodiment of the present application provides a handwriting drawing device.
  • the handwriting drawing device may be the electronic device as described in the first aspect above, or a chip in the electronic device.
  • the electronic device includes a touch screen, and the touch screen includes Touch sensorTP sensor.
  • the handwriting drawing device includes:
  • a processing module configured to perform an operation of drawing handwriting in response to detecting that the stylus is close to the touch screen, and the capacitance variation of the TP sensor is greater than or equal to a first threshold, and, in response to detecting that the stylus is detected away from the touch screen, and the capacitance variation of the TP sensor is less than a second threshold, stop performing the operation of drawing handwriting, and the first threshold is different from the second threshold.
  • the first threshold is greater than the second threshold.
  • the first threshold of the stylus at the first position of the touch screen is different from the first threshold of the stylus at the second position of the touch screen.
  • the processing module is specifically configured to, in response to detecting that the stylus is close to the touch screen, detect the position of the stylus on the touch screen; In the first position of the touch screen, query the first threshold of the first position; in response to the capacitance variation of the TP sensor at the first position being greater than or equal to the first threshold of the first position, perform drawing handwriting operation.
  • the processing module is specifically configured to, in response to detecting that the stylus is far away from the touch screen, detect the position of the stylus on the touch screen; In the first position of the touch screen, query the second threshold of the first position; in response to the capacitance variation of the TP sensor at the first position being less than the second threshold of the first position, stop performing the process of drawing handwriting operate.
  • the touch screen includes a first area and a second area, the first area includes at least one first location, and the second area includes at least one second location.
  • the storage module is configured to, in response to detecting that the stylus touches the first position, record the first threshold of the first area, and in response to detecting the touch The pen touches the second location, recording a first threshold for the second area.
  • the processing module is specifically configured to use the first threshold of the first region as the first threshold of the first position.
  • the storage module is further configured to, in response to detecting that the stylus touches a third position, record a first threshold value of an area to which the third position belongs, and the third position is located in the outside the first area and the second area.
  • the processing module is specifically configured to use a preset first threshold as the first threshold of the first position.
  • the processing module is specifically configured to, in response to detecting that the stylus touches the first position, acquire the capacitance variation of the TP sensor at the first position; based on the first The capacitance variation of the TP sensor at the position and the first ratio are used to obtain the first threshold of the first region.
  • the processing module is specifically configured to obtain the first threshold value of the first region corresponding to each first position based on the capacitance variation of the TP sensor at each first position and the first ratio ; Obtain the first threshold of the first area based on the first threshold of the first area corresponding to each first position.
  • the transceiver module is configured to receive a pressure-sensitive signal and a touch TP signal from the stylus.
  • a processing module specifically configured to respond to detecting that the stylus touches the first position, and the number of times of the pressure-sensitive signal is greater than a preset number, the number of reported points of the TP signal is greater than a preset number, and the The angle between the stylus and the touch screen is within a preset angle range, and the capacitance variation of the TP sensor at the first position is acquired.
  • the storage module is further configured to replace or update the first threshold of the first region.
  • the processing module is configured to, in response to detecting that the stylus touches the first position, detect an included angle between the stylus and the touch screen.
  • a storage module configured to record a first threshold at the first angle in the first area based on the angle between the stylus and the touch screen being a first angle.
  • a processing module further configured to detect an angle between the stylus and the touch screen in response to detecting that the stylus touches the second position;
  • a storage module further configured to The included angle with the touch screen is a second included angle, and the first threshold value under the second included angle in the first area is recorded.
  • the processing module is further configured to, in response to the first position of the stylus on the touch screen, detect an angle between the stylus and the touch screen; based on the The included angle between the stylus and the touch screen is the first included angle, and the first threshold under the first included angle in the first area is used as the first threshold of the first position.
  • an embodiment of the present application provides an electronic device, including a processor and a memory, the memory is used to store code instructions; the processor is used to run code instructions, so that the electronic device can perform any one of the first aspect or the first aspect. method in an implementation.
  • an embodiment of the present application provides a handwriting drawing system, including the electronic device described in the third aspect above, and a stylus.
  • the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when the instructions are executed, the computer executes the computer according to the first aspect or any implementation manner of the first aspect. Methods.
  • an embodiment of the present application provides a computer program product, including a computer program.
  • the computer program When the computer program is run, the computer executes the method in the first aspect or any implementation manner of the first aspect.
  • FIG. 1 is a schematic diagram of a scene applicable to an embodiment of the present application
  • FIG. 2A is a schematic structural diagram of a stylus provided in an embodiment of the present application.
  • FIG. 2B is a schematic diagram of a partially disassembled structure of the stylus provided in the embodiment of the present application.
  • FIG. 3 is a schematic diagram of the interaction between the stylus and the electronic device provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of the assembly of the stylus and the wireless keyboard provided by the embodiment of the present application.
  • FIG. 5A is a schematic diagram of a stylus provided in an embodiment of the present application stored in a storage portion of a wireless keyboard;
  • FIG. 5B is a schematic side view of the stylus provided by the embodiment of the present application when it is stored in the storage part of the wireless keyboard;
  • FIG. 6 is a schematic diagram of a hardware structure of a stylus provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a hardware structure of a wireless keyboard provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the interaction between the stylus and the electronic device provided by the embodiment of the present application.
  • FIG. 10 is a schematic diagram of another scenario applicable to the embodiment of the present application.
  • FIG. 11A is a schematic diagram of changes in the capacitance value of the touch screen
  • FIG. 11B is another schematic diagram of changes in the capacitance value of the touch screen.
  • FIG. 12 is a schematic diagram of drawing handwriting of a stylus by an existing electronic device
  • Fig. 13 is a schematic flow chart of an embodiment of the handwriting drawing method provided by the embodiment of the present application.
  • FIG. 14 is a schematic diagram of the capacitance variation of the TP sensor provided by the embodiment of the present application.
  • Fig. 15 is a schematic diagram of handwriting drawing provided by the embodiment of the present application.
  • Figure 16A is a schematic diagram of the TP sensor provided by the embodiment of the present application.
  • Fig. 16B is another schematic diagram of the TP sensor provided by the embodiment of the present application.
  • Fig. 17 is a schematic diagram of the height of the stylus at various positions on the touch screen provided by the embodiment of the present application, and the height of the stylus when it is lifted;
  • FIG. 18 is a schematic flow diagram of obtaining the first threshold and the second threshold of each position on the touch screen provided by the embodiment of the present application;
  • Fig. 19 is a schematic flowchart of another embodiment of the handwriting drawing method provided by the embodiment of the present application.
  • FIG. 20 is a schematic structural diagram of a handwriting drawing device provided by an embodiment of the present application.
  • FIG. 1 is a schematic diagram of a scene applicable to an embodiment of the present application.
  • the scene includes a stylus (stylus) 100 , an electronic device 200 and a wireless keyboard 300 .
  • the electronic device 200 is a tablet computer (tablet) as an example for illustration.
  • the stylus 100 and the wireless keyboard 300 may provide input to the electronic device 200 , and the electronic device 200 performs an operation in response to the input based on the stylus 100 or the wireless keyboard 300 .
  • a touch area can be set on the wireless keyboard 300 , and the stylus 100 can operate the touch area of the wireless keyboard 300 to provide input to the wireless keyboard 300 , and the wireless keyboard 300 can perform an operation in response to the input based on the stylus 100 .
  • between the stylus 100 and the electronic device 200, between the stylus 100 and the wireless keyboard 300, and between the electronic device 200 and the wireless keyboard 300, can be interconnected through a communication network to realize wireless communication. signal interaction.
  • the communication network can be but not limited to: WI-FI hotspot network, WI-FI point-to-point (peer-to-peer, P2P) network, Bluetooth network, zigbee network or near field communication (near field communication, NFC) network and other short-distance Communications network.
  • the stylus 100 can be, but not limited to: an inductive pen and a capacitive pen.
  • the electronic device 200 has a touch screen 201.
  • the touch screen 201 of the electronic device 200 interacting with the stylus 100 needs to integrate an electromagnetic induction board. Coils are distributed on the electromagnetic induction board, and coils are also integrated in the inductive pen. Based on the principle of electromagnetic induction, within the range of the magnetic field generated by the electromagnetic induction board, as the inductive pen moves, the inductive pen can store electric energy. The inductive pen can transmit the accumulated electric energy to the electromagnetic induction board through the coil in the inductive pen through free oscillation.
  • the electromagnetic induction board can scan the coil on the electromagnetic induction board based on the electric energy from the inductive pen, and calculate the position of the inductive pen on the touch screen 201 .
  • the touch screen in the electronic device 200 may also be called a touch screen, and the stylus may be called a stylus.
  • Capacitive pens can include: passive capacitive pens and active capacitive pens.
  • a passive capacitive pen can be called a passive capacitive pen, and an active capacitive pen can be called an active capacitive pen.
  • One or more electrodes can be set in the active capacitive pen (for example, inside the pen tip), and the active capacitive pen can transmit signals through the electrodes.
  • the stylus 100 is an active capacitive stylus
  • an electrode array needs to be integrated on the touch screen 201 of the electronic device 200 interacting with the stylus 100 .
  • the electrode array may be a capacitive electrode array.
  • the electronic device 200 can receive a signal from the active capacitive stylus through the electrode array, and when receiving the signal, recognize the position of the active capacitive stylus on the touch screen based on the change of the capacitance value on the touch screen 201, and actively The inclination angle of the capacitive pen.
  • the stylus used in the embodiment of the present application is an active capacitive stylus, which may be referred to as an active stylus for short.
  • FIG. 2A is a schematic structural diagram of a stylus provided by an embodiment of the present application.
  • the stylus 100 may include a pen tip 10 , a pen barrel 20 and a back cover 30 .
  • the interior of the pen holder 20 is a hollow structure.
  • the nib 10 and the back cover 30 are located at both ends of the pen holder 20 respectively.
  • the back cover 30 and the pen holder 20 can be plugged or engaged. See description of Figure 2B.
  • FIG. 2B is a schematic diagram of a partially disassembled structure of the stylus provided by the embodiment of the present application.
  • the stylus 100 further includes a spindle assembly 50 , the spindle assembly 50 is located in the pen holder 20 , and the spindle assembly 50 is slidably disposed in the pen holder 20 .
  • the spindle assembly 50 has an external thread 51
  • the nib 10 includes a writing end 11 and a connecting end 12 , wherein the connecting end 12 of the pen point 10 has an internal thread (not shown) matching the external thread 51 .
  • the connecting end 12 of the nib 10 protrudes into the pen holder 20 and is threadedly connected with the external thread 51 of the spindle assembly 50 .
  • the connection between the connecting end 12 of the pen tip 10 and the spindle assembly 50 may also be detachably connected by snap-fitting or the like. Through the detachable connection between the connecting end 12 of the nib 10 and the spindle assembly 50 , the replacement of the nib 10 is realized.
  • a pressure-sensitive assembly 60 is provided on the main shaft assembly 50, and a part of the pressure-sensitive assembly 60 is fixedly connected with a fixed structure in the pen holder 20, and a part of the pressure-sensitive assembly 60 is connected to the main shaft assembly 50. Fixed connection.
  • the circuit board 70 detects the pressure of the writing end 11 of the nib 10 according to the deformation of the pressure-sensitive component 60, thereby The line thickness of the writing end 11 is controlled according to the pressure of the writing end 11 of the nib 10 .
  • the pressure detection of the pen tip 10 includes but not limited to the above methods.
  • a pressure sensor can also be provided in the writing end 11 of the pen point 10 so that the pressure of the pen point 10 can be detected by the pressure sensor.
  • the stylus 100 further includes a plurality of electrodes, for example, the plurality of electrodes may be the first emitting electrode 41 , the ground electrode 43 and the second emitting electrode 42 .
  • the first emitter electrode 41 , the ground electrode 43 and the second emitter electrode 42 are all electrically connected to the circuit board 70 .
  • the first emitter electrode 41 can be located in the nib 10 and close to the writing end 11, and the circuit board 70 can be configured as a control board that can provide signals to the first emitter electrode 41 and the second emitter electrode 42 respectively, and the first emitter electrode 41 is used for Transmitting the first signal, when the first emitting electrode 41 is close to the touch screen 201 of the electronic device 200, a coupling capacitance can be formed between the first emitting electrode 41 and the touch screen 201 of the electronic device 200, so that the electronic device 200 can receive first signal.
  • the second transmitting electrode 42 is used for transmitting a second signal, and the electronic device 200 can determine the inclination angle of the stylus 100 according to the received second signal.
  • the second emitting electrode 42 may be located on the inner wall of the pen holder 20 . In one example, the second emitter electrode 42 may also be located on the spindle assembly 50 .
  • the ground electrode 43 can be located between the first emitter electrode 41 and the second emitter electrode 42, or the ground electrode 43 can be located on the outer periphery of the first emitter electrode 41 and the second emitter electrode 42, and the ground electrode 43 is used to reduce the first emitter electrode 43.
  • the electrode 41 and the second emitter electrode 42 are coupled to each other.
  • the electronic device 200 When the electronic device 200 receives the first signal from the stylus 100 , the capacitance value at the corresponding position of the touch screen 201 will change. Accordingly, the electronic device 200 can determine the position of the stylus 100 (or the tip of the stylus 100 ) on the touch screen 201 based on the change of the capacitance value on the touch screen 201 . In addition, the electronic device 200 may acquire the inclination angle of the stylus 100 by using a double-tip projection method in the inclination detection algorithm. Wherein, the positions of the first emitting electrode 41 and the second emitting electrode 42 in the stylus 100 are different, so when the electronic device 200 receives the first signal and the second signal from the stylus 100, the two signals on the touch screen 201 The capacitance value at each position will change.
  • the electronic device 200 can obtain the tilt angle of the stylus 100 according to the distance between the first emitter electrode 41 and the second emitter electrode 42, and the distance between two positions on the touch screen 201 where the capacitance value changes,
  • the tilt angle of the stylus 100 For more detailed acquisition of the inclination angle of the stylus 100 , reference may be made to the relevant description of the double-tip projection method in the prior art.
  • the stylus 100 further includes: a battery assembly 80 , and the battery assembly 80 is used to provide power to the circuit board 70 .
  • the battery pack 80 may include a lithium ion battery, or, the battery pack 80 may include a nickel-chromium battery, an alkaline battery or a nickel-hydrogen battery or the like.
  • the battery included in the battery assembly 80 can be a rechargeable battery or a disposable battery, wherein, when the battery included in the battery assembly 80 is a rechargeable battery, the stylus 100 can charge the battery assembly wirelessly. 80 to charge the battery.
  • the electronic device 200 can send an uplink to the stylus 100 through the electrode array integrated on the touch screen 201.
  • the stylus 100 can receive the uplink signal through the receiving electrodes, and the stylus 100 can transmit the downlink signal through the transmitting electrodes (such as the first transmitting electrode 41 and the second transmitting electrode 42 ).
  • the downlink signal includes the above-mentioned first signal and second signal.
  • the uplink signal and the downlink signal may be square wave signals.
  • the wireless keyboard 300 may include a first part 301 and a second part 302 .
  • the wireless keyboard 300 may include: a keyboard body and a keyboard case.
  • the first part 301 may be a keyboard case
  • the second part 302 is a keyboard body.
  • the first part 301 is used to place the electronic device 200
  • the second part 302 may be provided with buttons, a touch panel, etc. for user operations.
  • the first part 301 and the second part 302 of the wireless keyboard 300 need to be opened, and when the wireless keyboard 300 is not in use, the first part 301 and the second part 302 of the wireless keyboard 300 can be closed.
  • the first part 301 and the second part 302 of the wireless keyboard 300 can be rotatably connected.
  • the first part 301 and the second part 302 may be connected by a rotating shaft or a hinge, or, in some examples, the first part 301 and the second part 302 may be rotationally connected by a flexible material (such as leather material or cloth material) .
  • the first part 301 and the second part 302 can be integrally formed, and the joint between the first part 301 and the second part 302 is thinned, so that the connection between the first part 301 and the second part 302 The connection can be bent.
  • the connection manner between the first part 301 and the second part 302 may include but not limited to the above-mentioned several rotational connection manners.
  • the first part 301 may include at least two rotatably connected brackets.
  • the first part 301 includes a first bracket 301a and a second bracket 301b, which are rotationally connected between the first bracket 301a and the second bracket 301b.
  • the first bracket 301a and the second bracket can be used 301b together support the electronic device 200 (refer to FIG. 1 ).
  • the first bracket 301 a supports the second bracket 301 b
  • the second bracket 301 b supports the electronic device 200 .
  • the second bracket 301b is connected to the second part 302 in rotation.
  • the wireless keyboard 300 may be provided with a storage portion 303 for storing the stylus 100 .
  • the storage portion 303 is a cylindrical cavity, and when stored, the stylus 100 is inserted into the storage cavity along the direction of the arrow in FIG. 4 .
  • the second part 302 and the second bracket 301 b are rotationally connected through a connection part 304 , and a receiving part 303 is disposed in the connection part 304 .
  • the connecting part 304 may be a rotating shaft.
  • FIG. 5A is a schematic diagram of the stylus provided by the embodiment of the present application stored in the storage part of the wireless keyboard
  • FIG. 5B is a schematic side view of the stylus provided by the embodiment of the present application stored in the storage part of the wireless keyboard.
  • the receiving portion 303 is a circular cavity, and the inner diameter of the receiving portion 303 is larger than the outer diameter of the stylus 100 .
  • a magnetic material may be disposed on the inner wall of the storage portion 303 , and a magnetic material may be disposed in the stylus 100 .
  • the stylus 100 is attracted in the storage portion 303 by the magnetic adsorption between the magnetic materials.
  • the fixing between the stylus 100 and the storage portion 303 includes but is not limited to the use of magnetic adsorption to achieve fixation.
  • the stylus 100 and the storage portion 303 can also be fixed by means of engagement .
  • a pop-up structure can be set in the storage portion 303, for example, when one end of the stylus 100 is pressed, the pop-up mechanism can drive one end of the stylus 100 to go outward from the storage portion 303. pop up.
  • FIG. 6 is a schematic diagram of a hardware structure of a stylus provided by an embodiment of the present application.
  • the stylus 100 may have a processor 110 .
  • Processor 110 may include storage and processing circuitry to support the operation of stylus 100 .
  • Storage and processing circuitry may include storage devices such as non-volatile memory (e.g., flash memory or other electrically programmable read-only memory configured as a solid state drive), volatile memory (e.g., static or dynamic random access memory) Wait.
  • Processing circuits in the processor 110 can be used to control the operation of the stylus 100 .
  • the processing circuitry may be based on one or more microprocessors, microcontrollers, digital signal processors, baseband processors, power management units, audio chips, application specific integrated circuits, and the like.
  • the sensors may include pressure sensor 120 .
  • the pressure sensor 120 can be disposed on the writing end 11 of the stylus 100 (as shown in FIG. 2B ).
  • the pressure sensor 120 can also be set in the barrel 20 of the stylus 100 , so that when one end of the nib 10 of the stylus 100 receives force, the other end of the nib 10 moves to apply force to the pressure sensor 120 .
  • the processor 110 can adjust the thickness of the line when writing with the nib 10 of the stylus 100 according to the pressure detected by the pressure sensor 120 .
  • the sensors may also include inertial sensors 130 .
  • Inertial sensor 130 may include a three-axis accelerometer and a three-axis gyroscope, and/or other components for measuring motion of stylus 100, for example, a three-axis magnetometer may be included in a nine-axis inertial sensor configuration in the sensor.
  • the sensors may also include additional sensors such as temperature sensors, ambient light sensors, light-based proximity sensors, contact sensors, magnetic sensors, pressure sensors, and/or other sensors.
  • a status indicator 140 such as a light emitting diode and a button 150 may be included in the stylus 100 .
  • the status indicator 140 is used to remind the user of the status of the stylus 100 .
  • Buttons 150 may include mechanical buttons and non-mechanical buttons, and buttons 150 may be used to collect button press information from a user.
  • the stylus 100 may include one or more electrodes 160 (for details, refer to the description in FIG. Located in the nib 10 , reference may be made to the relevant description above.
  • the stylus 100 may include a sensing circuit 170 .
  • Sensing circuitry 170 can sense capacitive coupling between electrodes 160 and drive lines of a capacitive touch sensor panel that interacts with stylus 100 .
  • the sensing circuit 170 may include an amplifier to receive capacitance readings from a capacitive touch sensor panel, a clock to generate a demodulated signal, a phase shifter to generate a phase-shifted demodulated signal, a frequency shifter to use an in-phase demodulation
  • a mixer to demodulate capacitance readings using quadrature demodulation frequency components, a mixer to demodulate capacitance readings using quadrature demodulation frequency components, etc.
  • the results of the mixer demodulation can be used to determine an amplitude proportional to the capacitance so that the stylus 100 can sense contact with the capacitive touch sensor panel.
  • the stylus 100 may include a microphone, a speaker, an audio generator, a vibrator, a camera, a data port and other devices.
  • a user can control the operation of the stylus 100 and the electronic device 200 that interacts with the stylus 100 by providing commands with these devices, and receive status information and other output.
  • the processor 110 may be used to run software on the stylus 100 that controls the operation of the stylus 100 .
  • software running on the processor 110 may process sensor inputs, button inputs, and inputs from other devices to monitor the movement of the stylus 100 and other user inputs.
  • Software running on the processor 110 can detect user commands and can communicate with the electronic device 200 .
  • the stylus 100 may include a wireless module.
  • the wireless module is the Bluetooth module 180 as an example for illustration.
  • the wireless module can also be a WI-FI hotspot module, a WI-FI point-to-point module, and the like.
  • the Bluetooth module 180 may include a radio frequency transceiver, such as a transceiver.
  • the Bluetooth module 180 may also include one or more antennas.
  • the transceiver may utilize the antenna to transmit and/or receive wireless signals, which may be Bluetooth signals, wireless local area network signals, long-range signals such as cellular phone signals, near field communication signals, or other wireless signals based on the type of wireless module.
  • the stylus 100 may further include a charging module 190 , and the charging module 190 may support charging of the stylus 100 and provide power for the stylus 100 .
  • the electronic device 200 in the embodiment of the present application may be called user equipment (user equipment, UE), terminal (terminal), etc.
  • the electronic device 200 may be a tablet computer (portable android device, PAD), personal digital processing (personal digital assistant, PDA), handheld devices with wireless communication functions, computing devices, vehicle-mounted devices or wearable devices, virtual reality (virtual reality, VR) terminal equipment, augmented reality (augmented reality, AR) terminal equipment, industrial control Wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical, wireless terminals in smart grid, transportation safety
  • a mobile terminal or a fixed terminal with a touch screen such as a wireless terminal in a smart city, a wireless terminal in a smart home, or a wireless terminal in a smart home.
  • the form of the terminal device is not specifically limited in the embodiment of the present application.
  • FIG. 7 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application.
  • electronic device 200 may include multiple subsystems that cooperate to perform, coordinate or monitor one or more operations or functions of electronic device 202 .
  • Electronic device 200 includes processor 210 , input surface 220 , coordination engine 230 , power subsystem 240 , power connector 250 , wireless interface 260 and display 270 .
  • the coordination engine 230 can be used to communicate and/or process data with other subsystems of the electronic device 200; communicate and/or trade data with the stylus 100; measure and/or obtain one or more analog or digital output of a sensor, such as a touch sensor; measure and/or obtain the output of one or more sensor nodes of an array of sensor nodes, such as an array of capacitive sensing nodes; receive and locate tip and ring signals from stylus 100 ; positioning the stylus 100 based on the positions of the tip signal crossing area and the ring signal crossing area, etc.
  • the coordination engine 230 of the electronic device 200 includes or is otherwise communicatively coupled to a sensor layer underlying or integrated with the input surface 220 .
  • Coordination engine 230 utilizes the sensor layer to position stylus 100 on input surface 220 and uses techniques described herein to estimate the angular position of stylus 100 relative to the plane of input surface 220 .
  • the input surface 220 may be called a touch screen 201 .
  • the sensor layer of the coordination engine 230 of the electronic device 200 is a grid of capacitive sensing nodes arranged in columns and rows. More specifically, the array of column traces is arranged perpendicular to the array of row traces.
  • the sensor layer can be separated from other layers of the electronic device, or the sensor layer can be placed directly on another layer, such as but not limited to: display stack layer, force sensor layer, digitizer layer, polarizer layer, battery layer , structural or decorative shell layers, etc.
  • the sensor layer can operate in multiple modes. If operating in mutual capacitance mode, the column and row traces form a single capacitive sensing node at each point of overlap (eg, "vertical" mutual capacitance). If operating in self-capacitance mode, the column and row traces form two (vertically aligned) capacitive sensing nodes at each point of overlap. In another embodiment, adjacent column traces and/or adjacent row traces may each form a single capacitive sensing node (eg, a "horizontal" mutual capacitance) if operating in mutual capacitance mode.
  • the sensor layer may detect the presence of the tip 10 of the stylus 100 and/or the touch of a user's finger by monitoring changes in capacitance (eg, mutual capacitance or self capacitance) present at each capacitive sensing node.
  • coordination engine 230 may be configured to detect tip and ring signals received from stylus 100 through the sensor layer via capacitive coupling.
  • the tip signal and/or the ring signal may include specific information and/or data that may be configured to enable the electronic device 200 to recognize the stylus 100 .
  • Such information is generally referred to herein as "stylus identity" information.
  • This information and/or data may be received by the sensor layer and interpreted, decoded and/or demodulated by the coordination engine 230 .
  • the processor 210 may use the stylus identity information to receive input from more than one stylus at the same time.
  • coordination engine 230 may be configured to transmit the position and/or angular position of each of the number of stylus detected by coordination engine 230 to processor 210 .
  • the coordination engine 230 may also transmit to the processor 210 information related to the relative positions and/or relative angular positions of the plurality of stylus detected by the coordination engine 230 .
  • the coordination engine 230 may notify the processor 210 that the detected first stylus is located at a distance from the detected second stylus.
  • the end signal and/or the ring signal may also include specific information and/or data for enabling the electronic device 200 to identify a specific user. Such information is generally referred to herein as "user-identifying" information.
  • Coordination engine 230 may forward user identity information (if detected and/or recoverable) to processor 210 . If the user identity information cannot be recovered from the tip signal and/or the ring signal, the coordination engine 230 may optionally indicate to the processor 210 that the user identity information is not available. Processor 210 can utilize user identity information (or the absence of such information) in any suitable manner, including but not limited to: accepting or denying input from a specific user, allowing or denying access to specific functions of the electronic device, and the like. Processor 210 may use user identity information to receive input from more than one user at a time.
  • the tip signal and/or ring signal may include specific information and/or data that may be configured to cause the electronic device 200 to recognize a user's or stylus 100's settings or preferences. Such information is generally referred to herein as "stylus settings" information.
  • Coordination engine 230 may forward stylus setting information (if detected and/or recoverable) to processor 210 . If the stylus setting information cannot be recovered from the tip signal and/or the ring signal, the coordination engine 230 may optionally indicate to the processor 210 that the stylus setting information is not available.
  • the electronic device 200 can use the stylus to set the information (or the absence of the information) in any suitable way, including but not limited to: applying the setting to the electronic device, applying the setting to the program running on the electronic device, changing the The line thickness, color, and pattern presented by the graphics program of the electronic device, changing the settings of the video game operated on the electronic device, etc.
  • the processor 210 may be configured to perform, coordinate and/or manage the functions of the electronic device 200 .
  • Such functions may include, but are not limited to: communicating and/or transacting data with other subsystems of the electronic device 200, communicating and/or transacting data with the stylus 100, communicating data and/or transacting data via a wireless interface, communicating via a wired
  • the interface communicates and/or trades data, facilitates power exchange via wireless (eg, inductive, resonant, etc.) or wired interfaces, receives position and angular position of one or more stylus, and the like.
  • Processor 210 may be implemented as any electronic device capable of processing, receiving or sending data or instructions.
  • a processor may be a microprocessor, central processing unit, application specific integrated circuit, field programmable gate array, digital signal processor, analog circuit, digital circuit, or a combination of these devices.
  • Processors can be single-threaded or multi-threaded.
  • Processors can be single-core or multi-core processors.
  • processor 210 may be configured to access memory storing instructions.
  • the instructions may be configured to cause the processor to perform, coordinate or monitor one or more operations or functions of the electronic device 200 .
  • the instructions stored in memory may be configured to control or coordinate the operation of other components of electronic device 200, such as, but not limited to: another processor, analog or digital circuitry, volatile or non-volatile memory modules, displays, speakers, microphones, rotary input devices, buttons or other physical input devices, biometric authentication sensors and/or systems, force or touch input/output components, communication modules (such as wireless interfaces and/or power connectors), and/or Haptic or tactile feedback devices.
  • the memory can also store electronic data that can be used by the stylus or the processor.
  • memory may store electronic data or content (such as media files, documents, and applications), device settings and preferences, timing signals and control signals, or data, data structures, or databases for various modules, and detect tip signals and/or Or ring signal-related files or configurations, etc.
  • the memory can be configured as any type of memory.
  • memory may be implemented as random access memory, read only memory, flash memory, removable memory, other types of storage elements, or a combination of such devices.
  • the electronic device 200 also includes a power subsystem 240 .
  • Power subsystem 240 may include a battery or other power source.
  • the power subsystem 240 may be configured to provide power to the electronic device 200 .
  • the power subsystem 240 may also be coupled to a power connector 250 .
  • Power connector 250 may be any suitable connector or port that may be configured to receive power from an external power source and/or to provide power to an external load.
  • power connector 250 may be used to recharge a battery within power subsystem 240 .
  • power connector 250 may be used to transfer power stored (or available) within power subsystem 240 to stylus 100 .
  • the electronic device 200 also includes a wireless interface 260 to facilitate electronic communication between the electronic device 200 and the stylus 100 .
  • the electronic device 200 may be configured to communicate with the stylus 100 via a Bluetooth low energy communication interface or a near field communication interface.
  • the communication interface facilitates electronic communication between the electronic device 200 and an external communication network, device or platform.
  • Wireless interface 260 may be implemented as one or more of a wireless interface, a Bluetooth interface, a near field communication interface, a magnetic interface, a general purpose serial Bus interface, inductive interface, resonant interface, capacitive coupling interface, Wi-Fi interface, TCP/IP interface, network communication interface, optical interface, acoustic interface or any traditional communication interface.
  • the electronic device 200 also includes a display 270 .
  • Display 270 may be located behind input surface 220, or may be integrated therewith.
  • Display 270 may be communicatively coupled to processor 210 .
  • Processor 210 may present information to a user using display 270 .
  • processor 210 uses display 270 to present an interface with which a user can interact.
  • the user manipulates the stylus 100 to interact with the interface.
  • FIG. 8 is a schematic diagram of a hardware structure of a wireless keyboard provided by an embodiment of the present application.
  • the wireless keyboard 300 may include a processor 310 , a memory 320 , a charging interface 330 , a charging management module 340 , a wireless charging coil 350 , a battery 360 , a wireless communication module 370 , a touch panel 380 , and a keyboard 390 .
  • the processor 310, the memory 320, the charging interface 330, the charging management module 340, the battery 360, the wireless communication module 370, the touch panel 380, the keyboard 390, etc. can all be arranged on the keyboard body of the wireless keyboard 300 (that is, as shown in FIG. 4 shown on the second portion 302).
  • the above-mentioned wireless charging coil 350 can be arranged in the connection part 304 (as shown in FIG. 4 ) for movably connecting the keyboard body and the bracket.
  • connection part 304 as shown in FIG. 4
  • wireless keyboard 300 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the memory 320 can be used to store program codes, such as program codes for wirelessly charging the stylus 100 .
  • a Bluetooth address for uniquely identifying the wireless keyboard 300 may also be stored in the memory 320 .
  • the memory 320 may also store connection data of electronic devices that have been successfully paired with the wireless keyboard 300 before.
  • the connection data may be the Bluetooth address of the electronic device successfully paired with the wireless keyboard 300 .
  • the wireless keyboard 300 can be automatically paired with the electronic device without configuring the connection therebetween, such as performing legality verification.
  • the above bluetooth address may be a media access control (media access control, MAC) address.
  • the processor 310 can be used to execute the above application program codes, and call related modules to realize the functions of the wireless keyboard 300 in the embodiment of the present application.
  • the processor 310 may include one or more processing units, and different processing units may be independent devices, or may be integrated in one or more processors 310 .
  • the processor 310 may be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to execute the functions belonging to the processor 310 described in the embodiments of this application.
  • the processor of the wireless keyboard 300 may be a microprocessor.
  • the wireless communication module 370 can be used to support the connection between the wireless keyboard 300 and other electronic devices including Bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), wireless local area network (wireless local area networks, WLAN) (such as Wireless fidelity (wireless fidelity, Wi-Fi) network), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication data exchange.
  • Bluetooth blue, BT
  • global navigation satellite system global navigation satellite system
  • GNSS global navigation satellite system
  • wireless local area network wireless local area networks, WLAN
  • frequency modulation frequency modulation
  • FM near field communication technology
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 370 may be a Bluetooth chip.
  • the wireless keyboard 300 can be a Bluetooth keyboard.
  • the wireless keyboard 300 can pair and establish a wireless connection with the Bluetooth chip of other electronic devices through the Bluetooth chip, so as to realize wireless communication between the wireless keyboard 300 and other electronic devices through the wireless connection.
  • the wireless communication module 370 may further include an antenna.
  • the wireless communication module 370 receives electromagnetic waves via the antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 310 .
  • the wireless communication module 370 can also receive the signal to be transmitted from the processor 310, frequency-modulate it, amplify it, and convert it into electromagnetic wave to radiate through the antenna.
  • wireless keyboard 300 may support wired charging.
  • the charging management module 340 may receive a charging input from a wired charger through the charging interface 330 .
  • the wireless keyboard 300 may support forward wireless charging.
  • the charging management module 340 can receive wireless charging input through the wireless charging coil 350 of the wireless keyboard 300 .
  • the charging management module 340 is connected to the wireless charging coil 350 through a matching circuit.
  • the wireless charging coil 350 can be coupled with the wireless charging coil of the above-mentioned wireless charger, and induces the alternating electromagnetic field emitted by the wireless charging coil 350 of the wireless charger to generate an alternating electric signal.
  • the alternating electric signal generated by the wireless charging coil 350 is transmitted to the charging management module 340 through the matching circuit, so as to wirelessly charge the battery 360 .
  • the charging management module 340 can also provide power for the wireless keyboard 300 while charging the battery 360 .
  • the charging management module 340 receives the input of the battery 360 to provide power for the processor 310 , the memory 320 , the external memory and the wireless communication module 370 .
  • the charging management module 340 can also be used to monitor parameters such as the battery capacity of the battery 360, the number of battery cycles, and the state of health of the battery (leakage, impedance).
  • the charging management module 340 may also be disposed in the processor 310 .
  • the wireless keyboard 300 can support reverse wireless charging.
  • the charging management module 340 may also receive an input from the charging interface 330 or the battery 360, and convert the DC signal input from the charging interface 330 or the battery 360 into an AC signal.
  • the AC signal is transmitted to the wireless charging coil 350 through the matching circuit.
  • the wireless charging coil 350 can generate an alternating electromagnetic field upon receiving the alternating current signal.
  • the wireless charging coil of other mobile terminals should induce an alternating electromagnetic field, which can be used for wireless charging. That is, the wireless keyboard 300 can also wirelessly charge other mobile terminals.
  • the wireless charging coil 350 can be set in the storage portion 303 of the wireless keyboard 300, and the wireless charging coil is set in the barrel 20 of the stylus 100. When the stylus 100 is placed in the storage portion 303, The wireless keyboard 300 can charge the stylus 100 through the wireless charging coil 350 .
  • FIG. 8 shows a schematic diagram of the hardware structure of the wireless keyboard 300 by taking the matching circuit integrated in the charging management module 340 as an example.
  • the charging interface 330 can be used to provide a wired connection for charging or communication between the wireless keyboard 300 and other electronic devices (such as a wired charger of the wireless keyboard 300 ).
  • a touch sensor is integrated in the above-mentioned touch panel 380 .
  • the notebook computer can receive user's control commands on the notebook computer through the touch panel 380 and the keyboard 390 .
  • the structure shown in the embodiment of the present application does not constitute a specific limitation on the wireless keyboard 300 . It may have more or fewer components than shown in FIG. 8, may combine two or more components, or may have a different configuration of components.
  • the casing of the wireless keyboard 300 may also be provided with a storage cavity for storing the stylus 100 .
  • the wireless charging coil 350 is disposed in the storage cavity, and is used for charging the stylus 100 wirelessly after the stylus 100 is stored in the storage cavity.
  • the outer surface of the wireless keyboard 300 may also include components such as buttons, indicator lights (which can indicate battery status, incoming/outgoing calls, pairing mode, etc.), display screens (which can prompt users for relevant information), and the like.
  • the button may be a physical button or a touch button (used in conjunction with a touch sensor), etc., and is used to trigger operations such as powering on, powering off, starting charging, and stopping charging.
  • FIG. 9 is a schematic diagram of interaction between a stylus applicable to an embodiment of the present application and an electronic device.
  • the stylus 100 includes: a micro-processing unit (micro controller unit, MCU), a first communication module, a charging module, a pressure sensor module, a sending module (transport, TX) and a receiving module (receive, RX).
  • the electronic device 200 includes: a touch sensor (TP sensor), a touch processing module and a second communication module.
  • TP sensor touch sensor
  • the first communication module and the second communication module can also be wireless local area network modules, WI-FI modules, etc. The embodiment does not limit this.
  • the stylus and the electronic device can establish a wireless path through the first communication module and the second communication module to exchange wireless signals.
  • the touch processing module is connected to the touch sensor and the second communication module respectively.
  • An array of electrodes may be included in the touch sensor.
  • the touch sensor is used to collect touch data, and the touch data may include: data of a stylus touching the touch screen.
  • the touch processing module is used to determine the position of the tip of the stylus and the angle between the stylus and the touch screen (hereinafter referred to as the angle) based on the touch data collected by the touch sensor, referring to the relevant descriptions in FIG. 11A and FIG. 11B .
  • the touch processing module can send an uplink signal to the stylus through the electrode array, and the uplink signal is used to instruct the stylus to feedback the downlink signal. Signal.
  • the touch processing module can determine the position and included angle of the tip of the stylus based on the downlink signal from the stylus.
  • both the uplink signal and the downlink signal may be square wave signals.
  • the touch processing module may be a touch IC chip (integrated circuit chip).
  • the MCU is respectively connected with the first communication module, the charging module, the pressure sensor module, the sending module, and the receiving module.
  • the charging module is used for charging the stylus.
  • the pressure sensor module includes: a pressure sensor and a pressure data processing module.
  • the pressure sensor is connected with the pressure data processing module, and the pressure data processing module is connected with the MCU.
  • the pressure sensor can be arranged at the nib of the stylus, and the pressure sensor is used to collect the pressure of the nib. Exemplarily, when the tip of the stylus touches the touch screen of the electronic device, the pressure sensor can collect the pressure of the tip.
  • the data processing module is used to send the pressure of the pen tip to the MCU.
  • the MCU may send the pressure of the pen tip to the electronic device based on the first communication module.
  • the electronic device can adjust the thickness of the lines written by the stylus on the touch screen based on the pressure received from the tip of the stylus by the second communication module.
  • the sending module may include: a first electrode, a second electrode and a sending driving circuit. Both the first electrode and the second electrode are connected to the sending driving circuit, and the sending driving circuit is connected to the MCU.
  • the MCU is configured to generate a first pulse width modulation (pulse width modulation, PWM) signal and a second PWM signal, and send the first PWM signal and the second PWM signal to the sending drive circuit.
  • the sending drive circuit may drive the first electrode to send the first signal based on the first PWM signal, and drive the second electrode to send the second signal based on the second PWM signal.
  • the first electrode may be called TX1
  • the second electrode may be called TX2.
  • the first signal and the second signal may be called downlink signals or coding signals.
  • the downlink signal may be a 40V square wave signal. It should be understood that the uplink signal and downlink signal in the embodiments of the present application are based on the stylus.
  • the downlink signal sends an uplink signal to the electronic device.
  • the stylus sends a downlink signal and the electronic device sends an uplink signal as an example for illustration.
  • the sending driving circuit may include: a high voltage driving signal module and a switch tube.
  • the MCU is respectively connected with the high-voltage driving signal module and the switching tube.
  • the switch tube is connected to the second electrode, and the high-voltage driving signal module is respectively connected to the first electrode and the second electrode.
  • the high-voltage driving signal module is used to provide a high-voltage driving signal, drive the first electrode to send the first signal based on the first PWM signal from the MCU, and drive the second electrode to send the second signal based on the second PWM signal from the MCU.
  • the MCU is also used to control the switch tube to switch the second electrode between sending signals and receiving signals, that is, switching the second electrode between TX2 and RX.
  • the specific circuit of the switch tube and the control mode of the MCU are not described in detail.
  • the MCU can control the switch tube so that the second electrode can be used as TX2, and the second electrode as TX2 is connected to the sending driving circuit, and then the second electrode can send the second signal under the action of the sending driving circuit.
  • the MCU can also control the switch tube so that the second electrode is used as RX, and the second electrode used as RX is connected to the receiving module, so that the second electrode can receive the uplink signal from the electronic device. That is to say, the second electrode can be switched between TX2 and RX under the control of the MCU.
  • the receiving module includes a decoding circuit.
  • the decoding circuit can be connected with the switch tube, and the decoding circuit is also connected with the MCU.
  • the second electrode is used for receiving the uplink signal from the electronic device and sending the uplink signal to the decoding circuit.
  • the decoding circuit is used to decode the uplink signal and send the decoded uplink signal to the MCU.
  • one transmitting electrode TX and one receiving electrode RX may be set in the stylus, which is not limited in this embodiment of the present application.
  • a wireless path can be established between the stylus and the electronic device, for example, a Bluetooth path can be established between the stylus and the electronic device.
  • the touch sensor in the electronic device includes an electrode array.
  • the touch sensor in the electronic device can establish a circuit connection through a capacitor.
  • the path between the tip of the stylus and the touch sensor in the electronic device is called a circuit path.
  • the touch processing module may control the touch sensor to send an uplink signal through the circuit path. In one embodiment, when the Bluetooth connection between the electronic device and the stylus is successful and the electronic device detects that the stylus is not charged, the touch processing module may control the touch sensor to send an uplink signal through the circuit path. In one embodiment, when the Bluetooth connection between the electronic device and the stylus is successful, and the electronic device detects that the stylus is in a moving state, the touch processing module may control the touch sensor to send an uplink signal through the circuit path. It should be understood that different electronic devices may have different trigger conditions for sending uplink signals. In the following embodiments, "when the electronic device is successfully connected to the stylus via Bluetooth, the touch processing module controls the touch sensor to send uplink signals through the circuit path" as an example Be explained.
  • the second electrode can receive the uplink signal from the electronic device based on the circuit path, and send the uplink signal to the decoding circuit.
  • the decoding circuit can transmit the decoded uplink signal to the MCU.
  • the MCU controls the sending driving circuit to drive the first electrode to send the first signal, and drive the second electrode to send the second signal. That is to say, the stylus can send downlink signals through the circuit path.
  • a touch sensor in an electronic device may receive downlink signals based on a circuit path.
  • the touch processing module can acquire the position and included angle of the tip of the stylus based on the downlink signal collected by the touch sensor.
  • FIG. 11A is a schematic diagram of changes in the capacitance value of the touch screen.
  • the touch sensor receives the first signal from the first electrode of the stylus
  • the capacitance variation at the corresponding position of the touch screen will change.
  • the tip of the stylus is closer to the touch screen
  • the capacitance change at the corresponding position of the touch screen is larger.
  • peaks are used to represent changes in capacitance variation at corresponding positions on the touch screen, and the electronic device can determine the position of the tip of the stylus based on the capacitance variation on the touch screen.
  • the electronic device can obtain the included angle by using the double-tip projection method in the inclination detection algorithm. Referring to FIG.
  • the first electrode and the second electrode in the stylus can be arranged at the tip of the stylus, the first electrode is arranged near the tip of the stylus, and the second electrode is far away from the first electrode.
  • the tip setting for the nib When the touch sensor receives the first signal from the first electrode of the stylus and the second signal from the second electrode, the capacitance variation at two positions (such as position B and position C) on the touch screen will change, and the electronic device The included angle can be obtained based on the distance between the first electrode and the second electrode, and the distance between two positions on the touch screen.
  • black dots represent positions where the stylus touches the touch screen
  • black dots represent positions B and C.
  • FIG. 12 is a schematic diagram of an existing electronic device drawing handwriting of a stylus.
  • a pressure sensor can be installed in the tip of the stylus.
  • the data is sent to the electronic device via bluetooth.
  • the pressure-sensitive data may include a pressure value.
  • the stylus can send a downlink signal to the electronic device, and the electronic device can obtain the position of the stylus on the touch screen through the downlink signal. and the angle between the stylus and the touchscreen.
  • the downlink signal may be referred to as a touch panel (TP) signal, and the TP signal is used as an example for illustration below.
  • TP touch panel
  • the electronic device can display the handwriting of the stylus on the touch screen based on the pressure-sensitive signal of the stylus and the TP signal of the stylus.
  • the TP signal will cause the capacitance change of the TP sensor in the electronic device to change, and the electronic device can obtain the pressure value based on the pressure-sensitive signal, if the electronic device detects that the capacitance change of the TP sensor is greater than or equal to the capacitance change threshold , and the pressure value is greater than or equal to the pressure threshold, the electronic device can display handwriting at a corresponding position on the touch screen based on the position of the stylus on the touch screen.
  • the stylus cannot discharge water, that is, the electronic device is on the touch screen.
  • the handwriting of the stylus does not appear on the screen.
  • electronic devices display the handwriting of the stylus according to the "pressure-sensitive signal” and "TP signal", which has a slow response speed and low control precision.
  • the pressure-sensitive signal is transmitted through Bluetooth, and Bluetooth transmission has a transmission delay of 10-20ms. If the stylus is still sending pressure-sensitive signals to the electronic device due to the transmission delay when the stylus just leaves the touch screen, and the capacitance change of the TP sensor is still greater than the capacitance change threshold, the electronic device will continue to Display the handwriting of the stylus, which will lead to ink leakage and poor user experience. It should be understood that ink leakage refers to: the stylus still leaks water after it leaves the touch screen, that is, the electronic device still displays the handwriting of the stylus.
  • the pressure sensor at the tip of the stylus can be a spring tube pressure sensor, a strain gauge pressure sensor, etc. Because of the inherent defects of the pressure sensor itself, it is impossible to detect a small pressure value, so the pressure threshold is often set to a value greater than 0 , such as 5g. Wherein, g stands for 9.8N/kg. In this way, when the user uses the stylus to write or touch the touch screen lightly, because the pressure value is less than the pressure threshold, the stylus will not emit water, and the electronic device will not display the handwriting of the stylus. In addition, the physical structure of the pressure sensor is easily affected by temperature drift, deformation, etc., resulting in inaccurate pressure measurement.
  • the capacitance change of the TP sensor will change, and the closer the stylus is to the touch screen, the greater the capacitance change of the TP sensor. In this way, the capacitance change of the TP sensor can represent the distance between the stylus and the touch screen. If the capacitance change of the TP sensor is used as the judgment factor for the handwriting of the stylus drawn by the electronic device, on the one hand, the inherent defects of the pressure sensor can be avoided. On the other hand, it can also avoid the problem of slow response caused by Bluetooth transmission of pressure-sensitive signals.
  • Breaking touch can be understood as: if the capacitance change of TP sensor is greater than or equal to the capacitance change threshold, the stylus will emit water, and the electronic device will display the handwriting of the stylus; if the capacitance change of TP sensor is less than the capacitance change threshold, touch The pen does not come out of water, and the electronic device does not display the handwriting of the stylus. In this way, at the capacitance change threshold, the stylus will switch back and forth between water discharge and discharge, and the electronic device will also switch back and forth between displaying handwriting and not displaying handwriting, resulting in a ping-pong effect.
  • the embodiment of the present application provides a handwriting drawing method.
  • the electronic device can set the first time for the electronic device to display the handwriting (that is, the stylus emits water) when the stylus pen is drawn (that is, it is close to the touch screen) based on the capacitance change of the TP sensor.
  • a capacitance change threshold when the stylus is lifted (that is, away from the touch screen), the second capacitance change threshold is set for the electronic device not to display handwriting (that is, the stylus does not emit water), the first capacitance change threshold and the second capacitance
  • the variation thresholds are different.
  • the embodiment of the present application not only improves the response speed and control precision of the handwriting drawn by the electronic device, but also avoids the ping-pong effect of the handwriting displayed by the electronic device and the problem of disconnection when the user uses the stylus.
  • the first threshold is used to represent the first capacitance change threshold
  • the second threshold is used to represent the second capacitance change threshold.
  • Fig. 13 is a schematic flow chart of an embodiment of a handwriting drawing method provided in the embodiment of the present application.
  • the handwriting drawing method provided by the embodiment of the present application may include:
  • the approaching of the stylus to the touch screen of the electronic device can be understood as: the stylus moves towards the direction of approaching the touch screen of the electronic device.
  • the electronic device can detect whether the stylus is close to the touch screen of the electronic device based on the capacitance variation of the TP sensor in the electronic device. Because the closer the stylus is to the touch screen, the greater the capacitance change. Therefore, if the electronic device detects that the capacitance change of the TP sensor gradually increases, it is determined that the stylus is close to the touch screen of the electronic device.
  • the stylus when the user uses the stylus, the stylus sometimes moves toward the direction close to the touch screen of the electronic device, and sometimes moves toward the direction away from the touch screen of the electronic device.
  • the electronic device detects that the capacitance variation of the TP sensor gradually increases within a preset time period, it is determined that the stylus is close to the touch screen of the electronic device. In this way, this embodiment can avoid the problem that the electronic device determines that the stylus is close to the touch screen of the electronic device because the stylus briefly moves toward the touch screen of the electronic device, and then changes the control logic, which can improve the control of the electronic device precision.
  • the touch screen of the electronic device may be provided with a sensor for detecting distance, and the sensor is used for acquiring distance data between the stylus and the touch screen. Accordingly, the electronic device can determine the distance between the stylus and the touch screen based on the distance data collected by the sensor, and then detect whether the stylus is close to the touch screen based on the distance between the stylus and the touch screen. Wherein, if the distance between the stylus and the touch screen gradually decreases, the electronic device determines that the stylus is close to the touch screen of the electronic device.
  • the sensors may include, but are not limited to: infrared distance sensors, ultrasonic distance sensors, depth sensors, and the like.
  • the distance data collected by the infrared sensor may include: the time when the infrared ray is received after being reflected by the stylus, and then the electronic device may be based on the time when the infrared ray is emitted and the time when the infrared ray is received after being reflected by the stylus. time, calculate the distance between the stylus and the touch screen.
  • the distance sensor of the ultrasonic pen and the principle of distance detection by the depth sensor reference may be made to related descriptions in the prior art.
  • the first threshold is stored in the electronic device, and the first threshold can be understood as: the threshold of water discharge when the stylus is down, or the threshold that triggers the electronic device to draw the handwriting of the stylus when the stylus is down. If the electronic device detects that the stylus is close to the touch screen of the electronic device, and the capacitance variation of the TP sensor in the electronic device is greater than or equal to the first threshold, the operation of drawing handwriting is performed.
  • the operation of drawing handwriting by the electronic device can be understood as: the electronic device displays the handwriting at the position based on the position of the stylus on the touch screen. Drawing handwriting may include but not limited to: drawing text, drawing, etc.
  • the first threshold may be an empirical value or a predefined value.
  • the staff in the development stage of electronic devices, can extract multiple electronic devices, hold the stylus gradually close to the touch screen of each electronic device, and then test to obtain the TP sensor of any distance between the stylus and each touch screen change in capacitance. Based on the user's drawing habit of holding the stylus, the staff can set the first threshold suitable for the user's drawing habit in combination with the capacitance change of the TP sensor obtained during the development stage.
  • the capacitance change of the TP sensor is 4500 (touch_sig), and when the distance between the stylus and the touch screen is 0.2 mm, the capacitance change of the TP sensor is 3700 (0.2 mm_sig), when the distance between the stylus and the touch screen is 0.5mm, the capacitance change of the TP sensor is 3200 (0.5mm_sig).
  • the first threshold may be 3700.
  • the electronic device detects that the stylus is close to the touch screen of the electronic device, and the capacitance change of the TP sensor in the electronic device is greater than or equal to 3700, and the operation of drawing handwriting can be performed.
  • the above S1301 may be replaced with: in response to detecting that the capacitance variation of the TP sensor in the electronic device is greater than or equal to the first threshold, perform the operation of drawing handwriting.
  • the electronic device does not need to judge the movement direction of the stylus relative to the touch screen (such as approaching the touch screen), but the electronic device can execute The operation of drawing strokes.
  • the electronic device can detect whether the stylus is far away from the touch screen of the electronic device based on the capacitance change of the TP sensor. Exemplarily, in one embodiment, if the electronic device detects that the capacitance variation of the TP sensor gradually decreases, it determines that the stylus is far away from the touch screen of the electronic device. Or, in one embodiment, if the electronic device detects that the capacitance variation of the TP sensor gradually decreases within a preset time period, it is determined that the stylus is far away from the touch screen of the electronic device.
  • the second threshold can be understood as: the threshold of no water when the stylus is lifted, or the threshold that triggers the electronic device to stop drawing handwriting when the stylus is lifted. If the electronic device detects that the stylus is away from the touch screen of the electronic device, and the capacitance variation of the TP sensor in the electronic device is less than the second threshold, the operation of drawing handwriting is stopped.
  • the second threshold is different from the first threshold.
  • the second threshold may be 3200.
  • the electronic device detects that the stylus is far away from the touch screen of the electronic device, and the capacitance change of the TP sensor in the electronic device is less than 3200, and the operation of drawing handwriting can be stopped.
  • the first threshold may be greater than the second threshold, for example, the first threshold 3700 is greater than the second threshold 3200 .
  • This setting can be adapted to the user's drawing habits. The specific reasons are as follows:
  • the electronic device when the stylus is close to the touch screen, when the stylus is 0.2 mm away from the touch screen, the electronic device performs the operation of drawing handwriting, which can avoid ink leakage from the stylus.
  • the user operates the stylus to draw, for example, it is inevitable to lift the pen when writing strokes, but the user still needs to continue writing. If the second threshold is set too large, the electronic device will stop drawing handwriting when the user lifts the pen. .
  • the second threshold 3200 is set to be smaller than the first threshold 3700, that is, when the user lifts the pen at a certain distance from the touch screen, the electronic device will stop drawing handwriting, so that it can be adapted to the real needs of the user when the electronic device stops writing.
  • the device stops performing handwriting drawing operations, which can adapt to the user's drawing habits and improve user experience.
  • the second threshold is not set too small to avoid ink leakage from the stylus.
  • the above S1302 may be replaced by: in response to detecting that the capacitance variation of the TP sensor of the electronic device is less than the first threshold, stop performing the operation of drawing handwriting.
  • the electronic device does not need to judge the movement direction of the stylus relative to the touch screen (such as away from the touch screen), and the electronic device can stop drawing in response to detecting that the capacitance change of the TP sensor is less than the second threshold. Handwriting operations.
  • the electronic device performs the operation of drawing handwriting in response to detecting that the stylus is close to the touch screen of the electronic device, and the capacitance change of the TP sensor in the electronic device is greater than or equal to the first threshold, and in response to detecting that the touch The pen is far away from the touch screen of the electronic device, and the capacitance change of the TP sensor of the electronic device is less than the second threshold, and the operation of drawing handwriting is stopped, and the first threshold and the second threshold are different.
  • the electronic device because the electronic device is not based on the pressure-sensitive signal of the tip of the stylus, but judges whether to execute the operation of drawing handwriting based on the capacitance change of the TP sensor, it can avoid the time delay of Bluetooth transmission and improve the drawing speed of the electronic device.
  • the response speed of handwriting can also avoid the problem of low control precision of electronic equipment due to the inherent defect of the pressure sensor at the tip of the stylus.
  • the electronic device because the electronic device judges whether to execute the operation of drawing handwriting based on the capacitance change of the TP sensor, it can also truly realize the zero pressure of the stylus, that is, when the user holds the stylus and touches the touch screen lightly or tilts to write , to achieve the purpose of electronic equipment drawing handwriting.
  • the embodiment of the present application sets the first threshold for the electronic device to draw handwriting when the stylus is close to the touch screen, and sets the second threshold for the electronic device to stop drawing handwriting when the stylus is away from the touch screen, which can avoid the ping-pong effect of the electronic device when drawing handwriting .
  • the TP sensor of an electronic device can be regarded as an electrode array.
  • the electrode array includes: 32 (TX) ⁇ 48 (RX) electrodes as an example.
  • 32(TX) ⁇ 48(RX) can be regarded as the number of channels of the TP sensor. Due to electrode manufacturing reasons, the impedance at each position of the TP sensor is inconsistent, which in turn causes the TP signal of the TP sensor to be inconsistent.
  • the inconsistency of TP signals can be understood as: when the stylus touches different positions of the touch screen, the capacitance of the TP sensor changes differently.
  • the electronic device judges whether to perform handwriting drawing operation based on the capacitance change of the TP sensor, which depends on the consistency of the TP signal of the TP sensor.
  • the distance between the stylus and the touch screen is different, causing the stylus to pen down at different positions of the touch screen
  • the height of the water outlet and the pen out of the water There is a big difference between the height of the water outlet and the pen out of the water, and the user experience is poor.
  • the water discharge height of the stylus pen and the height of the pen discharge are 0 mm and 0.03 mm, respectively.
  • the water-out heights are 0.11mm and 0.33mm respectively.
  • the capacitance change of the TP sensor is 4500 (touch_sig), and when the distance between the stylus and the touch screen is 0.2mm, the capacitance change of the TP sensor is 3700 (0.2mm_sig). When the distance between the stylus and the touch screen is 0.5mm, the capacitance change of the TP sensor is 3200 (0.5mm_sig).
  • the capacitance variation of the TP sensor is a real measurement value at a certain position in the TP sensor, and accordingly, the electronic device can obtain the first ratio and the second ratio.
  • the first ratio is: the ratio of the first threshold to the "capacitance change of the TP sensor when the stylus touches the touch screen”
  • the second ratio is: the second threshold and the “capacitance change of the TP sensor when the stylus touches the touch screen” " ratio.
  • the first ratio is used to characterize: the ratio of the capacitance change of the TP sensor when the stylus pen comes out of the water and the "capacitance change of the TP sensor when the stylus touches the touch screen", or the capacitance of the TP sensor when the electronic device starts to perform handwriting operations
  • the ratio of the variation to the "capacitance variation of the TP sensor when the stylus touches the touch screen is: the ratio of the first threshold to the "capacitance change of the TP sensor when the stylus touches the touch screen"
  • the second ratio is used to characterize: the ratio of the capacitance change of the TP sensor when the stylus is lifted out of the water and the "capacitance change of the TP sensor when the stylus touches the touch screen", or the TP sensor when the electronic device stops performing the handwriting operation.
  • the first ratio ENTER_NOPRESS_RATIO can be obtained based on the following formula 1
  • the second ratio EXIT_NOPRESS_RATIO can be obtained based on the following formula 2:
  • the electronic device can self-learn the TP based on the user's historical data.
  • the first threshold and the second threshold of each position in the sensor and then adapt to the user's drawing habits to improve user experience.
  • the historical data can be understood as: when the user history is drawn with a stylus, the capacitance change of the TP sensor when the stylus touches each position of the touch screen.
  • the capacitance change of the TP sensor when the stylus touches each position of the touch screen, and the first ratio and the second ratio self-learning the capacitance of each position in the TP sensor first threshold and second threshold.
  • the touch screen may include a first position and a second position, so in this embodiment of the present application, "the first threshold and the second threshold of the first position, and the first threshold of the second position and second threshold" characterizes "the first threshold and the second threshold for each position".
  • each position on the TP sensor can be understood as each position on the touch screen
  • each area in the TP sensor can be understood as each area on the touch screen:
  • the electronic device can divide the TP sensor into N regions according to the number of channels of the TP sensor, and self-learn the first threshold and the second threshold of each region in the N regions, and then the electronic device can be based on the stylus.
  • the position on the touch screen, and the first threshold and the second threshold of the area that the position falls into are used to determine whether to execute the handwriting drawing operation.
  • N is an integer greater than or equal to 2
  • the area of each of the N regions may be the same or different.
  • N is equal to the number of electrodes in the TP sensor, for example, N is 32 ⁇ 48.
  • the user historically operates the stylus to draw a line from position A to position B on the touch screen, position A falls within the range of electrode a in the TP sensor, and position B falls within the electrode of the TP sensor
  • the range of b is described below by taking the electronic device's self-learning of the first threshold and the second threshold at position A and position B as an example.
  • the stylus When the stylus touches the position A on the touch screen, the stylus can send a pressure-sensitive signal to the electronic device through Bluetooth. In this way, when the electronic device receives the pressure-sensitive signal, it can determine that the stylus touches the touch screen, and then can send the received pressure signal to the electronic device.
  • the capacitance change of the TP sensor when it comes from the pressure-sensitive signal is used as the capacitance change of the TP sensor at position A.
  • the electronic device may acquire the first threshold and the second threshold at position A based on the capacitance change of the TP sensor when the stylus touches position A on the touch screen, and the first ratio and the second ratio. Exemplarily, when the stylus touches the position A on the touch screen, the capacitance change of the TP sensor is X, then the first threshold may be 0.822X, and the second threshold may be 0.711X.
  • the stylus can always send a pressure-sensitive signal to the electronic device based on the pressure value collected by the pressure sensor.
  • the electronic device receives the pressure-sensitive signal, and based on the TP signal from the stylus, it detects that the stylus is located at position B on the touch screen, and then the electronic device can change the capacitance of the TP sensor when receiving the pressure-sensitive signal, As the capacitance change of the TP sensor at position B.
  • the electronic device can obtain the first threshold and the second threshold at the position B based on the capacitance change of the TP sensor when the stylus touches the position B on the touch screen, as well as the first ratio and the second ratio, and can refer to the correlation of the above position A illustrate.
  • the electronic device can acquire the first threshold and the second threshold of each position on a line from position A to position B.
  • the electronic device may store the first threshold and the second threshold of each position on a line from position A to position B.
  • the electronic device may store a first mapping relationship, and the first mapping relationship is used to characterize the first threshold and the second threshold at each position of the touch screen.
  • the electronic device can continuously The capacitance change of the TP sensor is used to learn and update the first threshold and the second threshold at the position A.
  • the electronic device can continuously self-learn and update the first threshold and the second threshold at position A based on the capacitance variation of the TP sensor at position A in multiple historical data, so as to improve the first threshold and the second threshold at position A. Threshold Accuracy.
  • the electronic device can continue to operate the stylus based on the user history and touch the touch screen, each position is TP
  • the capacitance variation of the sensor is used to update the first mapping relationship stored in the electronic device.
  • the electronic device can obtain the capacitance change of the new TP sensor when the stylus touches position A on the touch screen during the process of drawing a line from position A to position C with the stylus, and based on this
  • the capacitance change of the new TP sensor as well as the first ratio and the second ratio, to obtain the new first threshold and the new second threshold at position A
  • the electronic device may update the first threshold and the second threshold at the position A based on the first threshold and the second threshold at the position A stored in the electronic device, and the new first threshold and the new second threshold at the position A .
  • the electronic device may use the average value of the stored first threshold at position A and the new first threshold as the updated first threshold at position A, and use the stored second threshold at position A The average value of the threshold and the new second threshold is used as the updated second threshold of position A.
  • the electronic device may adopt a weighted average method, based on the first threshold and the second threshold at the position A stored in the electronic device, and the new first threshold and the new second threshold at the position A, The first and second thresholds at position A are updated.
  • the electronic device updates the first threshold and the second threshold at position A.
  • the electronic device may replace the first threshold and the second threshold at the position A stored in the electronic device with the new first threshold and the new second threshold of the position A.
  • N is less than (32 ⁇ 48), taking N as (32 ⁇ 48)/M as an example, M is an integer smaller than N, and (32 ⁇ 48)/M is an integer greater than 1, M Can be customized.
  • the electronic device may divide the TP sensor into four equal-area areas: upper left, upper right, lower left, and lower right.
  • the electronic device can use the mean value method or weighted average method to obtain the upper left area first threshold and second threshold. For example, taking the average value method as an example, the electronic device can use the average value of the first threshold values of each position on a line from position A to position B as the first threshold value in the upper left area, and use the line from position A to position B as The average value of the second threshold of each position is used as the second threshold of the upper left area.
  • the electronic device can detect that the position of the stylus falls into the target area (such as the upper left area) when the user actually uses the stylus to draw handwriting.
  • the electronic device can The threshold and the second threshold are used to determine whether to execute the handwriting drawing operation.
  • the electronic device can update the first threshold and second threshold of the upper left area based on position A to position D, and update the first threshold and second threshold of the lower right area based on position D to position C.
  • the specific update method Reference may be made to the relevant description in FIG. 16A above.
  • the electronic device can acquire the first threshold and the second threshold of each area of the touch screen.
  • the electronic device may store a second mapping relationship, and the second mapping relationship is used to characterize the first threshold and the second threshold of each area of the touch screen.
  • the touch screen includes a first area and a second area, then in this embodiment of the present application, "the first threshold and the second threshold of the first area, and the first threshold and the second threshold of the second area The second threshold" characterizes "the first threshold and the second threshold of each area".
  • the region where each electrode is located is regarded as a region, and the first mapping relationship may also represent the first threshold and the second threshold of each region.
  • the electronic device when the electronic device obtains the capacitance change of the TP sensor when the user historically operates the stylus and the stylus touches the position on the touch screen, it may preprocess the obtained capacitance change of the TP sensor to Improve the accuracy of the capacitance change of the TP sensor, thereby improving the accuracy of the first threshold and the second threshold. It should be understood that if the stylus stays at a certain position on the touch screen for a long enough time, the electronic device can accurately obtain the capacitance change of the TP sensor when the stylus touches the position, and if the stylus quickly scans If the electronic device passes a certain position on the touch screen, the accuracy of the capacitance change of the TP sensor at the position acquired by the electronic device is low. Accordingly, referring to FIG. 18, in the embodiment of the present application, the electronic device can obtain the first threshold and the second threshold of each position on the TP sensor in the following manner:
  • the first position is used to represent any position on the touch screen.
  • the electronic device detecting the first position where the stylus touches the touch screen and obtaining the capacitance variation of the TP sensor reference may be made to the relevant descriptions in the foregoing embodiments.
  • S1801 is different from the above-mentioned acquisition of the capacitance change of the TP sensor at a certain position on the touch screen: in the above-mentioned embodiment, as long as the electronic device detects that the stylus touches the first position based on the TP signal, it obtains the TP sensor at the first position The amount of capacitance change, the accuracy is low. In S1801, the electronic device can detect that the stylus stays at the first position for a period of time, and then obtain the capacitance change of the TP sensor at the first position, with high accuracy.
  • the way for the electronic device to measure that the stylus stays at the first position for a period of time is: the number of times of the pressure-sensitive signal is greater than the preset number, and the number of reported points of the TP signal is greater than the preset number.
  • the stylus when the stylus touches the touch screen, the stylus will always send pressure-sensitive signals to the electronic device, and the number of times of the pressure-sensitive signals is greater than the preset number, which can indicate that the stylus stays at the first position for "two pressure-sensitive signals" time.
  • the number of reporting points of the TP signal is related to the signal transmission frequency supported by the stylus.
  • the stylus supports a signal transmission frequency of 240Hz or 360Hz. Taking 240Hz as an example, the stylus can send signals to The electronic device sends a reporting point (or can be understood as reporting a point to the electronic device).
  • the fact that the number of reporting points of the TP signal is greater than the preset number may indicate that the stylus stays at the first position for a time of "a preset number of reporting points".
  • the electronic device may also preprocess the acquired capacitance variation of the TP sensor based on the angle between the stylus and the touch screen, so as to further increase the first threshold and The accuracy of the second threshold.
  • the above S1801 can be replaced with S1801A: during the history of the user operating the stylus, in response to detecting that the stylus touches the first position on the touch screen, and the number of times of the pressure-sensitive signal from the stylus More than the preset number of times, the number of reporting points of the TP signal is greater than the preset number, and the angle between the stylus and the touch screen is within the preset angle range, then the capacitance change of the TP sensor at the first position is obtained.
  • the preset included angle range is an included angle range adapted to the user's drawing habits.
  • the difference between S1801A and the above S1801 is that when the electronic device obtains the capacitance change of the TP sensor at the first position, it also adds the condition that "the angle between the stylus and the touch screen is within the preset angle range".
  • the capacitance variation of the TP sensor under the extreme included angle can be deleted, so that the accuracy of the first threshold and the second threshold obtained by the electronic device self-learning is higher , and more suitable for the user's drawing habits.
  • FIG. 19 is a schematic flowchart of another embodiment of the handwriting drawing method provided by the embodiment of the present application.
  • the handwriting drawing method provided by the embodiment of the present application may include:
  • the electronic device detects that the stylus is close to the touch screen of the electronic device in S1901
  • the position of the stylus on the touch screen may be understood as: the position of the stylus on the touch screen when the stylus is not in contact with the touch screen.
  • the electronic device can store the first threshold and the second threshold at each position (or each area) , the query obtains the first threshold of the first position.
  • the electronic device may query the first threshold of the first location in the first mapping relationship.
  • the electronic device may obtain the target area (first area) to which the first location belongs, and then use the first threshold and the second threshold of the target area as the first threshold in the second mapping relationship, respectively. The first threshold and the second threshold of the position.
  • the electronic device may preset the first threshold, the preset Two thresholds are respectively used as the first threshold and the second threshold of the first position.
  • the preset first threshold and the preset second threshold may be empirical values in the embodiment shown in FIG. 13 , for example, the preset first threshold may be 3700, and the preset second threshold may be 3200.
  • the electronic device may set the "already The first threshold of the stored location" is used as the first threshold of the first location.
  • the electronic device may obtain a first distance between location X and location Y, and a second distance between location X and location Z. If the first distance is smaller than the second distance, the electronic device may use the first threshold of position Y as the first threshold of position X.
  • the electronic device executes the operation of drawing handwriting, which can be referred to Relevant descriptions of the above-mentioned embodiments.
  • the electronic device can store the second threshold at each position (or each area) on the touch screen, the electronic device can query the second threshold at the second position among the stored second thresholds at each position (or each area).
  • the query method of the threshold refer to the related description of querying the first threshold of the first location.
  • the second position of the stylus on the touch screen may be the same as or different from the first position of the stylus on the touch screen when the stylus is close to the touch screen.
  • the electronic device can stop performing the operation of drawing handwriting after detecting that the capacitance change of the TP sensor at the second position is less than the second threshold value of the second position.
  • the electronic device can self-learn the first threshold and the second threshold of each position of the touch screen based on the capacitance change of the TP sensor when the user historically operates the stylus, and the first ratio and the second ratio.
  • the electronic device can judge whether to perform the operation of drawing handwriting based on the first threshold and the second threshold of each position of the touch screen, so that the height of the stylus pen coming out of the water and the pen coming out of the pen are consistent, and the accuracy is high.
  • the electronic device can learn the first threshold and the second threshold at different angles at the first position, and then when the user actually operates the stylus, the electronic device can The included angle between them is checked for the first threshold and the second threshold under the included angle at the first position to determine whether the electronic device executes the drawing operation, which can improve the control accuracy of the electronic device.
  • the electronic device when the electronic device obtains the capacitance variation of the TP sensor where the stylus touches the touch screen, it can also obtain the angle between the stylus and the touch screen, and then The included angle, the first threshold value of the first position (or the first area) and the second threshold value are correspondingly stored. In this way, through continuous self-learning, the electronic device can acquire the included angle of each position (or each area) of the touch screen and the third mapping relationship between the first threshold and the second threshold.
  • the electronic device may obtain the first threshold and the second threshold at the first position based on the capacitance variation of the TP sensor at the first position, and the first ratio and the second ratio, and reference may be made to relevant descriptions in the foregoing embodiments.
  • the first included angle and the first threshold and the second threshold at the first position are stored correspondingly, so that the first threshold and the second threshold at the first included angle at the first position can be obtained.
  • the electronic device may use the method in S1801B-S1802B to obtain the second clip at the first position.
  • the first threshold and the second threshold under the angle, and the first threshold and the second threshold under the second angle at the first position are stored.
  • the electronic device may update the first threshold and the second threshold at the first angle at the first position by: if the first angle is different from the second angle, the electronic device stores the first position The first threshold and the second threshold at the second included angle. Alternatively, if the first included angle and the second included angle are the same, the electronic device may replace the stored first threshold value and the second threshold value under the first included angle at the first position with "the second included angle at the first position The first threshold and the second threshold under the ", or, the electronic device can adopt the average method or the weighted average method, based on the first threshold and the second threshold under the first angle at the first position, and the second threshold at the first position For the first threshold value and the second threshold value under the included angle, and to update the first threshold value and the second threshold value under the first included angle at the first position, reference may be made to the related descriptions in the foregoing embodiments.
  • S1901A In response to detecting that the stylus is close to the touch screen of the electronic device, detect the position of the stylus on the touch screen and the angle between the stylus and the touch screen.
  • S1902A Based on the first position of the stylus on the touch screen and the first angle between the stylus and the touch screen, query a first threshold at the first angle at the first position.
  • the electronic device may query the first threshold at the first angle at the first position in the third mapping relationship.
  • the electronic device may first obtain the first area to which the first position belongs, and then query the first threshold value under the first included angle in the first area. Wherein, if the first threshold value under the first included angle is stored in the first area, the electronic device may use the first threshold value under the first included angle in the first area as the first threshold value under the first included angle at the first position. first threshold.
  • the electronic device may use the first threshold The first threshold value and the second threshold value corresponding to the angle with the smallest difference between the first angle at a position and the first angle are used as the first threshold at the first angle at the first position.
  • the first threshold value under the first included angle is not stored in the first area, the first threshold value under the included angle closest to the first included angle stored in the first area may be used as the first threshold value.
  • the first threshold at the first included angle at the position if the electronic device is in the process of self-learning, if the first threshold and the second threshold under the first angle at the first position are not stored (or not self-learned), the electronic device may use the first threshold The first threshold value and the second threshold value corresponding to the angle with the smallest difference between the first angle at a position and the first angle are used as the first threshold at the first angle at the first position.
  • the first threshold value under the first included angle is not stored in the first area, the first threshold value under the included angle closest to the first included angle stored in the first area may be used as the first
  • the angle between the stylus and the touch screen is 50 degrees
  • the third mapping relationship does not store the first threshold and the second threshold under 50 degrees at the first position, but stores the The first threshold and the second threshold at 70 degrees, and the first threshold and the second threshold at 40 degrees at the first position
  • the electronic device can set the first threshold and the second threshold at 40 degrees at the first position, as the first threshold and the second threshold at 50 degrees at the first position, respectively.
  • the electronic device may use the preset first threshold as the first threshold at the first included angle at the first position .
  • the electronic device may use the first threshold at the first angle at the second position closest to the first position as the first threshold at the first angle at the first position.
  • the electronic device may place the second position closest to the first position and the first threshold The first threshold at the included angle with the smallest included angle difference is used as the first threshold at the first included angle at the first position.
  • the electronic device Because the first thresholds at different angles at the first position of the electronic device are different, the electronic device detects that the capacitance change of the TP sensor at the first angle at the first position is greater than or equal to that at the first position at the first angle For the first threshold value, the electronic device executes the operation of drawing handwriting, and reference may be made to the relevant description of the foregoing embodiments.
  • the second angle between the stylus and the touch screen can be the same as the second angle between the stylus and the touch screen when the stylus is close to the touch screen or different.
  • the electronic device can learn the first threshold and the second threshold at different angles at each position, and then when the user actually operates the stylus, the electronic device can The included angle between the electronic device and the touch screen, and the first threshold value and the second threshold value under the included angle at each position are used to determine whether the electronic device performs a drawing operation, which can improve the control accuracy of the electronic device.
  • the handwriting drawing device may be the electronic device in the above embodiment.
  • the handwriting drawing device 2000 may include: a processing module 2001 , a storage module 2002 , and a transceiver module 2003 .
  • the electronic device includes a touch screen, and the touch screen includes a touch sensor TP sensor.
  • the processing module 2001 is configured to perform an operation of drawing handwriting in response to detecting that the stylus is close to the touch screen, and the capacitance variation of the TP sensor is greater than or equal to a first threshold, and, in response to detecting the touch The pen is far away from the touch screen, and the capacitance change of the TP sensor is less than a second threshold, and the operation of drawing handwriting is stopped, and the first threshold is different from the second threshold.
  • the first threshold is greater than the second threshold.
  • the first threshold of the stylus at the first position of the touch screen is different from the first threshold of the stylus at the second position of the touch screen.
  • the processing module 2001 is specifically configured to, in response to detecting that the stylus is close to the touch screen, detect the position of the stylus on the touch screen; In the first position of the touch screen, query the first threshold of the first position; in response to the capacitance variation of the TP sensor at the first position being greater than or equal to the first threshold of the first position, perform drawing Handwriting operations.
  • the processing module 2001 is specifically configured to, in response to detecting that the stylus is far away from the touch screen, detect the position of the stylus on the touch screen; In the first position of the touch screen, query the second threshold of the first position; in response to the capacitance variation of the TP sensor at the first position being less than the second threshold of the first position, stop drawing handwriting operation.
  • the touch screen includes a first area and a second area, the first area includes at least one first location, and the second area includes at least one second location.
  • the storage module 2002 is configured to, in response to detecting that the stylus touches the first position, record the first threshold of the first area, and in response to detecting that the stylus touches The pen touches the second position, and records the first threshold of the second area.
  • the processing module 2001 is specifically configured to use the first threshold of the first region as the first threshold of the first position.
  • the storage module 2002 is further configured to, in response to detecting that the stylus touches the third position, record the first threshold value of the area to which the third position belongs, and the third position is located in the outside the first area and the second area.
  • the processing module 2001 is specifically configured to use a preset first threshold as the first threshold of the first position.
  • the processing module 2001 is specifically configured to, in response to detecting that the stylus touches the first position, acquire the capacitance variation of the TP sensor at the first position; based on the first position The capacitance change amount and the first ratio of the TP sensor at a position are used to obtain the first threshold value of the first region.
  • the processing module 2001 is specifically configured to obtain the first value of the first region corresponding to each first position based on the capacitance variation of the TP sensor at each first position and the first ratio. Threshold: based on the first threshold of the first area corresponding to each first position, the first threshold of the first area is acquired.
  • the transceiver module 2003 is configured to receive a pressure-sensitive signal and a touch TP signal from the stylus.
  • the processing module 2001 is specifically configured to respond to detecting that the stylus touches the first position, and the number of times of the pressure-sensitive signal is greater than a preset number, the number of reported points of the TP signal is greater than a preset number, and the The angle between the stylus and the touch screen is within a preset angle range, and the capacitance variation of the TP sensor at the first position is obtained.
  • the storage module 2002 is further configured to replace or update the first threshold of the first area.
  • the processing module 2001 is configured to, in response to detecting that the stylus touches the first position, detect an included angle between the stylus and the touch screen.
  • the storage module 2002 is configured to record a first threshold at the first angle in the first area based on the angle between the stylus and the touch screen being a first angle.
  • the processing module 2001 is further configured to detect the angle between the stylus and the touch screen in response to detecting that the stylus touches the second position; the storage module 2002 is further configured to The included angle between the control pen and the touch screen is a second included angle, and the first threshold value under the second included angle in the first area is recorded.
  • the processing module 2001 is further configured to, in response to the first position of the stylus on the touch screen, detect the angle between the stylus and the touch screen;
  • the included angle between the stylus and the touch screen is the first included angle, and the first threshold under the first included angle in the first area is used as the first threshold of the first position.
  • the transceiver module 2003 used to receive the pressure-sensitive signal from the stylus may be a communication module in an electronic device, such as Bluetooth or WI-FI.
  • the transceiver module 2003 used to receive the touch TP signal from the stylus can be a TP sensor in the electronic device.
  • the processor 210 in FIG. 7 can be used to execute the actions performed by the processing module 2001 above, and the wireless interface 260 is used to execute the actions performed by the transceiver module 2003. action.
  • the electronics may include a memory (not shown in FIG. 7 ), and the memory is used to perform the actions performed by the above-mentioned storage module 2002 . In this way, the electronic device can execute the handwriting drawing method provided in the above embodiments.
  • the embodiment of the present application also provides a handwriting drawing system, which includes an electronic device and a stylus.
  • the electronic device can execute the steps shown in the above-mentioned Fig. 13 , Fig. 18 and Fig. 19 to realize the handwriting drawing method provided in the above embodiment.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASIC), or one or more microprocessors device (digital signal processor, DSP), or, one or more field programmable gate arrays (field programmable gate array, FPGA), etc.
  • ASIC application specific integrated circuits
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the processing element may be a general-purpose processor, such as a central processing unit (central processing unit, CPU) or other processors that can call program codes.
  • these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • a computer program product includes one or more computer instructions.
  • Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) to another website site, computer, server or data center.
  • DSL digital subscriber line
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, etc. integrated with one or more available media.
  • Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)).
  • plural herein means two or more.
  • the term “and/or” in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist simultaneously, and there exists alone B these three situations.
  • the character "/" in this paper generally indicates that the contextual objects are an “or” relationship; in the formula, the character "/" indicates that the contextual objects are a "division" relationship.

Abstract

本申请提供一种笔迹绘制方法、装置、电子设备和可读存储介质,方法应用于电子设备,电子设备包括触摸屏,触摸屏包括触摸传感器TP sensor,该方法包括:响应于检测到触控笔靠近触摸屏,且TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作;响应于检测到触控笔远离触摸屏,且TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,第一阈值和第二阈值不同。本申请,电子设备并未基于触控笔笔尖的压感信号,而是基于TP sensor的电容变化量判断是否执行绘制笔迹的操作,因此可以避免蓝牙传输的时延和触控笔笔尖的压力传感器固有的缺陷,提高电子设备绘制笔迹的响应速度和控制精度。

Description

笔迹绘制方法、装置、电子设备和可读存储介质
本申请要求于2021年07月02日提交中国专利局、申请号为202110753694.6、申请名称为“笔迹绘制方法、装置、电子设备和可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及终端技术,尤其涉及一种笔迹绘制方法、装置、电子设备和可读存储介质。
背景技术
随着触控技术的发展,越来越多的电子设备采用触控方式进行人机交互。用户可以通过触控笔操作电子设备的触摸屏,以向电子设备提供输入,电子设备基于触控笔的输入执行相应的操作。
目前,电子设备可以基于触控笔笔尖的压感信号,以及来自触控笔的触摸(touch panel,TP)信号,在触摸屏上显示触控笔的笔迹,以实现触控笔在触摸屏上书写、绘画等。目前电子设备绘制笔迹的响应速度慢,控制精度低,容易出现书写不畅、漏墨等现象。
发明内容
本申请实施例提供一种笔迹绘制方法、装置、电子设备和可读存储介质,可以提高电子设备绘制笔迹的响应速度和控制精度。
第一方面,本申请实施例提供一种笔迹绘制方法,该方法的执行主体可以为电子设备,或者电子设备中的芯片,下述以执行主体为电子设备为例进行说明。电子设备包括触摸屏,所述触摸屏中包括触摸传感器TP sensor,在用户操作触控笔在触摸屏上绘制笔迹时,触控笔与触摸屏之间的距离不同,可以引起TP sensor的电容变化量的变化,因此本申请实施例中,可以预先设置TP sensor的电容变化量的第一阈值和第二阈值,第一阈值和第二阈值不同。
其中,电子设备可以检测TP sensor的电容变化量,判断是否执行绘制笔迹的操作。其中,电子设备响应于检测到TP sensor的电容变化量大于或者第一阈值,执行绘制笔迹的操作,响应于检测到TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作。
本申请实施例中,因为电子设备并未基于触控笔笔尖的压感信号,而是基于TP sensor的电容变化量判断是否执行绘制笔迹的操作,因此可以避免蓝牙传输的时延,提高电子设备绘制笔迹的响应速度,另外还可以避免因为触控笔笔尖的压力传感器固有的缺陷,造成电子设备控制精度低的问题。
本申请实施例中,因为电子设备基于TP sensor的电容变化量判断是否执行绘制笔迹的操作,还可以真正实现触控笔0压力出水,即在用户握持触控笔轻触触摸屏或倾斜书写时, 达到电子设备绘制笔迹的目的。
另外,本申请实施例在触控笔靠近触摸屏时设置电子设备绘制笔迹的第一阈值,在触控笔远离触摸屏时设置电子设备停止绘制笔迹的第二阈值,可以避免电子设备绘制笔迹的乒乓效应。
在一种可能的实现方式中,本申请实施例中预先设置的第一阈值为用户下笔(即触控笔靠近触摸屏)时的电容变化量的阈值,第二阈值为用户提笔(即触控笔远离触摸屏)时的电容变化量的阈值。如此设置,电子设备可以更为准确的判断在用户下笔和提笔时,执行绘制笔迹的操作以及停止执行绘制笔迹的操作的时机,可以提高电子设备的控制准确性。应理解,如此设置,同样也具有如上实施例中的技术效果。
在该实现方式中,电子设备可以响应于检测到触控笔靠近所述触摸屏,且所述TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作;电子设备响应于检测到所述触控笔远离所述触摸屏,且所述TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,所述第一阈值和所述第二阈值不同。应理解,电子设备执行绘制笔迹的操作可以理解为触控笔出水,电子设备停止执行绘制笔迹的操作可以理解为触控笔不出水。
应理解,第一阈值和第二阈值基于“触控笔接触触摸屏时的TP sensor的电容变化量”得到的,第一阈值为触控笔距离触触摸屏的距离为第一距离时的TP sensor的电容变化量,第二阈值为触控笔距离触触摸屏的距离为第二距离时的TP sensor的电容变化量。示例性的,第一距离为0.2mm,第二距离为0.5mm。应注意,第一阈值与“触控笔接触触摸屏时的TP sensor的电容变化量”的比值为第一比例,第二阈值与“触控笔接触触摸屏时的TP sensor的电容变化量”的比值为第二比例。
本申请实施例中,将第一阈值和第二阈值设置不同的目的是为了避免电子设备执行绘制笔迹的操作的乒乓效应,同样可以理解为,可以避免触控笔在出水和不出水之间来回切换,避免触控笔的乒乓效应。
在一种实施例中,用户操作触控笔绘制笔迹时,如书写文字的笔画时避免不了提笔,但用户还是需求继续书写的,若第二阈值设置的过大,会导致用户一提笔,电子设备就停止绘制笔迹,导致用户体验差。因此,本申请实施例中,设置第一阈值大于第二阈值,用户提笔距离触摸屏一定距离时,电子设备会停止绘制笔迹,如此可以适配用户真正需求停止书写时,电子设备停止执行绘制笔迹的操作,可以适配于用户的绘制习惯,提高用户体验。
TP sensor是由多个电极组成的,因为电极制造工艺的影响,导致触控笔接触电子设备的触摸屏的不同位置时,TP sensor的电容变化量不同。这样会导致触摸屏的不同位置处触控笔下笔出水和提笔不出水的高度差异很大,用户体验差。
其一,本申请实施例可以在电子设备的生产制造阶段,可以预先测试获取触摸屏的每个位置的第一阈值和第二阈值,进而在电子设备中存储触摸屏的每个位置的第一阈值和第二阈值。也就是说,所述触控笔在所述触摸屏的第一位置的第一阈值,与所述触控笔在所述触摸屏的第二位置的第一阈值不同。第一位置和第二位置均为触摸屏上的位置。
其二,本申请实施例中,电子设备可以自学习触摸屏的每个位置的第一阈值和第二阈值,且存储触摸屏的每个位置的第一阈值和第二阈值。
如此,电子设备响应于检测到所述触控笔靠近所述触摸屏,可以检测所述触控笔在所 述触摸屏的位置,进而基于触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第一阈值;响应于所述第一位置的TP sensor的电容变化量大于或等于所述第一位置的第一阈值,执行绘制笔迹的操作。
相应的,电子设备响应于检测到所述触控笔远离所述触摸屏,检测所述触控笔在所述触摸屏的位置;基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第二阈值;响应于所述第一位置的TP sensor的电容变化量小于所述第一位置的第二阈值,停止执行绘制笔迹的操作。
如此,电子设备可以基于触控笔在触摸屏的所述第一位置,采用该第一位置处的第一阈值和第二阈值,判断是否执行绘制笔迹的操作,一方面可以保证触摸屏的不同位置处触控笔下笔出水和提笔不出水的高度相同,另一方面可以提高电子设备绘制笔迹的控制准确性。
下述对电子设备自学习的过程,以及查询第一阈值和第二阈值的过程进行说明:
其一:
电子设备可以将触摸屏划分为第一区域和第二区域,所述第一区域包括至少一个所述第一位置,所述第二区域包括至少一个所述第二位置。应理解,第一区域和第二区域的尺寸、形状等可以相同或不同。
电子设备响应于触控笔接触第一位置,可以记录所述第一区域的第一阈值,响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第一阈值。同理的,电子设备响应于触控笔接触第一位置,可以记录所述第一区域的第二阈值,响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第二阈值。
如此,若电子设备已自学习过第一区域的第一阈值,以及第二区域的第一区域,则在后续触控笔的使用过程中,若电子设备检测到触控笔位于触摸屏的第一位置,电子设备可以将所述第一区域的第一阈值作为所述第一位置的第一阈值。
在一种可能的实现方式中,若触控屏还包括第三区域,第三区域中包括第三位置,电子设备可以响应于检测到所述触控笔接触第三位置,记录所述第三位置所属区域的第一阈值,所述第三位置位于所述第一区域和所述第二区域之外,即第一位置位于第三位置所属区域之外。在该种可能的实现方式中,电子设备自学习过第三区域的第一阈值,但未学习过第一区域和第二区域的第一阈值。
在一种实施例中,电子设备响应于触控笔在所述触摸屏的第一位置,查询第一位置的第一阈值时,查询不到已存储的第一阈值,因此,电子设备可以将预设第一阈值作为所述第一位置的第一阈值。在一种实施例中,若电子设备查询不到已存储的第一阈值,电子设备还可以在已存储的第一阈值中,将与第一位置距离最近的位置的第一阈值,作为第一位置的第一阈值。
关于电子设备响应于触控笔接触第一位置,可以记录所述第一区域的第一阈值的方式可以为:电子设备响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量;基于所述第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值。
因为第一区域可以包括至少一个第一位置,因此电子设备可以基于每个第一位置的TP sensor的电容变化量和所述第一比例,得到每个第一位置对应的第一区域的第一阈值;基 于每个第一位置对应的第一区域的第一阈值,获取所述第一区域的第一阈值。示例性的,如采用均值法或者加权平均法,基于每个第一位置对应的第一区域的第一阈值,获取所述第一区域的第一阈值。
在一种可能的实现方式中,触控笔接触触摸屏上的位置时的TP sensor的电容变化量时,可以对获取的TP sensor的电容变化量进行预处理,以提高TP sensor的电容变化量的准确性,进而提高第一阈值和第二阈值的准确性。
其中,电子设备在检测到所述触控笔接触所述第一位置时,还可以接收来自所述触控笔的压感信号和触摸TP信号。电子设备可以响应于检测到所述触控笔接触所述第一位置,且所述压感信号的次数大于预设次数、所述TP信号的报点数大于预设数量,以及所述触控笔和所述触摸屏之间的夹角位于预设夹角范围内,获取所述第一位置的TP sensor的电容变化量。如此设置,可以保证触控笔在触摸屏上停留足够长的时间,使得电子设备更为准确地获取触控笔接触该位置时TP sensor的电容变化量,以提高该位置的第一阈值和第二阈值的准确性。
应理解的是,用户在使用触控笔的过程中,可以多次接触该第一位置、第二位置等。电子设备可以基于每次接触该第一位置时的TP sensor的电容变化量,获取第一位置的第一阈值,进而更新该第一位置的第一阈值。
同理的,若电子设备已自学习过第一区域的第二阈值,以及第二区域的第二阈值,则在后续触控笔的使用过程中,若电子设备检测到触控笔位于触摸屏的第一位置,电子设备可以将所述第一区域的第二阈值作为所述第一位置的第二阈值。
在一种可能的实现方式中,若触控屏还包括第三区域,第三区域中包括第三位置,电子设备可以响应于检测到所述触控笔接触第三位置,记录所述第三位置所属区域的第二阈值,所述第三位置位于所述第一区域和所述第二区域之外。在该种可能的实现方式中,电子设备自学习过第三区域的第二阈值,但未学习过第一区域和第二区域的第二阈值。电子设备响应于触控笔在所述触摸屏的第一位置,查询第一位置的第二阈值时,查询不到已存储的第二阈值,因此,电子设备可以将预设第二阈值作为所述第一位置的第二阈值。
在一种实施例中,若电子设备查询不到已存储的第二阈值,电子设备还可以在已存储的第二阈值中,将与第一位置距离最近的位置的第二阈值,作为第一位置的第二阈值。
关于电子设备响应于触控笔接触第一位置,可以记录所述第一区域的第二阈值的方式可以为:电子设备响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量;基于所述第一位置的TP sensor的电容变化量和第二比例,获取所述第一区域的第二阈值。
因为第一区域可以包括至少一个第一位置,因此电子设备可以基于每个第一位置的TP sensor的电容变化量和所述第二比例,得到每个第一位置对应的第一区域的第二阈值;基于每个第一位置对应的第一区域的第二阈值,获取所述第一区域的第二阈值。示例性的,如采用均值法或者加权平均法,基于每个第一位置对应的第一区域的第二阈值,获取所述第一区域的第二阈值。
在一种可能的实现方式中,触控笔接触触摸屏上的位置时的TP sensor的电容变化量时,可以对获取的TP sensor的电容变化量进行预处理,以提高TP sensor的电容变化量的准确性,进而提高第二阈值和第二阈值的准确性。
其中,电子设备在检测到所述触控笔接触所述第一位置时,还可以接收来自所述触控笔的压感信号和触摸TP信号。电子设备可以响应于检测到所述触控笔接触所述第一位置,且所述压感信号的次数大于预设次数、所述TP信号的报点数大于预设数量,以及所述触控笔和所述触摸屏之间的夹角位于预设夹角范围内,获取所述第一位置的TP sensor的电容变化量。如此设置,可以保证触控笔在触摸屏上停留足够长的时间,使得电子设备更为准确地获取触控笔接触该位置时TP sensor的电容变化量,以提高该位置的第二阈值和第二阈值的准确性。
应理解的是,用户在使用触控笔的过程中,可以多次接触该第一位置、第二位置等。电子设备可以基于每次接触该第一位置时的TP sensor的电容变化量,获取第一位置的第二阈值,进而更新该第一位置的第二阈值。
其二:
触控笔接触所述第一位置时,触控笔与所述触摸屏之间的夹角会影响TP sensor的电容变化量,进而影响第一位置的第一阈值和第二阈值。为了进一步提高电子设备自学习的触摸屏的各位置的第一阈值和第二阈值,可以结合触控笔与所述触摸屏之间的夹角进行考虑。
其中,电子设备响应于检测到所述触控笔接触所述第一位置,可以获取所述触控笔与所述触摸屏之间的第一夹角,进而记录所述第一区域中第一夹角下的第一阈值。具体的,电子设备可以响应于检测到所述触控笔接触所述第一位置,可以检测所述触控笔与所述触摸屏之间的夹角为第一夹角,以及TP sensor的电容变化量。电子设备可以第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值,同时与第一夹角对应记录,即得到第一区域中第一夹角下的第一阈值。
同理的,电子设备可以响应于检测到所述触控笔接触所述第二位置,可以检测所述触控笔与所述触摸屏之间的夹角为第二夹角,以及TP sensor的电容变化量。电子设备可以第二位置的TP sensor的电容变化量和第一比例,获取所述第二区域的第一阈值,同时与第一夹角向对应记录,即得到第二区域中第二夹角下的第一阈值。
在该种方式中,电子设备响应于所述触控笔在所述触摸屏的第一位置,可以获取所述触控笔与所述触摸屏之间的夹角;基于所述触控笔与所述触摸屏之间的夹角为所述第一夹角,将所述第一区域中第一夹角下的第一阈值作为所述第一位置的第一夹角下的第一阈值。
在一种可能的实现方式中,若电子设备在自学习的过程中,未学习到第一区域的第一夹角下的第一阈值,电子设备可以将预设第一阈值作为该第一位置的第一夹角下的第一阈值。
在一种可能的实现方式中,若电子设备在自学习的过程中,未学习到第一区域的第一夹角下的第一阈值,电子设备可以将第一区域中与第一夹角的差值最小的夹角下的第一阈值,作为第一位置的第一夹角下的第一阈值。
在一种实施例中,若电子设备在自学习的过程中,未学习到第一区域的第一夹角下的第一阈值,电子设备可以将与第一位置距离最近,且与第一夹角相同或差值最小夹角下的第一阈值作为第一位置的第一夹角下的第一阈值。
应理解,触摸屏上的各区域的各夹角下的第二阈值可以参照第一阈值的相关描述。
本申请实施例中,在电子设备自学习触摸屏的各区域的第一阈值和第二阈值时,考虑到触控笔与触摸屏的夹角的影响,可以习学习触摸屏的各区域中各夹角下的第一阈值和第 二阈值,进而在触控笔绘制笔迹时,电子设备可以基于触控笔在触摸屏上的位置,以及触控笔与触摸屏的夹角,查询该位置该夹角下的第一阈值和第二阈值,可以进一步提高绘制比较操作的控制准确性。
第二方面,本申请实施例提供一种笔迹绘制装置,该笔迹绘制装置可以为如上第一方面中所述的电子设备,或者电子设备中的芯片,电子设备中包括触摸屏,所述触摸屏中包括触摸传感器TP sensor。该笔迹绘制装置包括:
处理模块,用于响应于检测到触控笔靠近所述触摸屏,且所述TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作,以及,响应于检测到所述触控笔远离所述触摸屏,且所述TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,所述第一阈值和所述第二阈值不同。
在一种可能的实现方式中,所述第一阈值大于所述第二阈值。
在一种可能的实现方式中,所述触控笔在所述触摸屏的第一位置的第一阈值,与所述触控笔在所述触摸屏的第二位置的第一阈值不同。
在一种可能的实现方式中,处理模块,具体用于响应于检测到所述触控笔靠近所述触摸屏,检测所述触控笔在所述触摸屏的位置;基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第一阈值;响应于所述第一位置的TP sensor的电容变化量大于或等于所述第一位置的第一阈值,执行绘制笔迹的操作。
在一种可能的实现方式中,处理模块,具体用于响应于检测到所述触控笔远离所述触摸屏,检测所述触控笔在所述触摸屏的位置;基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第二阈值;响应于所述第一位置的TP sensor的电容变化量小于所述第一位置的第二阈值,停止执行绘制笔迹的操作。
在一种可能的实现方式中,所述触摸屏包括第一区域和第二区域,所述第一区域包括至少一个所述第一位置,所述第二区域包括至少一个所述第二位置。在一种可能的实现方式中,存储模块,用于响应于检测到所述触控笔接触所述第一位置,记录所述第一区域的第一阈值,以及响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第一阈值。
在一种可能的实现方式中,处理模块,具体用于将所述第一区域的第一阈值作为所述第一位置的第一阈值。
在一种可能的实现方式中,存储模块,还用于响应于检测到所述触控笔接触第三位置,记录所述第三位置所属区域的第一阈值,所述第三位置位于所述第一区域和所述第二区域之外。
处理模块,具体用于将预设第一阈值作为所述第一位置的第一阈值。
在一种可能的实现方式中,处理模块,具体用于响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量;基于所述第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值。
在一种可能的实现方式中,处理模块,具体用于基于每个第一位置的TP sensor的电容变化量和所述第一比例,得到每个第一位置对应的第一区域的第一阈值;基于每个第一位置对应的第一区域的第一阈值,获取所述第一区域的第一阈值。
在一种可能的实现方式中,收发模块,用于接收来自所述触控笔的压感信号和触摸TP 信号。
处理模块,具体用于响应于检测到所述触控笔接触所述第一位置,且所述压感信号的次数大于预设次数、所述TP信号的报点数大于预设数量,以及所述触控笔和所述触摸屏之间的夹角位于预设夹角范围内,获取所述第一位置的TP sensor的电容变化量。
在一种可能的实现方式中,存储模块,还用于替换或更新所述第一区域的第一阈值。
在一种可能的实现方式中,处理模块,用于响应于检测到所述触控笔接触所述第一位置,检测所述触控笔与所述触摸屏之间的夹角。
存储模块,用于基于所述触控笔与所述触摸屏之间的夹角为第一夹角,记录所述第一区域中第一夹角下的第一阈值。
处理模块,还用于响应于检测到所述触控笔接触所述第二位置,检测所述触控笔与所述触摸屏之间的夹角;存储模块,还用于基于所述触控笔与所述触摸屏之间的夹角为第二夹角,记录所述第一区域中第二夹角下的第一阈值。
在一种可能的实现方式中,处理模块,还用于响应于所述触控笔在所述触摸屏的第一位置,检测所述触控笔与所述触摸屏之间的夹角;基于所述触控笔与所述触摸屏之间的夹角为所述第一夹角,将所述第一区域中第一夹角下的第一阈值作为所述第一位置的第一阈值。
第三方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储代码指令;处理器用于运行代码指令,使得电子设备以执行如第一方面或第一方面的任一种实现方式中的方法。
第四方面,本申请实施例提供一种笔迹绘制系统,包括如上第三方面所述的电子设备,以及触控笔。
第五方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有指令,当指令被执行时,使得计算机执行如第一方面或第一方面的任一种实现方式中的方法。
第六方面,本申请实施例提供一种计算机程序产品,包括计算机程序,当计算机程序被运行时,使得计算机执行如第一方面或第一方面的任一种实现方式中的方法。
应当理解的是,本申请的第二方面至第六方面与本申请的第一方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。
附图说明
图1为本申请实施例适用的一种场景示意图;
图2A为本申请实施例提供的触控笔的结构示意图;
图2B为本申请实施例提供的触控笔的部分拆分结构示意图;
图3为本申请实施例提供的触控笔与电子设备交互的示意图;
图4为本申请实施例提供的触控笔与无线键盘的装配示意图;
图5A为本申请实施例提供的触控笔收纳在无线键盘的收纳部中的示意图;
图5B为本申请实施例提供的触控笔收纳在无线键盘的收纳部时的侧面示意图;
图6为本申请实施例提供的一种触控笔的硬件结构示意图;
图7为本申请实施例提供的一种电子设备的硬件结构示意图;
图8为本申请实施例提供的一种无线键盘的硬件结构示意图;
图9为本申请实施例提供的触控笔和电子设备交互的一种示意图;
图10为本申请实施例适用的另一种场景示意图;
图11A为触摸屏的电容值变化的一示意图;
图11B为触摸屏的电容值变化的另一示意图;
图12为已有的电子设备绘制触控笔的笔迹的一种示意图;
图13为本申请实施例提供的笔迹绘制方法的一种实施例的流程示意图;
图14为本申请实施例提供的TP sensor的电容变化量的一种示意图;
图15为本申请实施例提供的笔迹绘制的一种示意图;
图16A为本申请实施例提供的TP sensor的一种示意图;
图16B为本申请实施例提供的TP sensor的另一种示意图;
图17为本申请实施例提供的触摸屏上各位置处触控笔的下笔出水高度和提笔不出水高度的一种示意图;
图18为本申请实施例提供的获取触摸屏上各位置的第一阈值和第二阈值的一种流程示意图;
图19为本申请实施例提供的笔迹绘制方法的另一种实施例的流程示意图;
图20为本申请实施例提供的笔迹绘制装置的一种结构示意图。
具体实施方式
图1为本申请实施例适用的一种场景示意图。参照图1,该场景中包括触控笔(stylus)100、电子设备200和无线键盘300。图1中以电子设备200为平板电脑(tablet)为例进行说明。触控笔100和无线键盘300可以向电子设备200提供输入,电子设备200基于触控笔100或无线键盘300的输入,执行响应于该输入的操作。无线键盘300上可以设置触控区域,触控笔100可以操作无线键盘300的触控区域,向无线键盘300提供输入,无线键盘300可以基于触控笔100的输入执行响应于该输入的操作。在一种实施例中,触控笔100和电子设备200之间、触控笔100和无线键盘300之间,以及电子设备200和无线键盘300之间,可以通过通信网络进行互联,以实现无线信号的交互。该通信网络可以但不限于为:WI-FI热点网络、WI-FI点对点(peer-to-peer,P2P)网络、蓝牙网络、zigbee网络或近场通信(near field communication,NFC)网络等近距离通信网络。
触控笔100可以但不限于为:电感笔和电容笔。电子设备200具有触控屏201,触控笔100为电感笔时,与触控笔100交互的电子设备200的触控屏201上需要集成电磁感应板。电磁感应板上的分布有线圈,电感笔中也集成有线圈。基于电磁感应原理,在电磁感应板所产生的磁场范围内,随着电感笔的移动,电感笔能够积蓄电能。电感笔可以将积蓄的电能通过自由震荡,经电感笔中的线圈传输至电磁感应板。电磁感应板可以基于来自电感笔的电能,对电磁感应板上的线圈进行扫描,计算出电感笔在触控屏201上的位置。电子设备200中的触控屏也可以称为触摸屏,触控笔可以称为手写笔。
电容笔可以包括:无源电容笔和有源电容笔。无源电容笔可以称为被动式电容笔,有源电容笔可以称为主动式电容笔。
主动式电容笔中(例如笔尖内)可以设置一个或多个电极,主动式电容笔可以通过电 极发射信号。触控笔100为主动式电容笔时,与触控笔100交互的电子设备200的触控屏201上需要集成电极阵列。在一种实施例中,电极阵列可以为电容式电极阵列。电子设备200通过电极阵列可以接收来自主动式电容笔的信号,进而在接收到该信号时,基于触控屏201上的电容值的变化识别主动式电容笔在触控屏上的位置,以及主动式电容笔的倾角。应理解,本申请实施例中采用的触控笔为主动式电容笔,可以简称为主动笔。
图2A为本申请实施例提供的触控笔的结构示意图。参照图2A所示,触控笔100可以包括笔尖10、笔杆20和后盖30。笔杆20的内部为中空结构,笔尖10和后盖30分别位于笔杆20的两端,后盖30与笔杆20之间可以通过插接或者卡合方式,笔尖10与笔杆20之间的配合关系详见图2B的描述。
图2B为本申请实施例提供的触控笔的部分拆分结构示意图。参照图2B所示,触控笔100还包括主轴组件50,主轴组件50位于笔杆20内,且主轴组件50在笔杆20内可滑动设置。主轴组件50上具有外螺纹51,笔尖10包括书写端11和连接端12,其中,笔尖10的连接端12具有与外螺纹51配合的内螺纹(未示出)。
当主轴组件50装配到笔杆20内时,笔尖10的连接端12伸入笔杆20内且与主轴组件50的外螺纹51螺纹连接。在一些其他示例中,笔尖10的连接端12与主轴组件50之间还可以通过卡合等可拆卸方式实现连接。通过笔尖10的连接端12与主轴组件50之间可拆卸相连,这样实现了对笔尖10的更换。
其中,为了对笔尖10的书写端11受到的压力进行检测,参照图2A所示,笔尖10与笔杆20之间具有间隙10a,这样可以确保笔尖10的书写端11受到外力时,笔尖10可以朝向笔杆20移动,笔尖10的移动会带动主轴组件50在笔杆20内移动。而对外力的检测,参照图2B所示,在主轴组件50上设有压感组件60,压感组件60的部分与笔杆20内的固定结构固定相连,压感组件60的部分与主轴组件50固定相连。这样,主轴组件50随着笔尖10移动时,由于压感组件60的部分与笔杆20内的固定结构固定相连,所以主轴组件50的移动会驱动压感组件60形变,压感组件60的形变传递给电路板70(例如,压感组件60与电路板70之间可以通过导线或者柔性电路板实现电连接),电路板70根据压感组件60形变检测出笔尖10的书写端11的压力,从而根据笔尖10书写端11的压力控制书写端11的线条粗细。
需要说明的是,笔尖10的压力检测包括但不限于上述方法。例如,还可以通过在笔尖10的书写端11内设置压力传感器,由压力传感器检测笔尖10的压力。
本实施例中,参照图2B所示,触控笔100还包括多个电极,多个电极例如可以为第一发射电极41、接地电极43和第二发射电极42。第一发射电极41、接地电极43和第二发射电极42均与电路板70电连接。第一发射电极41可以位于笔尖10内且靠近书写端11,电路板70可以被配置为可以分别向第一发射电极41和第二发射电极42提供信号的控制板,第一发射电极41用于发射第一信号,当第一发射电极41靠近电子设备200的触控屏201时,第一发射电极41与电子设备200的触控屏201之间可以形成耦合电容,这样电子设备200可以接收到第一信号。其中,第二发射电极42用于发射第二信号,电子设备200根据接收到的第二信号可以判断触控笔100的倾斜角度。本申请实施例中,第二发射电极42可以位于笔杆20的内壁上。在一种示例中,第二发射电极42也可以位于主轴组件50上。
接地电极43可以位于第一发射电极41和第二发射电极42之间,或者,接地电极43可以位于第一发射电极41和第二发射电极42的外周围,接地电极43用于降低第一发射电极41和第二发射电极42相互之间的耦合。
当电子设备200接收来自触控笔100的第一信号时,触控屏201对应位置处的电容值会发生变化。据此,电子设备200可以基于触控屏201上的电容值的变化,确定触控笔100(或触控笔100的笔尖)在触控屏201上的位置。另外,电子设备200可以采用倾角检测算法中的双笔尖投影方法获取触控笔100的倾斜角度。其中,第一发射电极41和第二发射电极42在触控笔100中的位置不同,因此当电子设备200接收来自触控笔100的第一信号和第二信号时,触控屏201上两个位置处的电容值会发生变化。电子设备200可以根据第一发射电极41和第二发射电极42之间的距离,以及触控屏201上电容值发生变化的两个位置处之间的距离,获取触控笔100的倾斜角度,更为详细的获取触控笔100的倾斜角度可以参照现有技术中双笔尖投影方法的相关描述。
本申请实施例中,参照图2B所示,触控笔100还包括:电池组件80,电池组件80用于向电路板70提供电源。其中,电池组件80可以包括锂离子电池,或者,电池组件80可以包括镍铬电池、碱性电池或镍氢电池等。在一种实施例中,电池组件80包括的电池可以为可充电电池或一次性电池,其中,当电池组件80包括的电池为可充电电池时,触控笔100可以通过无线充电方式对电池组件80中的电池进行充电。
其中,触控笔100为主动式电容笔时,参照图3,电子设备200和触控笔100无线连接后,电子设备200可以通过触控屏201上集成的电极阵列向触控笔100发送上行信号。触控笔100可以通过接收电极接收该上行信号,且触控笔100通过发射电极(例如第一发射电极41和第二发射电极42)发射下行信号。下行信号包括上述的第一信号和第二信号。当触控笔100的笔尖10接触触控屏201时,触控屏201对应位置处的电容值会发生变化,电子设备200可以基于触控屏201上的电容值,确定触控笔100的笔尖10在触控屏201上的位置。在一种实施例中,上行信号和下行信号可以为方波信号。
在一种实施例中,参照图4所示,无线键盘300可以包括第一部分301和第二部分302。示例性的,如无线键盘300可以包括:键盘主体和键盘套。第一部分301可以为键盘套,第二部分302为键盘主体。第一部分301用于放置电子设备200,第二部分302上可以设置有用于用户操作的按键、触控板等。
其中,无线键盘300使用时,需要将无线键盘300的第一部分301和第二部分302打开,而无线键盘300不使用时,无线键盘300的第一部分301和第二部分302能够合上。在一种实施例中,无线键盘300的第一部分301与第二部分302之间可以转动相连。例如,第一部分301与第二部分302之间可以通过转轴或者铰链相连,或者,在一些示例中,第一部分301与第二部分302之间通过柔性材料(例如皮质材料或布材料)实现转动相连。或者,在一些示例中,第一部分301与第二部分302可以一体成型,且第一部分301与第二部分302之间的连接处通过减薄处理,使得第一部分301与第二部分302之间的连接处可以弯折。其中,第一部分301和第二部分302之间的连接方式可以包括但不限于上述的几种转动连接方式。
其中,第一部分301可以包括至少两个转动相连的支架。例如,参照图4所示,第一部分301包括第一支架301a和第二支架301b,第一支架301a和第二支架301b之间转动 相连,在使用时,可以采用第一支架301a和第二支架301b共同对电子设备200进行支撑(参照图1)。或者,第一支架301a对第二支架301b提供支撑,第二支架301b对电子设备200进行支撑。参照图4所示,第二支架301b与第二部分302之间转动相连。
其中,参照图4所示,为了便于对触控笔100进行收纳,无线键盘300上可以设置有收纳触控笔100的收纳部303。参照图4所示,收纳部303为筒状的腔体,收纳时,触控笔100沿着图4中的箭头方向插入收纳腔体中。本实施例中,参照图4所示,第二部分302和第二支架301b之间通过连接部304转动连接,连接部304中设置有收纳部303。其中,连接部304可以为转轴。
图5A为本申请实施例提供的触控笔收纳在无线键盘的收纳部中的示意图,图5B为本申请实施例提供的触控笔收纳在无线键盘的收纳部时的侧面示意图。参照图5B所示,收纳部303为圆形腔体,且收纳部303的内径大于触控笔100的外径。
其中,为了避免触控笔100放置于收纳部303中掉落,在一种实施例中,收纳部303的内壁上可以设置有磁性材料,触控笔100中可以设置磁性材料。触控笔100通过磁性材料之间的磁性吸附作用吸附在收纳部303内。当然,在一些示例中,触控笔100与收纳部303之间固定时,包括但不限于采用磁力吸附实现固定,例如,触控笔100与收纳部303之间还可以通过卡合方式实现固定。
其中,为了方便触控笔100从收纳部303中取出,收纳部303内可以设置弹出结构,例如,按压触控笔100的一端,弹出机构可以驱动触控笔100的一端从收纳部303向外弹出。
图6为本申请实施例提供的一种触控笔的硬件结构示意图。参照图6所示,触控笔100可以具有处理器110。处理器110可以包括用于支持触控笔100的操作的存储和处理电路。存储和处理电路可以包括诸如非易失性存储器的存储装置(例如,闪存存储器或构造为固态驱动器的其它电可编程只读存储器)、易失性存储器(例如,静态或动态随机存取存储器)等。处理器110中的处理电路可以用来控制触控笔100的操作。处理电路可以基于一个或多个微处理器、微控制器、数字信号处理器、基带处理器、电源管理单元、音频芯片、专用集成电路等。
触控笔100中可以包括一个或多个传感器。例如,传感器可以包括压力传感器120。压力传感器120可以设置在触控笔100的书写端11(如图2B所示)。当然,压力传感器120还可以设在触控笔100的笔杆20内,这样,触控笔100的笔尖10一端受力后,笔尖10的另一端移动将力作用到压力传感器120。在一种实施例中,处理器110根据压力传感器120检测到的压力大小可以调整触控笔100的笔尖10书写时的线条粗细。
传感器也可以包括惯性传感器130。惯性传感器130可以包括三轴加速计和三轴陀螺仪,和/或,用于测量触控笔100的运动的其它部件,例如,三-轴磁力计可以以九-轴惯性传感器的构造被包括在传感器中。传感器也可以包括附加的传感器,诸如温度传感器、环境光传感器、基于光的接近传感器、接触传感器、磁传感器、压力传感器和/或其它传感器。
触控笔100中可以包括如发光二极管的状态指示器140和按钮150。状态指示器140用于向用户提示触控笔100的状态。按钮150可以包括机械按钮和非机械按钮,按钮150可以用于从用户收集按钮按压信息。
本申请实施例中,触控笔100中可以包括一个或多个电极160(具体可以参照图2B中 的描述),其中一个电极160可以位于触控笔100的书写端处,其中一个电极160可以位于笔尖10内,可以参照上述的相关描述。
触控笔100中可以包括感测电路170。感测电路170可感测位于电极160和与触控笔100交互的电容触摸传感器面板的驱动线之间的电容耦合。感测电路170可以包括用以接收来自电容触摸传感器面板的电容读数的放大器、用以生成解调信号的时钟、用以生成相移的解调信号的相移器、用以使用同相解调频率分量来解调电容读数的混频器、以及用以使用正交解调频率分量来解调电容读数的混频器等。混频器解调的结果可用于确定与电容成比例的振幅,使得触控笔100可以感测到与电容触摸传感器面板的接触。
可以理解的是,根据实际需求,在触控笔100可以包括麦克风、扬声器、音频发生器、振动器、相机、数据端口以及其它设备。用户可以通过利用这些设备提供命令来控制触控笔100和与触控笔100交互的电子设备200的操作,并且接收状态信息和其它输出。
处理器110可以用于运行触控笔100上的控制触控笔100的操作的软件。触控笔100的操作过程中,运行在处理器110上的软件可以处理传感器输入、按钮输入和来自其它装置的输入以监视触控笔100的移动和其它用户输入。在处理器110上运行的软件可以检测用户命令并且可以与电子设备200通信。
为了支持触控笔100与电子设备200的无线通信,触控笔100可以包括无线模块。图6中以无线模块为蓝牙模块180为例进行说明。无线模块还可以为WI-FI热点模块、WI-FI点对点模块等。蓝牙模块180可以包括射频收发器,例如收发器。蓝牙模块180也可以包括一个或多个天线。收发器可以利用天线发射和/或接收无线信号,无线信号基于无线模块的类型,可以是蓝牙信号、无线局域网信号、诸如蜂窝电话信号的远程信号、近场通信信号或其它无线信号。
触控笔100还可以包括充电模块190,充电模块190可以支持触控笔100的充电,为触控笔100提供电力。
应理解,本申请实施例中的电子设备200可以称为用户设备(user equipment,UE)、终端(terminal)等,例如,电子设备200可以为平板电脑(portable android device,PAD)、个人数字处理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备、车载设备或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等具有触控屏的移动终端或固定终端。本申请实施例中对终端设备的形态不做具体限定。
图7为本申请实施例提供的一种电子设备的硬件结构示意图。参照图7,电子设备200可以包括多个子系统,这些子系统协作以执行、协调或监控电子设备202的一个或多个操作或功能。电子设备200包括处理器210、输入表面220、协调引擎230、电源子系统240、电源连接器250、无线接口260和显示器270。
示例性的,协调引擎230可以用于与电子设备200的其他子系统进行通信和/或处理数据;与触控笔100通信和/或交易数据;测量和/或获得一个或多个模拟或数字传感器(诸如触摸传感器)的输出;测量和/或获得传感器节点阵列(诸如电容感测节点的阵列)的一个或多 个传感器节点的输出;接收和定位来自触控笔100的尖端信号和环信号;基于尖端信号交叉区域和环形信号交叉区域的位置来定位触控笔100等。
电子设备200的协调引擎230包括或以其他方式可通信地耦接至位于输入表面220下方或与该输入表面集成一体的传感器层。协调引擎230利用传感器层对输入表面220上的触控笔100进行定位,并使用本文所述的技术来估计触控笔100相对于输入表面220的平面的角位置。在一种实施例中,输入表面220可以称为触控屏201。
例如,电子设备200的协调引擎230的传感器层是布置为列和行的电容感测节点网格。更具体地说,列迹线阵列被设置成垂直于行迹线阵列。传感器层可以与电子设备的其他层分开,或者传感器层可以直接设置在另一个层上,其他层诸如但不限于:显示器叠堆层、力传感器层、数字转换器层、偏光器层、电池层、结构性或装饰性外壳层等。
传感器层能够以多种模式操作。如果以互电容模式操作,则列迹线和行迹线在每个重叠点(例如,“垂直”互电容)处形成单个电容感测节点。如果以自电容模式操作,则列迹线和行迹线在每个重叠点处形成两个(垂直对齐的)电容感测节点。在另一个实施方案中,如果以互电容模式操作,则相邻的列迹线和/或相邻的行迹线可各自形成单个电容感测节点(例如,“水平”互电容)。如上所述,传感器层可以通过监测在每个电容感测节点处呈现的电容(例如,互电容或自电容)变化来检测触控笔100的笔尖10的存在和/或用户手指的触摸。在许多情况下,协调引擎230可被配置为经由电容耦合来检测通过传感器层从触控笔100接收的尖端信号及环信号。
其中,尖端信号和/或环信号可以包括可被配置为令电子设备200识别触控笔100的特定信息和/或数据。此类信息在本文通常被称为“触笔身份”信息。该信息和/或数据可以由传感器层接收,并由协调引擎230解译、解码和/或解调。
处理器210可以使用触笔身份信息来同时接收来自一支以上的触笔的输入。具体地,协调引擎230可被配置为将由协调引擎230检测到的若干触笔中的每个触笔的位置和/或角位置传输给处理器210。在其他情况下,协调引擎230还可以向处理器210传输与由协调引擎230检测到的多个触笔的相对位置和/或相对角位置有关的信息。例如,协调引擎230可以通知处理器210所检测的第一触控笔位于距离所检测的第二触控笔的位置。
在其他情况下,端信号和/或环信号还可以包括用于令电子设备200识别特定用户的特定信息和/或数据。此类信息在本文通常被称为“用户身份”信息。
协调引擎230可以将用户身份信息(如果检测到和/或可复原的话)转发到处理器210。如果用户身份信息不能从尖端信号和/或环信号中复原,则协调引擎230可以可选地向处理器210指示用户身份信息不可用。处理器210能够以任何合适的方式利用用户身份信息(或不存在该信息的情况),包括但不限于:接受或拒绝来自特定用户的输入,允许或拒绝访问电子设备的特定功能等。处理器210可以使用用户身份信息来同时接收来自一个以上的用户的输入。
在另外的其他情况下,尖端信号和/或环信号可以包括可被配置为令电子设备200识别用户或触控笔100的设置或偏好的特定信息和/或数据。此类信息在本文通常被称为“触笔设置”信息。
协调引擎230可以将触笔设置信息(如果检测到和/或可复原的话)转发到处理器210。如果触笔设置信息不能从尖端信号和/或环信号中复原,则协调引擎230可以可选地向处理 器210指示触笔设置信息不可用。电子设备200能够以任何合适的方式利用触笔设置信息(或不存在该信息的情况),包括但不限于:将设置应用于电子设备,将设置应用于在电子设备上运行的程序,改变由电子设备的图形程序所呈现的线条粗细、颜色、图案,改变在电子设备上操作的视频游戏的设置等。
一般而言,处理器210可被配置为执行、协调和/或管理电子设备200的功能。此类功能可以包括但不限于:与电子设备200的其他子系统通信和/或交易数据,与触控笔100通信和/或交易数据,通过无线接口进行数据通信和/或交易数据,通过有线接口进行数据通信和/或交易数据,促进通过无线(例如,电感式、谐振式等)或有线接口进行电力交换,接收一个或多个触笔的位置和角位置等。
处理器210可被实现为能够处理、接收或发送数据或指令的任何电子设备。例如,处理器可以是微处理器、中央处理单元、专用集成电路、现场可编程门阵列、数字信号处理器、模拟电路、数字电路或这些设备的组合。处理器可以是单线程或多线程处理器。处理器可以是单核或多核处理器。
在使用期间,处理器210可被配置为访问存储有指令的存储器。该指令可被配置为使处理器执行、协调或监视电子设备200的一个或多个操作或功能。
存储在存储器中的指令可被配置为控制或协调电子设备200的其他部件的操作,该部件诸如但不限于:另一处理器、模拟或数字电路、易失性或非易失性存储器模块、显示器、扬声器、麦克风、旋转输入设备、按钮或其他物理输入设备、生物认证传感器和/或系统、力或触摸输入/输出部件、通信模块(诸如无线接口和/或电源连接器),和/或触觉或触觉反馈设备。
存储器还可存储可由触笔或处理器使用的电子数据。例如,存储器可以存储电子数据或内容(诸如媒体文件、文档和应用程序)、设备设置和偏好、定时信号和控制信号或者用于各种模块的数据、数据结构或者数据库,与检测尖端信号和/或环信号相关的文件或者配置等等。存储器可被配置为任何类型的存储器。例如,存储器可被实现作为随机存取存储器、只读存储器、闪存存储器、可移动存储器、其他类型的存储元件或此类设备的组合。
电子设备200还包括电源子系统240。电源子系统240可包括电池或其它电源。电源子系统240可被配置为向电子设备200提供电力。电源子系统240还可耦接到电源连接器250。电源连接器250可以是任何合适的连接器或端口,其可被配置为从外部电源接收电力并且/或者被配置为向外部负载提供电力。例如,在一些实施方案中,电源连接器250可以用于对电源子系统240内的电池进行再充电。在另一个实施方案中,电源连接器250可以用于将存储在(或可用于)电源子系统240内的电力传输到触控笔100。
电子设备200还包括无线接口260,以促进电子设备200与触控笔100之间的电子通信。在一个实施方案中,电子设备200可被配置为经由低能量蓝牙通信接口或近场通信接口与触控笔100通信。在其他示例中,通信接口有利于电子设备200与外部通信网络、设备或平台之间的电子通信。
无线接口260(无论是电子设备200与触控笔100之间的通信接口还是另外的通信接口)可被实现为一个或多个无线接口、蓝牙接口、近场通信接口、磁性接口、通用串行总线接口、电感接口、谐振接口,电容耦合接口、Wi-Fi接口、TCP/IP接口、网络通信接口、光学接口、声学接口或任何传统的通信接口。
电子设备200还包括显示器270。显示器270可以位于输入表面220后方,或者可以与其集成一体。显示器270可以通信地耦接至处理器210。处理器210可以使用显示器270向用户呈现信息。在很多情况下,处理器210使用显示器270来呈现用户可以与之交互的界面。在许多情况下,用户操纵触控笔100与界面进行交互。
对于本领域的技术人员而言将显而易见的是,上文关于电子设备200所呈现的具体细节中的一些细节可为实践特定的所述实施方案或其等同物所不需要的。类似地,其他电子设备可以包括更多数量的子系统、模块、部件等。在适当的情况下,一些子模块可以被实现为软件或硬件。因此,应当理解,上述描述并非旨在穷举或将本公开限制于本文所述的精确形式。相反,对于本领域的普通技术人员而言将显而易见的是,根据上述教导内容,许多修改和变型是可能的。
图8为本申请实施例提供的一种无线键盘的硬件结构示意图。参照图8,该无线键盘300可以包括处理器310,存储器320,充电接口330,充电管理模块340,无线充电线圈350,电池360,无线通信模块370,触控板380,键盘390。
其中,上述处理器310,存储器320,充电接口330,充电管理模块340,电池360,无线通信模块370,触控板380,键盘390等均可以设置在无线键盘300的键盘主体(即如图4所示的第二部分302)上。上述无线充电线圈350可以设置在用于活动连接键盘主体和支架的连接部304(如图4所示)中。可以理解的是,本实施例示意的结构并不构成对无线键盘300的具体限定。在另一些实施例中,无线键盘300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
其中,存储器320可以用于存储程序代码,如用于为触控笔100无线充电的程序代码等。存储器320中还可以存储有用于唯一标识无线键盘300的蓝牙地址。另外,该存储器320中还可以存储有与无线键盘300之前成功配对过的电子设备的连接数据。例如,该连接数据可以为与该无线键盘300成功配对过的电子设备的蓝牙地址。基于该连接数据,无线键盘300能够与该电子设备自动配对,而不必配置与其之间的连接,如进行合法性验证等。上述蓝牙地址可以为媒体访问控制(media access control,MAC)地址。
处理器310可以用于执行上述应用程序代码,调用相关模块以实现本申请实施例中无线键盘300的功能。例如,实现无线键盘300有线充电功能,反向无线充电功能,无线通信功能等。处理器310可以包括一个或多个处理单元,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器310中。处理器310具体可以是集成的控制芯片,也可以由包括各种有源和/或无源部件的电路组成,且该电路被配置为执行本申请实施例描述的属于处理器310的功能。其中,无线键盘300的处理器可以是微处理器。
无线通信模块370可以用于支持无线键盘300与其他电子设备之间包括蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的数据交换。
在一些实施例中,该无线通信模块370可以为蓝牙芯片。该无线键盘300可以是蓝牙 键盘。无线键盘300可以通过该蓝牙芯片与其他电子设备的蓝牙芯片之间进行配对并建立无线连接,以通过该无线连接实现无线键盘300和其他电子设备之间的无线通信。
另外,无线通信模块370还可以包括天线,无线通信模块370经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器310。无线通信模块370还可以从处理器310接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。
在一些实施例中,无线键盘300可以支持有线充电。具体的,充电管理模块340可以通过充电接口330接收有线充电器的充电输入。
在另一些实施例中,无线键盘300可以支持正向无线充电。充电管理模块340可以通过无线键盘300的无线充电线圈350接收无线充电输入。具体的,充电管理模块340与无线充电线圈350通过匹配电路连接。无线充电线圈350可以与上述无线充电器的无线充电线圈耦合,感应无线充电器的无线充电线圈350发出的交变电磁场,产生交变电信号。无线充电线圈350产生的交变电信号经过匹配电路传输至充电管理模块340,以便为电池360无线充电。
其中,充电管理模块340为电池360充电的同时,还可以为无线键盘300供电。充电管理模块340接收电池360的输入,为处理器310,存储器320,外部存储器和无线通信模块370等供电。充电管理模块340还可以用于监测电池360的电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,充电管理模块340也可以设置于处理器310中。
在另一些实施例中,无线键盘300可以支持反向无线充电。具体的,充电管理模块340还可以接收充电接口330或者电池360的输入,将充电接口330或者电池360输入的直流电信号转换为交流电信号。该交流电信号经过匹配电路传输至无线充电线圈350。无线充电线圈350接收到该交流电信号可以产生交变电磁场。其他移动终端的无线充电线圈感应该交变电磁场,可以进行无线充电。即无线键盘300还可以为其他移动终端无线充电。在一种实施例中,无线充电线圈350可以设置在无线键盘300的收纳部303中,触控笔100的笔杆20内设置有无线充电线圈,当触控笔100放置在收纳部303中时,无线键盘300可以通过无线充电线圈350,为触控笔100进行充电。
需要说明的是,上述匹配电路可以集成在充电管理模块340中,该匹配电路也可以独立于充电管理模块340,本申请实施例对此不作限制。图8以匹配电路可以集成在充电管理模块340中为例,示出无线键盘300的硬件结构示意图。
充电接口330,可以用于提供无线键盘300与其他电子设备(如该无线键盘300的有线充电器)之间进行充电或通信的有线连接。
上述触控板380中集成有触摸传感器。笔记本电脑可以通过触控板380和键盘390接收用户对笔记本电脑的控制命令。
可以理解的是,本申请实施例示意的结构并不构成对无线键盘300的具体限定。其可以具有比图8示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,上述无线键盘300的壳体上还可以设置有用于收纳触控笔100的收纳腔。上述无线充电线圈350设置于上述收纳腔内,用于当触控笔100收纳于上述收纳腔内后,为该触控笔100无线充电。
又例如,在无线键盘300的外表面还可以包括按键、指示灯(可以指示电量、呼入/呼出、配对模式等状态)、显示屏(可以提示用户相关信息)等部件。其中,该按键可以是物理按键或触摸按键(与触摸传感器配合使用)等,用于触发开机、关机、开始充电、停止充电等操作。
应理解,本申请实施例提供的方法也可以适用于包含有触控笔100和电子设备200的场景中。
图9为本申请实施例适用的触控笔和电子设备交互的一种示意图。参照图9,触控笔100中包括:微处理单元(micro controller unit,MCU)、第一通信模块、充电模块、压力传感器模块、发送模块(transport,TX)和接收模块(receive,RX)。电子设备200中包括:触摸传感器(TP sensor)、触摸处理模块和第二通信模块。应理解,下述实施例以第一通信模块和第二通信模块均为蓝牙模块为例进行说明,第一通信模块和第二通信模块还可以为无线局域网模块、WI-FI模块等,本申请实施例对此不作限制。应理解,触控笔和电子设备,可以通过第一通信模块和第二通信模块建立无线通路,以交互无线信号。
电子设备中,触摸处理模块分别与触摸传感器、第二通信模块连接。触摸传感器中可以包括电极阵列。触摸传感器,用于采集触摸数据,触摸数据可以包括:触控笔触摸触摸屏的数据。触摸处理模块,用于基于触摸传感器采集的触摸数据,确定触控笔的笔尖的位置,以及触控笔与触摸屏的夹角(下述简称为夹角),参照图11A和图11B的相关描述。其中,当电子设备和触控笔无线建立无线通路,即电子设备和触控笔无线连接后,触摸处理模块可以通过电极阵列向触控笔发送上行信号,上行信号用于指示触控笔反馈下行信号。触摸处理模块可以基于来自触控笔的下行信号,确定触控笔的笔尖的位置,以及夹角。在一种实施例中,上行信号和下行信号均可以为方波信号。在一种实施例中,触摸处理模块可以为触摸IC芯片(integrated circuit chip)。
触控笔中,MCU分别与第一通信模块、充电模块、压力传感器模块、发送模块,以及接收模块连接。应理解,MCU可以理解为图6所示的处理器。充电模块,用于为触控笔进行充电。压力传感器模块中包括:压力传感器和压力数据处理模块。压力传感器与压力数据处理模块连接,压力数据处理模块与MCU连接。压力传感器可以设置在触控笔的笔尖,压力传感器,用于采集笔尖的压力。示例性的,当触控笔的笔尖接触电子设备的触摸屏时,压力传感器可以采集笔尖的压力。数据处理模块,用于将笔尖的压力发送给MCU。在一种实施例中,MCU可以基于第一通信模块,向电子设备发送笔尖的压力。电子设备可以基于第二通信模块接收到来自触控笔中笔尖的压力,调节触控笔在触摸屏上书写的线条的粗细。
发送模块中可以包括:第一电极、第二电极和发送驱动电路。第一电极、第二电极均与发送驱动电路连接,发送驱动电路与MCU连接。MCU,用于生成第一脉冲宽度调制(pulse width modulation,PWM)信号和第二PWM信号,且向发送驱动电路发送第一PWM信号和第二PWM信号。发送驱动电路可以基于第一PWM信号,驱动第一电极发送第一信号,以及,基于第二PWM信号,驱动第二电极发送第二信号。其中,第一电极可以称为TX1,第二电极可以称为TX2。在一种实施例中,第一信号和第二信号可以称为下行信号或者打码信号。在一种实施例中,下行信号可以为40V的方波信号。应理解,本申请实施例中的 上行信号和下行信号是基于触控笔来说的,可以想到的是,基于电子设备来说,电子设备可以向触控笔发送下行信号,触控笔可以基于下行信号向电子设备发送上行信号。下述实施例中,以触控笔发送下行信号,以及电子设备发送上行信号为例进行说明。
参照图9,在一种实施例中,发送驱动电路中可以包括:高压驱动信号模块和开关管。MCU分别与高压驱动信号模块,以及开关管连接。开关管与第二电极连接,高压驱动信号模块分别与第一电极,以及第二电极连接。高压驱动信号模块,用于提供高压驱动信号,并基于来自MCU的第一PWM信号驱动第一电极发送第一信号,以及基于来自MCU的第二PWM信号驱动第二电极发送第二信号。
在一种实施例中,MCU,还用于控制开关管,实现第二电极在发送信号和接收信号之间进行切换,即实现第二电极在TX2和RX之间的切换。本申请实施例中对开关管的具体电路,以及MCU的控制方式不做赘述。换句话说,MCU可以控制开关管,使得第二电极可以作为TX2,作为TX2的第二电极与发送驱动电路连接,进而在发送驱动电路的作用下使得第二电极发送第二信号。MCU也可以控制开关管,使得第二电极作为RX,作为RX的第二电极与接收模块连接,进而使得第二电极可以接收来自电子设备的上行信号。也就是说,第二电极可以在MCU的控制下,在TX2和RX之间进行切换。
接收模块中包括解码电路。解码电路可以与开关管连接,解码电路还与MCU连接。第二电极,用于接收来自电子设备的上行信号,且向解码电路发送上行信号。解码电路,用于解码上行信号,并向MCU发送解码后的上行信号。
应理解,图9所示的触控笔的结构为一种示例,在一种实施例中,触控笔中可以设置一个发射电极TX,一个接收电极RX,本申请实施例对此不作限制。
基于图9所示的结构,下述结合图10对电子设备和触控笔交互的过程进行说明。参照图10,示例性的,触控笔和电子设备可以建立无线通路,如触控笔和电子设备之间可以建立蓝牙通路。因为触控笔的笔尖设置有电极,电子设备中的触摸传感器中包括电极阵列。触控笔的笔尖和触摸传感器的电极之间,存在绝缘物质(如空气、触摸屏上的玻璃),因此触控笔的笔尖和触摸传感器的电极之间形成电容,触控笔的笔尖与电子设备中的触摸传感器可以通过电容建立电路连接,下述实施例将触控笔的笔尖与电子设备中的触摸传感器之间的通路称为电路通路。
在一种实施例中,当电子设备与触控笔蓝牙连接成功时,触摸处理模块可以控制触摸传感器通过电路通路发送上行信号。在一种实施例中,当电子设备与触控笔蓝牙连接成功,且电子设备检测到触控笔未充电时,触摸处理模块可以控制触摸传感器通过电路通路发送上行信号。在一种实施例中,当电子设备与触控笔蓝牙连接成功,且电子设备检测到触控笔处于移动状态时,触摸处理模块可以控制触摸传感器通过电路通路发送上行信号。应理解,不同的电子设备发送上行信号的触发条件可以不同,下述实施例中以“当电子设备与触控笔蓝牙连接成功时,触摸处理模块控制触摸传感器通过电路通路发送上行信号”为例进行说明。
第二电极,可以基于电路通路,接收来自电子设备的上行信号,且向解码电路发送上行信号。解码电路可以向MCU传输解码后的上行信号。MCU基于输解码后的上行信号,控制发送驱动电路驱动第一电极发送第一信号,以及驱动第二电极发送第二信号。也就是说,触控笔可以通过电路通路发送下行信号。电子设备中的触摸传感器可以基于电路通路, 接收下行信号。触摸处理模块可以基于触摸传感器采集的下行信号,获取触控笔的笔尖的位置以及夹角。
图11A为触摸屏的电容值变化一示意图。当触摸传感器接收来自触控笔的第一电极的第一信号时,触摸屏对应位置处的电容变化量会发生变化。且当触控笔的笔尖越靠近触摸屏,触摸屏对应位置处的电容变化量越大。参照图11A,图11A中以波峰表征触摸屏对应位置处的电容变化量发生变化,电子设备可以基于触摸屏上的电容变化量,确定触控笔的笔尖的位置。另外,电子设备可以采用倾角检测算法中的双笔尖投影方法获取夹角。参照图11B,在一种实施例中,触控笔中的第一电极和第二电极可以设置在触控笔的笔尖,第一电极设置靠近笔尖的尖端,第二电极相对于第一电极远离笔尖的尖端设置。当触摸传感器接收来自触控笔的第一电极的第一信号,以及第二电极的第二信号时,触摸屏两个位置处(如位置B和位置C)的电容变化量会发生变化,电子设备可以基于第一电极和第二电极之间的距离,以及触摸屏两个位置处之间的距离,获取夹角,更为具体的双笔尖投影方法可以参照现有技术的相关描述。图11A以黑色圆点表征触控笔接触触摸屏的位置,图11B中以黑色圆点表征位置B和位置C。
图12为已有的电子设备绘制触控笔的笔迹的一种示意图。参照上述图2B的相关描述,触控笔的笔尖中可以设置压力传感器,参照图12,触控笔的笔尖接触电子设备的触摸屏时,压力传感器可以采集笔尖的压感数据,且将该压感数据通过蓝牙发送给电子设备。其中,压感数据可以包括压力值。另外,基于图10中的相关描述,当电子设备与触控笔蓝牙连接成功时,触控笔可以向电子设备发送下行信号,电子设备通过该下行信号可以获取触控笔在触摸屏上的位置,以及触控笔与触摸屏之间的夹角。在一种实施例中,下行信号可以称为触摸(touch panel,TP)信号,下述以TP信号为例进行说明。
现有技术中,电子设备可以基于触控笔的压感信号,以及触控笔的TP信号,在触摸屏上显示触控笔的笔迹。具体的,因为TP信号会导致电子设备中TP sensor的电容变化量发生变化,且电子设备基于压感信号可以获取压力值,若电子设备检测到TP sensor的电容变化量大于或等于电容变化量阈值,且压力值大于或等于压力阈值,则电子设备可以基于触控笔在触摸屏上的位置,在触摸屏的对应位置显示笔迹。
如果“压感信号”和“TP信号”中有一个条件不满足(如TP sensor的电容变化量小于电容变化量阈值,或者压力值小于压力阈值),触控笔无法出水,即电子设备在触摸屏上不显示触控笔的笔迹。目前电子设备依据“压感信号”和“TP信号”显示触控笔的笔迹的方式,响应速度慢,控制精度低。具体原因分析如下:
压感信号通过蓝牙传输,蓝牙传输有10-20ms的传输时延。若当触控笔刚刚离开触摸屏时,由于传输时延的原因,触控笔还在向电子设备发送压感信号,同时TP sensor的电容变化量仍大于电容变化量阈值,则电子设备还会继续显示触控笔的笔迹,这样会导致出现漏墨的情况,用户体验差。应理解,漏墨指的是:触控笔离开触摸屏后仍然出水,即电子设备仍显示触控笔的笔迹。
另外,触控笔笔尖的压力传感器可以为弹簧管压力传感器,应变片式压力传感器等,因为压力传感器本身固有的缺陷,无法检测到很小的压力值,因此压力阈值往往设置为大于0的值,如5g。其中,g表征9.8N/kg。如此,用户采用触控笔倾斜书写或者轻触触摸 屏时,因为压力值小于压力阈值,触控笔不出水,电子设备不会显示触控笔的笔迹。另外,压力传感器的物理结构很容易受到温漂、变形等影响,导致压力值测量不准确。
如此,电子设备绘制笔迹的响应速度慢,控制精度低。
因为电子设备接收来自触控笔的TP信号时,TP sensor的电容变化量会发生改变,且触控笔距离触摸屏的距离越近,TP sensor的电容变化量越大。如此,TP sensor的电容变化量能够表征触控笔与触摸屏之间的距离,如果采用TP sensor的电容变化量作为电子设备绘制触控笔的笔迹的判断因素,一方面可以避免压力传感器固有的缺陷造成的精度低的问题,另一方面还可以避免因为蓝牙传输压感信号造成的响应速度慢的问题。
但若电子设备仅采用“TP sensor的电容变化量大于或等于电容变化量阈值”这一个条件,判断是否绘制触控笔的笔迹,则会造成乒乓效应,造成用户使用触控笔时出现断触。断触可以理解为:如TP sensor的电容变化量大于或等于电容变化量阈值,触控笔出水,电子设备显示触控笔的笔迹,如TP sensor的电容变化量小于电容变化量阈值,触控笔不出水,电子设备不显示触控笔的笔迹。如此,在电容变化量阈值处,触控笔会在出水和不出水之间来回切换,电子设备也会在显示笔迹和不显示笔迹之间来回切换,产生乒乓效应。
为此,本申请实施例提供一种笔迹绘制方法,电子设备可以基于TP sensor的电容变化量,在触控笔下笔(即靠近触摸屏)时设置电子设备显示笔迹(即触控笔出水)的第一电容变化量阈值,在触控笔提笔(即远离触摸屏)时设置电子设备不显示笔迹(即触控笔不出水)的第二电容变化量阈值,第一电容变化量阈值和第二电容变化量阈值不同。如此,本申请实施例在提高电子设备绘制笔迹的响应速度和控制精度的同时,还避免了电子设备显示笔迹的乒乓效应,以及用户使用触控笔时断触的问题。应理解,下述实施例中以第一阈值表征第一电容变化量阈值,以第二阈值表征第二电容变化量阈值。
下面结合具体的实施例对本申请实施例提供的笔迹绘制方法进行说明。下面这几个实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图13为本申请实施例提供的笔迹绘制方法的一种实施例的流程示意图。参照图13,本申请实施例提供的笔迹绘制方法可以包括:
S1301,响应于检测到触控笔靠近电子设备的触摸屏,且电子设备中TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作。
触控笔靠近电子设备的触摸屏可以理解为:触控笔朝向靠近电子设备的触摸屏的方向运动。
在一种实施例中,电子设备可以基于电子设备中TP sensor的电容变化量,检测触控笔是否靠近电子设备的触摸屏。因为触控笔距离触摸屏的距离越近,电容变化量越大,因此若电子设备检测到TP sensor的电容变化量逐渐增大,则确定触控笔靠近电子设备的触摸屏。
因为用户在使用触控笔时,触控笔有时朝向靠近电子设备的触摸屏的方向运动,有时朝向远离电子设备的触摸屏的方向运动,为了保证电子设备检测触控笔是否靠近电子设备的触摸屏的准确性,在一种实施例中,若电子设备检测到TP sensor的电容变化量在预设时长内逐渐增大,则确定触控笔靠近电子设备的触摸屏。如此,该种实施例可以避免因为触控笔短暂地朝向靠近电子设备的触摸屏的方向运动,电子设备就确定触控笔靠近电子设备 的触摸屏,进而改变控制逻辑的问题,可以提高电子设备的控制精度。
在一种实施例中,电子设备的触摸屏中可以设置有用于检测距离的传感器,该传感器用于获取触控笔与触摸屏之间的距离数据。据此,电子设备可以基于传感器采集的距离数据,确定触控笔与触摸屏之间的距离,进而基于触控笔与触摸屏之间的距离,检测触控笔是否靠近触摸屏。其中,若触控笔与触摸屏之间的距离逐渐减小,则电子设备确定触控笔靠近电子设备的触摸屏。
示例性的,传感器可以包括但不限于为:红外距离传感器、超声波距离传感器、深度传感器等。应理解,当传感器为红外距离传感器时,红外传感器采集的距离数据可以包括:红外线经触控笔反射后接收的时刻,进而电子设备可以基于红外线发射的时刻以及红外线经触控笔反射后接收的时刻,计算得到触控笔与触摸屏之间的距离。超声笔距离传感器,以及深度传感器检测距离的原理可以参照现有技术中的相关描述。
电子设备中存储有第一阈值,第一阈值可以理解为:触控笔下笔时的出水阈值,或触控笔下笔时触发电子设备绘制触控笔的笔迹的阈值。若电子设备检测到触控笔靠近电子设备的触摸屏,且电子设备中TP sensor的电容变化量大于或等于第一阈值,则执行绘制笔迹的操作。电子设备绘制笔迹的操作可以理解为:电子设备基于触控笔在触摸屏上的位置,在该位置上显示笔迹。绘制笔迹可以包括但不限于:绘制文字、绘画等。
在一种实施例中,第一阈值可以为经验值,或预定义的值。示例性的,在电子设备的开发阶段,工作人员可以抽取多个电子设备,握持触控笔逐渐靠近每个电子设备的触摸屏,进而测试得到触控笔距离每个触摸屏任一距离的TP sensor的电容变化量。工作人员可以基于用户握持触控笔的绘制习惯,结合开发阶段得到的TP sensor的电容变化量,设置适配于用户的绘制习惯的第一阈值。
示例性的,参照图14,如触控笔接触触摸屏时,TP sensor的电容变化量为4500(touch_sig),触控笔与触摸屏的距离为0.2mm时,TP sensor的电容变化量为3700(0.2mm_sig),触控笔与触摸屏的距离为0.5mm时,TP sensor的电容变化量为3200(0.5mm_sig)。在一种实施例中,第一阈值可以为3700。如此,参照图15中的a,电子设备检测到触控笔靠近电子设备的触摸屏,且电子设备中TP sensor的电容变化量大于或等于3700,可以执行绘制笔迹的操作。
在一种实施例中,上述S1301可以替换为:响应于检测到电子设备中TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作。在该种实施例中,电子设备可以不用判断触控笔相较于触摸屏的运动方向(如靠近触摸屏),电子设备响应于检测到TP sensor的电容变化量大于或等于第一阈值,即可以执行绘制笔迹的操作。
S1302,响应于检测到触控笔远离电子设备的触摸屏,且电子设备的TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,第一阈值和第二阈值不同。
触控笔远离电子设备的触摸屏可以理解为:触控笔朝向远离电子设备的触摸屏的方向运动。与上述S1301类似的,电子设备可以基于TP sensor的电容变化量,检测触控笔是否远离电子设备的触摸屏。示例性的,在一种实施例中,若电子设备检测到TP sensor的电容变化量逐渐减小,则确定触控笔远离电子设备的触摸屏。或者,在一种实施例中,若电子设备检测到TP sensor的电容变化量在预设时长内逐渐减小,则确定触控笔远离电子设备的触摸屏。
电子设备中存储有第二阈值,第二阈值可以理解为:触控笔提笔时不出水的阈值,或触控笔提笔时触发电子设备停止绘制笔迹的阈值。若电子设备检测到触控笔远离电子设备的触摸屏,且电子设备中TP sensor的电容变化量小于第二阈值,则停止执行绘制笔迹的操作。
其中,为了避免电子设备的乒乓效应,第二阈值与第一阈值不同。示例性的,参照上述图14中的描述,第二阈值可以为3200。如此,参照图15中的b,电子设备检测到触控笔远离电子设备的触摸屏,且电子设备中TP sensor的电容变化量小于3200,可以停止执行绘制笔迹的操作。
在一种实施例中,第一阈值可以大于第二阈值,如第一阈值3700大于第二阈值3200。如此设置可以适配于用户的绘制习惯,具体原因分析如下:
示例性的,在触控笔靠近触摸屏的过程中,当触控笔距离触摸屏0.2mm时,电子设备执行绘制笔迹的操作,可以避免触控笔漏墨。用户操作触控笔进行绘制时,如书写文字的笔画时避免不了提笔,但用户还是需求继续书写的,若第二阈值设置的过大,会导致用户一提笔,电子设备就停止绘制笔迹。如此,本申请实施例中,将第二阈值3200设置为小于第一阈值3700,即用户提笔距离触摸屏一定距离时,电子设备会停止绘制笔迹,如此可以适配用户真正需求停止书写时,电子设备停止执行绘制笔迹的操作,可以适配于用户的绘制习惯,提高用户体验。应理解的是,本申请实施例中,第二阈值并未设置的过小,以避免出现触控笔漏墨的情况。
在一种实施例中,上述S1302可以替换为:响应于检测到电子设备的TP sensor的电容变化量满足小于第一阈值,停止执行绘制笔迹的操作。在该种实施例中,电子设备可以不用判断触控笔相较于触摸屏的运动方向(如远离触摸屏),电子设备响应于检测到TP sensor的电容变化量小于第二阈值,即可以停止执行绘制笔迹的操作。
本申请实施例中,电子设备响应于检测到触控笔靠近电子设备的触摸屏,且电子设备中TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作,响应于检测到触控笔远离电子设备的触摸屏,且电子设备的TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,第一阈值和第二阈值不同。本申请实施例,因为电子设备并未基于触控笔笔尖的压感信号,而是基于TP sensor的电容变化量判断是否执行绘制笔迹的操作,因此可以避免蓝牙传输的时延,提高电子设备绘制笔迹的响应速度,另外还可以避免因为触控笔笔尖的压力传感器固有的缺陷,造成电子设备控制精度低的问题。本申请实施例中,因为电子设备基于TP sensor的电容变化量判断是否执行绘制笔迹的操作,还可以真正实现触控笔0压力出水,即在用户握持触控笔轻触触摸屏或倾斜书写时,达到电子设备绘制笔迹的目的。另外,本申请实施例在触控笔靠近触摸屏时设置电子设备绘制笔迹的第一阈值,在触控笔远离触摸屏时设置电子设备停止绘制笔迹的第二阈值,可以避免电子设备绘制笔迹的乒乓效应。
电子设备的TP sensor可以看做电极阵列,参照图16A,以电极阵列包括:32(TX)×48(RX)个电极构成为例。在一种实施例中,32(TX)×48(RX)可以看做TP sensor的通道数。因为电极制造原因,TP sensor的各位置处的阻抗不一致,进而造成TP sensor的TP信号不一致。TP信号不一致可以理解为:当触控笔接触触摸屏的不同位置时,TP  sensor的电容变化量不同。
示例性的,触控笔接触触摸屏的位置A时,TP sensor的电容变化量为4500,触控笔接触触摸屏的位置B时,TP sensor的电容变化量为4300。如上图13所示的实施例,电子设备基于TP sensor的电容变化量判断是否执行笔迹绘制操作,依赖于TP sensor的TP信号的一致性。
如果TP sensor的TP信号一致性差,则触摸屏的不同位置处达到第一阈值(3700)和第二阈值(3200)时,触控笔距离触摸屏的距离不同,造成触摸屏的不同位置处触控笔下笔出水和提笔不出水的高度差异很大,用户体验差。示例性的,参照图17,触摸屏的位置1处,触控笔的下笔出水高度、提笔不出水高度分别为0mm、0.03mm,触摸屏的位置18处,触控笔的下笔出水高度、提笔不出水高度分别为0.11mm、0.33mm。
如上实施例中,当触控笔接触触摸屏时,TP sensor的电容变化量为4500(touch_sig),触控笔与触摸屏的距离为0.2mm时,TP sensor的电容变化量为3700(0.2mm_sig),触控笔与触摸屏的距离为0.5mm时,TP sensor的电容变化量为3200(0.5mm_sig)。其中的TP sensor的电容变化量是TP sensor中某一位置真实的测量值,据此,电子设备可以获取第一比例和第二比例。其中,第一比例为:第一阈值和“触控笔接触触摸屏时TP sensor的电容变化量”的比值,第二比例为:第二阈值和“触控笔接触触摸屏时TP sensor的电容变化量”的比值。第一比例用于表征:触控笔下笔出水时TP sensor的电容变化量和“触控笔接触触摸屏时TP sensor的电容变化量”的比值,或电子设备开始执行绘制笔迹操作时TP sensor的电容变化量和“触控笔接触触摸屏时TP sensor的电容变化量”的比值。第二比例用于表征:触控笔提笔不出水时TP sensor的电容变化量和“触控笔接触触摸屏时TP sensor的电容变化量”的比值,或电子设备停止执行绘制笔迹操作时TP sensor的电容变化量和“触控笔接触触摸屏时TP sensor的电容变化量”的比值。
示例性的,第一比例ENTER_NOPRESS_RATIO可以基于如下公式一获取,第二比例EXIT_NOPRESS_RATIO可以基于如下公式二获取:
ENTER_NOPRESS_RATIO=3700/4500≈0.822   公式一
EXIT_NOPRESS_RATIO=3200/4500≈0.711     公式二
为了解决电子设备中TP信号不一致,造成TP sensor各位置处触控笔的下笔出水高度、提笔不出水高度不一致的问题,本申请实施例中,电子设备可以基于用户的历史数据,自学习TP sensor中各位置的第一阈值和第二阈值,进而适配用户的绘制习惯,提高用户体验。其中,历史数据可以理解为:用户历史采用触控笔进行绘制时,触控笔接触触摸屏的各位置时TP sensor的电容变化量。具体的,电子设备可以基于用户历史采用触控笔进行绘制时,触控笔接触触摸屏的各位置时TP sensor的电容变化量,以及第一比例和第二比例,自学习TP sensor中各位置的第一阈值和第二阈值。应理解,在一种实施例中,触摸屏可以包括第一位置和第二位置,则本申请实施例中可以以“第一位置的第一阈值和第二阈值,以及第二位置的第一阈值和第二阈值”表征“各位置的第一阈值和第二阈值”。
下述详细介绍电子设备自学习TP sensor中各位置的第一阈值和第二阈值的过程,应理解,TP sensor的尺寸和触摸屏的尺寸可以相同,且TP sensor的各位置和触摸屏的各位置一一对应,TP sensor上的各位置可以理解为触摸屏上的各位置,TP sensor中的各区域可以理解为触摸屏中的各区域:
参照图16A,电子设备可以按照TP sensor的通道数,将TP sensor划分为N个区域,自学习N个区域中每个区域的第一阈值和第二阈值,进而电子设备可以基于触控笔在触摸屏上的位置、以及该位置落入区域的第一阈值和第二阈值,判断是否执行笔迹绘制操作。其中,N为大于或等于2的整数,N个区域中每个区域的面积可以相同或不同。
在一种实施例中,N等于TP sensor中的电极的个数,如N为32×48。示例性的,参照图16A,用户历史操作触控笔,在触摸屏上绘制位置A至位置B的一条线,位置A落入TP sensor中的电极a的范围,位置B落入TP sensor中的电极b的范围,下述以电子设备自学习位置A和位置B处的第一阈值和第二阈值为例进行说明。
当触控笔接触触摸屏上的位置A时,触控笔可以通过蓝牙向电子设备发送压感信号,如此,电子设备接收到压感信号时,可以确定触控笔接触触摸屏,进而可以将接收到来自压感信号时TP sensor的电容变化量,作为位置A处的TP sensor的电容变化量。电子设备可以基于触控笔接触触摸屏上的位置A时TP sensor的电容变化量,以及第一比例和第二比例,获取位置A处的第一阈值和第二阈值。示例性的,触控笔接触触摸屏上的位置A时TP sensor的电容变化量为X,则第一阈值可以为0.822X,第二阈值可以为0.711X。
因为触控笔在触摸屏上绘制位置A至位置B的一条线的过程中,触控笔一直没有离开触摸屏,因此触控笔可以基于压力传感器采集的压力值,一直向电子设备发送压感信号。当电子设备接收到压感信号,且基于来自触控笔的TP信号,检测到触控笔位于触摸屏上的位置B,进而电子设备可以将接收到来自压感信号时TP sensor的电容变化量,作为位置B处的TP sensor的电容变化量。电子设备可以基于触控笔接触触摸屏上的位置B时TP sensor的电容变化量,以及第一比例和第二比例,获取位置B处的第一阈值和第二阈值,可以参照上述位置A的相关说明。
如此,电子设备可以获取位置A至位置B的一条线上,各位置的第一阈值和第二阈值。本申请实施例中,电子设备可以存储位置A至位置B的一条线上,各位置的第一阈值和第二阈值。换句话说,电子设备可以存储第一映射关系,第一映射关系用于表征触摸屏的各位置的第一阈值和第二阈值。
该种实施例中,当触控笔接触触摸屏的位置A时,若触控笔和触摸屏之间的夹角不同,则TP sensor的电容变化量也不同,也就是说,触控笔和触摸屏之间的夹角对TP sensor的电容变化量有影响。本申请实施例中,为了避免因为触控笔和触摸屏之间的夹角不同,造成位置A的第一阈值和第二阈值不准确的问题,电子设备可以不断基于触控笔接触位置A处的TP sensor的电容变化量,对该位置A处的第一阈值和第二阈值进行学习更新。如,电子设备可以基于多个历史数据中位置A处的TP sensor的电容变化量,不断自学习更新位置A处的第一阈值和第二阈值,以提高位置A处的第一阈值和第二阈值的准确性。
示例性的,参照图16A,如用户历史操作触控笔,在触摸屏上绘制位置A至位置C的一条线,电子设备可以继续基于该次用户历史操作触控笔接触触摸屏时,各位置时TP sensor的电容变化量,更新电子设备中存储的第一映射关系。
以位置A为例,电子设备可以基于触控笔绘制位置A至位置C的一条线的过程中,获取触控笔接触触摸屏上的位置A时的新的TP sensor的电容变化量,以及基于该新的TP sensor的电容变化量,以及第一比例和第二比例,获取位置A处的新的第一阈值和新的第二阈值,可以参照上述位置A的相关说明。电子设备可以基于电子设备中已存储的位置A 处的第一阈值和第二阈值,以及位置A的新的第一阈值和新的第二阈值,更新位置A处的第一阈值和第二阈值。
在一种实施例中,电子设备可以将已存储的位置A处的第一阈值和新的第一阈值的均值,作为位置A更新后的第一阈值,将已存储的位置A处的第二阈值和新的第二阈值的均值,作为位置A更新后的第二阈值。
在一种实施例中,电子设备可以采用加权平均法,基于电子设备中已存储的位置A处的第一阈值和第二阈值,以及位置A的新的第一阈值和新的第二阈值,更新位置A处的第一阈值和第二阈值。本申请实施例中对电子设备更新位置A处的第一阈值和二阈值的方式不做限制。
在一种实施例中,电子设备可以将位置A的新的第一阈值和新的第二阈值替换电子设备中已存储的位置A处的第一阈值和第二阈值。
在一种实施例中,N小于(32×48),以N为(32×48)/M为例,M为小于N的整数,且(32×48)/M为大于1的整数,M可以自定义。示例性的,参照图16B,以(32×48)/M为4为例进行说明,电子设备可以将TP sensor划分为左上、右上、左下以及右下4个面积相等的区域。
示例性的,用户历史操作触控笔,在触摸屏上绘制位置A至位置B的一条线,该条线落入左上区域中。本申请实施例中,参照上述相关描述,电子设备在获取位置A至位置B的一条线上,各位置的第一阈值和第二阈值后,可以采用均值法或者加权平均法,获取左上区域的第一阈值和第二阈值。如以均值法为例,电子设备可以将位置A至位置B的一条线上,各位置的第一阈值的均值,作为左上区域的第一阈值,且将位置A至位置B的一条线上,各位置的第二阈值的均值,作为左上区域的第二阈值。
在该实施例中,若在用户实际使用触控笔绘制笔迹的过程中,电子设备若检测到触控笔的位置落入目标区域(如左上区域),电子设备可以基于该左上区域的第一阈值和第二阈值,判断是否执行笔迹绘制操作。
在该实施例中,参照图16B,如用户历史操作触控笔,在触摸屏上绘制位置A至位置C的一条线,其中,位置A至位置D落入左上区域,位置D至位置C落入右下区域,则电子设备可以基于位置A至位置D,更新左上区域的第一阈值和第二阈值,基于位置D至位置C,更新右下区域的第一阈值和第二阈值,具体更新方法可以参照上述图16A中的相关描述。
如此,电子设备可以获取触摸屏的各区域的第一阈值和第二阈值。换句话说,电子设备可以存储第二映射关系,第二映射关系用于表征触摸屏的各区域的第一阈值和第二阈值。应理解,在一种实施例中,触摸屏包括第一区域和第二区域,则本申请实施例中可以以“第一区域的第一阈值和第二阈值,以及第二区域的第一阈值和第二阈值”表征“各区域的第一阈值和第二阈值”。
在一种实施例中,如上图16A,每个电极所处的区域看做一个区域,第一映射关系也可以表征各区域的第一阈值和第二阈值。
在一种实施例中,电子设备获取用户历史操作触控笔,触控笔接触触摸屏上的位置时的TP sensor的电容变化量时,可以对获取的TP sensor的电容变化量进行预处理,以提高 TP sensor的电容变化量的准确性,进而提高第一阈值和第二阈值的准确性。应理解的是,若触控笔在触摸屏上的某个位置上停留足够长的时间,则电子设备可以准确获取触控笔接触该位置时TP sensor的电容变化量,而若触控笔快速掠过触摸屏上的某个位置,则电子设备获取的该位置处TP sensor的电容变化量的准确性较低。据此,参考图18,本申请实施例中,电子设备可以按照如下方式获取TP sensor上各位置的第一阈值和第二阈值:
S1801,在用户历史操作触控笔的过程中,响应于检测到触控笔接触触摸屏上的第一位置,且来自触控笔的压感信号的次数大于预设次数、TP信号的报点数大于预设数量,则获取第一位置处TP sensor的电容变化量。
第一位置用于表征触摸屏上的任意一个位置。电子设备检测触控笔接触触摸屏上的第一位置,以及获取TP sensor的电容变化量可以参照上述实施例的相关描述。
S1801与上述获取触摸屏上某个位置的TP sensor的电容变化量不同的是:上述实施例中,电子设备只要基于TP信号,检测到触控笔接触第一位置,便获取第一位置的TP sensor的电容变化量,准确性较低。而S1801中,电子设备可以检测触控笔在该第一位置停留一段时间,再获取第一位置的TP sensor的电容变化量,准确性高。本申请实施例中,电子设备衡量触控笔在该第一位置停留一段时间的方式为:压感信号的次数大于预设次数,以及TP信号的报点数大于预设数量。
应理解,触控笔接触触摸屏,触控笔会一直向电子设备发送压感信号,压感信号的次数大于预设次数可以表征:触控笔在该第一位置停留了“两次压感信号”的时间。TP信号的报点数与触控笔支持的信号发送频率相关,示例性的,触控笔支持240Hz或360Hz的信号发送频率,以240Hz为例,触控笔可以每隔1000/240=4.17ms向电子设备发送一个报点(或可以理解为向电子设备报一次点)。TP信号的报点数大于预设数量可以表征:触控笔在该第一位置停留了“预设数量个报点”的时间。
S1802,基于第一位置的TP sensor的电容变化量,以及第一比例和第二比例,获取第一位置的第一阈值和第二阈值。
S1803,存储第一位置的第一阈值和第二阈值。
S1804,基于用户的历史数据,更新第一位置的第一阈值和第二阈值。
S1802-S1804可以参照上述的相关描述。
因为用户采用触控笔进行绘制时,触控笔与触摸屏之间的夹角不会太大,也不会太小,如,用户不会将触控笔垂直于触摸屏进行绘制,也不会将触控笔平行于触摸屏进行绘制,如此这些触控笔与触摸屏之间的夹角为用户不常用的绘制夹角。在一种实施例中,电子设备在自学习的过程中,还可以基于触控笔与触摸屏之间的夹角,对获取的TP sensor的电容变化量进行预处理,以进一步提高第一阈值和第二阈值的准确性。
在该实施例中,上述S1801可以替换为S1801A:在用户历史操作触控笔的过程中,响应于检测到触控笔接触触摸屏上的第一位置,且来自触控笔的压感信号的次数大于预设次数、TP信号的报点数大于预设数量,以及触控笔与触摸屏之间的夹角处于预设夹角范围内,则获取第一位置处TP sensor的电容变化量。
预设夹角范围为适配于用户的绘制习惯的夹角范围。S1801A与上述S1801不同的是,电子设备获取第一位置处TP sensor的电容变化量时还增加了“触控笔与触摸屏之间的夹角处于预设夹角范围内”这一条件,电子设备在自学习过程中,可以删除极端夹角下(如位 于预设夹角范围外)的TP sensor的电容变化量,如此,电子设备自学习获取的第一阈值和第二阈值的准确性更高,且更加适配于用户的绘制习惯。
基于上述电子设备可以自学习触摸屏上各位置的第一阈值和第二阈值的技术方案,图19为本申请实施例提供的笔迹绘制方法的另一种实施例的流程示意图。参照图19,本申请实施例提供的笔迹绘制方法可以包括:
S1901,响应于检测到触控笔靠近电子设备的触摸屏,检测触控笔在触摸屏上的位置。
S1901中电子设备检测到触控笔靠近电子设备的触摸屏的方式可以参照上述S1301中的相关描述,电子设备检测触控笔在触摸屏上的位置的方式可以参照上述实施例中的相关描述。应理解,触控笔在触摸屏上的位置,可以理解为:触控笔还未接触触摸屏时,触控笔位于触摸屏上的位置。
S1902,基于触控笔在触摸屏上的第一位置,查询第一位置的第一阈值。
因为电子设备中可以存储触摸屏上各位置处(或各区域)的第一阈值和第二阈值,因此电子设备可以在已存储的各位置处(或各区域)的第一阈值和第二阈值中,查询获取第一位置的第一阈值。
在一种实施例中,电子设备可以在第一映射关系中,查询第一位置的第一阈值。在一种实施例中,电子设备可以获取第一位置所属的目标区域(第一区域),进而在第二映射关系中,将该目标区域的第一阈值、第二阈值,分别作为该第一位置的第一阈值、第二阈值。
在一种实施例中,若电子设备在自学习的过程中,未学习到(或未存储)第一位置的第一阈值和第二阈值,电子设备可以将预设第一阈值、预设第二阈值,分别作为该第一位置的第一阈值和第二阈值。应理解,预设第一阈值和预设第二阈值可以为图13所示的实施例中的经验值,如预设第一阈值可以为3700,预设第二阈值可以为3200。
在一种实施例中,若电子设备在自学习的过程中,未学习到(或未存储)第一位置的第一阈值和第二阈值,电子设备可以将与第一位置距离最近的“已存储的位置”的第一阈值,作为第一位置的第一阈值。示例性的,如触控笔在触摸屏上的位置为位置X,而电子设备中未存储位置X的第一阈值,但存储有位置Y的第一阈值和位置Z的第一阈值,因此,电子设备可以获取位置X与位置Y之间的第一距离,以及位置X与位置Z之间的第二距离。若第一距离小于第二距离,则电子设备可以将位置Y的第一阈值作为位置X的第一阈值。
S1903,响应于第一位置处的TP sensor的电容变化量大于或等于第一位置的第一阈值,执行绘制笔迹的操作。
因为电子设备的各位置的第一阈值不同,因此当电子设备检测到第一位置处的TP sensor的电容变化量大于或等于第一位置的第一阈值,电子设备执行绘制笔迹的操作,可以参照上述实施例的相关描述。
S1904,响应于检测到触控笔远离电子设备的触摸屏,检测触控笔在触摸屏上的位置。
电子设备检测触控笔远离电子设备的触摸屏,以及触控笔在触摸屏上的第二位置可以参照上述的相关描述。因为电子设备中可以存储触摸屏上各位置处(或各区域)的第二阈值,因此电子设备可以在已存储的各位置处(或各区域)的第二阈值中,查询第二位置的 第二阈值,查询方式可以参照查询第一位置的第一阈值的相关描述。
在一种实施例中,触控笔远离的触摸屏时,触控笔在触摸屏上的第二位置可以与触控笔靠近触摸屏时,触控笔在触摸屏上的第一位置相同或者不同。
S1905,基于触控笔在触摸屏上的第二位置,查询第二位置的第二阈值。
S1906,响应于第二位置处TP sensor的电容变化量小于第二位置的第二阈值,停止执行绘制笔迹的操作。
因为电子设备的各位置的第二阈值不同,因此电子设备可以在检测到第二位置处的TP sensor的电容变化量小于第二位置的第二阈值,停止执行绘制笔迹的操作,可以参照上述实施例的相关描述。
因为触控笔接触电子设备的触摸屏的各位置处时,TP sensor的电容变化量不同,如此触摸屏的各位置的第一阈值和第二阈值也不同。本申请实施例中,电子设备可以基于用户历史操作触控笔时的TP sensor的电容变化量,以及第一比例和第二比例,自学习触摸屏的各位置的第一阈值和第二阈值。电子设备可以基于触摸屏的各位置的第一阈值和第二阈值,判断是否执行绘制笔迹的操作,使得触控笔下笔出水和提笔不出水的高度一致,准确性高。
在一种实施例中,因为触控笔和触摸屏之间的夹角对TP sensor的电容变化量有影响,本申请实施例中,为了进一步提高第一位置的第一阈值和第二阈值的准确性,电子设备在自学习的过程中,可以学习第一位置处不同夹角下的第一阈值和第二阈值,进而在用户实际操作触控笔时,电子设备可以基于触控笔和触摸屏之间的夹角,查询第一位置处该夹角下的第一阈值和第二阈值,来判断电子设备是否执行绘制操作,可以提高电子设备的控制准确性。
示例性的,在上述电子设备自学习的实施例的基础上,电子设备在获取触控笔接触触摸屏的TP sensor的电容变化量时,还可以获取触控笔和触摸屏之间的夹角,进而将该夹角、第一位置(或第一区域)的第一阈值和第二阈值对应存储。如此,电子设备通过不断的自学习,可以获取触摸屏各位置(或各区域)的夹角,以及第一阈值和第二阈值的第三映射关系。
如上实施例S1801-S1804可以替换为:
S1801B,在用户历史操作触控笔的过程中,响应于检测到触控笔接触触摸屏上的第一位置,且来自触控笔的压感信号的次数大于预设次数、TP信号的报点数大于预设数量,则获取第一位置处TP sensor的电容变化量,以及触控笔与触摸屏之间的第一夹角。
应理解,电子设备获取触控笔与触摸屏之间的第一夹角的方式可以参照上述实施例中的相关描述。
S1802B,基于第一位置处TP sensor的电容变化量,以及第一比例和第二比例,获取第一位置处第一夹角下的第一阈值和第二阈值。
应理解,电子设备可以基于第一位置处TP sensor的电容变化量,以及第一比例和第二比例,获取第一位置处的第一阈值和第二阈值,可以参照上述实施例的相关描述。本申请实施例中,将第一夹角和第一位置处的第一阈值和第二阈值对应存储,即可得到第一位置处第一夹角下的第一阈值和第二阈值。
S1803B,存储第一位置处第一夹角下的第一阈值和第二阈值。
S1804B,基于用户的历史数据,更新第一位置处第一夹角下的第一阈值和第二阈值。
S1804B中,当用户操作触控笔接触第一位置,且触控笔与触摸屏之间夹角为第二夹角时,电子设备可以采用S1801B-S1802B中的方式,获取第一位置处第二夹角下的第一阈值和第二阈值,且存储第一位置处第二夹角下的第一阈值和第二阈值。
本申请实施例中,电子设备更新第一位置处第一夹角下的第一阈值和第二阈值的方式可以为:若第一夹角和第二夹角不同,则电子设备存储第一位置处第二夹角下的第一阈值和第二阈值。或者,若第一夹角和第二夹角相同,则电子设备可以将存储的第一位置处第一夹角下的第一阈值和第二阈值,替换为“第一位置处第二夹角下的第一阈值和第二阈值”,或者,电子设备可以采用均值法或者加权平均法,基于第一位置处第一夹角下的第一阈值和第二阈值,以及第一位置处第二夹角下的第一阈值和第二阈值,更新第一位置处第一夹角下的第一阈值和第二阈值,可以参照上述实施例中的相关描述。
在该实施例中,上述S1901-S1904可以替换为:
S1901A,响应于检测到触控笔靠近电子设备的触摸屏,检测触控笔在触摸屏上的位置,以及触控笔和触摸屏之间的夹角。
S1902A,基于触控笔在触摸屏上的第一位置,以及触控笔和触摸屏的第一夹角,查询第一位置处第一夹角下的第一阈值。
电子设备可以在第三映射关系中,查询第一位置处第一夹角下的第一阈值。
在一种实施例中,电子设备可以先获取第一位置所属的第一区域,进而在第一区域中查询第一夹角下的第一阈值。其中,若第一区域中存储有第一夹角下的第一阈值,则电子设备可以将该第一区域中第一夹角下的第一阈值,作为第一位置处第一夹角下的第一阈值。
在一种实施例中,若电子设备在自学习的过程中,若未存储(或未自学习到)第一位置处第一夹角下的第一阈值和第二阈值,电子设备可以将第一位置处与第一夹角差值最小的夹角对应的第一阈值、第二阈值,作为第一位置处第一夹角下的第一阈值。换句话说,若第一区域中未存储有第一夹角下的第一阈值,则可以将第一区域中存储的与第一夹角最接近的夹角下的第一阈值,作为第一位置处第一夹角下的第一阈值。
示例性的,触控笔和触摸屏之间的夹角为50度,但第三映射关系中并为存储第一位置处50度下的第一阈值和第二阈值,但存储有第一位置处70度下的第一阈值和第二阈值,以及第一位置处40度下的第一阈值和第二阈值,则电子设备可以将第一位置处40度下的第一阈值和第二阈值,分别作为第一位置处50度下的第一阈值和第二阈值。
在一种实施例中,若第一位置未包含于电子设备已自学习过的第一区域中,则电子设备可以将预设第一阈值作为第一位置处第一夹角下的第一阈值。或者,电子设备可以将与第一位置距离最近的第二位置处第一夹角下的第一阈值,作为第一位置处第一夹角下的第一阈值。或者,在一种实施例中,若电子设备未自学习第二位置处第一夹角下的第一阈值,则电子设备可以将与第一位置距离最近的第二位置处,且与第一夹角差值最小的夹角下的第一阈值,作为第一位置处第一夹角下的第一阈值。
S1903A,响应于第一位置处第一夹角下的TP sensor的电容变化量大于或等于第一位置第一夹角下的第一阈值,执行绘制笔迹的操作。
因为电子设备的第一位置处不同夹角下的第一阈值不同,因此电子设备检测到第一位置处第一夹角下的TP sensor的电容变化量大于或等于第一位置第一夹角下的第一阈值,电 子设备执行绘制笔迹的操作,可以参照上述实施例的相关描述。
S1904A,响应于检测到触控笔远离电子设备的触摸屏,检测触控笔在触摸屏上的位置,以及触控笔和触摸屏之间的夹角。
S1905A,基于触控笔在触摸屏上的第二位置,以及触控笔和触摸屏的第二夹角,查询第二位置处第二夹角下的第二阈值。
在一种实施例中,触控笔远离的触摸屏时,触控笔与触摸屏之间的第二夹角,可以与触控笔靠近触摸屏时,触控笔与触摸屏之间的第二夹角相同或者不同。
S1906A,响应于第二位置处第二夹角下的TP sensor的电容变化量小于第二位置处第二夹角下的第二阈值,停止执行绘制笔迹的操作。
S1904A-S1906A可以参照S1901A-S1903A中的相关描述。
本申请实施例中,电子设备在自学习的过程中,可以学习各位置处不同夹角下的第一阈值和第二阈值,进而在用户实际操作触控笔时,电子设备可以基于触控笔和触摸屏之间的夹角,以及各位置处该夹角下的第一阈值和第二阈值,判断电子设备是否执行绘制操作,可以提高电子设备的控制准确性。
本申请实施例提供一种笔迹绘制装置,参照图20,该笔迹绘制装置可以如如上实施例中的电子设备。该笔迹绘制装置2000可以包括:处理模块2001、存储模块2002,以及收发模块2003。其中,电子设备中包括触摸屏,所述触摸屏中包括触摸传感器TP sensor。
处理模块2001,用于响应于检测到触控笔靠近所述触摸屏,且所述TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作,以及,响应于检测到所述触控笔远离所述触摸屏,且所述TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,所述第一阈值和所述第二阈值不同。
在一种可能的实现方式中,所述第一阈值大于所述第二阈值。
在一种可能的实现方式中,所述触控笔在所述触摸屏的第一位置的第一阈值,与所述触控笔在所述触摸屏的第二位置的第一阈值不同。
在一种可能的实现方式中,处理模块2001,具体用于响应于检测到所述触控笔靠近所述触摸屏,检测所述触控笔在所述触摸屏的位置;基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第一阈值;响应于所述第一位置的TP sensor的电容变化量大于或等于所述第一位置的第一阈值,执行绘制笔迹的操作。
在一种可能的实现方式中,处理模块2001,具体用于响应于检测到所述触控笔远离所述触摸屏,检测所述触控笔在所述触摸屏的位置;基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第二阈值;响应于所述第一位置的TP sensor的电容变化量小于所述第一位置的第二阈值,停止执行绘制笔迹的操作。
在一种可能的实现方式中,所述触摸屏包括第一区域和第二区域,所述第一区域包括至少一个所述第一位置,所述第二区域包括至少一个所述第二位置。在一种可能的实现方式中,存储模块2002,用于响应于检测到所述触控笔接触所述第一位置,记录所述第一区域的第一阈值,以及响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第一阈值。
在一种可能的实现方式中,处理模块2001,具体用于将所述第一区域的第一阈值作为 所述第一位置的第一阈值。
在一种可能的实现方式中,存储模块2002,还用于响应于检测到所述触控笔接触第三位置,记录所述第三位置所属区域的第一阈值,所述第三位置位于所述第一区域和所述第二区域之外。
处理模块2001,具体用于将预设第一阈值作为所述第一位置的第一阈值。
在一种可能的实现方式中,处理模块2001,具体用于响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量;基于所述第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值。
在一种可能的实现方式中,处理模块2001,具体用于基于每个第一位置的TP sensor的电容变化量和所述第一比例,得到每个第一位置对应的第一区域的第一阈值;基于每个第一位置对应的第一区域的第一阈值,获取所述第一区域的第一阈值。
在一种可能的实现方式中,收发模块2003,用于接收来自所述触控笔的压感信号和触摸TP信号。
处理模块2001,具体用于响应于检测到所述触控笔接触所述第一位置,且所述压感信号的次数大于预设次数、所述TP信号的报点数大于预设数量,以及所述触控笔和所述触摸屏之间的夹角位于预设夹角范围内,获取所述第一位置的TP sensor的电容变化量。
在一种可能的实现方式中,存储模块2002,还用于替换或更新所述第一区域的第一阈值。
在一种可能的实现方式中,处理模块2001,用于响应于检测到所述触控笔接触所述第一位置,检测所述触控笔与所述触摸屏之间的夹角。
存储模块2002,用于基于所述触控笔与所述触摸屏之间的夹角为第一夹角,记录所述第一区域中第一夹角下的第一阈值。
处理模块2001,还用于响应于检测到所述触控笔接触所述第二位置,检测所述触控笔与所述触摸屏之间的夹角;存储模块2002,还用于基于所述触控笔与所述触摸屏之间的夹角为第二夹角,记录所述第一区域中第二夹角下的第一阈值。
在一种可能的实现方式中,处理模块2001,还用于响应于所述触控笔在所述触摸屏的第一位置,检测所述触控笔与所述触摸屏之间的夹角;基于所述触控笔与所述触摸屏之间的夹角为所述第一夹角,将所述第一区域中第一夹角下的第一阈值作为所述第一位置的第一阈值。
在一种实施例中,上述收发模块2003中用于接收来自所述触控笔的压感信号的可以为电子设备中的通信模块,如蓝牙或者WI-FI等。收发模块2003中用于接收来自所述触控笔的触摸TP信号的可以为电子设备中的TP sensor。
如上图7所示的电子设备的硬件结构图,本申请实施例中,图7中的处理器210可以用于执行上述处理模块2001执行的动作,无线接口260用于执行上述收发模块2003执行的动作。在一种实施例中,电子中可以包括存储器(图7中未示出),存储器用于执行上述存储模块2002执行的动作。如此,电子设备可以执行如上实施例中提供的笔迹绘制方法。
本申请实施例还提供一种笔迹绘制系统,该系统中包括电子设备和触控笔。电子设备可以执行上述图13、图18和图19中所示的步骤,以实现如上实施例中提供的笔迹绘制方 法。
需要说明的是,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。
另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。

Claims (18)

  1. 一种笔迹绘制方法,其特征在于,应用于电子设备,所述电子设备包括触摸屏,所述触摸屏中包括触摸传感器TP sensor,所述方法包括:
    响应于检测到触控笔靠近所述触摸屏,且所述TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作;
    响应于检测到所述触控笔远离所述触摸屏,且所述TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,所述第一阈值和所述第二阈值不同。
  2. 根据权利要求1所述的方法,其特征在于,所述第一阈值大于所述第二阈值。
  3. 根据权利要求1或2所述的方法,其特征在于,所述触控笔在所述触摸屏的第一位置的第一阈值,与所述触控笔在所述触摸屏的第二位置的第一阈值不同。
  4. 根据权利要求3所述的方法,其特征在于,所述响应于检测到触控笔靠近所述触摸屏,且所述TP sensor的电容变化量大于或等于第一阈值,执行绘制笔迹的操作,包括:
    响应于检测到所述触控笔靠近所述触摸屏,检测所述触控笔在所述触摸屏的位置;
    基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第一阈值;
    响应于所述第一位置的TP sensor的电容变化量大于或等于所述第一位置的第一阈值,执行绘制笔迹的操作。
  5. 根据权利要求3所述的方法,其特征在于,所述响应于检测到所述触控笔远离所述触摸屏,且所述TP sensor的电容变化量小于第二阈值,停止执行绘制笔迹的操作,包括:
    响应于检测到所述触控笔远离所述触摸屏,检测所述触控笔在所述触摸屏的位置;
    基于所述触控笔在所述触摸屏的所述第一位置,查询所述第一位置的第二阈值;
    响应于所述第一位置的TP sensor的电容变化量小于所述第一位置的第二阈值,停止执行绘制笔迹的操作。
  6. 根据权利要求4所述的方法,其特征在于,所述触摸屏包括第一区域和第二区域,所述第一区域包括至少一个所述第一位置,所述第二区域包括至少一个所述第二位置;所述方法还包括:
    响应于检测到所述触控笔接触所述第一位置,记录所述第一区域的第一阈值;
    响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第一阈值。
  7. 根据权利要求6所述的方法,其特征在于,所述基于所述触控笔在所述触摸屏的第一位置,查询所述第一位置的第一阈值,包括:
    将所述第一区域的第一阈值作为所述第一位置的第一阈值。
  8. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    响应于检测到所述触控笔接触第三位置,记录所述第三位置所属区域的第一阈值,所述第一位置位于所述第三位置所属区域之外;
    所述基于所述触控笔在所述触摸屏的第一位置,查询所述第一位置的第一阈值,包括:
    将预设第一阈值作为所述第一位置的第一阈值。
  9. 根据权利要求6或7所述的方法,其特征在于,所述响应于检测到所述触控笔接触所述第一位置,记录所述第一区域的第一阈值,包括:
    响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量;
    基于所述第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值。
  10. 根据权利要求9所述的方法,其特征在于,所述基于所述第一位置的TP sensor的电容变化量和第一比例,获取所述第一区域的第一阈值,包括:
    基于每个第一位置的TP sensor的电容变化量和所述第一比例,得到每个第一位置对应的第一区域的第一阈值;
    基于每个第一位置对应的第一区域的第一阈值,获取所述第一区域的第一阈值。
  11. 根据权利要求9或10所述的方法,其特征在于,所述检测到所述触控笔接触所述第一位置时,还包括:
    接收来自所述触控笔的压感信号和触摸TP信号;
    所述响应于检测到所述触控笔接触所述第一位置,获取所述第一位置的TP sensor的电容变化量,包括:
    响应于检测到所述触控笔接触所述第一位置,且所述压感信号的次数大于预设次数、所述TP信号的报点数大于预设数量,以及所述触控笔和所述触摸屏之间的夹角位于预设夹角范围内,获取所述第一位置的TP sensor的电容变化量。
  12. 根据权利要求9-11中任一项所述的方法,其特征在于,所述记录所述触摸屏的第一区域的第一阈值,包括:
    替换或更新所述第一区域的第一阈值。
  13. 根据权利要求6所述的方法,其特征在于,所述响应于检测到所述触控笔接触所述第一位置,记录所述第一区域的第一阈值,包括:
    响应于检测到所述触控笔接触所述第一位置,检测所述触控笔与所述触摸屏之间的夹角;
    基于所述触控笔与所述触摸屏之间的夹角为第一夹角,记录所述第一区域中第一夹角下的第一阈值。
  14. 根据权利要求6或13所述的方法,其特征在于,所述响应于检测到所述触控笔接触所述第二位置,记录所述第二区域的第一阈值,包括:
    响应于检测到所述触控笔接触所述第二位置,检测所述触控笔与所述触摸屏之间的夹角;
    基于所述触控笔与所述触摸屏之间的夹角为第二夹角,记录所述第一区域中第二夹角下的第一阈值。
  15. 根据权利要求13所述的方法,其特征在于,所述基于所述触控笔在所述触摸屏的第一位置,查询所述第一位置的第一阈值,包括:
    响应于所述触控笔在所述触摸屏的第一位置,检测所述触控笔与所述触摸屏之间的夹角;
    基于所述触控笔与所述触摸屏之间的夹角为所述第一夹角,将所述第一区域中第一夹角下的第一阈值作为所述第一位置的第一阈值。
  16. 一种电子设备,其特征在于,包括:处理器和存储器;
    所述存储器存储计算机执行指令;
    所述处理器执行所述存储器存储的计算机执行指令,使得所述处理器执行如权利要求 1-15中任一项所述的方法。
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序或指令,当所述计算机程序或指令被运行时,实现如权利要求1-15中任一项所述的方法。
  18. 一种计算机程序产品,包括计算机程序或指令,其特征在于,所述计算机程序或指令被处理器执行时,实现权利要求1-15中任一项所述的方法。
PCT/CN2022/087496 2021-07-02 2022-04-18 笔迹绘制方法、装置、电子设备和可读存储介质 WO2023273526A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/271,468 US20240053880A1 (en) 2021-07-02 2022-04-18 Handwriting drawing method and apparatus, electronic device, and readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110753694.6A CN115562560B (zh) 2021-07-02 2021-07-02 笔迹绘制方法、装置、电子设备和可读存储介质
CN202110753694.6 2021-07-02

Publications (2)

Publication Number Publication Date
WO2023273526A1 true WO2023273526A1 (zh) 2023-01-05
WO2023273526A9 WO2023273526A9 (zh) 2023-09-07

Family

ID=84690216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/087496 WO2023273526A1 (zh) 2021-07-02 2022-04-18 笔迹绘制方法、装置、电子设备和可读存储介质

Country Status (3)

Country Link
US (1) US20240053880A1 (zh)
CN (1) CN115562560B (zh)
WO (1) WO2023273526A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115938244B (zh) * 2023-02-20 2023-06-02 深圳市英唐数码科技有限公司 一种适配多笔形的电纸书显示方法、系统和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221955A (zh) * 2010-04-19 2011-10-19 中兴通讯股份有限公司 橡皮擦功能实现方法、移动终端及用于移动终端的触控笔
US20130257793A1 (en) * 2012-03-27 2013-10-03 Adonit Co., Ltd. Method and system of data input for an electronic device equipped with a touch screen
CN103927062A (zh) * 2013-12-24 2014-07-16 上海中航光电子有限公司 电容触摸屏的驱动检测方法、装置和电子设备
US20150185923A1 (en) * 2014-01-02 2015-07-02 Samsung Electronics Co., Ltd. Method for processing input and electronic device thereof
CN213338645U (zh) * 2020-09-29 2021-06-01 王珏 一种电容触控笔

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150185909A1 (en) * 2012-07-06 2015-07-02 Freescale Semiconductor, Inc. Method of sensing a user input to a capacitive touch sensor, a capacitive touch sensor controller, an input device and an apparatus
JP5974745B2 (ja) * 2012-09-10 2016-08-23 コニカミノルタ株式会社 タッチパネル入力装置、タッチ入力方法及びタッチ入力制御プログラム
KR101439855B1 (ko) * 2013-01-25 2014-09-17 주식회사 하이딥 터치 스크린 제어 장치 및 그의 제어 방법
CN104065792A (zh) * 2013-03-18 2014-09-24 中兴通讯股份有限公司 终端控制方法、终端控制装置及终端
JP6300027B2 (ja) * 2014-12-04 2018-03-28 アルプス電気株式会社 入力装置
KR101598412B1 (ko) * 2015-02-11 2016-02-29 주식회사 하이딥 전극 시트 및 터치 입력 장치
CN105933041B (zh) * 2016-06-28 2019-02-15 西安电子科技大学 基于CoMP的双阈值模式切换方法
CN108011659B (zh) * 2017-10-30 2024-02-09 歌尔股份有限公司 一种无人机通信方法、装置及无人机
CN112905035A (zh) * 2019-12-04 2021-06-04 北京小米移动软件有限公司 触摸屏控制方法及装置、计算机存储介质
CN111381729B (zh) * 2020-03-27 2023-04-25 深圳市鸿合创新信息技术有限责任公司 一种电容式触摸屏的触摸点定位方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102221955A (zh) * 2010-04-19 2011-10-19 中兴通讯股份有限公司 橡皮擦功能实现方法、移动终端及用于移动终端的触控笔
US20130257793A1 (en) * 2012-03-27 2013-10-03 Adonit Co., Ltd. Method and system of data input for an electronic device equipped with a touch screen
CN103927062A (zh) * 2013-12-24 2014-07-16 上海中航光电子有限公司 电容触摸屏的驱动检测方法、装置和电子设备
US20150185923A1 (en) * 2014-01-02 2015-07-02 Samsung Electronics Co., Ltd. Method for processing input and electronic device thereof
CN213338645U (zh) * 2020-09-29 2021-06-01 王珏 一种电容触控笔

Also Published As

Publication number Publication date
US20240053880A1 (en) 2024-02-15
WO2023273526A9 (zh) 2023-09-07
CN115562560B (zh) 2023-11-21
CN115562560A (zh) 2023-01-03

Similar Documents

Publication Publication Date Title
US20240094841A1 (en) Method Applied to Signal Synchronization System, System, Stylus, and Electronic Device
CN116466867B (zh) 笔迹绘制方法、装置、电子设备和可读存储介质
EP4116804A1 (en) Stylus pen and electronic device assembly
WO2023040602A1 (zh) 一种电子设备连接方法及电子设备
WO2023273526A1 (zh) 笔迹绘制方法、装置、电子设备和可读存储介质
WO2023082768A1 (zh) 功能模式切换方法、电子设备及系统
WO2023134408A9 (zh) 一种信息传输方法和装置
WO2023020022A1 (zh) 一种触控笔的连接方法及电子设备
CN116088695B (zh) 系统升级方法及相关装置
CN116736989A (zh) 触控笔及其控制方法

Legal Events

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

Ref document number: 22831357

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18271468

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2022831357

Country of ref document: EP

Effective date: 20230712

122 Ep: pct application non-entry in european phase

Ref document number: 22831357

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE