Handwriting pen control method and device, handwriting pen and storage medium
By introducing a stylus control method into the stylus, using angle changes and verification modes, the problem of active stylus accidentally wake up in vibration scenes is solved, and the sleep state is maintained in a motion state caused by non-use factors, thereby reducing additional power consumption.
Patent Information
- Application Number
- CN202411863869.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-12-16
AI Technical Summary
Active stylus may be awakened by mistake in vibrating scenes, resulting in additional power consumption.
Through a stylus control method, in response to the angle change of the stylus, enter the target mode to extend the verification duration and increase the number of verification thresholds, ensuring that the sleep state is maintained in a motion state caused by non-use factors.
Effectively reduces additional power consumption due to false wake-up and keeps the stylus reliable sleep in various environments.
Smart Images

Figure CN119937804A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent writing input devices, and in particular to a stylus control method, device, stylus and storage medium. Background Art
[0002] In the related art, styluses can be divided into active styluses (with power supply, so that the stylus can realize more functions through certain electronic technology) and passive styluses (without power supply, and can only write input by simulating the capacitance characteristics of human fingers) according to whether they have a built-in power supply. Active styluses can be provided with sleep and wake-up functions to reduce power consumption when not in use.
[0003] Among the active stylus wake-up methods, one is that the stylus wakes up by itself. The main principle is that when the vibration angle (or acceleration) of the stylus exceeds a certain threshold, it can wake up. However, in actual usage scenarios, there will be vibration scenarios. If the intensity of the vibration exceeds a certain level, the stylus may be mistakenly awakened, resulting in additional power consumption. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a stylus control method, device, stylus and storage medium, aiming to keep the stylus in a dormant state when it is in a motion state caused by non-usage factors, so as to reduce the additional power consumption caused by false awakening.
[0005] To achieve the above object, a first aspect of an embodiment of the present application provides a stylus control method, comprising the following steps: When the stylus enters a dormant state, in response to the acquired angle of the stylus being not less than a preset first angle threshold, acquiring a target angle that is not less than a preset pattern recognition angle threshold within a preset verification time period; When the number of the target angles is less than a preset first verification number threshold, the target mode is entered, and the following steps are performed in the target mode: the stylus is controlled to remain in a dormant state, the verification time is extended, and the first verification number threshold is increased; at the next moment, the target angle is obtained based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, the target mode is maintained, and the steps performed in the target mode are looped until the loop is exited; Perform a wake-up process on the stylus pen.
[0006] In one embodiment, after acquiring the target angle based on the current verification duration, the steps performed in the target mode further include: When the number of the target angles acquired based on the current verification duration is 0, controlling the stylus pen to remain in a dormant state; The current first verification quantity threshold is restored to the first verification quantity threshold when entering the target mode, the current verification duration is restored to the verification duration when entering the target mode, and the target mode is exited.
[0007] In one embodiment, after maintaining the target mode, the steps performed in the target mode further include: Lowering a preset first angle difference threshold; The waking up process of the stylus pen includes: Acquire a current first angle of the stylus pen and a second angle corresponding to a current stylus pen trajectory; The first angle difference threshold is currently compared with the first angle difference between the first angle and the second angle. If the first angle difference is smaller than the first angle difference threshold currently, the stylus is controlled to enter a wake-up state.
[0008] In one embodiment, after controlling the stylus pen to enter a wake-up state, the method further includes: Exit the target mode, restore the current first verification quantity threshold to the first verification quantity threshold when entering the target mode, restore the current verification duration to the verification duration when entering the target mode, and restore the current first angle difference threshold to the first angle difference threshold when entering the target mode.
[0009] In one embodiment, after comparing the first angle difference threshold with the first angle difference between the first angle and the second angle, the method further includes: When the first angle difference is not less than the current first angle difference threshold, the target mode is maintained, and the steps performed in the target mode are re-circulated according to the current first angle difference threshold, the current verification duration and the current first verification quantity threshold.
[0010] In one embodiment, after acquiring the target angle based on the current verification duration, the steps performed in the target mode further include: When the number of the acquired target angles is not less than the current first verification number threshold, the second angle difference between each two adjacent target angles is calculated according to the angle sequence of the target angles acquired within the current verification duration; When any of the second angle differences is less than a preset second angle difference threshold, the target mode is maintained, and the steps executed in the target mode are looped according to the current verification duration, the current first verification quantity threshold, and the current first angle difference threshold.
[0011] In one embodiment, after calculating the second angle difference between every two adjacent target angles, the method further includes: In the case where multiple second angle differences are not less than the second angle difference threshold, if the multiple second angle differences that are not less than the second angle difference threshold are continuous and the number is not less than the preset second verification number threshold, maintain the target mode and loop the steps executed in the target mode according to the current verification duration, the current first verification number threshold and the current first angle difference threshold.
[0012] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a stylus control device, comprising: A target angle acquisition module, configured to acquire a target angle that is not less than a preset angle threshold within a preset verification time period in response to the acquired angle of the stylus being not less than a preset first angle threshold when the stylus enters a dormant state; A target mode processing module is used to enter a target mode when the number of target angles is less than a preset first verification number threshold, and perform the following steps in the target mode: control the stylus to remain in a dormant state, extend the verification time, and increase the first verification number threshold; at the next moment, obtain the target angle based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, maintain the target mode, and loop the steps performed in the target mode until exiting the loop; The wake-up module is used to perform a wake-up process on the stylus pen.
[0013] To achieve the above objective, a third aspect of an embodiment of the present application provides a stylus pen, the stylus pen comprising a memory and a processor, the memory storing a computer program, and the processor implementing the method described in the first aspect when executing the computer program.
[0014] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0015] The present application proposes a stylus control method, device, stylus and storage medium, the method comprising: when the stylus enters a dormant state, in response to the acquired angle of the stylus being not less than a preset first angle threshold, acquiring a target angle that is not less than a preset pattern recognition angle threshold within a preset verification time; when the number of the target angles is less than a preset first verification number threshold, entering a target mode, and performing the following steps in the target mode: controlling the stylus to remain in a dormant state, extending the verification time, and increasing the first verification number threshold; at the next moment, acquiring the target angle based on the current verification time, when the number of the acquired target angles is less than the current first verification number threshold, maintaining the target mode, and looping the steps executed in the target mode until exiting the loop; waking up the stylus. In response to obtaining a stylus angle that is not less than a first angle threshold, it can be determined that the stylus enters a motion state. Then, by identifying whether the number of target angles exceeds the first verification number threshold, it can be determined whether the motion state of the stylus continues. When the stylus is in a continuous motion state, it can enter a target mode. In the target mode, the stylus can be controlled to continue to sleep, and the stylus in the motion state can be awakened by cyclically extending the verification time and increasing the first verification number threshold, and determining whether the target angle obtained during the extended verification time is not less than the increased first verification number threshold. In this way, the stylus can maintain a dormant state when it is in a motion state caused by non-use factors through the cyclic steps in the target mode, which is conducive to reducing the additional power consumption caused by false awakening. In addition, since the stylus can be cyclically maintained in the target mode in the target mode, when the stylus is in a variety of motion state environments that can generate non-use factors, it can maintain an adaptive dormant state for the environment through a self-cyclic method, which is conducive to the stylus reliably maintaining a dormant state in a variety of environments, thereby effectively reducing the additional power consumption caused by false awakening. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a flow chart of a stylus control method provided by an embodiment of the present application; Figure 2 is a schematic diagram of a stylus control template provided by an embodiment of the present application; Figure 3 is a flow chart of a stylus control method for adding unit engineering association provided by an embodiment of the present application; Figure 4 is a flowchart of a stylus control method for a second target unit project that has no corresponding source file provided by an embodiment of the present application; Figure 5is a schematic diagram of the structure of a stylus pen control device provided in an embodiment of the present application; Figure 6 It is a schematic diagram of the hardware structure of the stylus provided in the embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0018] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0020] In the related art, the stylus can be divided into active stylus (with power supply, so that the stylus can realize more functions through certain electronic technology) and passive stylus (without power supply, and can only write input by simulating the capacitance characteristics of human fingers) according to whether it has a built-in power supply. In order to reduce the power consumption when not in use, the active stylus can be set with sleep and wake-up functions.
[0021] Among the active stylus wake-up methods, one is that the stylus wakes up by itself. The main principle is that when the vibration angle (or acceleration) of the stylus exceeds a certain threshold, it can wake up. However, in actual usage scenarios, there will be vibration scenarios. If the intensity of the vibration exceeds a certain level, the stylus may be mistakenly awakened, resulting in additional power consumption.
[0022] In order to enable a stylus pen that has entered a dormant state to remain in a dormant state when it is in a motion state caused by non-usage factors, so as to reduce the additional power consumption caused by false awakening, an embodiment of the present application provides a stylus pen control method, a stylus pen control device, a stylus pen and a computer-readable storage medium. The method can obtain a target angle that is not less than a preset pattern recognition angle threshold within a preset verification time in response to the acquired angle of the stylus pen being not less than a preset first angle threshold when the stylus pen enters a dormant state; when the number of target angles is less than the preset first verification number threshold, enter a target mode, and perform the following steps in the target mode: control the stylus pen to remain in a dormant state, extend the verification time, and increase the first verification number threshold; at the next moment, obtain the target angle based on the current verification time, and when the number of acquired target angles is less than the current first verification number threshold, maintain the target mode, and loop the steps performed in the target mode until the loop is exited; and wake up the stylus pen. In response to obtaining a stylus angle that is not less than a first angle threshold, it can be determined that the stylus enters a motion state. Then, by identifying whether the number of target angles exceeds the first verification number threshold, it can be determined whether the motion state of the stylus continues. When the stylus is in a continuous motion state, it can enter a target mode. In the target mode, the stylus can be controlled to continue to sleep, and the stylus in the motion state can be awakened by cyclically extending the verification time and increasing the first verification number threshold, and determining whether the target angle obtained during the extended verification time is not less than the increased first verification number threshold. In this way, the stylus can maintain a dormant state when it is in a motion state caused by non-use factors through the cyclic steps in the target mode, which is conducive to reducing the additional power consumption caused by false awakening. In addition, since the stylus can be cyclically maintained in the target mode in the target mode, when the stylus is in a variety of motion state environments that can generate non-use factors, it can maintain an adaptive dormant state for the environment through a self-cyclic method, which is conducive to the stylus reliably maintaining a dormant state in a variety of environments, thereby effectively reducing the additional power consumption caused by false awakening.
[0023] A stylus control method, device, stylus, and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the stylus control method in the embodiments of the present application is described.
[0024] The stylus control method provided in the embodiment of the present application can be applied to a stylus device or software running on a terminal. In some embodiments, the stylus device can be an electromagnetic pen, an active capacitive pen, etc.; the software can be an application that implements the stylus control method, etc., but is not limited to the above forms.
[0025] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
[0026] See also Figure 1 , Figure 1 A stylus control method provided by an embodiment of the present application is shown. In this embodiment, the stylus control method may at least include steps 110 to 130.
[0027] Step 110: when the stylus enters a dormant state, in response to the acquired stylus angle being not less than a preset first angle threshold, acquiring a target angle that is not less than a preset pattern recognition angle threshold within a preset verification time period; Step 120: When the number of target angles is less than the preset first verification number threshold, enter the target mode, and execute the following steps in the target mode: control the stylus to remain in a dormant state, extend the verification time, and increase the first verification number threshold; at the next moment, obtain the target angle based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, maintain the target mode, and loop the steps executed in the target mode until exiting the loop; Step 130: Wake up the stylus pen.
[0028] In one embodiment, the stylus pen entering a dormant state refers to the situation where the stylus pen set to the dormant state continuously obtains its own angles, and none of these angles is greater than or equal to a preset first angle threshold. The dormant state refers to a state in which the stylus pen cannot perform writing input with a terminal or other device. In addition, the stylus pen entering the dormant state may be in a stationary state or in a moving state. It should be noted that in the embodiment of the present application, when the angle obtained by the stylus pen in the dormant state is not less than the first angle threshold, the stylus pen is in a moving state at this time, but the inside of the stylus pen still enters a dormant state. In addition, it should also be noted that when the stylus pen is in a stationary state, the angle of the stylus pen obtained may be 0 or not 0, which is not specifically limited here.
[0029] In one embodiment, in the process of obtaining a target angle that is not less than a preset angle threshold within a preset verification time, specifically, multiple stylus angles can be obtained within the preset verification time, and then each stylus angle is compared with a preset pattern recognition angle threshold, and each angle that is not less than the pattern recognition angle threshold is determined as the target angle. The angle sampling frequency used by the stylus when entering the dormant state can be the same as the angle sampling frequency of the stylus within the preset verification time, or it can be different, which is not specifically limited here.
[0030] In one embodiment, the first angle threshold refers to an angle threshold used to determine whether the stylus is in motion. The pattern recognition angle threshold refers to an angle threshold used to determine whether the stylus in motion needs to enter the target mode. The first angle threshold may be equal to the pattern recognition angle threshold, or may be less than the pattern recognition angle threshold, which is not specifically limited here.
[0031] In one embodiment, the target mode refers to a mode for identifying whether a change in the motion state of a stylus that is currently in a dormant state is caused by a writing activity using the stylus, thereby determining whether to wake up the stylus.
[0032] In one embodiment, extending the verification time refers to increasing the verification time value to obtain a longer verification time. The specific extension method is various. First, an extension coefficient can be determined according to the number of executions of the extension process after entering the target mode this time, and then the verification time can be extended according to the extension coefficient. A preset fixed time can also be increased, etc., which is not specifically limited here.
[0033] In one embodiment, performing a boosting process on the first verification quantity threshold refers to increasing the value of the first verification quantity threshold to obtain a larger first verification quantity threshold. The specific manner of the boosting process is various. First, a boosting coefficient can be determined according to the number of executions of the boosting process after entering the target mode this time, and then the first verification quantity threshold can be boosted according to the boosting coefficient, or a preset fixed value can be increased, etc., which is not specifically limited here.
[0034] In one embodiment, obtaining the target angle based on the current verification time refers to an operation of obtaining a target angle that is not less than a preset pattern recognition angle threshold value within the verification time after the extension process. Specifically, in the process of obtaining the target angle based on the current verification time, a plurality of stylus angles can be obtained within the verification time after the extension process, and then each stylus angle is compared with the preset pattern recognition angle threshold value, and each angle that is not less than the pattern recognition angle threshold value is determined as the target angle.
[0035] In one embodiment, the number of target angles obtained being less than the current first verification number threshold means that the number of target angles obtained within the verification time after the extended processing is less than the first verification number threshold after the enhanced processing.
[0036] In one embodiment, the steps executed in the target mode in a loop refer to first controlling the stylus to remain in a dormant state, then extending the current verification time (i.e., extending the verification time that has been extended again), increasing the current first verification quantity threshold (i.e., increasing the first verification quantity threshold that has been increased last time again), and then at the next moment, obtaining the target angle based on the verification time at the current moment, and then determining whether the number of target angles obtained based on the verification time at the current moment exceeds the first verification quantity threshold at the current moment.
[0037] In one embodiment, after the stylus enters the target mode, when the number of target angles acquired in the process of executing the steps in the target mode in a loop is less than the current first verification number threshold, the loop may be exited first, and then step 130 may be executed. In the process of exiting the loop and executing step 130, the target mode may be maintained all the time, or the target mode may be exited at any time during the execution of step 130, which is not specifically limited here.
[0038] In one embodiment, when the stylus pen does not enter the target mode, when the number of target angles is less than a preset first verification number threshold, the target mode may not be entered, and the stylus pen may be directly controlled to remain in a dormant state.
[0039] In one embodiment, when the acquired angles of the stylus are not less than a first angle threshold, the stylus is controlled to remain in a dormant state.
[0040] In one embodiment, during the wake-up process of the stylus pen, the stylus pen can be directly controlled to enter the wake-up state, or after exiting the loop, it can be determined whether the stylus pen meets the preset wake-up conditions (such as whether a writing track is generated, whether the difference between multiple angles obtained subsequently is greater than a certain preset value, etc.) to determine whether to control the stylus pen to enter the wake-up state, etc., which is not specifically limited here.
[0041] See also Figure 2 , Figure 2 The execution step flow in the target mode provided by another embodiment of the present application is shown. In one embodiment, after acquiring the target angle based on the current verification duration, the steps executed in the target mode may also include the following steps.
[0042] Step 210: When the number of target angles acquired based on the current verification duration is 0, control the stylus pen to remain in a dormant state; Step 220: restore the current first verification quantity threshold to the first verification quantity threshold when entering the target mode, restore the current verification time to the verification time when entering the target mode, and exit the target mode.
[0043] In one embodiment, the number of target angles acquired based on the current verification duration is 0, which means that among the multiple angles of the stylus acquired based on the current verification duration, none of the angles is greater than or equal to the pattern recognition angle threshold. The acquired angle may be not less than the first angle threshold, or may be less than the first angle threshold, which is not specifically limited here.
[0044] In one embodiment, in the process of restoring the current first verification number threshold to the first verification number threshold when entering the target mode, specifically, the preset first verification number threshold can be obtained first, and then the current first verification number threshold is updated to the preset first verification number threshold. In this way, the stylus can be directly restored without the need to perform a calculation process of subtracting the threshold value added in the boosting process from the current first verification number threshold, thereby improving the efficiency of the stylus before converting to the state of entering the target mode.
[0045] In one embodiment, in the process of restoring the current first verification number threshold to the first verification number threshold when entering the target mode, specifically, the threshold value increased by the enhancement processing in the target mode can be first obtained, and then, the current first verification number threshold is subtracted according to this determined threshold value to obtain the first verification number threshold when entering the target mode, and then, the current first verification number threshold is updated to the first verification number threshold when entering the target mode.
[0046] In one embodiment, in the process of restoring the current verification time to the verification time when entering the target mode, the preset verification time can be obtained first, and then the current verification time can be updated to the preset verification time. In this way, the stylus can be restored directly without the need to perform a calculation process of subtracting the time value extended in the extension process from the current verification time, thereby improving the efficiency of the state of the stylus before converting to entering the target mode.
[0047] In one embodiment, in the process of restoring the current verification time to the verification time when entering the target mode, specifically, the threshold value increased by the enhancement processing in the target mode can be first obtained, and then, the current verification time is subtracted according to this determined threshold value to obtain the verification time when entering the target mode, and then, the current verification time is updated to the verification time when entering the target mode.
[0048] In one embodiment, after exiting the target mode, the angle of the stylus can continue to be obtained. In response to the obtained stylus angle being not less than a preset first angle threshold, the target angle can be obtained again in the preset value to determine whether the target mode needs to be entered again.
[0049] By exiting the target mode when the number of target angles obtained based on the current verification time is 0, the target mode can be exited when the stylus does not meet the condition of maintaining the target mode after entering the step cycle of the target mode, so that the stylus can enter and exit the target mode normally, which is conducive to improving the correctness of the operation of the target mode and effectively reducing the situation where the stylus cannot be correctly awakened after using the mechanism of the target mode. In addition, since the verification number threshold benchmark and the verification time benchmark used for judgment in the target mode are restored, the situation where the cycle cannot be exited due to the first verification number threshold and the verification time after entering the target mode next time can be avoided, thereby further improving the correctness of the operation of the target mode.
[0050] See also Figure 3 , Figure 3 Shows Figure 1 In the process of a sub-step embodiment of step 130 in the target mode, in one embodiment, after maintaining the target mode, the steps performed in the target mode may also include performing an enhancement process on the preset first angle difference threshold. On this basis, step 130 may include the following steps.
[0051] Step 310: Acquire the current first angle of the stylus pen and the second angle corresponding to the current stylus pen trajectory; Step 320: compare the current first angle difference threshold with the first angle difference between the first angle and the second angle, and if the first angle difference is smaller than the current first angle difference threshold, control the stylus pen to enter a wake-up state.
[0052] In one embodiment, lowering the first angle difference threshold refers to increasing the value of the first angle difference threshold to obtain a smaller first angle difference threshold. The specific manner of the lowering process is various. A lowering coefficient may be determined according to the number of executions of the lowering process after entering the target mode this time, and then the first angle difference threshold may be lowered according to the lowering coefficient, or a preset fixed value may be increased, etc., which are not specifically limited here.
[0053] In one embodiment, the second angle corresponding to the stylus trajectory refers to the direction angle of the path formed when the stylus moves on the terminal plane after exiting the loop. The trajectory of the stylus after exiting the loop can be recognized and recorded by a trajectory measurement device set in the stylus, or the terminal can sense the moving path of the stylus on the terminal plane (it should be noted that the stylus is in a dormant state at this time, and the terminal will not display the trajectory, but only sense and collect the trajectory), etc., which are not specifically limited here.
[0054] In one embodiment, the first angle difference threshold refers to a threshold used to determine whether the current posture of the stylus matches the path formed when it moves on the terminal plane. Specifically, regardless of the state of the stylus, when the stylus is used for writing, the posture of the stylus will correspond to the path (i.e., "handwriting") formed on the terminal plane. Considering that there may be an error between the angle obtained by the stylus and the angle corresponding to the current trajectory of the stylus due to the sensing speed and other conditions, the first angle difference threshold is set. When the first angle difference is less than the current first angle difference threshold, it means that the current posture of the stylus matches the path formed when it moves on the terminal plane, which can prove that the stylus is in a state of being used. In this case, the stylus can be controlled to enter the awakening state.
[0055] Since the first angle difference threshold is continuously lowered in the steps of the target mode loop execution, the criterion for judging the degree of match between the current posture of the stylus and the path formed when it moves on the terminal plane becomes more stringent. Therefore, in the subsequent wake-up processing, the first angle difference can be compared with a smaller first angle difference threshold, so that the degree of match between the current posture of the stylus that has been in motion and the path formed when it moves on the terminal plane can be judged more strictly, and then whether the stylus in motion is used can be judged more accurately, which is conducive to more accurate wake-up of the stylus.
[0056] In one embodiment, after step 320, step 130 may further include the following steps: exiting the target mode, restoring the current first verification quantity threshold to the first verification quantity threshold when entering the target mode, restoring the current verification duration to the verification duration when entering the target mode, and restoring the current first angle difference threshold to the first angle difference threshold when entering the target mode.
[0057] In one embodiment, in the process of restoring the current first angle difference threshold to the first angle difference threshold when entering the target mode, specifically, the preset first angle difference threshold can be first obtained, and then the current first angle difference threshold can be updated to the preset first angle difference threshold. In this way, the stylus can be directly restored without the need to perform a calculation process of subtracting the threshold value reduced in the reduction process from the current first angle difference threshold, thereby improving the efficiency of the state of the stylus before converting to entering the target mode.
[0058] In one embodiment, in the process of restoring the current first angle difference threshold to the first angle difference threshold when entering the target mode, specifically, the threshold value increased by the reduction processing in the target mode can be first obtained, and then, the current verification duration is increased according to this determined threshold value to obtain the first angle difference threshold when entering the target mode, and then, the current first angle difference threshold is updated to the first angle difference threshold when entering the target mode.
[0059] Since the stylus enters the awakening state, it can be determined that the motion state of the stylus is caused by the use of the stylus. Therefore, by exiting the target mode, it is possible to avoid the situation where the stylus mistakenly loops and maintains the dormant state in the target mode when it can be awakened, so that the stylus can be accurately awakened. In addition, after exiting the target mode, by restoring the current first verification quantity threshold, verification time, and first angle difference threshold, it is possible to avoid the situation where the loop cannot be exited due to the first verification quantity threshold and verification time being too large after entering the target mode next time, thereby further improving the correctness of the operation of the target mode.
[0060] In one embodiment, after comparing the current first angle difference threshold with the first angle difference between the first angle and the second angle, when the first angle difference is not less than the current first angle difference threshold, the target mode is maintained, and the steps performed in the target mode are re-cycled according to the current first angle difference threshold, the current verification duration and the current first verification quantity threshold.
[0061] In one embodiment, the step of re-circulating the execution in the target mode according to the current first angle difference threshold, the current verification time and the current first verification number threshold refers to continuing to control the stylus to remain in a dormant state, then extending the current verification time, increasing the current first verification number threshold, and then obtaining the target angle based on the verification time that has been extended again at the next moment, and determining whether to maintain the target mode, lower the current first angle difference threshold and enter a loop according to the relationship between the number of target angles and the first verification number threshold that has been increased again.
[0062] When the first angle difference is not less than the current first angle difference threshold, the current posture of the stylus does not match the path formed when it moves on the terminal plane, that is, although the stylus is currently in motion, it is not used and does not meet the wake-up condition. Therefore, the target mode is maintained and the steps in the target mode are executed cyclically, so that the stylus is not awakened in the motion state of this situation, effectively reducing the power consumption of the stylus due to frequent awakening. In addition, since the cycle of steps executed in the target mode is re-entered according to the current thresholds, when entering the step cycle of the target mode, it is not necessary to use the initial threshold to restart the cycle, so that the problem of false awakening caused by using the initial threshold when re-entering the mode can be effectively avoided.
[0063] See also Figure 4 , Figure 4 The execution step flow in the target mode provided by another embodiment of the present application is shown. In one embodiment, after obtaining the target angle based on the current verification duration, the target mode execution step may further include the following steps.
[0064] Step 410: When the number of acquired target angles is not less than the current first verification number threshold, a second angle difference between every two adjacent target angles is calculated according to the angle sequence of the target angles acquired within the current verification duration; Step 420: When any second angle difference is less than the preset second angle difference threshold, the target mode is maintained, and the steps executed in the target mode are cycled according to the current verification duration, the current first verification quantity threshold, and the current first angle difference threshold.
[0065] In one embodiment, according to the angle sequence of the target angle obtained within the current verification time, calculating the second angle difference between each two adjacent target angles means that for each target angle obtained within the current verification time, when the next angle in the angle sequence of the target angle obtained within the current verification time is the target angle, the second angle difference between the two target angles is calculated. For example, assuming that the angles obtained within the current verification time are A, B, C, D, E, and F, where A, C, D, E, and F are the target angles, then when calculating the second angle difference, only the second angle differences between C and D, between D and E, and between E and F will be calculated, and the second calculated angle difference between A and C will not be calculated.
[0066] In one embodiment, the second angle difference threshold refers to a threshold used to determine whether the posture of the stylus produces a change that matches the posture of the stylus when it is used.
[0067] When the stylus is in use, due to the user's holding method, writing content, etc., a large angle change difference can be generated between strictly adjacent target angles, and the change of this angle difference is continuous (for example, when writing, the stylus can produce relatively large posture changes in the front, back, left and right directions due to the continuous writing of strokes at the tip, tail, etc.). Therefore, by calculating the second angle difference between strictly adjacent target angles, it is possible to accurately identify whether the current motion state of the stylus is caused by human use when the stylus that has entered the dormant state is in a motion state, so that when the current motion state of the stylus is not caused by human use, the stylus can be kept in the current mode and the stylus can be cyclically controlled to remain in the dormant state, thereby reducing the power consumption of the stylus when the motion state is not caused by human use.
[0068] In one embodiment, after calculating the second angle difference between each two adjacent target angles, when multiple second angle differences are not less than the second angle difference threshold, if the multiple second angle differences that are not less than the second angle difference threshold are continuous and the number is not less than the preset second verification number threshold, the target mode is maintained, and the steps executed in the target mode are cycled according to the current verification duration, the current first verification number threshold and the current first angle difference threshold.
[0069] In one embodiment, a plurality of second angle differences that are not less than the second angle difference threshold value are continuous, and the number is not less than the preset second verification number threshold value, which refers to the situation where the first angle and the second angle of the combination of two target angles that can calculate the second angle difference are not the target angles, and the number of the obtained second angle differences is not less than the preset second verification number threshold value. For example, assuming that the angles obtained within the current verification duration are A, B, C, D, E, and F, where A, B, D, E, and F are the target angles, then when calculating the second angle difference, the second angle differences between A and B, between D and E, and between E and F are calculated, and among these three second angle differences, the second angle difference between A and B and the second angle difference between D and E are discontinuous due to the discontinuity between angles B and D, while the second angle difference between D and E and the second angle difference between E and F are continuous.
[0070] Because in certain environments, there may be vibrations of a certain intensity that cause the stylus to generate a target angle that can calculate the second angle difference when it is not in use, therefore, by judging the continuity and number of the second angle differences, the stylus can recognize this situation, thereby reducing the possibility of the stylus being falsely awakened due to this situation, which is beneficial to reducing the power consumption of the stylus.
[0071] See also Figure 5The embodiment of the present application further provides a stylus pen control device, which can implement the stylus pen control method of the first aspect. The stylus pen control device 500 includes: The target angle acquisition module 510 may be used to acquire a target angle that is not less than a preset angle threshold within a preset verification time period in response to the acquired stylus angle being not less than a preset first angle threshold when the stylus enters a dormant state; The target mode processing module 520 may be used to enter the target mode when the number of target angles is less than a preset first verification number threshold, and perform the following steps in the target mode: control the stylus to remain in a dormant state, extend the verification time, and increase the first verification number threshold; at the next moment, obtain the target angle based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, maintain the target mode, and loop the steps performed in the target mode until the loop is exited; The wake-up module 530 can be used to wake up the stylus pen.
[0072] The specific implementation of the stylus pen control device is substantially the same as the specific implementation of the stylus pen control method described above, and will not be described in detail herein.
[0073] The embodiment of the present application also provides a stylus, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned stylus control method when executing the computer program. The stylus can be any intelligent terminal including a tablet computer, a car computer, etc.
[0074] See also Figure 6 , Figure 6 The hardware structure of a stylus pen of another embodiment is shown. The stylus pen 600 includes: The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 602 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the stylus control method of the embodiment of this application; Input / output interface 603, used to implement information input and output; Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 605 that transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0075] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned stylus control method is implemented.
[0076] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0077] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0078] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0079] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0080] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0081] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0082] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0083] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0084] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0085] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0086] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0087] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A stylus control method, characterized in that: The following steps are involved: When the stylus enters a dormant state, in response to the acquired angle of the stylus being not less than a preset first angle threshold, acquiring a target angle that is not less than a preset pattern recognition angle threshold within a preset verification time period; When the number of the target angles is less than a preset first verification number threshold, the target mode is entered, and the following steps are performed in the target mode: the stylus is controlled to remain in a dormant state, the verification time is extended, and the first verification number threshold is increased; at the next moment, the target angle is obtained based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, the target mode is maintained, and the steps performed in the target mode are looped until the loop is exited; Perform a wake-up process on the stylus pen.
2. The method according to claim 1, characterized in that: After acquiring the target angle based on the current verification duration, the steps performed in the target mode further include: When the number of the target angles acquired based on the current verification duration is 0, controlling the stylus pen to remain in a dormant state; The current first verification quantity threshold is restored to the first verification quantity threshold when entering the target mode, the current verification duration is restored to the verification duration when entering the target mode, and the target mode is exited.
3. The method according to claim 1, characterized in that After maintaining the target mode, the steps performed in the target mode further include: Lowering a preset first angle difference threshold; The waking up process of the stylus pen includes: Acquire a current first angle of the stylus pen and a second angle corresponding to a current stylus pen trajectory; The first angle difference threshold is currently compared with the first angle difference between the first angle and the second angle. If the first angle difference is smaller than the first angle difference threshold currently, the stylus is controlled to enter a wake-up state.
4. The method according to claim 3, characterized in that After controlling the stylus pen to enter a wake-up state, the method further includes: Exit the target mode, restore the current first verification quantity threshold to the first verification quantity threshold when entering the target mode, restore the current verification duration to the verification duration when entering the target mode, and restore the current first angle difference threshold to the first angle difference threshold when entering the target mode.
5. The method according to claim 3, characterized in that: After comparing the first angle difference threshold with the first angle difference between the first angle and the second angle, the method further includes: When the first angle difference is not less than the current first angle difference threshold, the target mode is maintained, and the steps performed in the target mode are re-circulated according to the current first angle difference threshold, the current verification duration and the current first verification quantity threshold.
6. The method according to claim 3, characterized in that After acquiring the target angle based on the current verification duration, the steps performed in the target mode further include: When the number of the acquired target angles is not less than the current first verification number threshold, the second angle difference between each two adjacent target angles is calculated according to the angle sequence of the target angles acquired within the current verification duration; When any of the second angle differences is less than a preset second angle difference threshold, the target mode is maintained, and the steps executed in the target mode are looped according to the current verification duration, the current first verification quantity threshold, and the current first angle difference threshold.
7. The method according to claim 6, characterized in that After calculating the second angle difference between every two adjacent target angles, the method further includes: In the case where multiple second angle differences are not less than the second angle difference threshold, if the multiple second angle differences that are not less than the second angle difference threshold are continuous and the number is not less than the preset second verification number threshold, maintain the target mode and loop the steps executed in the target mode according to the current verification duration, the current first verification number threshold and the current first angle difference threshold.
8. A stylus control device, characterized in that: include: A target angle acquisition module, configured to acquire a target angle that is not less than a preset angle threshold within a preset verification time period in response to the acquired angle of the stylus being not less than a preset first angle threshold when the stylus enters a dormant state; A target mode processing module is used to enter a target mode when the number of target angles is less than a preset first verification number threshold, and perform the following steps in the target mode: control the stylus to remain in a dormant state, extend the verification time, and increase the first verification number threshold; at the next moment, obtain the target angle based on the current verification time, and when the number of the obtained target angles is less than the current first verification number threshold, maintain the target mode, and loop the steps performed in the target mode until exiting the loop; The wake-up module is used to perform a wake-up process on the stylus pen.
9. A stylus pen, characterized in that: The stylus pen comprises a memory and a processor, the memory stores a computer program, and the processor implements the stylus pen control method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the stylus control method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Electronic pen control method, device and equipment and readable storage medium
CN111158512A
Dormancy awakening method, electronic equipment, Bluetooth peripheral and storage medium
CN116709477A
Pen mouse with a tracing compensation function
US10564734B1
Setting digital pen input mode using tilt angle
US11372486B1
Pen, Method for Detecting Pen, and Touch System
US20210165510A1
Cited By
Stylus control method, system, apparatus, stylus, and medium
WO2026067116A1