Disclosure of Invention
The invention mainly aims to provide a sleep awakening method for an active pen, and aims to solve the technical problem of simply and accurately awakening the active pen.
In addition, in order to achieve the above object, the present invention further provides an active pen sleep wake-up method, including the following steps:
when a starting instruction is received and the signal detection device is started, the state of the active pen is adjusted from a sleep state to a ready state;
judging whether a target touch screen in a working state is detected;
and if the target touch screen in the working state is detected, awakening the active pen.
Optionally, after the step of determining whether the target touch screen in the working state is detected, the method includes:
if a code printing signal sent by the touch screen based on the working state is detected, judging that the target touch screen in the working state is detected;
and if the code printing signal is not detected, judging that the target touch screen is not detected.
Optionally, if the target touch screen in the working state is detected, the step of waking up the active pen includes:
if the target touch screen in the working state is detected, judging whether a target code printing signal sent by the target touch screen belongs to a preset code printing signal set or not;
if the target coding signal does not belong to the preset coding signal set, closing a signal detection device, and adjusting the state of the active pen from a ready state to a sleep state;
and if the target coding signal belongs to the preset coding signal set, awakening the active pen.
Optionally, before the step of adjusting the state of the active pen from the sleep state to the ready state when the signal detection device is turned on after receiving the start instruction, the method includes:
when an acceleration sensor installed in the active pen obtains a target acceleration value, judging whether the target acceleration value belongs to a preset acceleration interval;
if the target acceleration value belongs to the preset acceleration interval, acquiring a target distance value based on a distance sensor installed in the active pen;
and generating a starting instruction when the target distance value belongs to a preset distance interval.
Optionally, before the step of adjusting the state of the active pen from the sleep state to the ready state when the signal detection device is turned on after receiving the start instruction, the method further includes:
when a pressure sensor installed in the active pen obtains a target pressure value, judging whether the target pressure value belongs to a preset pressure interval or not;
if the target pressure value belongs to the preset pressure interval, acquiring a target distance value based on a distance sensor installed in the active pen;
and generating a starting instruction when the target distance value belongs to a preset distance interval.
Optionally, before the step of adjusting the state of the active pen from the sleep state to the ready state when the signal detection device is turned on after receiving the start instruction, the method further includes:
when an acceleration sensor acquires a target acceleration value, and the target acceleration value belongs to a preset acceleration interval, acquiring a target pressure value based on a pressure sensor;
if the target pressure value belongs to a preset pressure interval, acquiring a target distance value based on a distance sensor;
and if the target distance value belongs to a preset distance interval, generating a starting instruction.
Optionally, after the step of determining whether the target touch screen in the working state is detected, the method further includes:
and if the target touch screen is not detected within the preset time, closing the signal detection device, and adjusting the state of the active pen from the ready state to the sleep state.
In addition, to achieve the above object, the present invention further provides an active pen sleep wake-up device, including: the device comprises a memory, a processor and an active pen sleep wake-up program which is stored on the memory and can run on the processor, wherein the active pen sleep wake-up program realizes the steps of the active pen sleep wake-up method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a readable storage medium, where an active pen sleep wake-up program is stored, and when executed by a processor, the active pen sleep wake-up program implements the steps of the active pen sleep wake-up method as described above.
The embodiment of the invention provides an active pen sleep awakening method, device and equipment and a readable storage medium. In the embodiment of the invention, when a sensor arranged in the active pen receives a starting signal and the starting signal meets a preset starting condition, a signal detection device is started, the state of the active pen is adjusted from a sleep state to a ready state, and then whether the condition for starting the active pen is met or not is determined by judging whether the started signal detection device detects a target signal or not. The embodiment realizes simple and accurate awakening of the active pen through signal detection and state adjustment.
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.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The active pen sleep wake-up terminal (also called terminal, device or terminal device) in the embodiment of the invention can be a PC, and can also be a terminal device with touch operation function, such as a smart phone, a tablet computer, a touch pen, a portable computer and the like.
As shown in fig. 1, the terminal may include: aprocessor 1001, such as a CPU, anetwork interface 1004, auser interface 1003, amemory 1005, acommunication bus 1002. Wherein acommunication bus 1002 is used to enable connective communication between these components. Theuser interface 1003 may comprise a Display screen (Display), an input unit such as an active pen, and theoptional user interface 1003 may also comprise a standard wired interface, a wireless interface. Thenetwork interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). Thememory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). Thememory 1005 may alternatively be a storage device separate from theprocessor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WiFi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that 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, amemory 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 active pen sleep-wake program.
In the terminal shown in fig. 1, thenetwork interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; theuser interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and theprocessor 1001 may be configured to call an active pen sleep wake-up program stored in thememory 1005, and the active pen sleep wake-up program, when executed by the processor, implements the operations of the active pen sleep wake-up method provided in the following embodiments.
Based on the hardware structure of the equipment, the embodiment of the active pen sleep awakening method is provided.
Referring to fig. 2, in a first embodiment of the active pen sleep wake-up method of the present invention, the active pen sleep wake-up method includes:
step S10, when the signal detection device is turned on by receiving the start command, the state of the active pen is adjusted from the sleep state to the ready state.
The active pen sleep wake-up method in this embodiment is applied to an active pen sleep wake-up device (also called a terminal, a device or a terminal device), where the active pen sleep wake-up device includes a terminal device having a touch operation function, such as a PC, a smart phone, a tablet computer, a touch pen, and a portable computer. It should be understood that the active pen in this embodiment at least includes a signal detection device and a signal receiving device, and the signal receiving device refers to various sensors installed in the active pen, and may include an acceleration sensor, a gravity sensor, a pressure sensor, and the like. The active pen in this embodiment further includes at least three states, a sleep state, a ready state, and a wake state.
The active pen in this embodiment is used to operate the touch-enabled display screen, and therefore, the touch-enabled display screen supports the operation of the active pen, and when the touch-enabled display screen is lighted, the screen sends out a code printing signal. The signal detection device is arranged at a position, close to the pen point, of the active pen, and the code printing signal sent by the screen is weakened along with the distance, so that the position where the signal detection device is arranged cannot be too far away from the pen point, the pen point is prevented from contacting the screen, and the signal detection device does not detect the code printing signal. When the active pen sleep awakening program detects that the user has a desire to use the active pen, a signal detection device in the active pen is started, the state of the active pen is adjusted from the sleep state to a ready state, and the signal detection device is started to correspond to the ready state of the active pen.
The embodiment provides a specific application scenario, an acceleration sensor is installed in the active pen, a pressure sensor is installed at the pen point, when the acceleration sensor and the pressure sensor do not detect a relevant numerical value (an acceleration value or a pressure value), the active pen sleep awakening program judges that a user does not want to use the active pen, the active pen keeps a sleep state, and the active pen only supplies power to the acceleration sensor and the pressure sensor in the sleep state. When a user takes up the active pen, the acceleration sensor acquires an acceleration value, or when the user brings a pen point of the active pen into contact with the touch screen, the pressure sensor acquires a pressure value, and no matter the acceleration value or the pressure value is acquired, the active pen sleep awakening program starts the signal detection device.
Step S20, determine whether the target touch screen in the working state is detected.
When the touch screen supporting the active pen operation is lighted (i.e., in a working state), the screen end may send a code printing signal, and it can be known that the code printing signal is weakened along with the increase of the distance from the emission source, and the distance between the signal detection device and the code printing signal sending end (i.e., the screen end) can be accurately detected only when the distance is within a certain range, for example, the range may be within five centimeters, that is, when the signal detection device detects the code printing signal, the distance between the active pen and the lighted display screen is within five centimeters, which is determined as the intention of the user to use the active pen in this embodiment.
Therefore, whether the signal detection device detects the target touch screen in the working state in the embodiment is determined by whether the target touch screen in the working state detects the intention of the user not to use the active pen, and then when the intention of the user to use the active pen is determined, the active pen is awakened, and when the intention of the user not to use the active pen is determined, the active pen is not awakened, so that the effect of awakening the active pen more accurately and saving energy is achieved.
And step S30, if the target touch screen in the working state is detected, waking up the active pen.
It is known, when supporting the touch-control screen that initiative pen controlled to be in operating condition, the screen end can send one kind and beat the sign indicating number signal, the signal detection device who installs in initiative pen can detect this kind and beat the sign indicating number signal, the prerequisite that detects this kind and beat the sign indicating number signal is, the distance of signal detection device and signal transmission end will be within certain within the scope, this distance is little, so when signal detection device detects and beats the sign indicating number signal, can judge that the user has the wish of using initiative pen, under this kind of condition, through starting initiative pen, can reach the beneficial effect of waking up the initiative pen more accurately.
Therefore, when the active pen is activated, the state of the active pen is also adjusted to the wake-up state corresponding to the activation of the active pen from the ready state corresponding to the activation of the signal receiving device. As is known, the state names of active pens are for illustration only and do not represent other meanings.
Specifically, the steps before step S10 include:
step a1, when an acceleration sensor installed in the active pen obtains a target acceleration value, judging whether the target acceleration value belongs to a preset acceleration interval.
Step a2, if the target acceleration value belongs to the preset acceleration interval, acquiring a target distance value based on a distance sensor installed in the active pen.
Step a3, when the target distance value belongs to a preset distance interval, generating a starting instruction.
It is known that, when the active pen is moved, the acceleration sensor will acquire an acceleration value generated by the relevant movement, and the acceleration value acquired by the acceleration sensor is the target acceleration value in the present embodiment. Considering the situation that there is a false touch on the active pen (for example, the active pen is touched by mistake when not in use) and the technical problem that the active pen is woken up more simply, conveniently and accurately, which is to be solved by the sleep-wake-up method for the active pen in this embodiment, it is necessary to judge the value obtained by the acceleration sensor, that is, the target acceleration value. The purpose of judging whether the target acceleration value belongs to the preset acceleration interval is to determine whether the condition of mistaken touch exists, namely, if the target acceleration value does not belong to the preset acceleration interval, the active pen sleep awakening program judges that the mistaken touch exists, and otherwise, the active pen sleep awakening program judges that the mistaken touch does not exist. When the active pen sleep awakening program judges that the false touch does not exist, whether the target distance value acquired by the distance sensor belongs to a preset distance interval or not is further judged. It should be noted that, a distance sensor may be further installed at the pen point of the active pen, and is used to obtain a distance between the pen point of the active pen and the object, and the preset distance interval is from zero to a preset smaller distance value, for example, 10 cm. The use of an acceleration sensor in combination with a distance sensor enables the determination of a specific intended use scenario of the active pen.
If a user takes up the active pen through experiments, the acceleration value obtained by the acceleration sensor is not lower than 5m/s2 (meters per second of square), when the acceleration sensor in the active pen obtains the acceleration value, the active pen sleep wake-up program will determine whether the acceleration value obtained by the acceleration sensor is greater than or equal to 5m/s2, where greater than or equal to 5m/s2 is the preset acceleration interval in this embodiment, if the determination result is that the acceleration value obtained by the acceleration sensor belongs to the preset acceleration interval, and the distance value obtained by the acceleration sensor is 8 centimeters, and if the preset distance interval is 0 to 10 centimeters, the active pen sleep-up program will generate a start instruction, which is known to be used for starting the signal detection device.
Specifically, the steps before step S10 further include:
step b1, when the pressure sensor installed in the active pen obtains a target pressure value, judging whether the target pressure value belongs to a preset pressure interval.
And b2, if the target pressure value belongs to the preset pressure interval, acquiring a target distance value based on a distance sensor installed in the active pen.
And b3, generating a starting instruction when the target distance value belongs to a preset distance interval.
Specifically, the steps before step S10 further include:
and c1, when the acceleration sensor acquires a target acceleration value, and the target acceleration value belongs to a preset acceleration interval, acquiring a target pressure value based on the pressure sensor.
And c2, if the target pressure value belongs to a preset pressure interval, acquiring a target distance value based on the distance sensor.
And c3, if the target distance value belongs to a preset distance interval, generating a starting instruction.
It is understood that, when the active pen is pressed, the pressure sensor installed in the active pen acquires a pressure value generated by the relevant pressing, and the pressure value acquired by the pressure sensor is the target pressure value in the present embodiment. Considering the situation that there is a false touch on the active pen (for example, the active pen is pressed by mistake when not in use) and the technical problem that the active pen is woken up more simply, conveniently and accurately, which is to be solved by the sleep wake-up method for the active pen in this embodiment, it is necessary to judge the value obtained by the pressure sensor, that is, judge the target pressure value. The purpose of judging whether the target pressure value belongs to the preset pressure interval is to determine whether the situation of false pressure exists, namely, if the target pressure value does not belong to the preset pressure interval, the active pen sleep awakening program judges that the false touch exists, and otherwise, the false touch does not exist. When the active pen sleep awakening program judges that the false touch does not exist, whether the target distance value acquired by the distance sensor belongs to a preset distance interval or not is further judged. It should be noted that, a distance sensor may be further installed at the pen point of the active pen, and is used to obtain a distance between the pen point of the active pen and the object, and the preset distance interval is from zero to a preset smaller distance value, for example, 10 cm. The use of a pressure sensor in combination with a distance sensor enables the determination of a specific intended use scenario of the active pen.
If a user picks up the active pen through experiments, a pressure value obtained by the pressure sensor is not lower than 10N (newtons, unit of force), and when the pressure sensor in the active pen obtains a pressure value, the active pen sleep wake-up program determines whether the pressure value obtained by the pressure sensor is greater than or equal to 10N, where the pressure value greater than or equal to 10N is a preset pressure interval in the present embodiment, if the determination result is that the pressure value obtained by the pressure sensor belongs to the preset pressure interval, and the distance value obtained by the pressure sensor is 8 centimeters, and if the preset distance interval is 0 to 10 centimeters, the active pen sleep-up program generates a start instruction, which is known to be used for starting the signal detection device.
In this embodiment, the acceleration value, the pressure value and the distance value are obtained through an acceleration sensor, a pressure sensor and a distance sensor installed in the active pen, the acceleration value belongs to a preset acceleration interval, the pressure value belongs to a preset pressure interval, and the distance value belongs to a preset distance interval, a start instruction is generated, when the active pen sleep wake-up program detects the start instruction, the signal detection device is started, the state of the active pen is adjusted from the sleep state to the ready state, and then whether a target touch screen in the working state is detected by judging whether the started signal detection device, whether a condition for starting the active pen is provided is determined, when the signal detection device detects the target touch screen in the working state, the active pen sleep wake-up program judges that the condition for starting the active pen is provided, and accordingly the active pen is started. The active pen is awakened simply and accurately.
Further, referring to fig. 3, a second embodiment of the active pen sleep wake-up method according to the present invention is provided on the basis of the above-mentioned embodiment of the present invention.
This embodiment is a step after step S20 in the first embodiment, and the present embodiment is different from the above-described embodiments of the present invention in that:
in step S40, if a code printing signal sent by the touch screen based on the operating state is detected, it is determined that the target touch screen in the operating state is detected.
Step S50, if the code signal is not detected, it is determined that the target touch screen is not detected.
Specifically, the steps subsequent to step S20 further include:
and d1, if the target touch screen is not detected within the preset time, closing the signal detection device, and adjusting the state of the active pen from the ready state to the sleep state.
When the touch screen supporting the active pen operation is lighted (i.e. in a working state), the screen end sends a code printing signal, which is known to decrease with the increase of the distance from the emission source, and the distance between the signal detection device and the code printing signal sending end (i.e. the screen end) can be accurately detected only when the distance is within a certain range, i.e. when the signal detection device can detect the code printing signal, the active pen sleep wake-up program determines that the target touch screen in the working state is detected, and when the signal detection device does not detect the code printing signal, the active pen sleep-up program determines that the target touch screen in the working state is not detected, the active pen sleep-up method in this embodiment detects the code printing signal as a determination criterion for detecting the touch screen in the working state, which depends on the foregoing conditions: when the touch screen supporting the active pen control is in a working state, the screen end can send out a code printing signal, and the code printing signal can be weakened along with the increase of the distance from the emission source. Therefore, when the signal detection device is turned on and the touch screen in the working state is not detected within a period of time, the active pen sleep wake-up program judges that the active application scene which is intentionally used by the user is not met, and in consideration of the requirement of energy conservation, the active pen sleep wake-up program turns off the signal detection device and adjusts the state of the active pen from the ready state to the sleep state so that the sensor can acquire the corresponding value again.
Therefore, the active pen sleep awakening method in the embodiment detects the code printing signal as a determination standard for detecting the touch screen in the working state, and conforms to an application scene that a user wishes to use the active pen.
Further, referring to fig. 4, a third embodiment of the active pen sleep wake-up method according to the present invention is provided on the basis of the above-mentioned embodiments of the present invention.
This embodiment is a step of the first embodiment, which is a refinement of step S30, and the difference between this embodiment and the above-described embodiment of the present invention is:
step S31, if the target touch screen in the working state is detected, determining whether a target code printing signal sent by the target touch screen belongs to a preset code printing signal set.
And step S32, if the target coding signal does not belong to the preset coding signal set, closing the signal detection device, and adjusting the state of the active pen from the ready state to the sleep state.
And step S33, if the target coding signal belongs to the preset coding signal set, waking up the active pen.
In this embodiment, the active pen is used for touching the display screen, and it can be known that, based on differences between products or whether the device on which the touch display screen is installed supports active pen operation, the device on which the touch display screen is installed needs to be distinguished, that is, the display screen needs to be distinguished. As is known, the touch display screen can send a code printing signal when being lighted, and the sent code printing signal can also be modified manually, and first, the signal detection device in the active pen can only start the active pen according to the code printing signal sent by the display screen supporting the operation and control of the active pen. Secondly, there are differences between products of different brands, for example, the active pen of brand a cannot touch the device display screen of brand B, in which case it can be implemented by modifying the parameters (e.g. signal frequency) of the coding signal emitted by the device display screen.
In view of the above, when the signal detection device detects a code printing signal (i.e. the object signal in the embodiment), it needs to determine the detected code printing signal, and the reason for the determination is to determine whether the detected code printing signal is from a display screen of a device of the same brand or whether the detected code printing signal is from a display screen supporting active pen operation in the case of product differences. Therefore, the code printing signals sent by the display screens of the devices of the same brand have a certain rule (for example, the signal frequency is within a certain range), and if the active pen sleep wake-up program determines that the detected code printing signals conform to the rule, that is, the code printing signals belong to a preset code printing signal set, the active pen sleep wake-up program determines that the detected code printing signals are sent by the display screen which can be controlled by the active pen (that is, target signals).
In this embodiment, the display screen that sends out the code printing signal is distinguished by determining whether the object signal detected by the signal detection device belongs to a preset code printing signal set.
The embodiment of the present invention further provides an active pen sleep wake-up device, which includes:
the receiving module is used for adjusting the state of the active pen from a sleep state to a ready state when the signal detection device is started after a starting instruction is received;
the judging module is used for judging whether a target touch screen in a working state is detected or not;
and the awakening module is used for awakening the active pen if the target touch screen in the working state is detected.
Optionally, the active pen sleep wake-up device further includes:
the first judgment unit is used for judging that the target touch screen in the working state is detected if a code printing signal sent by the touch screen based on the working state is detected;
and the second judging unit is used for judging that the target touch screen is not detected if the code printing signal is not detected.
Optionally, the wake-up module includes:
the first judgment unit is used for judging whether a target coding signal sent by the target touch screen belongs to a preset coding signal set or not if the target touch screen in the working state is detected;
the first switch unit is used for closing the signal detection device and adjusting the state of the active pen from a ready state to a sleep state if the target coding signal does not belong to the preset coding signal set;
and the awakening unit is used for awakening the active pen if the target code printing signal belongs to the preset code printing signal set.
Optionally, the active pen sleep wake-up device further includes:
the second judgment unit is used for judging whether the target acceleration value belongs to a preset acceleration interval or not when the acceleration sensor installed in the active pen obtains the target acceleration value;
a first obtaining unit configured to obtain a target distance value based on a distance sensor installed in the active pen if the target acceleration value belongs to the preset acceleration interval;
and the first generating unit is used for generating a starting instruction when the target distance value belongs to a preset distance interval.
Optionally, the active pen sleep wake-up device further includes:
the third judgment unit is used for judging whether the target pressure value belongs to a preset pressure interval or not when a pressure sensor installed in the active pen obtains the target pressure value;
a second obtaining unit, configured to obtain a target distance value based on a distance sensor installed in the active pen if the target pressure value belongs to the preset pressure interval;
and the second generating unit is used for generating a starting instruction when the target distance value belongs to a preset distance interval.
Optionally, the active pen sleep wake-up device further includes:
the third acquisition unit is used for acquiring a target pressure value based on the pressure sensor when the acceleration sensor acquires the target acceleration value and the target acceleration value belongs to a preset acceleration interval;
a fourth obtaining unit, configured to obtain a target distance value based on the distance sensor if the target pressure value belongs to a preset pressure interval;
and the third generating unit is used for generating a starting instruction if the target distance value belongs to a preset distance interval.
Optionally, the active pen sleep wake-up device further includes:
and the second switch unit is used for closing the signal detection device and adjusting the state of the active pen from a ready state to a sleep state if the target touch screen is not detected within the preset time.
The method executed by each program module can refer to each embodiment of the method of the present invention, and is not 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 tablet computer, etc.) 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.