WO2024087816A1 - 一种防误触方法及设备 - Google Patents

一种防误触方法及设备 Download PDF

Info

Publication number
WO2024087816A1
WO2024087816A1 PCT/CN2023/113324 CN2023113324W WO2024087816A1 WO 2024087816 A1 WO2024087816 A1 WO 2024087816A1 CN 2023113324 W CN2023113324 W CN 2023113324W WO 2024087816 A1 WO2024087816 A1 WO 2024087816A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
stylus
user
tablet computer
touch screen
Prior art date
Application number
PCT/CN2023/113324
Other languages
English (en)
French (fr)
Inventor
刘耀冲
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024087816A1 publication Critical patent/WO2024087816A1/zh

Links

Classifications

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

Definitions

  • the present application relates to the field of touch control, and in particular to a method and device for preventing accidental touches.
  • the touch screen can determine the location of the stylus based on the signal from the stylus. Therefore, the electronic device can distinguish whether the current touch is from the stylus or the user's hand.
  • the electronic device can prevent accidental touches from the user's hand.
  • a threshold value of the pen tip signal is usually set for preventing accidental touches. If the pen tip signal is detected to exceed the threshold value, the anti-accidental touch mode is entered, and the touch point of the hand on the touch screen is not reported.
  • the detection of the pen tip signal by the electronic device is easily affected by environmental interference. For example, if the electronic device is placed on a conductive material or a non-conductive material, the pen tip signal detected by the electronic device may be different. If a fixed anti-accidental touch threshold is used, the electronic device may have inaccurate anti-accidental touch when the user writes with a stylus in different external environments.
  • the embodiments of the present application provide a method and device for preventing accidental touches, which are used to solve the problem that when a fixed accidental touch prevention threshold is used, an electronic device may have inaccurate prevention of accidental touches when a user writes with a stylus in different external environments.
  • a method for preventing accidental touches is provided, the method being applied to an electronic device, the electronic device including a touch screen.
  • the method comprises:
  • the electronic device periodically detects the first pen tip signal of the stylus on the touch screen; wherein the first pen tip signal is used to indicate the pen tip signal strength of the stylus.
  • the electronic device can determine whether the stylus is in the first state based on the first pen tip signal. If so, the electronic device obtains the vertical distance between the first position of the stylus tip and the touch screen; wherein the first state includes the state in which the user holds the stylus and hovers above the touch screen, and the stylus is not writing on the touch screen. Then, the electronic device determines the anti-false touch threshold value of the stylus corresponding to the vertical distance; wherein the vertical distances within different value ranges correspond to different anti-false touch threshold values.
  • the electronic device When the electronic device detects that the first pen tip signal is greater than or equal to the anti-false touch threshold value, it enters the anti-false touch mode; wherein, in the anti-false touch mode, the electronic device does not report the touch information of the first contact point detected between the user's hand and the touch screen.
  • the tablet detects the pen tip signal quantity during the anti-false touch process and is affected by the environment. Since the anti-false touch threshold value is also determined in real time in combination with the current environment, the selection of the anti-false touch threshold value has taken the influence of the current environment into consideration. The dynamically determined anti-false touch threshold value is more in line with the current environment. Using the anti-false touch threshold value as the threshold for entering the anti-false touch mode can reduce the inaccuracy of anti-false touch caused by the environment.
  • the electronic device determines the stylus anti-mistouch threshold value corresponding to the vertical distance, which may specifically include: the electronic device obtains the standard pen tip signal corresponding to the vertical distance, and uses the standard pen tip signal as the stylus anti-mistouch threshold value. Among them, the electronic device pre-stores multiple vertical distances and the standard pen tip signal corresponding to each vertical distance. In this embodiment, when determining the anti-mistouch threshold value, the electronic device can directly look up the standard signal corresponding to the vertical distance as the anti-mistouch threshold value, which can improve the efficiency of determining the anti-mistouch threshold value.
  • the electronic device obtains the vertical distance between the first position of the stylus tip and the touch screen, which may specifically include: the electronic device obtains the first angle between the stylus and the touch screen and the second angle between the stylus and the geographic horizontal line in the second state of the stylus; wherein the second state includes the state of the stylus being held by the user and writing on the touch screen; the electronic device calculates the difference between the first angle and the second angle to obtain the compensation angle between the touch screen and the geographic horizontal line.
  • the electronic device obtains the third angle between the stylus and the geographic horizontal line in the first state; and obtains the second contact point closest to the stylus tip among the contact points between the stylus and the user's hand when the user holds the stylus, and the holding distance between the corresponding position of the second contact point and the stylus tip; the electronic device calculates the vertical distance based on the first angle, the third angle, the compensation angle and the holding distance.
  • the electronic device obtains multiple angles and holding distances when the stylus is in the first state and the second state, respectively, and calculates the vertical distance through the obtained multiple angles and holding distances. Since the vertical distance is obtained by converting the measured angle, distance and other information, the vertical distance is less affected by the external environment. In this way, when the electronic device determines the anti-false touch threshold value according to the vertical distance, it can reduce the interference of the external environment, select a more accurate anti-false touch threshold value, and thus improve the accuracy of anti-false touch.
  • the electronic device calculates the vertical distance based on the first angle, the third angle, the compensation angle and the pen holding distance, which may specifically include: the electronic device sums the third angle and the compensation angle to obtain the fourth angle; the electronic device multiplies the cosine value of the fourth angle and the pen holding distance to obtain the first distance; the electronic device subtracts the first angle and the fourth angle to obtain the fifth angle; the electronic device multiplies the tangent value of the fifth angle and the first distance to obtain the second distance; the vertical distance includes the second distance.
  • the vertical distance between the pen tip and the touch screen of the stylus in the first state is calculated by converting the pen holding distance in combination with the trigonometric function relationship.
  • a plurality of preset mapping relationship tables are stored in the electronic device, and each preset mapping relationship table stores a plurality of vertical distances of the electronic device under a preset environment and a standard pen tip signal corresponding to each vertical distance; the preset environment includes at least one of the following: whether the electronic device is being charged, whether the touch screen has a film, and the type of film on the touch screen.
  • the method further includes: the electronic device obtains a charging state of the electronic device; wherein the charging state includes a charging state or an uncharged state.
  • the electronic device obtains a second pen tip signal when the stylus is in a second state; wherein the second state includes a state where a user is holding the stylus and writing on the touch screen; the stylus is in a second state In the state, when the touch screen is in the film-applied state and the film-unapplied state, the pen tip signal amount collected by the electronic device is different; when the touch screen is attached with different types of films, the pen tip signal amount collected by the electronic device is different.
  • the electronic device combines the charging state and the second pen tip signal amount to select a target mapping relationship table that matches the current environment from multiple preset mapping relationship tables. In this embodiment, the electronic device selects the most matching preset mapping relationship table as the target preset mapping relationship table according to the current environment. In this way, the influence of the environment on the pen tip signal amount detected by the electronic device can be reduced, so that a more accurate anti-mistouch threshold value can be determined.
  • the above method also includes: the electronic device responds to the first event and re-selects the target mapping relationship table that matches the current environment from multiple preset mapping relationship tables; wherein the first event includes at least one of the following: the charging state of the electronic device is updated, the electronic device is awakened from sleep, the electronic device is restarted, or the electronic device receives a mapping relationship reset instruction.
  • a preset mapping relationship table that matches the environment at the current time is selected to determine the anti-false touch threshold value, which can reduce the impact of environmental factors on the selection of the anti-false touch threshold value and make the anti-false touch more accurate.
  • the method further includes: the electronic device sets the electronic device's anti-mistouch flag to a first flag; wherein, when the electronic device detects that the first pen tip signal is greater than or equal to the anti-mistouch threshold value, if the anti-mistouch flag is detected to be the first flag, the electronic device enters the anti-mistouch mode.
  • the electronic device enters the anti-mistouch mode only after detecting that the pen tip signal is greater than the anti-mistouch threshold value when the anti-mistouch flag is the first flag. In this way, unnecessary anti-mistouch is avoided.
  • the above method further includes: if the electronic device detects that the moving distance of the electronic device is greater than a preset threshold, the electronic device sets the anti-false touch flag to the second flag; wherein, when the electronic device detects that the first pen tip signal is greater than or equal to the anti-false touch threshold value, if the anti-false touch flag is detected to be the second flag, the electronic device does not enter the anti-false touch mode. In this way, it is possible to avoid the change of the compensation angle due to the movement of the electronic device, thereby preventing the previously determined anti-false touch threshold value from being inaccurate, and avoiding inaccurate anti-false touch.
  • the above method also includes: the electronic device obtains the user writing characteristics when the user uses the stylus to perform writing operations, and stores the user writing characteristics in correspondence with the user's anti-mistouch threshold value as a user characteristic table.
  • the user writing characteristics include at least one of the following: the contact area between the user's hand and the touch screen when the user uses the stylus to perform writing operations, and the holding distance between the corresponding position of the second contact point of the user's hand and the stylus and the pen tip.
  • the electronic device can determine whether the current user is a historical user through the stored user writing characteristics. Thereby, the anti-mistouch threshold value corresponding to the user can be quickly read to prevent mistouch.
  • the method further includes: when the electronic device detects the user's writing features to be matched, it searches the user feature table for the existence of the user's writing features to be matched; if so, the electronic device obtains the anti-false touch threshold value corresponding to the user's writing features to be matched from the user feature table as the user's initial anti-false touch threshold value.
  • the initial anti-false touch threshold value is used by the electronic device to adjust the initial anti-false touch threshold value in real time according to the vertical distance of the stylus in the first state and the standard pen tip signal.
  • the method can only realize the use of the dynamically determined anti-false touch threshold value to prevent false touches after the user starts writing with the stylus and the electronic device has learned.
  • the initial anti-false touch threshold value of the user read before the electronic device completes learning can be used to prevent false touches. This avoids false touches by the user's hand when writing before the electronic device completes learning.
  • the electronic device determines that the stylus is in the first state based on the first pen tip signal, which may specifically include: the electronic device detects n second events, detects the moment when the first pen tip signal is the smallest, and determines that the stylus is in the first state at the moment when the first pen tip signal is the smallest.
  • the second event is used to indicate that the first pen tip signal changes from large to small, and then from small to large.
  • the pen tip signal changes from large to small corresponding to the process of the user lifting the pen, and the pen tip signal changes from small to large corresponding to the process of the user putting the pen down.
  • the electronic device selects the moment when the pen tip signal is the smallest between the user lifting the pen and putting the pen down as the moment when the stylus is in the first state, and then selects the corresponding anti-false touch threshold value according to the vertical distance between the pen tip and the touch screen in the first state. In this way, the influence of the environment on the selection of the anti-false touch threshold value can be reduced, and the accuracy of anti-false touch can be improved.
  • an electronic device comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to enable the electronic device to perform an anti-mistouch method as described in any one of the first aspects above.
  • a computer-readable storage medium wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer can execute any one of the methods for preventing accidental touches in the first aspect.
  • a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute any one of the methods for preventing accidental touches according to the first aspect.
  • a device for example, the device may be a chip system
  • the device including a processor for supporting an electronic device to implement the functions involved in the first aspect above.
  • the device also includes a memory for storing program instructions and data necessary for the electronic device.
  • the device is a chip system, it may be composed of a chip, or may include a chip and other discrete devices.
  • the technical effects brought about by any design method in the second to fifth aspects can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
  • FIG1A is a schematic diagram of a scenario provided in an embodiment of the present application.
  • FIG1B is a schematic diagram of another scenario provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of hardware interaction between a stylus pen and a tablet computer provided in an embodiment of the present application
  • FIG4 is a schematic diagram of a flow chart of a method for preventing accidental touches provided in an embodiment of the present application
  • FIG5 is a schematic diagram of a flow chart of another method for preventing accidental touches provided in an embodiment of the present application.
  • FIG6A is a schematic diagram of a stylus provided in an embodiment of the present application in a second state
  • FIG6B is a schematic diagram of a stylus provided in an embodiment of the present application in a first state
  • FIG6C is a schematic diagram of a user holding a stylus provided in an embodiment of the present application.
  • FIG6D is a schematic diagram of a sensor of a stylus pen detecting a user's hand provided by an embodiment of the present application
  • FIG6E is a simplified schematic diagram corresponding to a stylus in a second state provided by an embodiment of the present application.
  • FIG6F is a simplified schematic diagram corresponding to a stylus provided in an embodiment of the present application when the stylus is in a first state;
  • FIG7A is a schematic diagram of a flow chart of another method for preventing accidental touches provided in an embodiment of the present application.
  • FIG7B is a schematic diagram of the structure of a touch screen provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of a chip system provided in an embodiment of the present application.
  • many electronic devices such as tablet computers and mobile phones, include touch screens, and all support writing operations on the touch screen by fingers and styluses.
  • the above electronic devices can be mobile phones, tablet computers, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (ultra-mobile personal computers, UMPCs), netbooks, as well as cellular phones, personal digital assistants (personal digital assistants, PDAs), augmented reality (augmented reality, AR) and virtual reality (virtual reality, VR) devices, media players, televisions and other devices.
  • PDAs personal digital assistants
  • augmented reality augmented reality
  • VR virtual reality
  • a user uses a stylus pen 2 to write on the touch screen 11 of the tablet computer 1.
  • the palm of the user usually touches the touch screen before writing, and at this time, the tip of the pen is still a short distance away from the touch screen, as shown in FIG1B .
  • the touch screen of the tablet computer 1 may be accidentally touched by the palm, causing unnecessary operations. In this case, the tablet computer 1 may be accidentally touched by the user's hand.
  • one type of stylus 2 is an active stylus.
  • the active stylus adopts an electronic circuit structure, the pen tip transmits a high-frequency signal, and the touch screen receives the high-frequency signal transmitted by the pen tip, thereby knowing the coordinates of the active stylus on the screen. Since the tablet computer 1 detects the coordinates of the active stylus tip by detecting the high-frequency signal emitted by the pen tip of the active stylus, if the user uses the active stylus to write on the touch screen, the tablet computer 1 can distinguish between the touch point of the active stylus and the touch point of the user's hand. In this way, when the user uses the active stylus to write on the touch screen, the tablet computer 1 can not report the touch point in some scenes when detecting the signal of the user's hand touching the touch screen, thereby avoiding accidental touch of the user's hand.
  • a short-range wireless communication connection is also established between the tablet computer 1 and the stylus 2.
  • the tablet computer 1 can obtain information about the stylus 2 from the stylus 2, such as the angle between the stylus 2 and the geographic horizontal line detected by the stylus 2, and the contact information between the user's hand and the stylus 2 detected by the stylus 2, etc.
  • the short-range wireless communication connection can be any one of a Bluetooth connection, a wireless fidelity (Wi-Fi) connection, a near field communication (NFC) connection, etc.
  • a fixed threshold value of the pen tip signal for preventing accidental touches is usually set. If the pen tip signal is detected to exceed the threshold value, the anti-accidental touch mode is entered, and the touch point of the hand on the touch screen is not reported.
  • the detection of the pen tip signal by the tablet computer 1 is easily affected by environmental interference. For example, if the tablet computer 1 is placed on a conductive material or a non-conductive material, the pen tip signal detected by the tablet computer 1 may be different. If a fixed anti-accidental touch threshold value is used, the tablet computer 1 may have inaccurate anti-accidental touch when the user writes with the stylus 2 in different external environments.
  • the present application proposes an anti-mistouch method, which is applied to an electronic device, such as a tablet computer 1 as shown in FIG1A.
  • the tablet computer 1 obtains the vertical distance (ds as shown in FIG1B) between the tip of the stylus 2 and the touch screen when the user holds the stylus 2 above the touch screen of the tablet computer 1 and the stylus 2 is not writing on the touch screen.
  • the tablet computer 1 determines the corresponding anti-mistouch threshold value of the stylus according to the vertical distance. That is,
  • the false touch prevention threshold is set to a value dynamically determined according to the vertical distance between the pen tip and the touch screen. In this way, the tablet computer 1 can determine different false touch prevention thresholds according to the vertical distance in different environments, thereby avoiding the problem of inaccurate false touch prevention caused by environmental interference.
  • FIG. 2 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application.
  • the electronic device 100 may be the tablet computer 1 shown in FIG. 1A above.
  • the electronic device 100 may include a processor 110, an internal memory 120, a universal serial bus (USB) interface 130, a charging management module 140, a battery 141, a wireless charging coil 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, a button 190, a camera 191, and a display screen 192, etc.
  • USB universal serial bus
  • the sensor module 180 may include an acceleration sensor, a distance sensor, a touch sensor, and the like.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc.
  • different processing units may be independent devices or integrated in one or more processors.
  • the processor 110 may be an application processor AP.
  • the controller may be the nerve center and command center of the electronic device 100.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a USB interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices or mobile terminals, such as AR devices, etc.
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100.
  • the electronic device 100 may also be Different interface connection modes in the above embodiments may be adopted, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the electronic device 100 may support wired charging.
  • the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
  • the electronic device 100 may support wireless charging.
  • the charging management module 140 can also power the electronic device 100 while charging the battery 141.
  • the charging management module 140 receives input from the battery 141 and powers the processor 110, the internal memory 120, the external memory, the display screen 192, the camera 191, and the wireless communication module 160.
  • the charging management module 140 can also be used to monitor the battery capacity, battery cycle number, battery health status (leakage, impedance) and other parameters of the battery 141.
  • the charging management module 140 can also be set in the processor 110.
  • the wireless charging coil 142 of the electronic device 100 is used to wirelessly charge the stylus.
  • the wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 100.
  • the wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared technology (IR), etc., applied to the electronic device 100.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC infrared technology
  • IR infrared technology
  • the electronic device 100 implements the display function through a GPU, a display screen 192, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 192 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 192 is used to display images, videos, etc.
  • the display screen 192 includes a display panel.
  • the electronic device 100 may include 1 or N display screens 192, where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 191, the video codec, the GPU, the display screen 192 and the application processor.
  • the ISP is used to process the data fed back by the camera 191.
  • the ISP can be set in the camera 191.
  • the camera 191 is used to capture a still image or a video.
  • the electronic device 100 can include 1 or N cameras 191, where N is a positive integer greater than 1.
  • the internal memory 120 may be used to store computer executable program codes, which may include instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120.
  • the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the electronic device 100 can implement audio functions such as music playing and recording through the audio module 170 and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 may be a mechanical key or a touch key.
  • the electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
  • FIG3 is a hardware interaction diagram of a stylus 2 and a tablet computer 1 provided in an embodiment of the present application.
  • the stylus 2 may include: a micro controller unit (MCU) 301, a first communication module 302, a coding chip 303, a sensor 304, a charging module 305 and a battery 306.
  • the sensor 304 may include but is not limited to a pressure sensor 314 and an acceleration sensor 324.
  • the tablet computer 1 may include a touch panel 307 and a second communication module 308.
  • the touch panel 307 may further include a touch sensor (TP sensor) 317 and a touch microelectronic device (IC) chip 327.
  • TP sensor touch sensor
  • IC touch microelectronic device
  • the first communication module 302 in the stylus pen 2 and the second communication module 308 in the tablet computer 1 may be wireless local area network (such as Wi-Fi network) modules, Bluetooth modules or near field communication NFC modules and other wireless communication modules, which are not limited in the embodiments of the present application. It should be understood that the stylus pen 2 and the tablet computer 1 can establish a wireless path through the first communication module 302 and the second communication module 308. Exemplarily, a Bluetooth path can be established between the stylus pen 2 and the tablet computer 1, and the Bluetooth path can be used to transmit information between the stylus pen 2 and the tablet computer 1, such as transmission of configuration parameters, pressure signals, etc. Among them, the configuration parameters are used to instruct the stylus pen 2 to send a coding signal according to a certain rule. Among them, the coding signal can be used by the tablet computer 1 to determine the position of the tip of the stylus pen 2 on the touch screen of the tablet computer 1 (which can be referred to as the tip position).
  • the touch sensor 317 in the tablet computer 1 is composed of an electrode array, which includes a plurality of electrodes arranged in rows and columns.
  • the coding chip 303 in the stylus pen 2 is arranged at the tip of the pen, and the coding chip 303 includes electrodes for sending and receiving signals.
  • the tip of the stylus pen 2 and the touch sensor 317 in the tablet computer 1 can establish a circuit connection through the capacitor.
  • the stylus pen 2 and the tablet computer 1 can exchange signals through the circuit path.
  • the touch sensor 317 in the tablet computer 1 can send an uplink signal to the stylus pen 2 through the circuit path.
  • the coding chip 303 in the stylus pen 2 can send a coding signal to the tablet computer 1 through the circuit path.
  • the coding signal and the uplink signal are usually square wave signals.
  • the touch sensor 317 in the tablet computer 1 is used to collect touch information, which may include: information about the stylus 2 touching the screen of the tablet computer 1 and information about the user (such as the user's finger or knuckle, etc.) touching the screen.
  • the touch information mainly refers to the information of the touch operation of the stylus 2 tip on the screen, such as a coding signal, and the touch IC chip 327 can determine the touch position based on the touch information collected by the touch sensor 317.
  • the coding chip 303 can receive The uplink signal sent by the tablet computer 1. Then, the signal (such as the coding signal) sent by the coding chip 303 to the touch sensor 317 in the tablet computer 1 through the circuit path will cause the change in the capacitance sampling value of each electrode in the electrode array of the touch sensor 317 to change, and the closer the tip of the stylus 2 is to the electrode, the greater the change in its capacitance sampling value.
  • the touch IC chip 327 in the screen can determine the touch position based on the change in the capacitance sampling value of each electrode in the electrode array of the touch sensor 317.
  • the touch IC chip 327 can use the position where the change in the capacitance sampling value on the touch sensor 317 is the largest as the position of the stylus 2 on the screen.
  • determining the touch position according to the change in the capacitance sampling value in the touch screen please refer to the description in the relevant prior art, which will not be elaborated in this article.
  • the pressure sensor 314 in the stylus pen 2 can be set at the tip of the stylus pen 2 to collect the pressure signal of the tip. For example, when the tip of the stylus pen 2 contacts the screen of the tablet computer 1, the pressure sensor 314 can collect the pressure signal generated by the screen squeezing the tip of the stylus pen.
  • the stylus pen 2 can send the pressure signal to the tablet computer 1 through a wireless channel. This makes it easier for the tablet computer 1 to determine the touch pressure.
  • the acceleration sensor 324 in the stylus 2 can be used to collect the three-axis acceleration value of the stylus 2, and the three-axis acceleration value includes: the acceleration value on the X-axis, the acceleration value on the Y-axis, and the acceleration value on the Z-axis.
  • the acceleration sensor 324 can also send the three-axis acceleration value to the MCU 301. In this way, the MCU 301 can obtain information such as the inclination angle and the motion state of the stylus 2 based on the three-axis acceleration value.
  • the motion state is used to characterize whether the stylus 2 is in a static state or a non-static state.
  • the MCU 301 can also be used to control the operation of the corresponding components in the stylus 2 based on the acceleration value collected by the acceleration sensor 324.
  • the MCU 301 determines that the stylus 2 is in a flat state, and the MCU 301 can control the coding chip 303, the pressure sensor 314, etc. to stop working. Thereby, the power consumption of the stylus 2 can be reduced.
  • the charging module 305 in the stylus 2 can be used to receive charging input to charge the battery 306 in the stylus 2.
  • the charging module 305 can be used to power components (such as the MCU 301) in the tablet computer 1.
  • the methods for preventing accidental touches provided in the following embodiments can all be implemented in the electronic device 100 having the above hardware structure.
  • the present application provides an anti-mistouch method, which is applied to a tablet computer 1.
  • a user uses a stylus pen 2 to write on the touch screen of the tablet computer 1, the user's hand may touch the touch screen before the pen is put down, resulting in a scenario where the touch screen is accidentally touched.
  • the anti-mistouch method provided by the present application detects the pen tip signal of the stylus pen 2 in real time through the tablet computer 1, and determines the current position of the pen tip according to the pen tip signal. In this way, the tablet computer 1 can detect the first state in which the user holds the stylus pen 2 and hovers above the touch screen, and the stylus pen 2 is not writing on the touch screen, in combination with the pen tip signal.
  • the tablet computer 1 can obtain the vertical distance between the pen tip of the stylus pen 2 and the touch screen in the first state, and determine the anti-mistouch threshold value corresponding to the vertical distance. Afterwards, when the tablet computer 1 detects that the pen tip signal of the stylus pen 2 is greater than or equal to the anti-mistouch threshold value, it indicates that the vertical distance between the pen tip of the stylus pen 2 and the touch screen is small, and at this time, the tablet computer 1 can enter the anti-mistouch mode. In this anti-mistouch mode, the tablet computer 1 will not report the touch information of the first contact point detected between the user's hand and the touch screen.
  • the tablet computer 1 will detect the tip signal of the stylus 2 in real time, thereby dynamically refreshing the anti-mistouch threshold value.
  • the false-touch prevention threshold value determined by the computer 1 will also be different accordingly, which can avoid the problem of inaccurate false-touch prevention caused by environmental interference.
  • An acceleration sensor is a sensor that can measure acceleration. It is usually composed of a mass block, a damper, an elastic element, a sensitive element, and an adaptive circuit. During the acceleration process, the sensor measures the inertial force on the mass block and obtains the acceleration value using Newton's second law. Depending on the different sensitive elements of the sensor, common acceleration sensors include capacitive, inductive, strain, piezoresistive, piezoelectric, etc.
  • the stylus 2 includes a G-sensor, and the angle between the stylus 2 and the geographic horizontal line can be calculated by the G-sensor.
  • the tablet computer 1 includes a G-sensor, and the tablet computer 1 can obtain whether the tablet computer 1 moves through the G-sensor, and calculate the moving distance of the tablet computer 1.
  • a touch sensor is a device that captures and records physical touch on a device and/or an object, which enables the device or object to detect touch, usually by a user.
  • a touch sensor may also be referred to as a touch detector.
  • the body of the stylus 2 is provided with one or more touch sensors for detecting the contact point between the user's hand and the body of the stylus, and the stylus 2 can determine the position of the contact point between the user's hand and the body of the stylus in combination with the setting position of the touch sensor in the stylus 2.
  • the stylus 2 further includes an antenna 1 and an antenna 2.
  • the antenna 1 and the antenna 2 are respectively arranged at two positions, namely, the tip and the body of the stylus 2.
  • the tablet computer 1 can respectively obtain the vertical projection positions of the antenna 1 and the antenna 2 of the stylus 2 on the touch screen of the tablet computer 1, and calculate the distance between the vertical projection positions of the antenna 1 and the antenna 2 of the stylus 2 on the touch screen, and the setting positions of the antenna 1 and the antenna 2 in the stylus 2, and then calculate the angle between the body of the stylus 2 and the touch screen.
  • the setting positions of the antenna 1 and the antenna 2 in the stylus 2 can be pre-stored in the stylus 2; the tablet computer 1 can obtain the setting positions of the antenna 1 and the antenna 2 from the stylus 2.
  • FIG4 is a flow chart of a method for preventing accidental touches provided in an embodiment of the present application.
  • the method includes S401-S405. Among them:
  • the tablet computer 1 periodically detects a first pen tip signal of the stylus 2 on the touch screen.
  • the first pen tip signal of the stylus pen 2 is used to indicate the pen tip signal strength of the stylus pen 2.
  • the electronic device that supports the stylus pen 2 to perform writing operations on the touch screen it will periodically detect the pen tip signal of the stylus pen 2.
  • the tablet computer 1 can detect the pen tip signal emitted by the pen tip of the stylus pen 2.
  • the tablet computer 1 can detect the first pen tip signal of the stylus pen 2 at every preset time period; wherein the preset time period can be set according to actual conditions.
  • the preset time period can be 2 milliseconds (ms), 5ms, etc.
  • the stylus 2 may send a tip signal via an antenna disposed at the tip of the stylus 2. After detecting the tip signal sent by the antenna disposed at the tip of the stylus 2, the tablet computer 1 may detect the tip signal strength of the tip signal, that is, the first tip signal amount.
  • the tablet computer 1 can detect the signal emitted by the tip of the stylus 2 and the strength of the tip signal, that is, the first tip signal amount, through a touch sensor disposed on the touch screen.
  • the tablet computer 1 detects the tip signal of the stylus pen 2
  • the tip of the stylus pen 2 is at a distance from the tablet computer. 1, the stronger the pen tip signal of the stylus 2 detected by the tablet computer 1; the farther the pen tip is from the touch screen, the weaker the pen tip signal detected by the tablet computer 1.
  • the tablet computer 1 After the distance between the pen tip of the stylus 2 and the touch screen is greater than a certain value, the tablet computer 1 will no longer be able to detect the signal emitted by the pen tip of the stylus 2. It can be determined that the tablet computer 1 can judge the distance between the stylus 2 and the touch screen based on the first pen tip signal currently detected. The tablet computer 1 can also judge the movement trend of the stylus 2 based on the change of the first pen tip signal detected.
  • the tablet computer 1 when the tablet computer 1 detects that the first pen tip signal is gradually increasing, it can be judged that the pen tip of the stylus 2 is gradually approaching the touch screen; when the first pen tip signal is detected to be gradually decreasing, it can be judged that the pen tip of the stylus 2 is gradually moving away from the touch screen. In some embodiments, the tablet computer 1 can determine whether the stylus 2 is in a specific state in combination with the first pen tip signal.
  • the tablet computer 1 determines whether the stylus pen 2 is in the first state according to the first pen tip signal.
  • the first state includes a state in which a user holds a stylus pen and hovers above the touch screen of the tablet computer 1 , and the stylus pen does not write on the touch screen.
  • S402 may specifically be that the tablet computer 1 detects whether the first pen tip signal amount becomes the minimum in n second events to determine whether the stylus 2 is in the first state.
  • the tablet computer 1 determines that the stylus 2 is in the first state when the first pen tip signal amount is detected to be the minimum.
  • n is a natural number greater than 1.
  • the second event is used to indicate that the tablet computer 1 detects that the first pen tip signal amount changes from large to small, and then changes from small to large.
  • the second event can be the process of the user holding the stylus 2 to write on the touch screen of the tablet computer 1, lifting the pen tip and then dropping the pen tip.
  • the pen tip signal detected by the tablet computer 1 will be the smallest.
  • the user may lift the pen tip to a position where the tablet computer 1 cannot detect the pen tip signal, stop, and then put down the pen, that is, the pen tip is far away from the touch screen.
  • the above-mentioned first state may correspond to the process in which the pen tip signal changes from large to small and then from small to large (i.e., the second event), and the minimum pen tip signal may refer to the pen tip signal becoming 0.
  • the user may not reduce the pen tip signal to 0 during the process of lifting and putting down the pen. At this time, the moment when the tablet computer 1 detects the minimum pen tip signal during the process from the user lifting the pen to putting down the pen (i.e., the second event) can be taken to determine the moment when the stylus 2 is in the first state.
  • the user uses the stylus pen 2 to write on the touch screen of the tablet computer 1, the user usually lifts up the pen tip and puts it down repeatedly. Therefore, when the tablet computer 1 detects n second events, it can be the process of the user using the stylus pen 2 to write continuously on the touch screen.
  • the tablet computer 1 determines that the stylus 2 is not in the first state according to the first pen tip signal, the tablet computer 1 returns to execute S401 and continues to detect the first pen tip signal. If the tablet computer 1 determines that the stylus 2 is in the first state according to the first pen tip signal, the tablet computer 1 may execute S403.
  • the tablet computer 1 obtains the vertical distance between the first position of the stylus tip and the touch screen.
  • the first position indicates the position of the stylus tip in the first state.
  • the vertical distance between the first position and the touch screen can specifically be obtained by vertically projecting the first position onto the touch screen to obtain a first vertical projection point, and obtaining the distance between the position corresponding to the first vertical projection point and the first position.
  • the vertical distance between them may be ds as shown in FIG1B .
  • the vertical distance may also be referred to as the levitation height of the tip of the stylus pen 2 in the first state.
  • the tip of the stylus 2 is provided with an antenna.
  • the antenna periodically sends out a signal, and the tablet computer 1 can receive the signal sent by the antenna of the pen tip.
  • the touch IC chip of the tablet computer 1 can determine the position of the pen tip based on the signal. Afterwards, the tablet computer 1 projects the position of the pen tip vertically onto the touch screen, i.e., the first vertical projection point mentioned above.
  • the state of lifting the pen and putting down the pen may not be completely consistent.
  • the farthest position of the pen tip from the touch screen between the user lifting the pen for the first time and putting down the pen is X1
  • the farthest position of the pen tip from the touch screen between the user lifting the pen for the second time and putting down the pen is X2
  • the tablet computer 1 when the tablet computer 1 detects n second events, when multiple first states are detected within a first preset time period, the vertical distances between the first positions corresponding to the multiple first states and the touch screen can be obtained, and the average value between the vertical distances is calculated as the vertical distance used for determining the anti-false touch threshold value later.
  • the tablet computer 1 may obtain the vertical distance from the stylus 2.
  • the stylus 2 may determine the vertical distance between the first position and the touch screen by any commonly used method for measuring distance.
  • the tablet computer 1 may calculate the vertical distance in combination with parameters related to the state of the user holding the stylus 2 in the first state.
  • the tablet computer 1 may calculate the vertical distance in combination with the holding distance between the first contact point and the pen tip, the angle between the stylus 2 and the geographic horizontal line, and the angle between the stylus 2 and the touch screen.
  • the above S403 may specifically include S501-S506.
  • the tablet computer 1 obtains a first angle between the stylus 2 and the touch screen, and a second angle between the stylus 2 and a geographic horizontal line when the stylus is in the second state.
  • the second state includes a state where the user holds the stylus pen and writes on the touch screen.
  • the second state refers to a state where the tip of the stylus pen 2 is on the touch screen.
  • FIG6A shows that the stylus pen 2 is in the second state.
  • the first angle between the stylus pen 2 and the touch screen can be measured by a device in the tablet computer 1.
  • a first antenna 61 is provided at the tip of the stylus pen 2
  • a second antenna 62 is provided at the body of the stylus pen 2.
  • the tablet computer 1 detects a first vertical projection point 63 of a signal transmitted by the first antenna on the touch screen and a second vertical projection point 64 of a signal transmitted by the second antenna on the touch screen.
  • the tablet computer 1 can determine a first angle 65 between the stylus pen 2 and the touch screen based on a distance L between the first vertical projection point 63 and the second vertical projection point 64, and a distance M between the locations where the first antenna and the second antenna are set.
  • the second angle between the stylus 2 and the geographic horizontal line can be measured by the device in the stylus 2.
  • the tablet computer 1 obtains the second angle from the stylus 2.
  • a G-sensor is installed in the stylus 2 to measure the second angle between the stylus 2 and the geographic horizontal line.
  • the specific process of the stylus 2 calculating the above-mentioned second angle through the G-sensor can refer to the description in the relevant technology, and will not be repeated in the embodiment of the present application. For example, please continue to refer to Figure 6A, in which the angle between the stylus 2 and the geographic horizontal line 60 is recorded as the second angle 66.
  • the tablet computer 1 calculates the difference between the first angle and the second angle to obtain a compensation angle between the touch screen and the geographic horizontal line.
  • the difference between the first angle and the second angle is the compensation angle 67 shown in FIG6A.
  • the compensation angle 67 represents the angle between the touch screen of the tablet computer 1 and the geographic horizontal line.
  • the user does not necessarily place the tablet computer 1 horizontally on a plane parallel to the geographic horizon. Therefore, when calculating the vertical distance between the pen tip and the touch screen, the angle between the tablet computer 1 and the geographic horizon, that is, the compensation angle, needs to be taken into account.
  • the compensation angle in the embodiment of the present application is the angle between the touch screen of the tablet computer 1 and the geographic horizontal line
  • the compensation angle may also change if the tablet computer 1 moves.
  • the tablet computer 1 detects that the moving distance of the tablet computer 1 is greater than a preset threshold
  • the tablet computer 1 executes S501 and S502 to recalculate the compensation angle.
  • the tablet computer 1 obtains a third angle between the stylus pen 2 and the geographic horizontal line in the first state.
  • the first state refers to the state where the stylus 2 is above the touch screen and the stylus 2 is not writing.
  • the angle between the stylus 2 and the geographic horizon is usually different from the angle between the stylus 2 and the geographic horizon in the second state. Therefore, the tablet computer 1 needs to obtain the angle between the stylus 2 and the geographic horizon in the first state and the second state, that is, the third angle and the second angle.
  • the third angle is recorded as 68.
  • the tablet computer 1 obtains a second contact point, among the contact points between the stylus pen 2 and the user's hand, which is closest to the tip of the stylus pen 2 when the user holds the stylus pen 2 .
  • the hand When the user uses the stylus 2, the hand needs to hold the stylus 2, that is, there is a contact point between the user's hand and the stylus 2. In addition, there may be multiple contact points between the user's hand and the stylus 2. In the embodiment of the present application, a contact point closest to the pen tip is selected from the multiple contact points between the user's hand and the stylus 2, that is, the second contact point.
  • the tablet computer 1 can obtain information of the second contact point from the stylus 2.
  • the contact information may include the contact position, contact area, etc. of the second contact point.
  • the stylus 2 is provided with a sensor for detecting the contact point position when the user holds the stylus 2. Exemplarily, as shown in FIG6C , one of the contact points 69 of the user's hand 610 and the stylus 2 is the position corresponding to the second contact point.
  • the sensor provided on the body of the stylus pen 2 may be a film sensor.
  • the body of the stylus pen 2 may be provided with a plurality of film sensors, which may detect the contact point between the user's hand and the body, and determine the position of the contact point between the user's hand and the stylus pen 2, including the position of the second contact point, in combination with the setting position of the film sensor.
  • a schematic diagram of the film sensor detecting the contact point of the user's hand is shown.
  • the circle shown in the figure represents the contact point between the user's hand and the stylus pen 2.
  • a schematic diagram of the film sensor determining the contact point of the hand according to the detected capacitance data is shown.
  • the stylus pen 2 is provided with a preset sensor, which is used to detect the contact points of the user's hand and determine which finger of the user corresponds to each contact point according to the contact point information.
  • the tablet computer 1 can also use the contact point corresponding to the preset finger (such as the middle finger) detected by the stylus pen 2 as the second contact point.
  • the tablet computer 1 obtains the pen holding distance between the corresponding position of the second contact point and the pen tip.
  • the tablet computer 1 can obtain the holding distance from the stylus 2. After the stylus 2 determines the second contact point between the user's hand and the stylus 2 through the film sensor, it can determine the distance between the second contact point and the tip of the stylus 2, i.e., the holding distance mentioned above, in combination with the setting position of the film sensor in the stylus 2.
  • N as shown in FIG. 6C is the holding distance in the embodiment of the present application. It should be understood that in other embodiments, the tablet computer 1 can also obtain the holding distance in other ways, which are not limited in the embodiment of the present application.
  • the tablet computer 1 calculates the vertical distance according to the first angle, the third angle, the compensation angle and the pen holding distance.
  • the tablet computer 1 calculates the vertical distance based on a trigonometric function relationship according to the first angle, the third angle, the compensation angle, and the pen holding distance.
  • FIG6E a simplified schematic diagram corresponding to when the stylus 2 is in the second state is shown.
  • the stylus 2 is in the second state, and the user's hand is simplified as a straight line.
  • Point 611 represents the contact point between the tip of the stylus 2 and the touch screen of the tablet computer 1 in the second state (i.e., the position of the tip)
  • point 612 represents the contact point between the user's hand and the touch screen of the tablet computer 1 in the second state
  • point 613 represents the second contact point between the user's hand and the stylus 2 in the second state (i.e., 69 shown in FIG6C ).
  • point A represents the above contact point 611
  • point B represents the above contact point 612
  • point C represents the above contact point 613.
  • FIG6E the intersection of the geographic horizontal line 60 and BC is recorded as point D.
  • ⁇ CAB corresponds to the first angle 65 shown in FIG6A
  • ⁇ CAD corresponds to the second angle 66 shown in FIG6A
  • ⁇ DAB corresponds to the angle 67 shown in FIG6A .
  • AC in FIG6E the pen holding distance N.
  • FIG6F it is a simplified schematic diagram corresponding to when the stylus 2 is in the first state.
  • the stylus 2 is in the first state
  • the user's hand is simplified as a straight line.
  • Point 614 represents the position of the tip of the stylus 2 in the first state
  • point 615 represents the contact point between the user's hand and the touch screen of the tablet computer 1 in the first state
  • point 616 represents the second contact point between the user's hand and the stylus 2 in the first state (the user lifts the pen when writing, and the relative position of the hand and the stylus 2 usually remains unchanged, so 616 is still 69 shown in FIG6C ).
  • point A' corresponds to the above point 614
  • point B' represents the above contact point 615
  • point C' represents the above contact point 616.
  • the intersection of the geographic horizontal line 60 and B'C' is recorded as point E.
  • the auxiliary line 617 passing through point A ⁇ is parallel to the touch screen of the tablet computer 1 , and the intersection of the auxiliary line 617 and B ⁇ C ⁇ is recorded as point F; the auxiliary line 618 is made through points A ⁇ and B ⁇ .
  • ⁇ CAE corresponds to the third angle 68 shown in FIG. 6B .
  • ⁇ EA ⁇ F is the angle between the auxiliary line 617 and the geographic horizontal line 60 .
  • ⁇ EA ⁇ F angle 67 shown in FIG. 6A .
  • a ⁇ C ⁇ in FIG. 6F pen holding distance N.
  • the relative position relationship between the user's hand and the stylus 2 does not change during the process of lifting or putting down the pen.
  • the stylus pen 2 when the stylus pen 2 is in the first state, the user's hand is approximately perpendicular to the touch screen of the tablet computer 1.
  • the stylus pen 2 is in the first state and the user's hand is perpendicular to the touch screen, that is, B'C' and A'F in FIG. 6F are perpendicular.
  • the above compensation angle 67, ⁇ C ⁇ A ⁇ B ⁇ (equal to ⁇ CAB) and A ⁇ C ⁇ (the above pen holding distance), A ⁇ F, ⁇ FA ⁇ B ⁇ in Figure 6F, and the vertical distance ds between the stylus 2 and the touch screen in the above first state can be calculated.
  • the above S506 may specifically include: the tablet computer 1 sums the third angle and the compensation angle to obtain a fourth angle.
  • the tablet computer 1 multiplies the cosine value of the fourth angle and the pen holding distance to obtain the first distance.
  • the tablet computer 1 subtracts the first angle from the fourth angle to obtain a fifth angle.
  • the tablet computer 1 multiplies the tangent value of the fifth angle and the first distance to obtain the second distance.
  • the fourth angle is ⁇ C ⁇ A ⁇ F in the figure.
  • the first distance is A ⁇ F shown in Figure 6F.
  • ⁇ C ⁇ A ⁇ B ⁇ shown in FIG6F ⁇ CAB (FIG6E)
  • ⁇ CAB in FIG6E is the first angle 65 shown in FIG6A. Therefore, in the embodiment of the present application, ⁇ C ⁇ A ⁇ B ⁇ shown in FIG6F is represented by the first angle, and the fifth angle obtained by subtracting ⁇ C ⁇ A ⁇ B ⁇ (the first angle) from the fourth angle is the angle 619 ( ⁇ FA ⁇ B ⁇ ) shown in FIG6F.
  • the vertical distance includes the second distance.
  • the second distance is B ⁇ F shown in FIG. 6F .
  • B ⁇ C ⁇ is perpendicular to A ⁇ F
  • a ⁇ F is parallel to the touch screen of the tablet computer 1. Therefore, the vertical distance ds between the tip of the stylus 2 and the touch screen of the tablet computer 1 is equal to B ⁇ F (i.e., the above second distance).
  • the vertical distance calculated by the tablet computer 1 can be expressed by the following formula:
  • ds N*cos(67+68)*tan(65-(67+68)); wherein N represents the pen holding distance, 67 represents the compensation angle, 68 represents the third angle, and 65 represents the first angle; ds represents the vertical distance between the pen tip and the touch screen.
  • the relative position relationship between the user's hand and the touch screen of the tablet computer 1 and the stylus 2 is analyzed during the user's writing process, and the vertical distance between the tip of the stylus 2 and the touch screen in the first state is calculated by converting the pen holding distance in combination with the trigonometric function relationship.
  • the anti-mis-touch threshold value can be determined later in combination with the vertical distance, so that the influence of the environment on the amount of the pen tip signal detected by the tablet computer 1 can be reduced, and the accuracy of the selection of the anti-mis-touch threshold value can be improved.
  • the tablet computer 1 determines a false touch prevention threshold value of the stylus 2 corresponding to the vertical distance.
  • the pen tip signal that can be detected by the tablet computer 1 may be the same. Therefore, in some embodiments, vertical distances within different value ranges correspond to different anti-mistaken touch thresholds. It should be noted that in the embodiments of the present application, the anti-mistaken touch threshold corresponds to the pen tip signal.
  • the tablet computer 1 may directly obtain the anti-false touch threshold value corresponding to the vertical distance in S404. In other embodiments, the tablet computer 1 may also obtain the average value of the vertical distance in the second preset time period, and in S404, the tablet computer 1 determines the anti-false touch threshold value corresponding to the average value of the vertical distance as the threshold value of the anti-false touch mode.
  • the tablet computer 1 stores a plurality of anti-false touch threshold values corresponding to vertical distances, and after obtaining the vertical distance, the tablet computer 1 can search for the anti-false touch threshold value corresponding to the vertical distance in the tablet computer 1.
  • the vertical distance and the anti-false touch threshold value can be stored in the tablet computer 1 in the form of a corresponding relationship table.
  • the tablet computer 1 stores a plurality of correspondences between vertical distances and standard pen tip signals. After obtaining the vertical distance, the tablet computer 1 searches for the standard pen tip signal corresponding to the vertical distance in the tablet computer 1 as a threshold value for preventing accidental touches.
  • the correspondence between the vertical distance and the standard pen tip signal is obtained by measuring the tablet computer 1 in a laboratory environment by relevant personnel before it leaves the factory. Relevant personnel can simulate a variety of different environments in the laboratory, and measure the pen tip signal detected by the tablet computer 1 at different pen tip vertical distances in each environment as the standard pen tip signal detected by the tablet computer 1 at different vertical distances.
  • the tablet computer 1 stores a plurality of preset mapping relationship tables, each of which stores a plurality of vertical distances and a standard pen tip signal corresponding to each vertical distance under a preset environment of the tablet computer 1.
  • the preset environment includes at least one of the following: whether the tablet computer 1 is charged, whether the touch screen of the tablet computer 1 is covered with a film, and the type of the film on the touch screen of the tablet computer 1.
  • the tablet computer 1 can search the preset mapping table for the standard pen tip distance corresponding to the vertical distance.
  • the tablet computer 1 stores at least the following preset mapping relationship tables corresponding to the preset situations: the tablet computer 1 is charging and the touch screen is not covered with a film, the tablet computer 1 is not charging and the touch screen is not covered with a film; the tablet computer 1 is charging and the touch screen is covered with a first type of film, the tablet computer 1 is not charging and the touch screen is covered with a first type of film; the tablet computer 1 is charging and the touch screen is covered with a second type of film, the tablet computer 1 is not charging and the touch screen is covered with a second type of film, etc.
  • the above-mentioned first type and second type of films are only examples.
  • the type of film can be determined in combination with actual situations.
  • the type of film can include plastic film, hydrogel film or tempered film, etc.
  • the tablet computer 1 Before searching for the standard pen tip signal corresponding to the vertical distance, the tablet computer 1 needs to select a preset mapping relationship table corresponding to the current environment from multiple preset mapping relationship tables.
  • the preset environment of the preset mapping relationship table includes whether the tablet computer 1 is charging, whether the touch screen has a film, and the type of the film, etc. Therefore, the tablet computer 1 can select the preset mapping relationship table closest to the current environment in combination with the charging state, film state, and film type of the tablet computer 1.
  • the tablet computer 1 usually stores a charging identifier, which is used to indicate whether the tablet computer 1 is in a charging state or an uncharging state. In some embodiments, whether the tablet computer 1 is charging can be determined by obtaining the charging identifier of the tablet computer 1. In some embodiments, whether the touch screen of the tablet computer 1 is covered with a film and the type of the film can be matched by the tablet computer 1 according to the size of the pen tip signal currently detected in the second state. Alternatively, in other embodiments, whether the touch screen of the tablet computer 1 is covered with a film and the type of the film can also be input into the tablet computer 1 by the user.
  • the method further includes S701 - S703 , wherein:
  • the tablet computer 1 obtains the charging status of the tablet computer 1.
  • the charging state includes a charging state or an uncharging state.
  • the tablet computer 1 obtains a charging identifier of the tablet computer 1 and determines the charging state of the tablet computer 1 according to the charging identifier. Exemplarily, when the charging identifier is 1, it indicates that the tablet computer 1 is in a charging state; when the charging identifier is 0, it indicates that the tablet computer 1 is in an uncharging state.
  • the tablet computer 1 detects the pen tip signal of the stylus 2 by detecting the signal strength emitted by the pen tip.
  • the pen tip signal strength detected by the tablet computer 1 may be different. Therefore, when the tablet computer 1 is in a charging state or an uncharging state, the pen tip signal collected by the tablet computer 1 is also different.
  • the pen tip signal collected by the tablet computer 1 is also different.
  • the tablet computer 1 obtains a second pen tip signal when the stylus pen 2 is in the second state.
  • the second state includes a state in which the user holds the stylus pen 2 and writes on the touch screen.
  • the touch screen of the tablet computer 1 is covered with a film or the type of the film is different will affect the vertical distance between the tip of the stylus pen 2 and the touch screen when writing on the touch screen.
  • the vertical distance between the pen tip and the touch screen is small, which may be 0.
  • the pen tip of the stylus 2 is at a certain distance from the touch screen when writing (the vertical distance is not 0), and the thicker the film is, the greater the vertical distance between the pen tip of the stylus 2 and the touch screen when writing.
  • the type and material of the film applied to the touch screen may also cause the tablet computer 1 to collect different amounts of pen tip signals of the stylus 2.
  • the tablet computer 1 collects different amounts of pen tip signals when the touch screen is in the film-applied state and the film-unapplied state; when the touch screen is attached with different types of films, the tablet computer 1 collects different amounts of pen tip signals.
  • the tablet computer 1 since the tablet computer 1 cannot directly know whether the tablet computer 1 is currently covered with a film and the type of the film, the tablet computer 1 determines whether the touch screen of the tablet computer 1 is covered with a film and the type of the film by detecting the tip signal of the stylus 2 when the stylus 2 is in the second state.
  • the tablet computer 1 combines the charging state and the second pen tip signal to select a target mapping relationship table that matches the current environment from a plurality of preset mapping relationship tables.
  • the tablet computer 1 can obtain the pen tip signal quantity when the stylus 2 is in the second state in the preset mapping relationship table corresponding to each preset environment as the candidate pen tip signal quantity. Then, the tablet computer 1 compares the second pen tip signal quantity obtained in S702 with each candidate pen tip signal quantity, selects the closest candidate pen tip signal quantity, and uses the preset mapping relationship table corresponding to the closest candidate pen tip signal quantity as the preset mapping relationship table matching the current environment, that is, the above-mentioned target preset mapping relationship table.
  • the tablet computer 1 can respectively calculate the difference between the second pen tip signal and each candidate pen tip signal, select the candidate pen tip signal with the smallest absolute value of the difference, and use the preset mapping relationship table corresponding to the candidate pen tip signal with the smallest absolute value of the difference as the target preset mapping relationship table.
  • the tablet computer 1 pre-stores the corresponding preset mapping relationship tables under multiple preset environments, and selects the preset mapping relationship table that best matches the current environment as the target preset mapping relationship table according to the second pen tip signal of the stylus 2 in the second state and whether the tablet computer 1 is being charged. In this way, the influence of the environment on the pen tip signal of the stylus 2 detected by the tablet computer 1 can be reduced, so that a more accurate anti-mistouch threshold value can be determined.
  • the above step of selecting the target preset mapping relationship table according to the charging state of the tablet computer 1, whether the touch screen is covered with a film, and the type of the film needs to be reselected according to actual conditions. For example, if the tablet computer 1 detects that the charging state has changed, or a long time has passed since the last selection of the target preset mapping relationship table, it can return to execute the above S701-S703 and reselect the target preset mapping relationship table.
  • the tablet computer in response to a first event, re-screens a target mapping relationship table that matches the current environment from a plurality of preset mapping relationship tables.
  • the first event includes at least one of the following: updating the charging status of the tablet computer 1, waking up from sleep mode of the tablet computer 1, restarting the tablet computer 1, or receiving a mapping relationship reset instruction.
  • the tablet computer 1 detects the charging status of the tablet computer 1 at intervals, and if it is detected that the charging status of the tablet computer 1 is updated, it is determined that the first event is detected.
  • the tablet computer 1 can obtain the charging identification of the tablet computer 1 at intervals of a third preset time period to detect whether the charging status of the tablet computer 1 has changed.
  • the third preset time period can be set according to actual conditions.
  • the user can temporarily and actively shut down the tablet computer system, put it into sleep mode or shut it down, and then wake up or start the tablet computer system from sleep mode when the tablet computer is needed next time.
  • the tablet computer will automatically enter a system sleep state until the next time the user wakes up the tablet computer. That is to say, the interval between the tablet computer 1 entering the sleep state and then being woken up is usually long. During this interval, whether the tablet computer 1 is filmed and the type of film may change.
  • the tablet computer 1 when the tablet computer 1 detects that the tablet computer 1 is awakened from sleep or restarted, it is determined that the first event is detected.
  • the tablet computer 1 will return to execute the above S701-S703 and reselect the target preset mapping relationship table.
  • the specific implementation process of the tablet computer 1 detecting awakening from sleep, restarting, etc. can refer to the description of the relevant technology, which will not be repeated in the embodiment of the present application.
  • the user may manually reset the target preset mapping relationship table when finding that the false touch prevention is not accurate enough.
  • the tablet computer 1 receives the mapping relationship reset instruction, it returns to execute the above S701-S703 and reselects the target preset mapping relationship table.
  • the target preset mapping relationship table when the tablet computer 1 detects the first event, the target preset mapping relationship table will be reselected. In this way, at different times and in different environments, the preset mapping relationship table matching the current environment is selected to determine the anti-false touch threshold value, which can reduce the influence of environmental factors on the selection of the anti-false touch threshold value and make the anti-false touch more accurate.
  • S404 may specifically include S404a, where: S404a.
  • Tablet computer 1 searches the target preset mapping relationship table for the standard pen tip signal corresponding to the vertical distance as the anti-mistouch threshold value of stylus 2.
  • Tablet computer 1 obtains the preset compensation signal amount, and uses the sum of the standard pen tip signal amount and the preset compensation signal amount as the anti-mistouch threshold value.
  • the preset compensation signal amount can be set according to the actual situation and stored in tablet computer 1.
  • the tablet computer 1 does not report the touch information of the first contact point detected between the user's hand and the touch screen.
  • the above method also includes: the tablet computer 1 sets the anti-mistouch flag of the tablet computer 1 to the first flag; wherein, when the tablet computer 1 detects that the first pen tip signal is greater than or equal to the anti-mistouch threshold value, if the anti-mistouch flag is detected to be the first flag, the tablet computer 1 enters the anti-mistouch mode.
  • the vertical distance obtained by the tablet computer 1 in the embodiment of the present application is calculated by combining the compensation angle, the first angle, the third angle, the pen holding distance and other information. Therefore, if the compensation angle changes, the vertical distance needs to be recalculated, and the anti-mistouch threshold value corresponding to the vertical distance also needs to be re-determined.
  • the tablet computer 1 further includes: if the tablet computer 1 detects that the moving distance of the tablet computer 1 is greater than a preset threshold, the tablet computer 1 sets the anti-mistaken touch flag to the second flag; wherein, when the tablet computer 1 detects that the first pen tip signal is greater than or equal to the anti-mistaken touch threshold value, if the anti-mistaken touch flag is detected to be the second flag, the tablet computer 1 does not enter the anti-mistaken touch mode. In this way, it is possible to avoid the previously determined anti-mistaken touch threshold value being inaccurate due to changes in the compensation angle, and to avoid inaccurate anti-mistaken touch.
  • the tablet computer 1 periodically detects the tip signal of the stylus 2
  • the anti-false touch threshold value is determined dynamically according to the detected pen tip signal amount as the threshold value for entering the anti-false touch mode. Even in different environments, even if the tablet computer 1 detects that the pen tip signal amount is affected by the environment during the anti-false touch process, the anti-false touch threshold value is also determined in real time in combination with the current environment, that is to say, the selection of the anti-false touch threshold value has taken into account the influence of the current environment.
  • the anti-false touch threshold value determined dynamically in this way is more in line with the current environment. Using the anti-false touch threshold value as the threshold value for entering the anti-false touch mode can reduce the inaccuracy of anti-false touch caused by the environment.
  • the touch screen may include a touch IC chip.
  • the touch IC chip is disposed on one side of the touch screen, as shown in FIG. 7B , wherein the touch and display driver integration (TDDI) includes a touch IC chip and a display chip.
  • TDDI is disposed on one side of the touch screen, and touch sensors disposed at different positions of the touch screen are respectively connected to the TDDI.
  • the wiring lengths of the touch IC chips disposed at different positions of the touch screen are inconsistent, resulting in that the impedances corresponding to the touch sensors at different positions are not completely the same. Therefore, for the touch sensor disposed at the far end of the touch screen (relative to the touch IC), due to the influence of the longer wiring and the larger impedance, the pen tip signal of the stylus 2 sensed by it is prone to be low.
  • the tip signal detected by the tablet computer 1 is also different. At this time, if the same false touch prevention threshold value is set in different areas of the touch screen, the false touch prevention problem may be inaccurate.
  • the touch screen is divided into multiple preset areas according to the setting position of the touch sensor, and each preset area corresponds to maintaining a set of anti-false touch threshold values.
  • the above S404 may specifically include: the tablet computer 1 determines the position of the third vertical projection point of the first position of the stylus tip on the touch screen, and the target area to which the third vertical projection point belongs on the touch screen. Then, the tablet computer 1 selects the corresponding anti-false touch threshold value according to the vertical distance and the target area. It can be understood that the target area to which the above third vertical projection point belongs is included in multiple preset areas.
  • the touch screen can be divided into preset areas in combination with the number of touch sensors set on the touch screen/the number of channels of the touch screen. For example, if the number of touch sensors set on the touch screen is 6*8, the touch screen can be divided into 3*4 preset areas, or 3*8 preset areas, etc. Each preset area maintains a set of false touch prevention threshold values.
  • the trigger threshold value for the tablet computer 1 to enter the anti-mistouch mode corresponds to the current preset area, which can make the tablet computer 1 more precise in anti-mistouch and more accurate in anti-mistouch.
  • the above anti-false touch method determines the anti-false touch threshold value, which can only be implemented after the user uses the stylus 2 to write on the touch screen of the tablet computer 1 for a certain period of time. That is to say, the tablet computer 1 needs to learn for a certain period of time before it can determine a more accurate anti-false touch threshold value. Therefore, in order to prevent the user's hand contact point from accidentally touching the tablet computer 1 before the learning is completed, in some embodiments, the initial anti-false touch threshold value is stored in the tablet computer 1.
  • the initial anti-false touch threshold value can be used as the threshold for entering the anti-false touch mode. In this way, the problem of the user's hand accidentally touching the touch screen when the tablet computer 1 is learning the user's writing with the stylus 2 can be avoided.
  • the tablet computer 1 can determine the current false touch prevention threshold value. During the process of the stylus 2 continuously writing on the touch screen for a long time, the tablet computer 1 can determine multiple corresponding anti-false touch threshold values of the user. In some embodiments, the tablet computer 1 can calculate an average value based on the multiple anti-false touch threshold values of the user, and store the average value as the user information of the user. If the tablet computer 1 can determine that the user currently writing with the stylus 2 has stored user information, then the tablet computer 1 can read the stored user information as the anti-false touch threshold value of the user.
  • the contact area between the user's hand and the stylus, the contact area with the touch screen, and the force of the user's hand pressing on the touch screen may be different.
  • the tablet computer 1 can distinguish different users based on some hand information of the user.
  • the method for preventing accidental touches further includes: the tablet computer 1 obtains the user writing characteristics when the user performs a writing operation using the stylus 2.
  • the tablet computer 1 stores the user writing characteristics and the accidental touch prevention threshold values in a user characteristic table.
  • the user writing feature includes at least one of the following: the contact area between the user's hand and the touch screen when the user uses the stylus pen 2 to write, and the holding distance between the corresponding position of the second contact point between the user's hand and the stylus pen 2 and the pen tip.
  • the second contact point refers to the contact point closest to the pen tip of the stylus pen 2 among the contact points between the stylus pen 2 and the user's hand when the user holds the stylus pen 2.
  • the user writing feature includes the contact area between the user's hand and the touch screen, and the contact area can be obtained by a touch sensor disposed on the touch screen of the tablet computer 1.
  • the touch sensor disposed on the touch screen can detect the contact point of the user's hand on the touch screen and calculate the contact area of the contact point.
  • the tablet computer 1 detecting the contact area between the user's hand and the touch screen can specifically include: obtaining the number of long-axis cells LL and the number of short-axis cells WW of the sensor whose capacitance value changes detected by the touch sensor on the touch screen. Calculate the LL average value and the WW average value within the fourth preset time period, and calculate the contact area between the user's hand and the touch screen based on the LL average value and the WW average value.
  • the user writing feature includes the holding distance between the corresponding position of the second contact point between the user's hand and the stylus 2 and the pen tip. Different users have different habits when using styluses, and the heights of holding the pens are usually different. Therefore, in an embodiment of the present application, the holding distance between the second contact point and the pen tip of the user when writing is obtained and stored as a user writing feature. In some embodiments, the tablet computer 1 can obtain the holding distance from the stylus 2 and store it as a user writing feature.
  • the user writing characteristics include both the contact area between the user's hand and the touch screen, and the holding distance between the corresponding position of the second contact point on the stylus 2 and the pen tip. In this way, the tablet computer 1 can more accurately distinguish different users based on the user writing characteristics.
  • the tablet computer 1 when the user writes on the touch screen of the tablet computer 1 using the stylus 2, the tablet computer 1 obtains the characteristics of the user's writing and stores the characteristics in correspondence with the anti-mis-touch threshold value. In this way, the next time the user writes on the tablet computer 1 using the stylus 2, the tablet computer 1 can determine whether the current user is a historical user based on the stored user writing characteristics. Thus, the anti-mis-touch threshold value corresponding to the user can be quickly read to prevent mis-touch.
  • the tablet computer 1 when the tablet computer 1 detects the user's writing feature to be matched, it searches the user feature table for the user's writing feature to be matched; when the tablet computer 1 searches the user feature table for the user's writing feature to be matched, When the writing feature of the user to be matched is found, the tablet computer 1 obtains the anti-false touch threshold value corresponding to the writing feature of the user to be matched from the user feature table as the user's initial anti-false touch threshold value; the initial anti-false touch threshold value is used by the tablet computer 1 to adjust the initial anti-false touch threshold value in real time according to the vertical distance of the stylus 2 in the first state and the standard pen tip signal.
  • the user writing feature to be matched is obtained when the tablet computer 1 detects the pen tip signal.
  • the user writing feature to be matched may include at least one of the following: the contact area between the user's hand and the touch screen when the user uses the stylus 2 for writing, and the holding distance between the corresponding position of the second contact point of the user's hand and the stylus 2 and the pen tip.
  • the tablet computer 1 After the tablet computer 1 detects the writing feature of the user to be matched, if a matching user writing feature is found in the user feature table, it means that the user has previously used the stylus pen 2 to perform a writing operation on the tablet computer 1. At this time, the tablet computer 1 can read the corresponding false-touch prevention threshold value from the user feature table as the initial false-touch prevention threshold value of the user. After that, the tablet computer 1 can learn the corresponding vertical distance in the first state when the current user uses the stylus pen 2 to perform a writing operation, and adjust and update the initial false-touch prevention threshold value in combination with the vertical distance.
  • the initial anti-false touch threshold value can also be set to correspond to the preset area. That is, for each preset area on the touch screen, a corresponding initial anti-false touch threshold value is set. And when the user uses the stylus 2 to write on the touch screen of the tablet computer 1, the anti-false touch threshold value of the preset area is adjusted and updated according to the preset area corresponding to the writing position.
  • the first preset area is correspondingly set with a first initial anti-false touch threshold value
  • the second preset area is correspondingly set with a second initial anti-false touch threshold value
  • the third preset area is set with a third initial anti-false touch threshold value.
  • the tablet computer 1 will use the first initial anti-false touch threshold value to prevent false touches.
  • the tablet computer 1 will adjust and update the first initial anti-false touch threshold value according to the data when the user uses the stylus pen 2 to write in the first preset area. Thereafter, if it is detected that the user continues to use the stylus pen 2 to write in the first preset area of the tablet computer 1, the anti-false touch threshold value corresponding to the updated first preset area is used to prevent false touches.
  • the second initial false-touch prevention threshold value and the third initial false-touch prevention threshold value are not updated.
  • the second initial false-touch prevention threshold value (third initial false-touch prevention threshold value) is first used to prevent false touches, and then the second initial false-touch prevention threshold value (third initial false-touch prevention threshold value) is adjusted and updated in combination with the data when the user writes in the second preset area (third preset area).
  • the tablet computer 1 obtains the writing characteristics of the user and stores them.
  • the user's stored anti-false touch threshold value is first read as the initial anti-false touch threshold value, and the initial anti-false touch threshold value can be used to prevent false touches before the tablet computer 1 completes learning. This prevents false touches by the user's hand when writing before the tablet computer 1 completes learning.
  • the above-mentioned method for preventing accidental touches may also be used when the tablet computer 1 detects n second events.
  • the tablet computer 1 obtains the minimum pen tip signal amount in each second event, and calculates the average value of the m minimum pen tip signal amounts in the fifth preset time period.
  • the tablet computer 1 uses the average value of the m minimum pen tip signal amounts as the anti-mistaken touch threshold value of the stylus 2.
  • the tablet computer 1 also dynamically obtains the minimum pen tip signal amount as the anti-mistaken touch threshold value, so that the anti-mistaken touch threshold value is more in line with the current environment, improves the accuracy of anti-mistaken touch, and improves the user experience when using the stylus pen to write on the tablet computer.
  • an electronic device comprising: a processor and a memory; wherein the memory is coupled to the processor.
  • the memory stores computer program code, the computer program code comprising computer instructions, and when the computer instructions are executed by the processor, the electronic device executes the various functions or steps executed by the tablet computer 1 in the method embodiment.
  • the above-mentioned electronic device may be a tablet computer 1.
  • the structure of the electronic device may refer to the structure of the tablet computer 1 shown in FIG. 2 .
  • the chip system 80 includes at least one processor 801 and at least one interface circuit 802.
  • the processor 801 and the interface circuit 802 can be interconnected through lines.
  • the interface circuit 802 can be used to receive signals from other devices (such as a memory of an electronic device).
  • the interface circuit 802 can be used to send signals to other devices (such as processor 801).
  • the interface circuit 802 can read instructions stored in the memory and send the instructions to the processor 801.
  • the electronic device can perform the various steps in the above embodiments.
  • the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.
  • the embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions.
  • the computer instructions When the computer instructions are executed on the above-mentioned electronic device (such as the tablet computer 1), the electronic device executes each function or step executed by the tablet computer 1 in the above-mentioned method embodiment.
  • the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the tablet computer 1 in the above method embodiment.
  • the computer may be an electronic device, such as the tablet computer 1.
  • the disclosed devices and methods can be implemented in other ways.
  • the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the unit can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

Landscapes

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

Abstract

本申请提供一种防误触方法及设备,涉及触控领域,用于解决使用固定的防误触门限值,在不同的外界环境中电子设备对于用户使用手写笔书写时的防误触可能存在不准确的问题。该方法应用于电子设备,电子设备包括触摸屏。该方法包括:周期性检测手写笔在触摸屏上的第一笔尖信号量。根据第一笔尖信号量可以确定手写笔是否处于第一状态。若是,则获取手写笔的笔尖所处的第一位置与触摸屏之间的垂直距离;其中,第一状态包括用户握持手写笔悬停在触摸屏上方,且手写笔未在触摸屏上书写的状态。然后,确定垂直距离对应的手写笔的防误触门限值。在检测到第一笔尖信号量大于或者等于防误触门限值时,进入防误触模式,不上报检测到的手部的触控信息。

Description

一种防误触方法及设备
本申请要求于2022年10月29日提交国家知识产权局、申请号为202211340769.9、发明名称为“一种防误触方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及触控领域,尤其涉及一种防误触方法及设备。
背景技术
目前很多电子设备,如平板电脑、手机等,都同时支持手指和手写笔的书写操作。通常用户使用手写笔在电子设备进行书写操作时,落笔之前通常手掌会先接触到触摸屏,而此时笔尖距离触摸屏还有一小段距离。此时,触摸屏可能会对手掌的接触产生误触,引起不必要的操作。
在用户使用主动式手写笔在电子设备的触摸屏上书写时,触摸屏可以根据手写笔的信号确定手写笔所处的位置。因此电子设备可以区分当前是的触控是来自手写笔还是用户的手部,在使用主动式手写笔的情况下,电子设备可以对用户的手部的触控进行防误触。
相关技术方案中,通常设定用于防误触的笔尖信号量门限值,如果检测到笔尖信号量超过该门限值,则进入防误触模式,不上报触摸屏上手部的触控点。然而,电子设备检测笔尖信号量容易受到环境干扰,如电子设备放置于导电材质和非导电材质上,电子设备检测到的笔尖信号量可能不相同。如果使用固定的防误触门限值,在不同的外界环境中电子设备对于用户使用手写笔书写时的防误触可能存在不准确的问题。
发明内容
本申请实施例提供一种防误触方法及设备,用于解决使用固定的防误触门限值,在不同的外界环境中电子设备对于用户使用手写笔书写时的防误触可能存在不准确的问题。
为达到上述目的,本申请的实施例采用如下技术方案:
第一方面,提供了一种防误触方法,该方法应用于电子设备,电子设备包括触摸屏。该方法包括:
电子设备周期性检测手写笔在触摸屏上的第一笔尖信号量;其中,第一笔尖信号量用于指示手写笔的笔尖信号强度。电子设备根据第一笔尖信号量可以确定手写笔是否处于第一状态。若是,则电子设备获取手写笔的笔尖所处的第一位置与触摸屏之间的垂直距离;其中,第一状态包括用户握持手写笔悬停在触摸屏上方,且手写笔未在触摸屏上书写的状态。然后,电子设备确定垂直距离对应的手写笔的防误触门限值;其中,不同取值范围内的垂直距离对应不同的防误触门限值。电子设备在检测到第一笔尖信号量大于或者等于防误触门限值时,进入防误触模式;其中,在防误触模式下,电子设备不上报检测到的用户的手部与触摸屏之间的第一接触点的触控信息。
通过该技术方案,即便在不同环境中使用手写笔在平板电脑上进行书写操作,即 使平板电脑在防误触过程中检测到笔尖信号量受到环境的影响,由于防误触门限值也是结合当前环境实时确定的,也就是说防误触门限值的选取已经考虑了当前环境的影响。这样动态确定的防误触门限值更符合当前环境,使用该防误触门限值作为进入防误触模式中的阈值,可以减少因环境导致的防误触不准确。
在一种可能的实时方式中,上述电子设备确定垂直距离对应的手写笔的防误触门限值,具体可以包括:电子设备获取与垂直距离对应的标准笔尖信号量,并将该标准笔尖信号量作为手写笔的防误触门限值。其中,电子设备中预先保存有多个垂直距离及每个垂直距离对应的标准笔尖信号量。在该实施方式中,电子设备在确定防误触门限值时可以直接查找垂直距离对应的标准信号量作为防误触门限值,可以提高确定防误触门限值的效率。
在一种可能的实时方式中,上述电子设备获取手写笔的笔尖所处的第一位置与触摸屏之间的垂直距离,具体可以包括:电子设备获取手写笔在第二状态下,手写笔与触摸屏之间的第一角度以及手写笔与地理水平线之间的第二角度;其中,第二状态包括用户握持手写笔,手写笔在触摸屏上的书写状态;电子设备计算第一角度和第二角度的差值,得到触摸屏与地理水平线之间的补偿角度。电子设备获取第一状态下,手写笔与地理水平线之间的第三角度;并获取用户握持手写笔时,手写笔与用户的手部的接触点中最靠近手写笔笔尖的第二接触点以及第二接触点对应位置与笔尖之间的握笔距离;电子设备根据第一角度、第三角度、补偿角度和握笔距离,计算垂直距离。
在该实施方式中,电子设备分别获取手写笔处于第一状态和第二状态时的多个角度和握笔距离,并通过获取的多个角度和握笔距离计算垂直距离。由于是对测量得到的角度、距离等信息进行换算得到垂直距离,该垂直距离受到外界环境影响较小。这样,电子设备在根据垂直距离确定防误触门限值时,可以减少外界环境的干扰,选择更准确的防误触门限值,进而提升防误触准确性。
在一种可能的实时方式中,上述电子设备根据第一角度、第三角度、补偿角度和握笔距离,计算垂直距离,具体可以包括:电子设备对第三角度和补偿角度求和,得到第四角度;电子设备对第四角度的余弦值和握笔距离求积,得到第一距离;电子设备将第一角度和第四角度求差,得到第五角度;电子设备对第五角度的正切值和第一距离求积,得到第二距离;垂直距离包括第二距离。在该实施方式中,通过分析用户在书写过程中落笔和抬笔的动作中,用户手部与电子设备的触摸屏以及手写笔之间的相对位置关系,结合三角函数关系由握笔距离转换计算得到手写笔在第一状态下笔尖与触摸屏之间的垂直距离。这样,可以减少环境对于电子设备检测到的笔尖信号量的影响,提升防误触门限值选择的准确性。
在一种可能的实时方式中,电子设备中保存有多个预设映射关系表,每个预设映射关系表中保存有电子设备在一种预设环境下,多个垂直距离及每个垂直距离对应的标准笔尖信号量;预设环境包括以下至少一种:电子设备是否正在充电、触摸屏是否贴膜,以及触摸屏的贴膜种类。其中,在电子设备获取与垂直距离对应的标准笔尖信号量之前,该方法还包括:电子设备获取电子设备的充电状态;其中,充电状态包括正在充电的状态或未充电的状态。电子设备获取手写笔处于第二状态时的第二笔尖信号量;其中,第二状态包括用户握持手写笔在触摸屏上的书写状态;手写笔处于第二 状态下,触摸屏处于贴膜状态和未贴膜状态时,电子设备采集的笔尖信号量不同;触摸屏贴不同种类的膜时,电子设备采集的笔尖信号量不同。电子设备结合充电状态和第二笔尖信号量,在多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表。在该实施方式中,电子设备根据当前环境选择最为匹配的预设映射关系表作为目标预设映射关系表。这样,可以减少因环境对电子设备检测手写笔的笔尖信号量的影响,从而可以确定更加准确的防误触门限值。
在一种可能的实时方式中,在电子设备结合充电状态和第二笔尖信号量,在多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表之后,上述方法还包括:电子设备响应于第一事件,重新从多个预设映射关系表筛选出与当前环境匹配的目标映射关系表;其中,第一事件包括以下至少一项:电子设备的充电状态更新、电子设备休眠唤醒、电子设备重启,或者电子设备接收到映射关系重置指令。这样,在不同时间、不同环境下,选择与当前时间的环境匹配的预设映射关系表,用于确定防误触门限值,可以减少环境因素对于防误触门限值选取的影响,使防误触更加准确。
在一种可能的实时方式中,在电子设备确定垂直距离对应的手写笔的防误触门限值之后,上述方法还包括:电子设备将电子设备的防误触标识设置为第一标识;其中,电子设备在检测到第一笔尖信号量大于或者等于防误触门限值时,若检测到防误触标识为第一标识,则电子设备进入防误触模式。在该实施例中,电子设备在防误触标识为第一标识,才会在检测到笔尖信号量大于防误触门限值之后进入防误触模式。这样,避免不必要的防误触。
在一种可能的实时方式中,在电子设备将电子设备的防误触标识设置为第一标识之后,上述方法还包括:若电子设备检测到电子设备的移动距离大于预设阈值,电子设备将防误触标识设置为第二标识;其中,电子设备在检测到第一笔尖信号量大于或者等于防误触门限值时,若检测到防误触标识为第二标识,则电子设备不进入防误触模式。这样,可以避免因电子设备移动导致补偿角度发生变化,从而导致的之前确定的防误触门限值不准确,可以避免不准确的防误触。
在一种可能的实时方式中,在电子设备确定垂直距离对应的手写笔的防误触门限值之后,上述方法还包括:电子设备获取用户在使用手写笔进行书写操作时的用户书写特征,并用户书写特征与该用户的防误触门限值对应存储,作为用户特征表。其中,用户书写特征包括以下至少一项:用户使用手写笔进行书写操作时,用户的手部与触摸屏的接触面积,以及用户的手部与手写笔的第二接触点对应位置与笔尖之间的握笔距离。这样,在下一次用户使用手写笔在该电子设备进行书写时,电子设备可以通过已存储的用户书写特征判断当前用户是否是历史用户。从而可以快速的读取该用户对应的防误触门限值进行防误触。
在一种可能的实时方式中,在电子设备将用户书写特征与防误触门限值对应存储为用户特征表之后,上述方法还包括:电子设备在检测到用户的待匹配用户书写特征时,在用户特征表中查找是否存在待匹配用户书写特征;若是则电子设备从用户特征表中获取与待匹配用户书写特征对应的防误触门限值,作为用户的初始防误触门限值。该初始防误触门限值用于电子设备根据手写笔处于第一状态的垂直距离、标准笔尖信号量对初始防误触门限值进行实时调整。由于电子设备确定防误触门限值时需结合用 户使用手写笔进行书写时的特征,也就是说该方法需在用户使用手写笔开始书写之后,电子设备通过学习之后,才可以实现使用动态确定的防误触门限值进行防误触。在该实施方式中,用户非首次使用手写笔在电子设备上进行书写时,可以在电子设备学习完成之前,使用读取的该用户的初始防误触门限值进行防误触。从而避免在电子设备在学习完成之前用户进行书写时的手部误触。
在一种可能的实时方式中,电子设备根据第一笔尖信号量确定手写笔处于第一状态,具体可以包括:电子设备检测到n个第二事件,检测第一笔尖信号量最小的时刻,并在第一笔尖信号量最小的时刻,确定手写笔处于第一状态。其中,第二事件用于指示第一笔尖信号量由大变小,再由小变大。在该实施方式中,笔尖信号量由大变小对应用户抬笔的过程,笔尖信号量由小变大则对应用户落笔的过程。电子设备选择用户抬笔与落笔之间笔尖信号量最小的时刻作为手写笔处于第一状态的时刻,再根据第一状态下笔尖与触摸屏之间的垂直距离选择对应的防误触门限值。这样,可以减少环境对于防误触门限值选择的影响,提升防误触的准确性。
第二方面,提供了一种电子设备,包括:处理器和存储器;该存储器用于存储计算机执行指令,当该电子设备运行时,该处理器执行该存储器存储的该计算机执行指令,以使该电子设备执行如上述第一方面中任一项的防误触方法。
第三方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面中任一项的防误触方法。
第四方面,提供了一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备可以执行上述第一方面中任一项的防误触方法。
第五方面,提供了一种装置(例如,该装置可以是芯片系统),该装置包括处理器,用于支持电子设备实现上述第一方面中所涉及的功能。在一种可能的设计中,该装置还包括存储器,该存储器,用于保存电子设备必要的程序指令和数据。该装置是芯片系统时,可以由芯片构成,也可以包含芯片和其他分立器件。
其中,第二方面至第五方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
附图说明
图1A为本申请实施例提供的一种场景示意图;
图1B为本申请实施例提供的另一种场景示意图;
图2为本申请实施例提供的电子设备的结构示意图;
图3为本申请实施例提供的手写笔和平板电脑的硬件交互示意图;
图4为本申请实施例提供的一种防误触方法的流程示意图;
图5为本申请实施例提供的另一种防误触方法的流程示意图;
图6A为本申请实施例提供的手写笔处于第二状态的示意图;
图6B为本申请实施例提供的手写笔处于第一状态的示意图;
图6C为本申请实施例提供的用户握持手写笔的示意图;
图6D为本申请实施例提供的手写笔的传感器检测用户手部的示意图;
图6E为本申请实施例提供的手写笔处于第二状态时对应的简化示意图;
图6F为本申请实施例提供的手写笔处于第一状态时对应的简化示意图;
图7A为本申请实施例提供的另一种防误触方法的流程示意图;
图7B为本申请实施例提供的一种触摸屏的结构示意图;
图8为本申请实施例提供的一种芯片系统的结构示意图。
具体实施方式
目前很多电子设备,如平板电脑、手机等都包括触摸屏,且都同时支持手指和手写笔在该触摸屏上的书写操作。示例性的,上述电子设备可以是手机、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备、媒体播放器、电视机等设备,本申请实施例对该设备的具体形态不作特殊限制。
如图1A所示,以电子设备是平板电脑1为例,用户使用手写笔2在平板电脑1的触摸屏11上进行书写操作。通常用户使用手写笔2在平板电脑1进行书写操作时,落笔之前通常手掌会先接触到触摸屏,而此时笔尖距离触摸屏还有一小段距离,如图1B。此时,平板电脑1的触摸屏可能会对手掌的接触产生误触,引起不必要的操作。在这种情况下,平板电脑1可能会对用户手部的接触产生误触。
其中,手写笔2中的一种类型是主动式手写笔。主动式手写笔采用电子电路结构,笔尖发射高频信号,触摸屏接收笔尖发射的高频信号,从而得知主动式手写笔在屏幕上的坐标。由于平板电脑1检测主动式手写笔笔尖的坐标,是通过检测主动式手写笔的笔尖发出的高频信号来实现的,因此,如果用户使用主动式手写笔在触摸屏上书写时,平板电脑1可以区分主动式手写笔的触控点和用户手部的触控点。这样,在用户使用主动式手写笔在触摸屏书写时,平板电脑1可以在部分场景中,在检测到用户手部接触触摸屏的信号时不上报触控点,从而避免用户手部的误触。
在一些实施例中,平板电脑1与手写笔2之间还建立了短距离无线通信连接。通过该短距离无线通信连接,平板电脑1可以从手写笔2获取手写笔2的信息,例如手写笔2检测到的手写笔2与地理水平线之间的夹角,以及手写笔2检测到的用户手部与手写笔2之间的接触信息,等等。其中,短距离无线通信连接可以是蓝牙连接、无线保真(wireless fidelity,Wi-Fi)连接、近距离无线通信技术(near field communication,NFC)连接等任一种。
相关技术方案中,通常设定固定的用于防误触的笔尖信号量门限值,如果检测到笔尖信号量超过该门限值,则进入防误触模式,不上报触摸屏上手部的触控点。然而,平板电脑1检测笔尖信号量容易受到环境干扰,如平板电脑1放置于导电材质和非导电材质上,平板电脑1检测到的笔尖信号量可能不相同。如果使用固定的防误触门限值,在不同的外界环境中平板电脑1对于用户使用手写笔2书写时的防误触可能存在不准确的问题。
为此,本申请提出一种防误触方法,应用于电子设备,如图1A所示的平板电脑1。该方法中,平板电脑1获取用户握持手写笔2在平板电脑1的触摸屏上方,且手写笔2未在触摸屏上书写的状态下,手写笔2的笔尖与触摸屏之间的垂直距离(如图1B所示的ds)。之后,平板电脑1根据该垂直距离确定对应的手写笔的防误触门限值。即, 将防误触门限值设置为根据上述笔尖与触摸屏之间的垂直距离动态确定的数值。这样,在不同环境下平板电脑1根据垂直距离可以确定对应不同的防误触门限值,从而避免因环境干扰导致的防误触不准确的问题。
请参考图2,为本申请实施例提供的一种电子设备100的结构示意图。示例性的,该电子设备100可以是上述图1A所示的平板电脑1。如图2所示,该电子设备100可以包括处理器110,内部存储器120,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电池141,无线充电线圈142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,摄像头191,以及显示屏192等。
其中,传感器模块180可以包括加速度传感器,距离传感器,触摸传感器等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,在本申请实施例中,处理器110可以是应用处理器AP。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或USB接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备或移动终端,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可 以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些实施例中,电子设备100可以支持有线充电。具体的,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在另一些实施例中,电子设备100可以支持无线充电。
其中,充电管理模块140为电池141充电的同时,还可以为电子设备100供电。充电管理模块140接收电池141的输入,为处理器110,内部存储器120,外部存储器,显示屏192,摄像头191,和无线通信模块160等供电。充电管理模块140还可以用于监测电池141的电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,充电管理模块140也可以设置于处理器110中。
电子设备100的无线充电线圈142用于为手写笔进行无线充电。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),NFC,红外技术(infrared,IR)等无线通信的解决方案。在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。
电子设备100通过GPU,显示屏192,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏192和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏192用于显示图像,视频等。显示屏192包括显示面板。在一些实施例中,电子设备100可以包括1个或N个显示屏192,N为大于1的正整数。
电子设备100可以通过ISP,摄像头191,视频编解码器,GPU,显示屏192以及应用处理器等实现拍摄功能。ISP用于处理摄像头191反馈的数据。在一些实施例中,ISP可以设置在摄像头191中。摄像头191用于捕获静态图像或视频。在一些实施例中,电子设备100可以包括1个或N个摄像头191,N为大于1的正整数。
内部存储器120可以用于存储计算机可执行程序代码,可执行程序代码包括指令。处理器110通过运行存储在内部存储器120的指令,从而执行电子设备100的各种功能应用以及数据处理。此外,内部存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
请参考图3,为本申请实施例提供的一种手写笔2和平板电脑1的硬件交互图。如图3所示,手写笔2中可以包括:微处理单元(micro controller unit,MCU)301、第一通信模块302、打码芯片303、传感器304、充电模块305和电池306。传感器304可以包括但不限于压力传感器314和加速度传感器324。平板电脑1中可以包括触摸面板307和第二通信模块308。触摸面板307可以进一步包括触摸传感器(Touch panel sensor,TP sensor)317和触摸微型电子器件(Integrated Circuit,IC)芯片327。
上述手写笔2中的第一通信模块302和平板电脑1中的第二通信模块308可以为无线局域网(如Wi-Fi网络)模块,蓝牙模块或者近场通信NFC模块等无线通信模块,本申请实施例对此不作限制。应理解,手写笔2和平板电脑1,可以通过第一通信模块302和第二通信模块308建立无线通路。示例性的,可在手写笔2和平板电脑1之间建立蓝牙通路,该蓝牙通路可用于在手写笔2和平板电脑1之间传输信息,如传输配置参数、压力信号等。其中,配置参数用于指示手写笔2按照一定的规律发送打码信号。其中,打码信号可用于平板电脑1确定手写笔2的笔尖在平板电脑1的触摸屏上的位置(可简称为笔尖位置)。
上述平板电脑1中的触摸传感器317由电极阵列组成,电极阵列中包括行列排布的多个电极。上述手写笔2中的打码芯片303设置于笔尖处,打码芯片303中包括发送和接收信号的电极。并且,打码芯片303中的电极和触摸传感器317的电极之间,存在绝缘物质(如空气、盖板玻璃),因此打码芯片303中的电极和触摸传感器317的电极之间可以形成电容。即,手写笔2的笔尖与平板电脑1的触摸传感器317之间可以形成电容。从而手写笔2的笔尖与平板电脑1中的触摸传感器317可以通过电容,建立电路连接。
在建立上述电路通路后,手写笔2和平板电脑1可以通过电路通路交互信号。示例性的,平板电脑1中的触摸传感器317可以通过电路通路向手写笔2发送上行信号。又示例性的,手写笔2中的打码芯片303可以通过电路通路向平板电脑1发送打码信号。其中,打码信号和上行信号通常均为方波信号。
上述平板电脑1中的触摸传感器317用于采集触摸信息,触摸信息可以包括:手写笔2触摸平板电脑1的屏幕的信息和用户(如用户的手指或指关节等)触摸屏幕的信息。在本申请实施例中,触摸信息主要是指手写笔2的笔尖对屏幕的触摸操作的信息,如打码信号,触摸IC芯片327可以基于触摸传感器317采集的触摸信息,确定触摸位置。
示例性的,手写笔2的笔尖靠近平板电脑1的屏幕,打码芯片303则可以接收到 平板电脑1发送的上行信号。然后,打码芯片303通过电路通路向平板电脑1中的触摸传感器317发送的信号(如打码信号),会引起触摸传感器317的电极阵列中各个电极的电容采样值的变化量变化,且手写笔2的笔尖距离越近的电极,其电容采样值的变化量越大。屏幕中的触摸IC芯片327可以基于触摸传感器317的电极阵列中各个电极的电容采样值的变化量,确定触摸位置,如触摸IC芯片327可以将触摸传感器317上电容采样值的变化量最大处的位置,作为手写笔2在屏幕上的位置。关于触摸屏中根据电容采样值的变化量确定触摸位置的具体实现,可参见相关现有技术中的说明,本文中不多赘述。
上述手写笔2中的压力传感器314可以设置在手写笔2的笔尖,用于采集笔尖的压力信号。示例性的,当手写笔2的笔尖接触平板电脑1的屏幕时,压力传感器314可以采集到屏幕挤压笔尖而产生的压力信号。手写笔2可以将压力信号通过无线通路发送给平板电脑1。从而方便平板电脑1确定触摸压力。
上述手写笔2中的加速度传感器324可用于采集手写笔2的三轴加速度值,三轴加速度值包括:X轴上的加速度值、Y轴上的加速度值和Z轴上的加速度值。加速度传感器324也可以将三轴加速度值发送给MCU 301。如此,MCU 301可以基于三轴加速度值,获取手写笔2的倾角和运动状态等信息,运动状态用于表征手写笔2处于静止状态或非静止状态。MCU301还可以用于基于加速度传感器324采集的加速度值,控制手写笔2中相应部件的工作。示例性的,MCU 301确定手写笔2处于平放状态,MCU 301则可以控制打码芯片303、压力传感器314等停止工作。从而可以降低手写笔2的功耗。
上述手写笔2中的充电模块305可用于接收充电输入,为手写笔2中的电池306充电。并且,充电模块305在为电池306充电的同时,可以用于为平板电脑1中的部件(如MCU 301)供电。
应理解,图3所示的手写笔2的硬件结构和平板电脑1的硬件结构仅为一种示例,实际实施时,可以根据需求增加或者减少模块,或者可以合并上述一个或多个模块。本申请实施例对此不作具体限定。
以下实施例提供的防误触方法均可以在具有上述硬件结构的电子设备100中实现。
本申请提供一种防误触方法,应用于平板电脑1。针对用户使用手写笔2在平板电脑1的触摸屏上进行书写时,落笔之前用户的手部可能会接触到触摸屏,导致触摸屏发生误触的场景。本申请提供的防误触方法通过平板电脑1实时检测手写笔2的笔尖信号量,并根据笔尖信号量确定笔尖当前所处的位置。这样,平板电脑1可以结合笔尖信号量检测到用户握持手写笔2在触摸屏上方悬停,且手写笔2未在触摸屏上书写的第一状态。然后,平板电脑1可以获取该第一状态下手写笔2的笔尖与触摸屏之间的垂直距离,并确定该垂直距离对应的防误触门限值。之后,平板电脑1在检测到手写笔2的笔尖信号量大于或者等于防误触门限值时,表示手写笔2的笔尖与触摸屏之间的垂直距离较小,此时,平板电脑1可以进入防误触模式。在该防误触模式下,平板电脑1将不会上报检测到的用户的手部与触摸屏之间的第一接触点的触控信息。
通过本申请实施例提供的防误触方法,平板电脑1将会实时检测手写笔2的笔尖信号量,从而动态刷新防误触门限值。这样,当平板电脑1处于不同环境下时,平板 电脑1确定的防误触门限值也随之不同,可以避免因环境干扰导致的防误触不准确的问题。
以下针对本申请实施例可能涉及的技术名词进行说明。
加速度传感器(G-sensor)是一种能够测量加速度的传感器。通常由质量块、阻尼器、弹性元件、敏感元件和适调电路等部分组成。传感器在加速过程中,通过对质量块所受惯性力的测量,利用牛顿第二定律获得加速度值。根据传感器敏感元件的不同,常见的加速度传感器包括电容式、电感式、应变式、压阻式、压电式等。在本申请的一些实施例中,手写笔2包括G-sensor,并且可以通过G-sensor计算手写笔2与地理水平线之间夹角。在本申请的一些实施例中,平板电脑1包括G-sensor,平板电脑1可以通过G-sensor获取平板电脑1是否发生移动,并且计算平板电脑1的移动距离。
触摸传感器是一种捕获和记录设备和/或物体上的物理触摸的设备,它使设备或对象能够通常由用户检测触摸,触摸传感器也可以称为触摸检测器。在本申请的一些实施例中,手写笔2的笔身设置有一个或多个触摸传感器,用于检测用户手部与笔身接触的接触点,进而手写笔2可以结合触摸传感器在手写笔2的设置位置,确定用户手部与笔身之间的接触点所处的位置。
在本申请的一些实施例中,手写笔2还包括天线1和天线2。在一些实施例中,天线1和天线2分别设置在手写笔2的笔尖和笔身两个位置。在手写笔2靠近平板电脑1的触摸屏时,平板电脑1可以分别获取手写笔2的天线1、天线2在平板电脑1的触摸屏上的垂直投影位置,通过计算手写笔2的天线1、天线2在触摸屏上垂直投影位置之间的距离,以及天线1和天线2在手写笔2中的设置位置,进而计算手写笔2的笔身与触摸屏之间的角度。其中,天线1和天线2在手写笔2中的设置位置可以预先存储在手写笔2中;平板电脑1可以从手写笔2中获取到天线1和天线2的设置位置。
如图4所示为本申请一实施例提供的防误触方法的流程示意图。该方法包括S401-S405。其中:
S401.平板电脑1周期性检测手写笔2在触摸屏上的第一笔尖信号量。
其中,手写笔2的第一笔尖信号量用于指示手写笔2的笔尖信号强度。通常,支持手写笔2在触摸屏上进行书写操作的电子设备在开机之后,就会周期性的检测手写笔2的笔尖信号。在本申请实施例中,手写笔2的笔尖与平板电脑1的触摸屏之间的距离较近时,平板电脑1即可检测到手写笔2的笔尖发出的笔尖信号。在一些实施例中,平板电脑1可以每隔预设时间段检测手写笔2的第一笔尖信号量;其中,预设时间段可以根据实际情况进行设置。例如,预设时间段可以是2毫秒(ms)、5ms等等。
在一些实施例中,手写笔2可以通过设置在笔尖位置的天线发出笔尖信号。平板电脑1在检测到设置在手写笔2的笔尖位置的天线发出的笔尖信号之后,可以检测该笔尖信号的笔尖信号强度,即第一笔尖信号量。
在一些实施例中,平板电脑1可以通过设置在触摸屏上的触摸传感器检测手写笔2的笔尖发出的信号,以及检测笔尖信号的强度,即第一笔尖信号量。
通常,平板电脑1检测手写笔2的笔尖信号量时,手写笔2的笔尖距离平板电脑 1的触摸屏越近,则平板电脑1检测到的手写笔2的笔尖信号量越强;笔尖距离触摸屏越远,则平板电脑1检测到的笔尖信号量越弱。在手写笔2的笔尖距离触摸屏的距离大于一定值之后,平板电脑1将无法再检测到手写笔2的笔尖发出的信号。由此可以确定,平板电脑1可以根据当前检测到的第一笔尖信号量,判断手写笔2与触摸屏之间的距离远近。平板电脑1也可以根据检测到的第一笔尖信号量的变化情况,判断手写笔2的运动趋势。例如,平板电脑1检测到第一笔尖信号量逐渐变大时,可以判断手写笔2的笔尖正在逐渐向触摸屏靠近;检测到第一笔尖信号量逐渐减小时,可以判断手写笔2的笔尖正在逐渐远离触摸屏。在一些实施例中,平板电脑1可以结合第一笔尖信号量判断手写笔2是否处于特定状态。
S402.平板电脑1根据第一笔尖信号量确定手写笔2是否处于第一状态。
在本申请的一些实施例中,第一状态包括用户握持手写笔悬停在平板电脑1的触摸屏上方,且手写笔未在触摸屏上书写的状态。
在一些实施例中,S402具体可以是平板电脑1在检测在n个第二事件中第一笔尖信号量是否变为最小,来确定手写笔2是否处于第一状态。在该实施例中,平板电脑1在检测到第一笔尖信号量最小的时刻,确定手写笔2处于第一状态。其中,n是大于1的自然数。第二事件用于指示平板电脑1检测到第一笔尖信号量由大变小,再由小变大。
由上述实施例的说明可知,平板电脑1检测到第一笔尖信号量由大变小时,表示手写笔2的笔尖逐渐远离触摸屏;第一笔尖信号量由小变大时,表示笔尖逐渐靠近触摸屏。因此,在本申请实施例中,第二事件可以是对应用户握持手写笔2在平板电脑1的触摸屏上进行书写操作后,抬起笔尖再落下笔尖的过程。
在实际情况中,用户在连续书写时,通常需要不断的抬笔、落笔。在抬笔落笔之间平板电脑1检测到的笔尖信号量将会出现最小的时刻。而在一些实施例中,用户可能会将笔尖抬起至平板电脑1无法检测到笔尖信号量的位置停住再落笔,即笔尖距离触摸屏较远的位置。在该实施例中,上述第一状态可以是对应在笔尖信号量由大变小,再由小变大的过程中(即第二事件),笔尖信号量最小可以是指笔尖信号量变为0。或者,在另一些实施例中,用户也可能在抬笔和落笔的过程中,笔尖信号量不会减小至0。此时,可以取用户抬笔至落笔的过程(即第二事件)中,平板电脑1检测到的最小笔尖信号量的时刻,确定手写笔2处于第一状态的时刻。
用户使用手写笔2在平板电脑1的触摸屏上进行书写操作时,通常会反复的抬起笔尖再落下笔尖,因此平板电脑1检测到n个第二事件时,可以是用户使用手写笔2在触摸屏上连续书写的过程。
如果平板电脑1根据第一笔尖信号量确定手写笔2不处于第一状态,则平板电脑1返回执行S401,继续检测第一笔尖信号量。如果平板电脑1根据第一笔尖信号量确定手写笔2处于第一状态,平板电脑1可以执行S403。
S403.平板电脑1获取手写笔的笔尖所处的第一位置与触摸屏之间的垂直距离。
其中,第一位置表示第一状态下手写笔的笔尖所在的位置。第一位置和触摸屏之间的垂直距离,具体可以表示将第一位置垂直投影到触摸屏得到第一垂直投影点,获取第一垂直投影点对应的位置与第一位置之间的距离。示例性的,第一位置与触摸屏 之间的垂直距离可以是如图1B所示的ds。在其它实施例中,上述垂直距离也可以称为手写笔2在第一状态下的笔尖悬浮高度。
在一些实施例中,手写笔2的笔尖设置有天线。该天线周期性的发出信号,平板电脑1可以接收该笔尖天线发出的信号。由上述图3的说明可知,平板电脑1的触摸传感器接收笔尖天线发出的信号之后,平板电脑1的触摸IC芯片即可基于该信号确定笔尖位置。之后,平板电脑1将笔尖位置垂直投影至触摸屏,即上述第一垂直投影点。
用户在使用手写笔2在触摸屏上进行连续的书写操作时,有可能抬笔落笔的状态不会完全一致,比如用户第一次抬笔至落笔之间笔尖距离触摸屏最远的位置为X1,第二次抬笔至落笔之间笔尖距离触摸屏最远的位置为X2,X1≠X2。因此在一些实施例中,平板电脑1检测到n个第二事件时,可以在第一预设时间段内检测到多个第一状态时,获取多个第一状态对应的第一位置与触摸屏之间的垂直距离,并计算各垂直距离之间的平均值,作为后续用于确定防误触门限值用到的垂直距离。
在一些实施例中,平板电脑1可以从手写笔2处获取上述垂直距离。手写笔2确定第一位置与触摸屏之间的垂直距离可以通过任意一种测量距离常用的方法确定。
在另一些实施例中,平板电脑1可以结合第一状态下,与用户握持手写笔2的状态相关的参数计算上述垂直距离。示例性的,平板电脑1可以结合第一接触点与笔尖之间的握笔距离、手写笔2与地理水平线之间的角度以及手写笔2与触摸屏之间的角度等计算上述垂直距离。在一些实施例中,请参照图5,上述S403具体可以包括S501-S506。
S501.平板电脑1获取手写笔在第二状态下,手写笔2与触摸屏之间的第一角度,以及手写笔2与地理水平线之间的第二角度。
其中,第二状态包括用户握持手写笔,手写笔在触摸屏上的书写状态。也就是说,第二状态是指手写笔2的笔尖在触摸屏上的状态。示例性的,如图6A所示为手写笔2处于第二状态。
在一些实施例中,手写笔2与触摸屏之间的第一角度可以由平板电脑1中的器件测量。在一些实施例中,如图6A所示,手写笔2的笔尖设置了第一天线61,手写笔2的笔身设置了第二天线62。平板电脑1分别检测第一天线发射的信号在触摸屏上的第一垂直投影点63、第二天线发射的信号在触摸屏上的第二垂直投影点64。平板电脑1根据第一垂直投影点63、第二垂直投影点64之间的距离L、以及第一天线与第二天线的设置位置之间的距离M,可以确定手写笔2与触摸屏之间的第一角度65。
手写笔2与地理水平线之间的第二角度可以由手写笔2中的器件测量。平板电脑1从手写笔2获取第二角度。在一些实施例中,手写笔2中安装有G-sensor,用于测量手写笔2与地理水平线之间的第二角度。其中,手写笔2通过G-sensor计算上述第二角度的具体过程可以参照相关技术中的描述,在本申请实施例中不予赘述。示例性的,请继续参照图6A,图中将手写笔2与地理水平线60之间的角度记为第二角度66。
S502.平板电脑1计算第一角度和第二角度的差值,得到触摸屏与地理水平线之间的补偿角度。
第一角度与第二角度的差值即图6A中所示的补偿角度67。结合图6A所示可知,该补偿角度67表示的是平板电脑1的触摸屏与地理水平线之间的角度。由于在实际使 用过程中,用户不一定是将平板电脑1水平放置在与地理水平线平行的平面上使用。因此,在计算笔尖与触摸屏之间的垂直距离时,需考虑到平板电脑1与地理水平线之间的角度,即上述补偿角度。
由于本申请实施例中的补偿角度是平板电脑1的触摸屏与地理水平线之间的角度,因此,如果平板电脑1发生移动,那么补偿角度也可能会发生变化。在一些实施例中,平板电脑1检测到平板电脑1的移动距离大于预设阈值时,平板电脑1执行S501和S502,重新计算补偿角度。
S503.平板电脑1获取第一状态下,手写笔2与地理水平线之间的第三角度。
由上述实施例可知,第一状态是指手写笔2处于触摸屏上方且手写笔2处于未书写的状态。在第一状态下,手写笔2与地理水平之间的角度,与第二状态下手写笔2与地理水平线之间的角度通常是不一样的。因此,平板电脑1需分别获取第一状态和第二状态下,手写笔2与地理水平线之间的角度,即第三角度和第二角度。示例性的,图6B所示手写笔2处于第一状态时,将第三角度记为68。
S504.平板电脑1获取用户握持手写笔2时,手写笔2与用户的手部的接触点中最靠近手写笔2笔尖的第二接触点。
用户使用手写笔2时,手部需要握住手写笔2,也就是说,用户的手部与手写笔2之间存在接触点。并且,用户手部与手写笔2可能存在多个接触点。在本申请实施例中,在用户手部与手写笔2之间多个接触点之间选择最靠近笔尖的一个接触点,即第二接触点。
在一些实施例中,平板电脑1可以从手写笔2获取第二接触点的信息。其中,接触信息可以包括第二接触点的接触位置、接触面积等等。进一步的,手写笔2的笔身设置有传感器,该传感器用于检测用户握住手写笔2时的接触点位置。示例性的,如图6C所示用户手部610与手写笔2的其中一个接触点69为第二接触点对应的位置。
其中,在一些实施例中,手写笔2的笔身设置的传感器可以是薄膜传感器(film)。手写笔2的笔身可以设置多个film传感器,film传感器可以检测用户手部与笔身的接触点,并结合film传感器的设置位置确定用户手部与手写笔2的接触点的位置,包括上述第二接触点的位置。如图6D中的a所示为film传感器检测用户手部的接触点的示意图。图中所示圆形表示用户手部与手写笔2之间的接触点。图6D中的b所示为film传感器根据检测到的容值数据确定手部接触点的示意图。
在另一些实施例中,手写笔2中设置有预设传感器,预设传感器用于检测用户手部接触点,并根据接触点信息确定每一个接触点对应的用户手指是哪一个手指。在该实施例中,平板电脑1也可以将手写笔2检测到的预设手指(如中指)对应接触点作为第二接触点。
S505.平板电脑1获取第二接触点对应位置与笔尖之间的握笔距离。
在一些实施例中,平板电脑1可以从手写笔2获取握笔距离。手写笔2在通过film传感器确定用户手部与手写笔2之间的第二接触点之后,可以结合film传感器在手写笔2的设置位置,确定该第二接触点与笔尖之间的距离,即上述握笔距离。示例性的,如图6C所示的N即为本申请实施例中的握笔距离。应理解,在其它实施例中,平板电脑1还可以通过其它方式获取握笔距离,在本申请实施例中不予限定。
S506.平板电脑1根据第一角度、第三角度、补偿角度和握笔距离,计算垂直距离。
在一些实施例中,平板电脑1根据第一角度、第三角度、补偿角度和握笔距离,基于三角函数关系计算垂直距离。
结合图6A所示手写笔2处于第二状态、图6B所示手写笔2处于第一状态的示意图,以及图6C所示的用户握持手写笔2的示意图,分别将手写笔2处于第一状态、第二状态下用户手部、手写笔以及触摸屏等物体简化为线条,得到对应的示意图。
示例性的,如图6E所示为手写笔2处于第二状态时对应的简化示意图。在图6E中手写笔2处于第二状态,将用户手部简化为直线,点611表示第二状态下手写笔2的笔尖与平板电脑1的触摸屏的接触点(即笔尖位置),点612表示第二状态下用户手部与平板电脑1的触摸屏之间的接触点,点613表示第二状态下用户手部与手写笔2的第二接触点(即图6C所示的69)。经过简化后,以点A对应表示上述接触点611,点B表示上述接触点612,点C表示上述接触点613。在图6E中,将地理水平线60与BC的交点记为点D。结合图6A可知,∠CAB对应表示图6A所示的第一角度65,∠CAD对应表示图6A所示的第二角度66,∠DAB对应表示图6A所示的角度67。结合图6C可知,图6E中的AC=握笔距离N。
示例性的,如图6F所示为手写笔2处于第一状态时对应的简化示意图。在图6F中手写笔2处于第一状态,将用户手部简化为直线,点614表示第一状态下手写笔2的笔尖所在位置,点615表示第一状态下用户手部与平板电脑1的触摸屏之间的接触点,点616表示第一状态下用户手部与手写笔2的第二接触点(用户书写时抬笔,手部与手写笔2的相对位置通常不变,因此616仍为图6C所示的69)。经过简化后,以点A`对应表示上述点614,点B`表示上述接触点615,点C`表示上述接触点616。在图6F中,将地理水平线60与B`C`的交点记为点E。此外,在图6F中,经过点A`的辅助线617与平板电脑1的触摸屏平行,将辅助线617与B`C`的交点记为点F;辅助线618是经过点A`和点B`所作出的。
结合图6B可知,∠CAE对应表示图6B所示的第三角度68。由图示可知,∠EA`F是辅助线617与地理水平线60之间的夹角,结合图6A以及辅助线617与平板电脑1的触摸屏平行可以确定,∠EA`F=图6A所示的角度67。结合图6C可知,图6F中的A`C`=握笔距离N。
通常,用户书写时抬笔或者落笔的过程中,用户手部与手写笔2之间的相对位置关系不会发生变化,手写笔2由第二状态变为第一状态,或者由第一状态变为第二状态的过程中,是以用户手部与平板电脑1的触摸屏的接触点为支点抬起手写笔2。因此,在本申请实施例中,默认图6E的三角形ABC与图6F中的三角形A`B`C`是相同的,由此可以确定:图6E所示的∠CAB与图6F所示的∠C`A`B`相等,∠CAB=∠C`A`B`。
同时,在手写笔2处于第一状态时,用户手部与平板电脑1的触摸屏之间近似垂直。在本申请实施例中,以手写笔2处于第一状态下,用户手部与触摸屏垂直进行说明,即图6F中B`C`与A`F是垂直的。
基于上述关系,结合图6F所示的第三角度68、上述补偿角度67、∠C`A`B`(与∠CAB相等)以及A`C`(上述握笔距离),可以计算图6F中的A`F、∠FA`B`、以及上述第一状态下手写笔2与触摸屏之间的垂直距离ds。
示例性的,上述S506具体可以包括:平板电脑1对第三角度和补偿角度求和,得到第四角度。平板电脑1对第四角度的余弦值和握笔距离求积,得到第一距离。平板电脑1将第一角度和第四角度求差,得到第五角度。平板电脑1对第五角度的正切值和第一距离求积,得到第二距离。
结合图6F可知,第四角度为图中∠C`A`F。第一距离为图6F所示A`F。
由上述说明可知,图6F所示的∠C`A`B`=∠CAB(图6E),而图6E中的∠CAB即图6A所示的第一角度65。因此,在本申请实施例中,以第一角度表示图6F所示的∠C`A`B`,将∠C`A`B`(第一角度)和第四角度求差得到的第五角度,即图6F所示的角度619(∠FA`B`)。
其中,垂直距离包括第二距离。结合图6F,第二距离即为图6F所示的B`F。由上述说明可知,本申请实施例中,B`C`与A`F是垂直的,A`F与平板电脑1的触摸屏平行,因此,手写笔2的笔尖与平板电脑1的触摸屏之间的垂直距离ds=B`F(即上述第二距离)。
综上所述,平板电脑1计算垂直距离可以通过以下公式表示:
ds=N*cos(67+68)*tan(65-(67+68));其中,N表示握笔距离,67表示补偿角度,68表示第三角度,65表示第一角度;ds表示笔尖与触摸屏之间的垂直距离。
本申请实施例提供的技术方案中,通过分析用户在书写过程中落笔和抬笔的动作中,用户手部与平板电脑1的触摸屏以及手写笔2之间的相对位置关系,结合三角函数关系由握笔距离转换计算得到手写笔2在第一状态下笔尖与触摸屏之间的垂直距离。后面可以结合该垂直距离确定防误触门限值,这样,可以减少环境对于平板电脑1检测到的笔尖信号量的影响,提升防误触门限值选择的准确性。
S404.平板电脑1确定垂直距离对应的手写笔2的防误触门限值。
在实际情况中,笔尖与触摸屏的垂直距离相差较小时,平板电脑1能够检测到的笔尖信号量可能是相同的。因此在一些实施例中,不同取值范围内的垂直距离对应不同的防误触门限值。需要说明的是,在本申请的实施例中,防误触门限值对应的是笔尖信号量。
在一些实施例中,S404中平板电脑1可以直接获取垂直距离对应的防误触门限值。在另一些实施例中,平板电脑1也可以获取第二预设时间段内垂直距离的平均值,在S404中平板电脑1确定该垂直距离的平均值对应的防误触门限值作为防误触模式的阈值。
在一些实施例中,平板电脑1中存储有多个垂直距离对应的防误触门限值,平板电脑1在获取垂直距离之后,可以在平板电脑1中查找与该垂直距离对应的防误触门限值。其中,垂直距离与防误触门限值可以以对应关系表的方式存储在平板电脑1中。
在另一些实施例中,平板电脑1中存储了多个垂直距离与标准笔尖信号量的对应关系。平板电脑1在获取垂直距离之后,在平板电脑1中查找该垂直距离对应的标准笔尖信号量,作为防误触门限值。其中,垂直距离与标准笔尖信号量的对应关系是在平板电脑1在出厂前由相关人员实验室环境下测量得到。相关人员可以在实验室模拟多种不同环境,分别测量各环境下,平板电脑1在不同笔尖的垂直距离时检测到的笔尖信号量,作为该平板电脑1在不同垂直距离对应检测到的标准笔尖信号量。
示例性的,平板电脑1中保存有多个预设映射关系表,每个预设关系表存储了平板电脑1在一种预设环境下,多个垂直距离及每个垂直距离对应的标准笔尖信号量。其中,预设环境包括以下至少一种:平板电脑1是否充电、平板电脑1的触摸屏是否贴膜,以及平板电脑1的触摸屏的贴膜种类。在该实施例中,平板电脑1可以在预设映射表中查找垂直距离对应的标准笔尖距离。
在一些实施例中,平板电脑1中至少存储了以下预设情况对应的预设映射关系表:平板电脑1正在充电且触摸屏未贴膜,平板电脑1未充电且触摸屏未贴膜;平板电脑1正在充电且触摸屏贴了第一种类的膜,平板电脑1未充电且触摸屏贴了第一种类的膜;平板电脑1正在充电且触摸屏贴了第二种类的膜,平板电脑1未充电且触摸屏贴了第二种类的膜,等等。应理解,上述第一种类、第二种类的膜仅为示例,在实际情况中,贴膜种类可以结合实际情况确定,示例性的,贴膜种类可以包括塑料膜,水凝膜或者钢化膜等等。
平板电脑1在查找垂直距离对应的标准笔尖信号量之前,还需从多个预设映射关系表中选择一个当前环境对应的预设映射关系表。预设映射关系表的预设环境包括平板电脑1是否正在充电、触摸屏是否贴膜以及贴膜种类等,因此,平板电脑1可以结合平板电脑1的充电状态、贴膜状态以及贴膜种类等选择与当前环境最接近的预设映射关系表。
平板电脑1通常存储了充电标识,该充电标识用于指示平板电脑1处于正在充电状态或者未充电状态。在一些实施例中,平板电脑1是否正在充电可以通过获取平板电脑1的充电标识确定。在一些实施例中,平板电脑1的触摸屏是否贴膜以及贴膜种类可以由平板电脑1根据当前在第二状态下检测到的笔尖信号量大小进行匹配。或者,在另一些实施例中,平板电脑1的触摸屏是否贴膜以及贴膜种类,也可以由用户输入平板电脑1。
在一些实施例中,如图7A所示,在S404之前,上述方法还包括S701-S703,其中:
S701.平板电脑1获取平板电脑1的充电状态。
其中,充电状态包括正在充电的状态或未充电的状态。在一些实施例中,平板电脑1获取平板电脑1的充电标识,根据该充电标识确定平板电脑1的充电状态。示例性的,充电标识为1时,表示平板电脑1处于正在充电状态;充电标识为0时,表示平板电脑1处于未充电状态。
平板电脑1对于手写笔2的笔尖信号量的检测,是通过平板电脑1检测笔尖发出的信号强度确定。而平板电脑1处于正在充电的状态或者未充电的状态下,平板电脑1检测到的笔尖信号强度可能不相同。因此,平板电脑1处于正在充电的状态或者未充电的状态时,平板电脑1采集的笔尖信号量也不同。在本申请实施例中,在为平板电脑1选择匹配的预设映射关系表时,需要结合当前平板电脑1的充电状态。
S702.平板电脑1获取手写笔2处于第二状态时的第二笔尖信号量。
其中,第二状态包括用户握持手写笔2在触摸屏上的书写状态。
平板电脑1的触摸屏是否贴膜、贴膜的种类不一样,将会影响到手写笔2在触摸屏上书写时,笔尖与触摸屏之间的垂直距离。例如,触摸屏未贴膜状态下,手写笔2 在书写时笔尖距离触摸屏的垂直距离较小,可能是0。而触摸屏贴膜状态下,手写笔2在书写时笔尖距离触摸屏有一定的距离(垂直距离不为0),且所贴的膜的厚度越大,手写笔2在书写时笔尖距离触摸屏的垂直距离越大。或者触摸屏所贴膜的种类和材质不同,也有可能导致平板电脑1采集手写笔2的笔尖信号量不同。因此,手写笔2处于第二状态下,触摸屏处于贴膜状态和未贴膜状态时,平板电脑1采集的笔尖信号量不同;触摸屏贴不同种类的膜时,平板电脑1采集的笔尖信号量不同。
在本申请实施例中,由于平板电脑1无法直接获知当前平板电脑1是否贴膜以及贴膜种类,因此平板电脑1通过检测手写笔2处于第二状态下的笔尖信号量,来确定平板电脑1的触摸屏是否贴膜以及贴膜种类。
S703.平板电脑1结合充电状态和第二笔尖信号量,在多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表。
在该实施例中,平板电脑1可以分别获取在各预设环境对应的预设映射关系表中手写笔2处于第二状态时的笔尖信号量,作为候选笔尖信号量。然后,平板电脑1将S702中获取的第二笔尖信号量与各候选笔尖信号量进行比较,选择最相近的候选笔尖信号量,并将该最相近的候选笔尖信号量对应的预设映射关系表作为当前环境匹配的预设映射关系表,即上述目标预设映射关系表。
在一些实施例中,平板电脑1可以分别计算第二笔尖信号量与各候选笔尖信号量的差值,选择差值的绝对值最小的候选笔尖信号量,将与该差值的绝对值最小的候选笔尖信号量对应的预设映射关系表作为目标预设映射关系表。
在本申请实施例提供的技术方案中,在平板电脑1中预先存储多个预设环境下对应的预设映射关系表,并根据手写笔2在第二状态时的第二笔尖信号量以及平板电脑1是否正在充电,选择与当前环境最为匹配的预设映射关系表作为目标预设映射关系表。这样,可以减少因环境对平板电脑1检测手写笔2的笔尖信号量的影响,从而可以确定更加准确的防误触门限值。
进一步的,由于平板电脑1的充电状态、触摸屏是否贴膜以及贴膜种类都有可能在不同时刻发生改变,因此,上述根据平板电脑1的充电状态、触摸屏是否贴膜以及贴膜种类选择目标预设映射关系表的步骤,需要根据实际情况重新选择。例如平板电脑1检测到充电状态改变、或者与上一次选择目标预设映射关系表间隔较长时间,都可以返回执行上述S701-S703,重新选择目标预设映射关系表。
在一些实施例中,平板电脑1响应于第一事件,重新从多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表。其中,第一事件包括以下至少一项:平板电脑1的充电状态更新、平板电脑1休眠唤醒、平板电脑1重启,或者平板电脑1接收到映射关系重置指令。
在一些实施例中,平板电脑1每隔一段时间检测平板电脑1的充电状态,若检测到平板电脑1的充电状态更新,判定检测到第一事件。示例性的,平板电脑1可以间隔第三预设时间段获取平板电脑1的充电标识,以检测平板电脑1的充电状态是否发生改变。其中第三预设时间段可以根据实际情况进行设置。
通常用户短时间内不再使用平板电脑时,可以暂时主动关闭平板电脑的系统,使其休眠或关机,等到下一次需要使用时再将平板电脑的系统从休眠状态唤醒或者开机。 或者,用户较长一段时间没有使用平板电脑时,平板电脑将会自动进入系统休眠状态,直到下一次用户将平板电脑唤醒。也就是说,在平板电脑1进入休眠状态再被唤醒的过程中,通常间隔的时间较长。在这一段间隔时间中,平板电脑1的是否贴膜、贴膜种类都有可能发生变化,因此在本申请实施例中,在平板电脑1检测到平板电脑1休眠唤醒、重启时,判定为检测到第一事件。平板电脑1将返回执行上述S701-S703,重新选择目标预设映射关系表。平板电脑1检测休眠唤醒、重启等具体实现过程可以参照相关技术的描述,本申请实施例中不予赘述。
在另一些实施例中,用户可以在发现防误触不够准确时,手动重置目标预设映射关系表。示例性的,平板电脑1接收到映射关系重置指令时,返回执行上述S701-S703,重新选择目标预设映射关系表。
本申请实施例提供的技术方案中,平板电脑1检测到第一事件时,将会重新选择目标预设映射关系表。这样,在不同时间、不同环境下,选择与当前时间的环境匹配的预设映射关系表,用于确定防误触门限值,可以减少环境因素对于防误触门限值选取的影响,使防误触更加准确。
此外,不同用户使用手写笔时的习惯可能不完全一样。为了避免因使用习惯不一样导致垂直距离计算不准确,导致选择的防误触门限值不够准确,在一些实施例中,请继续参照图7A,S404具体可以包括S404a,其中:S404a.平板电脑1在目标预设映射关系表中查找与垂直距离对应的标准笔尖信号量,作为手写笔2的防误触门限值。平板电脑1获取预设补偿信号量,将标准笔尖信号量与预设补偿信号量的和值作为防误触门限值。其中,预设补偿信号量可以根据实际情况设置,并存储在平板电脑1中。
通过设置预设补偿量,可以尽量避免因不同用户的使用习惯不一致导致确定的防误触门限值不够准确,从而提高防误触的准确性。
S405.平板电脑1在检测到第一笔尖信号量大于或者等于防误触门限值时,进入防误触模式。
其中,在防误触模式下,平板电脑1不上报检测到的用户的手部与触摸屏之间的第一接触点的触控信息。
在一些实施例中,在S404之后,上述方法还包括:平板电脑1将平板电脑1的防误触标识设置为第一标识;其中,平板电脑1在检测到第一笔尖信号量大于或者等于防误触门限值时,若检测到防误触标识为第一标识,则平板电脑1进入防误触模式。
由上述实施例的描述可知,本申请实施例中平板电脑1获取的垂直距离是结合补偿角度、第一角度、第三角度以及握笔距离等信息计算得到。因此,如果补偿角度发生变化,那么垂直距离需要重新计算,垂直距离对应的防误触门限值也需重新确定。
在一些实施例中,在平板电脑1将平板电脑1的防误触标识设置为第一标识之后,还包括:若平板电脑1检测到平板电脑1的移动距离大于预设阈值,平板电脑1将防误触标识设置为第二标识;其中,平板电脑1在检测到第一笔尖信号量大于或者等于防误触门限值时,若检测到防误触标识为第二标识,则平板电脑1不进入防误触模式。这样,可以避免因补偿角度发生变化导致之前确定的防误触门限值不准确,可以避免不准确的防误触。
在本申请实施例提供的技术方案中,平板电脑1周期性检测手写笔2的笔尖信号 量,并根据检测的笔尖信号量动态的确定防误触门限值,作为进入防误触模式的阈值。即便处于不同环境中,即使平板电脑1在防误触过程中检测到笔尖信号量受到环境的影响,由于防误触门限值也是结合当前环境实时确定的,也就是说防误触门限值的选取已经考虑了当前环境的影响。这样动态确定的防误触门限值更符合当前环境,使用该防误触门限值作为进入防误触模式中的阈值,可以减少因环境导致的防误触不准确。
由上述针对图3的说明可知,触摸屏可以包括触摸IC芯片。在一些实施例中,触摸IC芯片设置在触摸屏的一侧,如图7B所示,其中触控与显示驱动器集成(Touch and Display Driver Integration,TDDI)中包含触控IC芯片和显示芯片。TDDI设置在触摸屏的一侧,而设置在触摸屏不同位置的触摸传感器(sensor)分别与TDDI连接。由此,设置在触摸屏不同位置的触摸IC芯片的走线长短不一致,导致不同位置的触摸传感器对应的阻抗也不完全相同。因此,对于设置在触摸屏的远端(相对触摸IC来说)的触摸传感器受走线较长,阻抗较大的影响,其感应到的手写笔2的笔尖信号量容易出现偏低的现象。
也就是说,在手写笔2的笔尖与触摸屏之间的垂直距离相同的情况下,手写笔2的笔尖在触摸屏上垂直投影的位置处于不同的区域时,平板电脑1所检测到的笔尖信号量也不相同。此时,如果在触摸屏的不同区域设置相同的防误触门限值,可能会出现防误触不准确的问题。
基于此,在本申请的一些实施例中,根据触摸传感器的设置位置将触摸屏划分为多个预设区域,每一个预设区域对应维护一组防误触门限值。在一些实施例中,上述S404具体可以包括:平板电脑1确定手写笔的笔尖所处的第一位置在触摸屏上的第三垂直投影点的位置,以及该第三垂直投影点在触摸屏上所属的目标区域。然后,平板电脑1根据垂直距离和目标区域,选择对应的防误触门限值。可以理解的,上述第三垂直投影点所属的目标区域包含于多个预设区域。
其中,在一些实施例中,对触摸屏划分预设区域具体可以结合在触摸屏上设置的触摸传感器的数量/触摸屏的通道数量进行设置。示例性的,触摸屏上设置的触摸传感器的数量为6*8,可以将触摸屏划分为3*4个预设区域,也可以划分为3*8个预设区域等等。每一个预设区域对应维护一组防误触门限值。
在本申请实施例提供的技术方案中,在用户使用手写笔2在触摸屏上的不同预设区域内进行书写时,平板电脑1进入防误触模式的触发门限值与当前所在预设区域对应,可以使平板电脑1的防误触精度更高,防误触更加准确。
由上述实施例的说明可知,上述防误触方法确定防误触门限值,需要在用户使用手写笔2在平板电脑1的触摸屏上进行一定时间的书写之后,才可以实现。也就是说平板电脑1需要经过一定时间的学习,才可以确定较为准确的防误触门限值。因此,为了使平板电脑1在学习完成之前也可以进行防止用户的手部接触点误触,在一些实施例中,平板电脑1中存储了初始防误触门限值。平板电脑1在最开始检测到存在手写笔2的笔尖信号时,可以使用初始防误触门限值作为进入防误触模式的阈值。这样,可以避免平板电脑1在学习用户使用手写笔2的书写过程中,用户手部在触摸屏上误触的问题。
在上述S404之后,平板电脑1可以确定当前的防误触门限值。在同一用户使用手 写笔2在触摸屏上进行较长时间的连续书写的过程中,平板电脑1可以确定该用户多个对应的防误触门限值。在一些实施例中,平板电脑1可以根据用户的多个防误触门限值计算平均值,将该平均值作为用户的用户信息进行存储。如果平板电脑1可以确定当前使用手写笔2进行书写的用户存储过用户信息,那么平板电脑1可以读取存储的用户信息作为该用户的防误触门限值。此外,不同用户使用手写笔在触摸屏上书写时,用户手部与手写笔的接触面积、与触摸屏的接触面积,以及用户手部压在触摸屏上的力度都有可能不相同,平板电脑1可以依据用户的一些手部信息来区分不同用户。
示例性的,在一些实施例中,在上述S404之后,上述防误触方法还包括:平板电脑1获取用户在使用手写笔2进行书写操作时的用户书写特征。平板电脑1将用户书写特征与防误触门限值对应存储为用户特征表。
其中,用户书写特征包括以下至少一项:用户使用手写笔2进行书写操作时,用户的手部与触摸屏的接触面积,以及用户的手部与手写笔2的第二接触点对应位置与笔尖之间的握笔距离。第二接触点是指用户握持手写笔2时,手写笔2与用户的手部的接触点中最靠近手写笔2笔尖的接触点。
在一些实施例中,用户书写特征包括用户的手部与触摸屏的接触面积,该接触面积可以由设置在平板电脑1的触摸屏上的触控传感器获取。在一些实施例中,设置在触摸屏上的触控传感器可以检测用户手部在触摸屏上的接触点,并计算接触点的接触面积。示例性的,平板电脑1检测用户手部与触摸屏之间的接触面积具体可以包括:获取触摸屏上的触控传感器检测到容值发生变化的传感器的长轴单元格数LL和短轴的单元格数WW。计算第四预设时间段内的LL平均值及WW平均值,根据LL平均值和WW平均值计算用户手部与触摸屏的接触面积。
进一步的,在一些实施例中,为了可以根据用户书写特征更准确的区分不同用户,在存储用户书写特征时,仅存储用户在使用手写笔2进行书写时,笔尖位置的预设范围内的用户手部与触摸屏的接触面积。
在另一些实施例中,用户书写特征包括用户的手部与手写笔2的第二接触点对应位置与笔尖之间的握笔距离。不同用户使用手写笔时的习惯不一样,握笔的高度通常也不一样。因此,在本申请实施例中,获取用户在书写时第二接触点与笔尖之间的握笔距离作为用户书写特征进行存储。在一些实施例中,平板电脑1可以从手写笔2获取该握笔距离作为用户书写特征进行存储。
在另一些实施例中,用户书写特征同时包括用户的手部与触摸屏的接触面积,以及手写笔2上第二接触点对应位置与笔尖之间的握笔距离。这样,平板电脑1根据用户书写特征可以更准确的区分不同用户。
在本申请实施例提供的技术方案中,用户在使用手写笔2在平板电脑1的触摸屏上书写时,平板电脑1获取用户书写时的特征,并将这一特征与防误触门限值对应存储。这样,在下一次用户使用手写笔2在该平板电脑1进行书写时,平板电脑1可以通过已存储的用户书写特征判断当前用户是否是历史用户。从而可以快速的读取该用户对应的防误触门限值进行防误触。
进一步的,在一些实施例中,平板电脑1在检测到用户的待匹配用户书写特征时,在用户特征表中查找是否存在待匹配用户书写特征;当平板电脑1在用户特征表中查 找到待匹配用户书写特征时,平板电脑1从用户特征表中获取与待匹配用户书写特征对应的防误触门限值,作为用户的初始防误触门限值;初始防误触门限值用于平板电脑1根据手写笔2处于第一状态的垂直距离、标准笔尖信号量对初始防误触门限值进行实时调整。
其中,待匹配用户书写特征表示在平板电脑1检测到笔尖信号量时获取的。在一些实施例中,待匹配用户书写特征可以包括以下至少一项:用户使用手写笔2进行书写操作时,用户的手部与触摸屏的接触面积,以及用户的手部与手写笔2的第二接触点对应位置与笔尖之间的握笔距离。
平板电脑1检测到待匹配用户书写特征之后,如果在用户特征表中查找到匹配的用户书写特征,即表示该用户之前使用过手写笔2在该平板电脑1上进行书写操作。此时平板电脑1可以从用户特征表中读取对应的防误触门限值作为该用户的初始防误触门限值。在此之后,平板电脑1可以学习当前用户使用手写笔2进行书写操作时第一状态下对应的垂直距离,并结合垂直距离对该初始防误触门限值进行调整和更新。
进一步的,在针对平板电脑1的触摸屏上划分不同预设区域,且针对不同预设区域分别维护一组对应的防误触门限值的实施例中,初始防误触门限值也可以设置为与预设区域对应。即,对于每一个触摸屏上的预设区域,分别设置一个对应的初始防误触门限值。并且,在用户使用手写笔2在平板电脑1的触摸屏上进行书写时,分别根据书写位置所对应的预设区域分别调整和更新所在预设区域的防误触门限值。
示例性的,以触摸屏包括第一预设区域、第二预设区域和第三预设区域为例,第一预设区域对应设置有第一初始防误触门限值,第二预设区域对应设置有第二初始防误触门限值,第三预设区域设置有第三初始防误触门限值。当用户首次使用手写笔2在平板电脑1的触摸屏上进行书写之前,如果检测到手写笔2处于第一状态,且手写笔2的笔尖所处的第一位置在触摸屏上的垂直投影位置所属的区域为第一预设区域。那么,平板电脑1将使用第一初始防误触门限值进行防误触。同时,如果用户使用手写笔2在平板电脑1的第一预设区域上书写一段时间之后,平板电脑1将根据用户使用手写笔2在第一预设区域书写时的数据等对第一初始防误触门限值进行调整和更新。此后,如果检测到用户继续使用手写笔2在平板电脑1的第一预设区域书写,则使用第一预设区域对应更新后的防误触门限值进行防误触。由于用户还没有使用手写笔2在第二预设区域、第三预设区域进行书写,第二初始防误触门限值、第三初始防误触门限值都未更新。当用户从第一预设区域移动到第二预设区域(第三预设区域)进行书写时,首先使用第二初始防误触门限值(第三初始防误触门限值)进行防误触,然后再结合用户在第二预设区域(第三预设区域)书写时的数据对第二初始防误触门限值(第三初始防误触门限值)进行调整和更新。
在本申请实施例提供的技术方案中,用户在平板电脑1使用过手写笔2进行书写操作之后,平板电脑1获取该用户的书写特征进行存储。并且在该用户再次使用手写笔2在平板电脑1上进行书写时,先读取该用户存储的防误触门限值作为初始防误触门限值,可以在平板电脑1学习完成之前,使用初始防误触门限值进行防误触。从而避免在平板电脑1在学习完成之前用户进行书写时的手部误触。
在另一些实施例中,上述防误触方法也可以在平板电脑1检测到n个第二事件时, 平板电脑1获取每一次第二事件中最小笔尖信号量,并计算第五预设时间段内m个最小笔尖信号量的平均值。平板电脑1将m个最小笔尖信号量的平均值作为手写笔2的防误触门限值。该实施例中,平板电脑1也是动态的获取最小笔尖信号量作为防误触门限值,使防误触门限值更符合当前环境,提升防误触的准确性,提高用户使用手写笔在平板电脑进行书写时的体验。
本申请的另一些实施例中提供了一种电子设备,电子设备包括:处理器和存储器;其中,存储器与处理器耦合。存储器中存储有计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被处理器执行时,使得电子设备执行方法实施例中平板电脑1执行的各个功能或者步骤。示例性的,上述电子设备可以是平板电脑1。该电子设备的结构可以参考图2所示的平板电脑1的结构。
本申请实施例还提供一种芯片系统,如图8所示,该芯片系统80包括至少一个处理器801和至少一个接口电路802。处理器801和接口电路802可通过线路互联。例如,接口电路802可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路802可用于向其它装置(例如处理器801)发送信号。示例性的,接口电路802可读取存储器中存储的指令,并将该指令发送给处理器801。当指令被处理器801执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质包括计算机指令,当计算机指令在上述电子设备(如平板电脑1)上运行时,使得该电子设备执行上述方法实施例中平板电脑1执行的各个功能或者步骤。
本申请实施例还提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述方法实施例中平板电脑1执行的各个功能或者步骤。该计算机可以是电子设备,如平板电脑1。
通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成 的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (14)

  1. 一种防误触方法,其特征在于,所述方法应用于电子设备,所述电子设备包括触摸屏,所述方法包括:
    所述电子设备周期性检测手写笔在所述触摸屏上的第一笔尖信号量;其中,所述第一笔尖信号量用于指示所述手写笔的笔尖信号强度;
    所述电子设备根据所述第一笔尖信号量确定所述手写笔处于第一状态时,所述电子设备获取所述手写笔的笔尖所处的第一位置与所述触摸屏之间的垂直距离;其中,所述第一状态包括用户握持所述手写笔悬停在所述触摸屏上方,且所述手写笔未在所述触摸屏上书写的状态;
    所述电子设备确定所述垂直距离对应的所述手写笔的防误触门限值;其中,不同取值范围内的垂直距离对应不同的防误触门限值;
    所述电子设备在检测到所述第一笔尖信号量大于或者等于所述防误触门限值时,进入防误触模式;其中,在所述防误触模式下,所述电子设备不上报检测到的所述用户的手部与所述触摸屏之间的第一接触点的触控信息。
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备确定所述垂直距离对应的所述手写笔的防误触门限值,包括:
    所述电子设备获取与所述垂直距离对应的标准笔尖信号量;其中,所述电子设备中预先保存有多个垂直距离及每个垂直距离对应的标准笔尖信号量;
    所述电子设备将所述标准笔尖信号量作为所述手写笔的防误触门限值。
  3. 根据权利要求1或2所述的方法,其特征在于,所述电子设备获取所述手写笔的笔尖所处的第一位置与所述触摸屏之间的垂直距离,包括:
    所述电子设备获取所述手写笔在第二状态下,所述手写笔与所述触摸屏之间的第一角度以及所述手写笔与地理水平线之间的第二角度;其中,所述第二状态包括所述用户握持所述手写笔,所述手写笔在所述触摸屏上的书写状态;
    所述电子设备计算所述第一角度和所述第二角度的差值,得到所述触摸屏与所述地理水平线之间的补偿角度;
    所述电子设备获取所述第一状态下,所述手写笔与所述地理水平线之间的第三角度;
    所述电子设备获取所述用户握持所述手写笔时,所述手写笔与所述用户的手部的接触点中最靠近所述手写笔笔尖的第二接触点;
    所述电子设备获取所述第二接触点对应位置与所述笔尖之间的握笔距离;
    所述电子设备根据所述第一角度、所述第三角度、所述补偿角度和所述握笔距离,计算所述垂直距离。
  4. 根据权利要求3所述的方法,其特征在于,所述电子设备根据所述第一角度、所述第三角度、所述补偿角度和所述握笔距离,计算所述垂直距离,包括:
    所述电子设备对所述第三角度和所述补偿角度求和,得到第四角度;
    所述电子设备对所述第四角度的余弦值和所述握笔距离求积,得到第一距离;
    所述电子设备将所述第一角度和所述第四角度求差,得到第五角度;
    所述电子设备对所述第五角度的正切值和所述第一距离求积,得到第二距离;所 述垂直距离包括所述第二距离。
  5. 根据权利要求2所述的方法,其特征在于,所述电子设备中保存有多个预设映射关系表,每个所述预设映射关系表中保存有所述电子设备在一种预设环境下,多个垂直距离及每个垂直距离对应的标准笔尖信号量;所述预设环境包括以下至少一种:所述电子设备是否正在充电、所述触摸屏是否贴膜,以及所述触摸屏的贴膜种类;
    在所述电子设备获取与所述垂直距离对应的标准笔尖信号量之前,所述方法还包括:
    所述电子设备获取所述电子设备的充电状态;其中,所述充电状态包括正在充电的状态或未充电的状态;
    所述电子设备获取所述手写笔处于第二状态时的第二笔尖信号量;其中,所述第二状态包括所述用户握持所述手写笔在所述触摸屏上的书写状态;所述手写笔处于所述第二状态下,所述触摸屏处于贴膜状态和未贴膜状态时,所述电子设备采集的笔尖信号量不同;所述触摸屏贴不同种类的膜时,所述电子设备采集的笔尖信号量不同;
    所述电子设备结合所述充电状态和所述第二笔尖信号量,在所述多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表。
  6. 根据权利要求5所述的方法,其特征在于,在所述电子设备结合所述充电状态和所述第二笔尖信号量,在所述多个预设映射关系表中筛选出与当前环境匹配的目标映射关系表之后,所述方法还包括:
    所述电子设备响应于第一事件,重新从所述多个预设映射关系表筛选出与当前环境匹配的目标映射关系表;
    其中,所述第一事件包括以下至少一项:所述电子设备的充电状态更新、所述电子设备休眠唤醒、所述电子设备重启,或者所述电子设备接收到映射关系重置指令。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,在所述电子设备确定所述垂直距离对应的所述手写笔的防误触门限值之后,所述方法还包括:
    所述电子设备将所述电子设备的防误触标识设置为第一标识;
    其中,所述电子设备在检测到所述第一笔尖信号量大于或者等于所述防误触门限值时,若检测到所述防误触标识为所述第一标识,则所述电子设备进入所述防误触模式。
  8. 根据权利要求7所述的方法,其特征在于,在所述电子设备将所述电子设备的防误触标识设置为第一标识之后,所述方法还包括:
    若所述电子设备检测到所述电子设备的移动距离大于预设阈值,所述电子设备将所述防误触标识设置为第二标识;
    其中,所述电子设备在检测到所述第一笔尖信号量大于或者等于所述防误触门限值时,若检测到所述防误触标识为所述第二标识,则所述电子设备不进入所述防误触模式。
  9. 根据权利要求1-8中任一项所述的方法,其特征在于,在所述电子设备确定所述垂直距离对应的所述手写笔的防误触门限值之后,所述方法还包括:
    所述电子设备获取所述用户在使用所述手写笔进行书写操作时的用户书写特征;所述用户书写特征包括以下至少一项:所述用户使用所述手写笔进行书写操作时,所 述用户的手部与所述触摸屏的接触面积,以及所述用户的手部与所述手写笔的第二接触点对应位置与所述笔尖之间的握笔距离;
    所述电子设备将所述用户书写特征与所述防误触门限值对应存储为用户特征表。
  10. 根据权利要求9所述的方法,其特征在于,在所述电子设备将所述用户书写特征与所述防误触门限值对应存储为用户特征表之后,所述方法还包括:
    所述电子设备在检测到所述用户的待匹配用户书写特征时,在所述用户特征表中查找是否存在所述待匹配用户书写特征;
    当所述电子设备在所述用户特征表中查找到所述待匹配用户书写特征时,所述电子设备从所述用户特征表中获取与所述待匹配用户书写特征对应的防误触门限值,作为所述用户的初始防误触门限值;所述初始防误触门限值用于所述电子设备根据所述手写笔处于所述第一状态的垂直距离、标准笔尖信号量对所述初始防误触门限值进行实时调整。
  11. 根据权利要求1-10中任一项所述的方法,其特征在于,所述电子设备根据所述第一笔尖信号量确定所述手写笔处于第一状态,包括:
    所述电子设备检测到n个第二事件,检测所述第一笔尖信号量最小的时刻;所述第二事件用于指示所述第一笔尖信号量由大变小,再由小变大;
    所述电子设备在所述第一笔尖信号量最小的时刻,确定所述手写笔处于所述第一状态。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,所述防误触门限值包括多组防误触门限值,每一组防误触门限值与所述触摸屏中的一个预设区域对应;所述触摸屏包括多个预设区域;所述电子设备确定所述垂直距离对应的所述手写笔的防误触门限值,包括:
    所述电子设备确定所述手写笔的笔尖所处的第一位置在所述触摸屏上的垂直投影位置;
    所述电子设备确定所述垂直投影位置在所述触摸屏上所属的目标区域;所述目标区域包含于所述多个预设区域;
    所述电子设备确定所述垂直距离、所述目标区域对应的所述防误触门限值。
  13. 一种电子设备,其特征在于,所述电子设备包括:处理器和存储器;所述存储器中存储有计算机程序代码,所述计算机程序代码包括计算机指令,当所述计算机指令被所述处理器执行时,使得所述电子设备执行如权利要求1-12任一项所述的方法。
  14. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-12中任一项所述的方法。
PCT/CN2023/113324 2022-10-29 2023-08-16 一种防误触方法及设备 WO2024087816A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211340769.9 2022-10-29
CN202211340769.9A CN115686264B (zh) 2022-10-29 2022-10-29 一种防误触方法及设备

Publications (1)

Publication Number Publication Date
WO2024087816A1 true WO2024087816A1 (zh) 2024-05-02

Family

ID=85046468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/113324 WO2024087816A1 (zh) 2022-10-29 2023-08-16 一种防误触方法及设备

Country Status (2)

Country Link
CN (1) CN115686264B (zh)
WO (1) WO2024087816A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686264B (zh) * 2022-10-29 2023-08-11 荣耀终端有限公司 一种防误触方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160053302A (ko) * 2014-11-03 2016-05-13 엘지디스플레이 주식회사 터치 센싱 시스템과 그 구동 방법
WO2016185838A1 (ja) * 2015-05-15 2016-11-24 シャープ株式会社 タッチペン、タッチパネルシステムおよび電子機器
CN110956939A (zh) * 2019-11-27 2020-04-03 华为技术有限公司 调节屏幕亮度的方法及电子设备
CN111488076A (zh) * 2020-04-03 2020-08-04 合肥讯飞读写科技有限公司 一种防误触方法、装置、设备及存储介质
CN115686264A (zh) * 2022-10-29 2023-02-03 荣耀终端有限公司 一种防误触方法及设备

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI420358B (zh) * 2009-12-07 2013-12-21 Waltop Int Corp 整合性的觸控輸入裝置及觸控辨識方法
JP5974745B2 (ja) * 2012-09-10 2016-08-23 コニカミノルタ株式会社 タッチパネル入力装置、タッチ入力方法及びタッチ入力制御プログラム
US10216330B2 (en) * 2014-07-02 2019-02-26 3M Innovative Properties Company Touch systems and methods including rejection of unintentional touch signals
JP2017021540A (ja) * 2015-07-09 2017-01-26 シャープ株式会社 検出回路およびタッチセンサシステム
CN108595029B (zh) * 2018-04-27 2021-11-16 广州视源电子科技股份有限公司 电容笔倾斜角度的确定方法、装置、设备和存储介质
KR102573727B1 (ko) * 2018-08-08 2023-09-04 삼성전자주식회사 스타일러스 펜을 인식하기 위한 전자 장치 및 방법
CN113260963A (zh) * 2019-03-08 2021-08-13 深圳市柔宇科技股份有限公司 书写笔记信息的传输方法及其传输系统、电子设备
JP2021033543A (ja) * 2019-08-22 2021-03-01 株式会社ワコム 入力装置
US11385741B2 (en) * 2020-08-31 2022-07-12 Microsoft Technology Licensing, Llc Method to reduce blanking area for palm rejection in low cost in-cell displays
CN113835541B (zh) * 2021-09-24 2024-02-13 青岛罗博数码科技有限公司 电磁笔笔迹倾角修正的检测以及计算方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160053302A (ko) * 2014-11-03 2016-05-13 엘지디스플레이 주식회사 터치 센싱 시스템과 그 구동 방법
WO2016185838A1 (ja) * 2015-05-15 2016-11-24 シャープ株式会社 タッチペン、タッチパネルシステムおよび電子機器
CN110956939A (zh) * 2019-11-27 2020-04-03 华为技术有限公司 调节屏幕亮度的方法及电子设备
CN111488076A (zh) * 2020-04-03 2020-08-04 合肥讯飞读写科技有限公司 一种防误触方法、装置、设备及存储介质
CN115686264A (zh) * 2022-10-29 2023-02-03 荣耀终端有限公司 一种防误触方法及设备

Also Published As

Publication number Publication date
CN115686264B (zh) 2023-08-11
CN115686264A (zh) 2023-02-03

Similar Documents

Publication Publication Date Title
CN109997348B (zh) 一种终端界面的显示方法及终端
US11829200B2 (en) Electronic device for reducing occurrence of unintended user input and operation method for the same
US10162512B2 (en) Mobile terminal and method for detecting a gesture to control functions
EP2711825B1 (en) System for providing a user interface for use by portable and other devices
US20200125229A1 (en) Display Processing Method and Apparatus
EP2743819A2 (en) Terminal and method for providing user interface using a pen
EP3133473A1 (en) Method of sensing pressure by touch sensor and electronic device adapted thereto
JP7329150B2 (ja) タッチボタン、制御方法及び電子機器
WO2024087816A1 (zh) 一种防误触方法及设备
US20150160731A1 (en) Method of recognizing gesture through electronic device, electronic device, and computer readable recording medium
WO2017197636A1 (zh) 识别误触摸操作的方法和电子设备
US11550421B2 (en) Electronic device control method and input device
CN108334303B (zh) 电子设备及其控制方法
CN113919390A (zh) 一种识别触摸操作的方法及电子设备
US8711110B2 (en) Touchscreen with Z-velocity enhancement
US10114496B2 (en) Apparatus for measuring coordinates and control method thereof
US20140348334A1 (en) Portable terminal and method for detecting earphone connection
CN107943406B (zh) 一种触摸屏触控点确定方法及终端
WO2018166057A1 (zh) 一种输出触控信号的方法和电子设备
KR20150009833A (ko) 장소 인식을 제어하는 휴대 단말 및 방법
US20240053880A1 (en) Handwriting drawing method and apparatus, electronic device, and readable storage medium
CN110050249B (zh) 一种输入方法及智能终端设备
CN109085987B (zh) 设备控制方法、装置、存储介质及电子设备
WO2019183969A1 (zh) 一种终端的显示方法及终端
CN115145416A (zh) 智能化切换笔型的方法、装置、设备及存储介质