CN111158512A - Electronic pen control method, device, equipment and readable storage medium - Google Patents

Electronic pen control method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN111158512A
CN111158512A CN201911403703.8A CN201911403703A CN111158512A CN 111158512 A CN111158512 A CN 111158512A CN 201911403703 A CN201911403703 A CN 201911403703A CN 111158512 A CN111158512 A CN 111158512A
Authority
CN
China
Prior art keywords
electronic pen
preset
state
threshold
switching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911403703.8A
Other languages
Chinese (zh)
Other versions
CN111158512B (en
Inventor
詹梓煜
李卓珺
邓建
钟洪耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Original Assignee
Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianfenyi Intelligent Technology Co Ltd filed Critical Shenzhen Qianfenyi Intelligent Technology Co Ltd
Priority to CN201911403703.8A priority Critical patent/CN111158512B/en
Publication of CN111158512A publication Critical patent/CN111158512A/en
Application granted granted Critical
Publication of CN111158512B publication Critical patent/CN111158512B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03545Pens or stylus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Power Sources (AREA)

Abstract

The invention discloses an electronic pen control method, an electronic pen control device, electronic pen control equipment and a readable storage medium, wherein the electronic pen control method detects acceleration data of an electronic pen when the electronic pen is in a dormant state, namely preliminarily judges the use intention of a user on the electronic pen by detecting the acceleration data; judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data, namely further judging the use intention of the user on the electronic pen through the acceleration change rate in the acceleration data; if the acceleration change rate is greater than the preset first threshold, the electronic pen is switched from the dormant state to the working state so as to start more functions, so that the use intention of the user can be more accurately judged, unnecessary consumption of electric quantity caused by misjudgment of the use intention of the user is avoided, and the service life of the device is prolonged.

Description

Electronic pen control method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of electronic devices, and in particular, to a method, an apparatus, a device and a readable storage medium for controlling an electronic pen.
Background
With the rapid development of science and technology, various electronic devices are increasingly widely applied to daily life of people. For example, an electronic pen applied to a touch screen device such as a tablet computer generally determines a user intention by presetting various sensors such as a pressure sensor and an acceleration sensor in hardware, and then switches an operation state inside the electronic pen. However, the mode that only the sensor determines the use intention of the user often has a misjudgment situation, for example, if the acceleration sensor is preset in the active electronic pen, if the user puts the electronic pen on a backpack, the backpack shakes up and down when walking, the acceleration sensor misjudgment is caused, and the working mode of the active electronic pen is started; or the pressure sensor is preset in the active electronic pen and is extruded by other articles in the backpack, so that misjudgment of the pressure sensor can be caused, and the working mode is started. Both of the above two situations cause unnecessary power consumption of the electronic pen, thereby causing a technical problem of false triggering of the working mode of the electronic pen.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide an electronic pen control method, and aims to solve the technical problem of false triggering of the working mode of an electronic pen.
In order to achieve the above object, the present invention provides an electronic pen control method applied to an electronic pen control apparatus, the electronic pen control method including the steps of:
detecting acceleration data of the electronic pen when the electronic pen is in a dormant state;
judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and if the acceleration change rate is greater than the preset first threshold value, switching the electronic pen from the dormant state to the working state.
Optionally, if the acceleration rate is greater than the preset first threshold, the step of switching the electronic pen from the sleep state to the working state includes:
if the acceleration change rate is larger than the preset first threshold, judging whether the angle change amount in the acceleration data is larger than a preset second threshold;
if the angle variation is larger than a preset second threshold, switching the electronic pen from the dormant state to a working state;
and if the angle variation is not larger than the preset second threshold, not changing the current dormant state of the electronic pen.
Optionally, if the angle variation is greater than a preset second threshold, the step of switching the electronic pen from the sleep state to the working state includes:
if the angle variation is larger than the preset second threshold, judging whether the variation rate of the angle variation in the acceleration data is larger than a preset third threshold;
if the change rate is larger than the preset third threshold, switching the electronic pen from the dormant state to a working state;
and if the change rate is not greater than the preset third threshold, not changing the current sleep state of the electronic pen.
Optionally, if the acceleration rate is greater than the preset first threshold, the step of switching the electronic pen from the sleep state to the working state includes:
if the acceleration change rate in the acceleration data is larger than the preset first threshold, starting a code printing signal detection channel in the electronic pen, and judging whether a code printing signal is detected;
if the code printing signal is detected, switching the electronic pen from the dormant state to a working state;
and if the code printing signal is not detected, the current sleep state of the electronic pen is not changed.
Optionally, if the code printing signal is detected, the step of switching the electronic pen from the sleep state to the working state includes:
if the code printing signal is detected, acquiring a current power consumption parameter based on the code printing signal;
and determining that the current power consumption state is the dormant state according to the current power consumption parameter, and switching the electronic pen from the dormant state to a working state.
Optionally, after the step of switching the electronic pen from the sleep state to the working state if the jerk is greater than the preset first threshold, the method further includes:
judging whether the code printing signal is detected within a preset first time length or not;
if the code printing signal is not detected within the preset first time period, switching the electronic pen from the working state to the dormant state, and closing a code printing signal detection path;
and if the code printing signal is detected within the preset first time length, the current working state of the electronic pen is not changed.
Optionally, after the steps of switching the electronic pen from the working state to the sleep state and closing the code printing signal detection path if the code printing signal is not detected within the preset first time period, the method further includes:
judging whether the acceleration data is detected within a preset second time length or not;
if the acceleration data are not detected within the preset second duration, switching the electronic pen from the dormant state to a power-off state;
if the acceleration data is detected within the preset second duration, repeating the steps, and judging whether the acceleration change rate of the electronic pen is larger than a preset first threshold value or not according to the acceleration data.
Further, to achieve the above object, the present invention provides an electronic pen control device including:
the target data detection module is used for detecting the acceleration data of the electronic pen when the electronic pen is in a dormant state;
the target data judging module is used for judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and the working state switching module is used for switching the electronic pen from the dormant state to the working state if the acceleration change rate is greater than the preset first threshold value.
Further, to achieve the above object, the present invention also provides an electronic pen control apparatus including: a memory, a processor and an electronic pen control program stored on the memory and executable on the processor, the electronic pen control program, when executed by the processor, implementing the steps of the electronic pen control method as described above.
Furthermore, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon an electronic pen control program, which when executed by a processor, implements the steps of the electronic pen control method as described above.
The invention provides an electronic pen control method, an electronic pen control device, electronic pen control equipment and a computer readable storage medium. The electronic pen control method detects acceleration data of an electronic pen when the electronic pen is in a dormant state; judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data; and if the acceleration change rate is greater than the preset first threshold value, switching the electronic pen from the dormant state to the working state. Through the mode, the electronic pen using intention of the user is preliminarily judged by detecting the acceleration data, the electronic pen using intention of the user is further judged by analyzing the acceleration change rate in the acceleration data, so that the sleep state of the electronic pen is adjusted and converted into the normal energy-consuming working state to start more functions, the user using intention of the user can be judged more accurately, unnecessary consumption of electric quantity caused by misjudgment of the user using intention is avoided, the using time of the electronic pen is prolonged, and the technical problem that the working mode of the electronic pen is triggered by mistake is finally solved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first exemplary embodiment of a method for controlling an electronic pen according to the present invention;
fig. 3 is a flowchart illustrating a control method of an electronic pen according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a PC, and can also be a mobile terminal device with a display function, such as a smart phone, a tablet computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compress standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compress standard Audio Layer 3) player, a portable computer, and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory device separate from the processor 1001 described above.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an electronic pen control program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the electronic pen control program stored in the memory 1005 and perform the following operations:
detecting acceleration data of the electronic pen when the electronic pen is in a dormant state;
judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and if the acceleration change rate is greater than the preset first threshold value, switching the electronic pen from the dormant state to the working state.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
if the acceleration change rate is larger than the preset first threshold, judging whether the angle change amount in the acceleration data is larger than a preset second threshold;
if the angle variation is larger than a preset second threshold, switching the electronic pen from the dormant state to a working state;
and if the angle variation is not larger than the preset second threshold, not changing the current dormant state of the electronic pen.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
if the angle variation is larger than the preset second threshold, judging whether the variation rate of the angle variation in the acceleration data is larger than a preset third threshold;
if the change rate is larger than the preset third threshold, switching the electronic pen from the dormant state to a working state;
and if the change rate is not greater than the preset third threshold, not changing the current sleep state of the electronic pen.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
if the acceleration change rate in the acceleration data is larger than the preset first threshold, starting a code printing signal detection channel in the electronic pen, and judging whether a code printing signal is detected;
if the code printing signal is detected, switching the electronic pen from the dormant state to a working state;
and if the code printing signal is not detected, the current sleep state of the electronic pen is not changed.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
if the code printing signal is detected, acquiring a current power consumption parameter based on the code printing signal;
and determining that the current power consumption state is the dormant state according to the current power consumption parameter, and switching the electronic pen from the dormant state to a working state.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
judging whether the code printing signal is detected within a preset first time length or not;
if the code printing signal is not detected within the preset first time period, switching the electronic pen from the working state to the dormant state, and closing a code printing signal detection path;
and if the code printing signal is detected within the preset first time length, the current working state of the electronic pen is not changed.
Further, the processor 1001 may call the electronic pen control program stored in the memory 1005, and also perform the following operations:
judging whether the acceleration data is detected within a preset second time length or not;
if the acceleration data are not detected within the preset second duration, switching the electronic pen from the dormant state to a power-off state;
if the acceleration data is detected within the preset second duration, repeating the steps, and judging whether the acceleration change rate of the electronic pen is larger than a preset first threshold value or not according to the acceleration data.
Based on the above hardware structure, various embodiments of the electronic pen control method of the present invention are provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of an electronic pen control method.
A first embodiment of the present invention provides an electronic pen control method, including the steps of:
with the rapid development of science and technology, various electronic devices are increasingly widely applied to daily life of people. For example, an active electronic pen applied to a touch screen device such as a tablet computer generally determines a user intention by presetting various sensors such as a pressure sensor and an acceleration sensor in hardware, and then switches an operation state inside the electronic pen. However, the mode of judging the practical intention of the user only by the sensor often has a misjudgment situation, for example, if the acceleration sensor is preset in the active electronic pen, if the user puts the electronic pen on a backpack, the backpack shakes up and down when walking, the acceleration sensor misjudgment is caused, and the working mode of the active electronic pen is started; or the pressure sensor is preset in the active electronic pen and is extruded by other articles in the backpack, so that misjudgment of the pressure sensor can be caused, and the working mode is started. Both of the above two situations cause unnecessary power consumption of the electronic pen, thereby causing a technical problem of false triggering of the working mode of the electronic pen.
In order to solve the problems, the invention preliminarily judges the use intention of the user on the electronic pen by detecting the acceleration data, further judges the use intention of the user on the electronic pen by analyzing the change rate of the acceleration in the acceleration data, thereby adjusting the dormant state of the electronic pen, converting the dormant state into the working state with normal energy consumption so as to start more functions, more accurately judging the use intention of the user, avoiding unnecessary consumption of electric quantity caused by misjudging the use intention of the user, prolonging the service life of the electronic pen and finally solving the technical problem of mistriggering of the working mode of the electronic pen. The invention is applied to the electronic pen.
Step S10, when the electronic pen is in a dormant state, detecting acceleration data of the electronic pen;
the acceleration sensor may be a change rate of acceleration, an angular change amount of acceleration, a change rate of the angular change amount of acceleration, or the like.
In this embodiment, an acceleration sensor may be preset in the electronic pen, and acceleration data may be obtained through the acceleration sensor, and the number of the preset sensors is not limited in this embodiment. If the current electronic pen is set to be the active capacitive pen, the capacitive pen is in a dormant state. When a user directly or indirectly initiates an operation which can be sensed by an acceleration sensor in the capacitive pen to the capacitive pen, the acceleration sensor senses the current action of the user, detects the current acceleration data and sends the current acceleration data to a main control module in the capacitive pen. And the main control module receives the acceleration data sent by the acceleration sensor, and can preliminarily judge that the user has the current use intention. It is understood that the power switch of the capacitive stylus is turned on before step S10. In addition, in addition to the acceleration sensor, other types of sensors such as a pressure sensor may be preset in the capacitive pen to further detect the user's intention. And each power consumption state of the capacitive pen can be defined as different power consumption levels, for example, the sleep state is defined as a first power consumption level, and the working state is defined as a second power consumption level. Specifically, a user firstly presses a power switch key on the capacitance pen, a bistable control circuit in the capacitance pen detects state switching of the power switch key, current output is switched to another stable state, and a field effect transistor MOSFET of the power switch is driven to electrify an acceleration sensor, a booster circuit and a main control circuit in the capacitance pen so as to complete startup operation. After the capacitive pen is started, the capacitive pen is in an energy-saving state, and the main control circuit detects the state of the acceleration sensor at any time. When the user picks up the capacitance pen, the acceleration sensor senses the current action of the user and acquires the current acceleration change rate.
Step S20, judging whether the acceleration change rate of the electronic pen is larger than a preset first threshold value according to the acceleration data;
the preset first threshold is a critical value used for determining the current use intention of the user according to the acceleration change rate, and is set based on the preset use habit of the user, and can be flexibly set according to the actual situation, which is not specifically limited in this embodiment.
In this embodiment, since the acceleration data sensed by the current acceleration sensor may be generated by a user's misoperation, such as a user placing a pen in a bag and shaking the pen to cause movement of the pen, the user's intention of use needs to be further confirmed to eliminate the misoperation. And the preset acceleration sensor sends the current acceleration change rate to the main control circuit. When the main control circuit receives the acceleration change rate, the main control circuit compares the acceleration change rate with a preset first threshold value.
Step S30, if the acceleration rate is greater than the preset first threshold, switching the electronic pen from the sleep state to the working state.
In this embodiment, if the main control circuit in the capacitive pen determines that the change rate of the acceleration sent by the acceleration sensor is greater than the preset first threshold, it may be determined that the user currently needs to use the capacitive pen, adjust the current energy consumption state, and switch the sleep mode in which the capacitive pen is located to the standard working mode; and if the acceleration change rate is judged to be less than or equal to the preset first threshold value, the current dormant state is not changed. In addition, the use intention of the user can be further judged according to other numerical values in the acceleration data or whether a code printing signal sent by the touch screen device is detected.
The invention provides an electronic pen control method. The electronic pen control method detects acceleration data of an electronic pen when the electronic pen is in a dormant state; judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data; and if the acceleration change rate is greater than the preset first threshold value, switching the electronic pen from the dormant state to the working state. Through the mode, the electronic pen using intention of the user is preliminarily judged by detecting the acceleration data, the electronic pen using intention of the user is further judged by analyzing the acceleration change rate in the acceleration data, so that the sleep state of the electronic pen is adjusted and converted into the normal energy-consuming working state to start more functions, the user using intention of the user can be judged more accurately, unnecessary consumption of electric quantity caused by misjudgment of the user using intention is avoided, the using time of the electronic pen is prolonged, and the technical problem that the working mode of the electronic pen is triggered by mistake is finally solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for controlling an electronic pen according to a second embodiment of the present invention.
Based on the first embodiment shown in fig. 2 described above, in the present embodiment, step S20 includes:
step S21, if the acceleration rate is greater than the preset first threshold, determining whether an angle variation in the acceleration data is greater than a preset second threshold;
the preset second threshold is a critical value used for further determining the current use intention of the user according to the angle variation, and is set based on the preset use habit of the user, and can be flexibly set according to the actual situation, which is not specifically limited by the embodiment.
In this embodiment, the capacitive stylus is currently in a sleep state. If the main control circuit in the capacitive pen judges that the acceleration change rate is larger than a first threshold preset according to the use habit of the user, whether the angle change amount of the acceleration in the acceleration data is larger than a preset second threshold is further judged.
Step S22, if the angle variation is greater than a preset second threshold, switching the electronic pen from the sleep state to a working state;
in this embodiment, if the main control circuit in the capacitive pen determines that the acceleration angle variation in the acceleration data is greater than the preset second threshold, it may be determined that the current user has an intention to use the capacitive pen, so that the sleep state at this time is switched to the standard working state for the user to use the capacitive pen normally.
Step S23, if the angle variation is not greater than the preset second threshold, not changing the current sleep state of the electronic pen.
In this embodiment, if the main control circuit in the capacitive pen determines that the acceleration angle variation in the acceleration data is less than or equal to the preset second threshold, the current situation may be that the user puts the capacitive pen in a bag and shakes the capacitive pen during walking, rather than a scenario that the user takes the pen to prepare for writing, so that it may be determined that the current user does not have an intention to use the capacitive pen, based on maintaining the current sleep state.
Further, not shown in the figure, in the present embodiment, the step S22 includes:
step a, if the angle variation is larger than the preset second threshold, judging whether the variation rate of the angle variation in the acceleration data is larger than a preset third threshold;
the preset third threshold is a critical value for further determining the current use intention of the user according to the change rate of the angle change amount, and is set based on the preset use habit of the user, and can be flexibly set according to the actual situation, which is not specifically limited in this embodiment.
In this embodiment, if the capacitive pen determines that the angle variation in the current acceleration data is greater than the preset second threshold, the change rate of the angle variation in the acceleration data is further determined, and the value of the change rate is compared with a preset third threshold based on the use habit of the user, so as to further confirm the use intention of the user and avoid the situation that the user opens the working state of the capacitive pen due to misoperation.
B, if the change rate is larger than the preset third threshold, switching the electronic pen from the dormant state to a working state;
in this embodiment, if the main control circuit in the capacitive pen determines that the change rate of the angle change in the acceleration data is greater than the preset third threshold, it may be determined that the user currently has an intention to use the capacitive pen, and the current sleep mode is switched to the operating state, so that the user can use the capacitive pen normally.
And c, if the change rate is not greater than the preset third threshold, not changing the current sleep state of the electronic pen.
In this embodiment, if the main control circuit in the capacitive pen determines that the change rate of the angle change in the acceleration data is less than or equal to the preset third threshold, it may be determined that the user does not currently have an intention to use the capacitive pen, and the current acceleration generation cause may be caused by a user's misoperation, so that the current sleep state of the capacitive pen is continuously maintained.
The invention provides an electronic pen control method. The electronic pen control method further confirms the current use intention of the user by judging whether the angle variation is larger than a preset second threshold value, so that the misjudgment rate of switching the electronic pen from a non-working state to a working state is reduced; the current use intention of the user is further confirmed by judging whether the change rate of the angle change is greater than a preset third threshold value, so that the condition that the user triggers the working state of the electronic pen by mistake is avoided to the greatest extent, and the service life of the electronic pen is prolonged.
Not shown in the drawings, a third embodiment of the electronic pen control method according to the present invention is provided based on the first embodiment shown in fig. 2. In the present embodiment, step S20 includes:
step d, if the acceleration rate of change in the acceleration data is greater than the preset first threshold, starting a code printing signal detection path in the electronic pen, and judging whether a code printing signal is detected;
the code printing signal is a specific signal used for matching and sent out outwards when the touch screen equipment such as a flat plate is in a working state.
In this embodiment, if the main control circuit in the capacitive pen determines that the acceleration change rate in the current acceleration data is greater than the preset first threshold, a code printing signal detection path for detecting a screen end code printing signal sent by the touch screen device, such as a tablet, in a normal working state is opened, so as to further determine whether the current user brings the capacitive pen close to the touch screen device.
Step e, if the code printing signal is detected, switching the electronic pen from the dormant state to a working state;
in this embodiment, if the main control circuit of the capacitive pen currently detects a screen end code printing signal sent by the touch screen device in the operating state, it may be determined that the user currently brings the capacitive pen close to the touch screen device, that is, it is determined that the user currently has an intention to use the capacitive pen, so that the capacitive pen is switched from the current sleep state to the operating state, so that the user can use the capacitive pen conveniently.
And f, if the code printing signal is not detected, not changing the current sleep state of the electronic pen.
In this embodiment, if the main control circuit of the capacitive pen does not detect a screen end code printing signal sent by the touch screen device in the operating state, it may be determined that the user does not approach the capacitive pen to the touch screen device currently, that is, it is determined that the user does not have an intention to use the capacitive pen currently, so that the current sleep mode is continuously maintained to reduce unnecessary energy consumption.
Further, in this embodiment, step S20 includes:
step g, if the code printing signal is detected, acquiring a current power consumption parameter based on the code printing signal;
in this embodiment, after the capacitive pen detects a screen end code printing signal sent by the tablet, an instruction for acquiring the current power consumption parameter is triggered. The main control circuit obtains the power consumption grade corresponding to the current operation scene. Wherein, the power consumption level is used for describing the power consumption level of the operation scene in the device. The power consumption parameters may include performance parameters and behavior parameters. And the main control circuit matches the acquired current behavior parameters and current performance parameters with the standard behavior parameters and the standard performance parameters corresponding to the preset energy consumption levels to determine the power consumption level of the current internal operation state of the capacitive pen.
And h, determining that the current power consumption state is the dormant state according to the current power consumption parameters, and switching the electronic pen from the dormant state to a working state.
In this embodiment, after matching the current behavior parameter and the current performance parameter with the standard behavior parameter and the standard performance parameter corresponding to each preset power consumption level, the main control circuit determines that the current power consumption state of the capacitive pen is the sleep state corresponding to the first power consumption level, and switches the sleep state to the standard working state corresponding to the second power consumption level, so that the user can use the function of the electronic pen normally.
Further, in this embodiment, after step S20, the method further includes:
step i, judging whether the code printing signal is detected within a preset first time length or not;
the preset first duration is a time threshold for triggering whether the capacitive pen performs state switching based on the code printing signal in the working state, and the specific duration value can be flexibly set according to the actual situation, which is not limited in this embodiment.
In this embodiment, at this time, the capacitive pen is in the standard operating state, and in order to further reduce unnecessary energy consumption, a first duration is preset, and it is determined whether a code printing signal sent by another device is received within the first duration after the capacitive pen is switched to the standard operating state.
Step j, if the code printing signal is not detected within the preset first time period, switching the electronic pen from the working state to the dormant state, and closing the code printing signal detection path;
in this embodiment, within a preset first time period after the capacitive pen is in the standard working state, if the code printing signal sent by the tablet is not detected, the standard working state is switched to the sleep state. Specifically. The preset first time duration is set to be twenty minutes, if a user does not contact the capacitive pen with the flat plate in the working state within twenty minutes after the capacitive pen is in the standard working state, namely, the user fails to receive a screen end code printing signal sent by the flat plate, a main control circuit in the capacitive pen switches the current standard working state to the dormant state, and closes a specific channel for detecting the code printing signal, so that energy consumption during the period when the user is not in use is reduced.
And k, if the code printing signal is detected within the preset first duration, the current working state of the electronic pen is not changed.
In this embodiment, within a preset second time period after the capacitive pen is in the standard working state, if a screen end code printing signal sent by the tablet is detected, it can be determined that the capacitive pen still needs to be used by the current user, so that the current standard working state is continuously maintained for normal use by the user.
Further, in this embodiment, after step j, the method further includes:
step l, judging whether the acceleration data is detected within a preset second time length;
the preset second time length is a time threshold used for judging whether the capacitive pen is in a sleep state after the preset first time length, and the specific time length value can be flexibly set according to the actual situation, which is not limited in this embodiment.
In this embodiment, it can be understood that the capacitive pen is switched to the sleep state because the capacitive pen does not receive the code printing signal within the preset first time period, and at this time, the path for detecting the code printing signal is closed. In order to further reduce unnecessary energy consumption, a second time duration is preset, and whether the acceleration data sent by the acceleration sensor is received or not is continuously judged within a third time duration after the capacitive pen is switched from the standard working state to the dormant state.
Step m, if the acceleration data is not detected within the preset second duration, switching the electronic pen from the dormant state to a power-off state;
in this embodiment, within a preset second time period after the capacitive pen is in the sleep state, if acceleration data sent by the acceleration sensor is not detected, it can be determined that the current user does not have an intention to use the capacitive pen, and the current sleep state is switched to the power-off state, so that energy consumption is reduced to the maximum extent.
And n, if the acceleration data are detected within the preset second time length, repeating the steps, and judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data.
In this embodiment, within a preset second time period after the capacitive pen is in the sleep state, if the acceleration data sent by the acceleration sensor is detected, the execution scenario of step S10 is satisfied, and step S20 and the subsequent operations are repeatedly executed.
The invention provides an electronic pen control method. The electronic pen control method further controls the opening and closing of a channel for detecting the coding signal based on the acceleration change rate, so that the electronic pen can more accurately determine whether the current user has the intention of using the device, and the standard working mode is started when the user needs to use the electronic pen at present, thereby avoiding unnecessary energy consumption caused by the fact that the user mistakenly touches the electronic pen to start the working state in advance; determining the power consumption grade through the power consumption parameters, so that the equipment can accurately judge the current power consumption condition; when the electronic pen is controlled to be switched from the standard working state to the dormant state and the power-off state by presetting the first time length and the code printing signal as well as the second time length and the acceleration data, and unnecessary power consumption is further reduced.
The invention also provides a computer readable storage medium.
The computer readable storage medium of the invention has stored thereon an electronic pen control program which, when executed by a processor, carries out the steps of the electronic pen control method as described above.
The method implemented when the electronic pen control program is executed may refer to various embodiments of the electronic pen control method of the present invention, and details thereof are not repeated herein.
The invention also provides an electronic pen control device.
The electronic pen control device includes:
the target data detection module is used for detecting the acceleration data of the electronic pen when the electronic pen is in a dormant state;
the target data judging module is used for judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and the working state switching module is used for switching the electronic pen from the dormant state to the working state if the acceleration change rate is greater than the preset first threshold value.
The invention also provides electronic pen control equipment.
The electronic pen control apparatus comprises a processor, a memory and an electronic pen control program stored on the memory and executable on the processor, wherein the electronic pen control program, when executed by the processor, implements the steps of the electronic pen control method as described above.
The method for implementing the electronic pen control program when executed may refer to various embodiments of the electronic pen control method of the present invention, and will not be described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An electronic pen control method, comprising:
detecting acceleration data of the electronic pen when the electronic pen is in a dormant state;
judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and if the acceleration change rate is greater than the preset first threshold value, switching the electronic pen from the dormant state to the working state.
2. The electronic pen control method of claim 1, wherein the step of switching the electronic pen from the sleep state to the active state if the jerk is greater than the preset first threshold comprises:
if the acceleration change rate is larger than the preset first threshold, judging whether the angle change amount in the acceleration data is larger than a preset second threshold;
if the angle variation is larger than a preset second threshold, switching the electronic pen from the dormant state to a working state;
and if the angle variation is not larger than the preset second threshold, not changing the current dormant state of the electronic pen.
3. The electronic pen control method according to claim 2, wherein the step of switching the electronic pen from the sleep state to the working state if the angle variation is larger than a preset second threshold value comprises:
if the angle variation is larger than the preset second threshold, judging whether the variation rate of the angle variation in the acceleration data is larger than a preset third threshold;
if the change rate is larger than the preset third threshold, switching the electronic pen from the dormant state to a working state;
and if the change rate is not greater than the preset third threshold, not changing the current sleep state of the electronic pen.
4. The electronic pen control method of claim 1, wherein the step of switching the electronic pen from the sleep state to the active state if the jerk is greater than the preset first threshold comprises:
if the acceleration change rate in the acceleration data is larger than the preset first threshold, starting a code printing signal detection channel in the electronic pen, and judging whether a code printing signal is detected;
if the code printing signal is detected, switching the electronic pen from the dormant state to a working state;
and if the code printing signal is not detected, the current sleep state of the electronic pen is not changed.
5. The electronic pen control method of claim 4, wherein the step of switching the electronic pen from the sleep state to the working state if the coding signal is detected comprises:
if the code printing signal is detected, acquiring a current power consumption parameter based on the code printing signal;
and determining that the current power consumption state is the dormant state according to the current power consumption parameter, and switching the electronic pen from the dormant state to a working state.
6. The electronic pen control method according to claim 4, wherein after the step of switching the electronic pen from the sleep state to the active state if the jerk is greater than the preset first threshold, the method further comprises:
judging whether the code printing signal is detected within a preset first time length or not;
if the code printing signal is not detected within the preset first time period, switching the electronic pen from the working state to the dormant state, and closing a code printing signal detection path;
and if the code printing signal is detected within the preset first time length, the current working state of the electronic pen is not changed.
7. The electronic pen control method of claim 6, wherein after the steps of switching the electronic pen from the working state to the sleep state and closing the code signal detection path if the code signal is not detected within the preset first time period, further comprising:
judging whether the acceleration data is detected within a preset second time length or not;
if the acceleration data are not detected within the preset second duration, switching the electronic pen from the dormant state to a power-off state;
if the acceleration data is detected within the preset second duration, repeating the steps, and judging whether the acceleration change rate of the electronic pen is larger than a preset first threshold value or not according to the acceleration data.
8. An electronic pen control apparatus, characterized by comprising:
the target data detection module is used for detecting the acceleration data of the electronic pen when the electronic pen is in a dormant state;
the target data judging module is used for judging whether the acceleration change rate of the electronic pen is greater than a preset first threshold value or not according to the acceleration data;
and the working state switching module is used for switching the electronic pen from the dormant state to the working state if the acceleration change rate is greater than the preset first threshold value.
9. An electronic pen control apparatus characterized by comprising: memory, a processor and an electronic pen control program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the electronic pen control method according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an electronic pen control program, which when executed by a processor implements the steps of the electronic pen control method according to any one of claims 1 to 7.
CN201911403703.8A 2019-12-30 2019-12-30 Electronic pen control method, device, equipment and readable storage medium Active CN111158512B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911403703.8A CN111158512B (en) 2019-12-30 2019-12-30 Electronic pen control method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403703.8A CN111158512B (en) 2019-12-30 2019-12-30 Electronic pen control method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111158512A true CN111158512A (en) 2020-05-15
CN111158512B CN111158512B (en) 2023-05-23

Family

ID=70559657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403703.8A Active CN111158512B (en) 2019-12-30 2019-12-30 Electronic pen control method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111158512B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486309A (en) * 2020-11-27 2021-03-12 广东小天才科技有限公司 Method for determining duration corresponding to idle state, control chip and electronic equipment
CN113377206A (en) * 2021-07-05 2021-09-10 安徽淘云科技股份有限公司 Dictionary pen lifting awakening method, device and equipment
CN114356121A (en) * 2021-12-06 2022-04-15 深圳市千分一智能技术有限公司 Method and device for judging use of active pen, active pen and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615087A (en) * 2008-06-26 2009-12-30 曜瀚科技股份有限公司 Electronic pen framework and data entry device thereof
CN103810817A (en) * 2014-02-21 2014-05-21 广东乐源数字技术有限公司 Wearable human body collapse detecting and warning device and application
US8885285B1 (en) * 2013-07-23 2014-11-11 Western Digital Technologies, Inc. Impact detection for data storage device
CN105852810A (en) * 2016-04-05 2016-08-17 福州市马尾区小微发明信息科技有限公司 Sleep control method
CN108749399A (en) * 2018-05-30 2018-11-06 中国联合网络通信集团有限公司 Appliance for holding pen and pen holding posture detecting system
CN110363959A (en) * 2019-05-28 2019-10-22 哈尔滨理工大学 It is a kind of that determination method is fallen down based on plantar pressure and 3-axis acceleration sensor
CN110531874A (en) * 2019-08-05 2019-12-03 深圳市千分一智能技术有限公司 A kind of active capacitance pen and its electricity-saving control method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615087A (en) * 2008-06-26 2009-12-30 曜瀚科技股份有限公司 Electronic pen framework and data entry device thereof
US8885285B1 (en) * 2013-07-23 2014-11-11 Western Digital Technologies, Inc. Impact detection for data storage device
CN103810817A (en) * 2014-02-21 2014-05-21 广东乐源数字技术有限公司 Wearable human body collapse detecting and warning device and application
CN105852810A (en) * 2016-04-05 2016-08-17 福州市马尾区小微发明信息科技有限公司 Sleep control method
CN108749399A (en) * 2018-05-30 2018-11-06 中国联合网络通信集团有限公司 Appliance for holding pen and pen holding posture detecting system
CN110363959A (en) * 2019-05-28 2019-10-22 哈尔滨理工大学 It is a kind of that determination method is fallen down based on plantar pressure and 3-axis acceleration sensor
CN110531874A (en) * 2019-08-05 2019-12-03 深圳市千分一智能技术有限公司 A kind of active capacitance pen and its electricity-saving control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112486309A (en) * 2020-11-27 2021-03-12 广东小天才科技有限公司 Method for determining duration corresponding to idle state, control chip and electronic equipment
CN112486309B (en) * 2020-11-27 2024-05-28 广东小天才科技有限公司 Method for determining corresponding duration of idle state, control chip and electronic equipment
CN113377206A (en) * 2021-07-05 2021-09-10 安徽淘云科技股份有限公司 Dictionary pen lifting awakening method, device and equipment
CN114356121A (en) * 2021-12-06 2022-04-15 深圳市千分一智能技术有限公司 Method and device for judging use of active pen, active pen and computer storage medium
CN114356121B (en) * 2021-12-06 2023-07-14 深圳市千分一智能技术有限公司 Active pen use discriminating method and apparatus, active pen and computer storage medium

Also Published As

Publication number Publication date
CN111158512B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
CN111158512B (en) Electronic pen control method, device, equipment and readable storage medium
CN109712621B (en) Voice interaction control method and terminal
CN108334272B (en) Control method and mobile terminal
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN108196753B (en) Interface switching method and mobile terminal
CN108647505A (en) Unlocked by fingerprint method and Related product
CN103699260A (en) Method for starting terminal function module, and terminal equipment
CN108521501B (en) Voice input method, mobile terminal and computer readable storage medium
CN107834640B (en) Charging method and terminal
CN109600468B (en) Control method of foldable terminal and foldable terminal
CN109062634B (en) Application starting method and mobile terminal
CN109683768B (en) Application operation method and mobile terminal
CN107967418B (en) Face recognition method and mobile terminal
CN107832067B (en) Application updating method, mobile terminal and computer readable storage medium
CN111240503A (en) Method and device for converting nib pressure of active pen, active pen and storage medium
JP7221305B2 (en) Object recognition method and mobile terminal
CN106532876B (en) Power supply control method and device and computer equipment
CN110825296A (en) Application control method, device and computer readable storage medium
CN110825306B (en) Braille input method, device, terminal and readable storage medium
CN109947323B (en) Terminal display method and terminal
CN108170360B (en) Control method of gesture function and mobile terminal
CN111580911A (en) Operation prompting method and device for terminal, storage medium and terminal
CN108108608B (en) Control method of mobile terminal and mobile terminal
CN108563376B (en) Application program starting method and mobile terminal
US11461509B2 (en) Screen control method and terminal

Legal Events

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