Methods for adjusting frequency, handheld devices, and readable storage media
By dynamically adjusting the operating frequency of the touch module according to the usage scenario of the stylus, the problem of high power consumption of the stylus is solved, and the battery life and the accuracy of touch event detection are improved.
Patent Information
- Application Number
- CN202210678590.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The stylus operates at a fixed frequency, resulting in high power consumption and reduced battery life.
The operating frequency of the touch module is dynamically adjusted according to the usage scenario of the handheld device, including reducing the frequency when the device is stationary, in the information input state, or when a lock screen message is received, and restoring the frequency when real-time response to user operations is required.
By dynamically adjusting the frequency, the power consumption of the stylus is reduced, improving battery life and the accuracy of touch event detection.
Smart Images

Figure CN117270706B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a method for adjusting frequency, a handheld device, and a readable storage medium. Background Technology
[0002] With the rapid development of terminal technology, handheld devices such as styluses have gradually become widely used in order to enable users to input information quickly and accurately on electronic devices such as tablets.
[0003] Currently, styluses can not only be used to input information on electronic devices, but also allow users to perform corresponding operations on the electronic device by touching the stylus's touch panel. For example, a user can slide on the stylus's touch panel. After detecting the slide, the stylus sends a corresponding slide event message to the electronic device. In this way, the electronic device controls the cursor to move accordingly based on the slide event message.
[0004] To respond to user triggers in real time, styluses typically operate at a fixed frequency after power-on, collecting capacitance values from the touch panel in each cycle to determine if a touch event has occurred. However, because styluses operate at a fixed frequency, they consume relatively high power, thus reducing their battery life. Summary of the Invention
[0005] This application provides a method for adjusting frequency, a handheld device, and a readable storage medium, which can solve the problem in related technologies where the stylus operates at a fixed frequency, resulting in high power consumption and reduced battery life. The technical solution is as follows:
[0006] In a first aspect, a method for adjusting frequency is provided, applied to a handheld device, the handheld device including a touch module, the touch module being used to collect touch data on the touch panel of the handheld device, the method comprising:
[0007] If the current usage scenario of the handheld device meets the target conditions, the operating frequency of the touch module is adjusted to a first frequency, which is lower than the operating frequency before adjustment.
[0008] The target conditions include: the handheld device is in a stationary state, or the handheld device is in an information input state, or the handheld device receives a screen lock message, which is used to instruct the electronic device connected to the handheld device to enter a screen lock state.
[0009] In this way, the operating frequency of the touch module can be dynamically adjusted according to the usage scenario of the handheld device, avoiding the handheld device from working in a high power consumption state all the time, thus improving the battery life of the handheld device.
[0010] As an example of this application, the step of adjusting the operating frequency of the touch module to a first frequency if the current usage scenario of the handheld device meets the target conditions includes:
[0011] If the operating frequency of the touch module is the second frequency, and the current usage scenario of the handheld device meets the target conditions, then the operating frequency of the touch module is adjusted to the first frequency.
[0012] Thus, when the touch module operates at the second frequency, if the current usage scenario is detected to meet the target conditions, the operating frequency of the touch module is reduced to avoid the handheld device operating in a high-power state when not in use.
[0013] As an example of this application, after adjusting the operating frequency of the touch module to the first frequency, the method further includes:
[0014] If the handheld device is in motion, not in information input mode, or receives an unlock message, the operating frequency of the touch module is adjusted to the second frequency. The unlock message is used to instruct the electronic device to enter the unlock state.
[0015] Thus, if it is determined that the user may need to control the electronic device by touching the touch panel of the handheld device, the operating frequency of the touch module is restored so that the handheld device can respond to the user's touch operation in real time.
[0016] As an example of this application, the first frequency is the frequency at which the touch module enters a sleep mode.
[0017] Therefore, if it is determined that the user does not need to control the electronic device through the stylus's touch panel, putting the stylus into sleep mode can reduce the stylus's power consumption and thus improve its battery life.
[0018] As an example of this application, the touch data includes the capacitance value on the touch panel; the method further includes:
[0019] When the operating frequency of the touch module is the second frequency, if the handheld device is in motion, the handheld device is not in the information input state, and the handheld device does not receive the screen lock message, then the change in the capacitance value on the touch panel is determined.
[0020] If the capacitance value on the touch panel does not change within a first time period, the operating frequency of the touch module is adjusted to a third frequency, which is less than the second frequency and greater than the first frequency.
[0021] In this way, if it is determined that the user has not touched the touch panel of the handheld device, but may send touch commands to the electronic device by touching the touch panel, the operating frequency of the touch module can be reduced, that is, adjusted to the third frequency, but the touch module does not enter the sleep state. In this way, the power consumption of the handheld device is reduced, and the ability to continue to detect touch events is also ensured.
[0022] As an example of this application, after adjusting the operating frequency of the touch module to the third frequency if the capacitance value on the touch panel does not change within the first time period, the method further includes:
[0023] If the capacitance value on the touch panel does not change within the second time period, the operating frequency of the touch module is adjusted to a fourth frequency, which is less than the third frequency and greater than the first frequency.
[0024] In this way, the operating frequency of the touch module can be reduced again, that is, the operating frequency can be adjusted from the third frequency to the fourth frequency, so as to further reduce the power consumption of the handheld device and enable the handheld device to perform touch event detection at a very low operating frequency.
[0025] As an example of this application, after adjusting the operating frequency of the touch module to the fourth frequency if the capacitance value on the touch panel does not change within the second time period, the method further includes:
[0026] If the capacitance value on the touch panel changes, the operating frequency of the touch module is adjusted to the second frequency.
[0027] In this way, the handheld device restores the touch module's operating frequency to the second frequency, enabling it to respond promptly to the user's touch operations and improve the accuracy of touch event detection.
[0028] As an example of this application, after adjusting the operating frequency of the touch module to the third frequency if the capacitance value on the touch panel does not change within the first time period, the method further includes:
[0029] If the capacitance value on the touch panel changes during the second time period, the operating frequency of the touch module is adjusted to the second frequency.
[0030] Thus, if the capacitance value on the touch panel changes, it indicates that a touch event has been detected. In this case, in order to respond to the user's touch operation in a timely manner, the handheld device restores the operating frequency of the touch module to the second frequency to improve the accuracy of touch event detection.
[0031] In a second aspect, an apparatus for adjusting frequency is provided. The apparatus includes a processor and a memory. The memory stores a program that supports the apparatus in performing the frequency adjustment method provided in the first aspect, and stores data related to implementing the frequency adjustment method described in the first aspect. The processor is configured to execute the program stored in the memory. The apparatus may further include a communication bus for establishing a connection between the processor and the memory.
[0032] Thirdly, a handheld device is provided, the handheld device including a touch panel, a touch module, and a microcontroller unit (MCU);
[0033] The touch module is used to collect touch data on the touch panel;
[0034] The microcontroller unit (MCU) is used to detect touch events based on the touch data and to perform the method as described in any one of claims 1-8.
[0035] As an example of this application, the handheld device also includes a pressure sensor and an acceleration sensor;
[0036] The MCU is used to determine whether the handheld device is in an information input state through the pressure sensor;
[0037] The MCU is used to determine whether the handheld device is stationary via the accelerometer.
[0038] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the frequency adjustment method described in the first aspect.
[0039] Fifthly, a computer program product containing instructions is provided, which, when run on a computer, causes the computer to perform the frequency adjustment method described in the first aspect above.
[0040] The technical effects achieved by the second, third, fourth, and fifth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0041] Figure 1This is a schematic diagram of the structure of a handheld device according to an exemplary embodiment;
[0042] Figure 2 This is a schematic diagram illustrating a stylus according to an exemplary embodiment;
[0043] Figure 3 This is a schematic diagram illustrating the working state of a stylus during a working cycle according to an exemplary embodiment;
[0044] Figure 4 This is a schematic diagram illustrating an application scenario according to an exemplary embodiment;
[0045] Figure 5 This is a flowchart illustrating a method for adjusting frequency according to an exemplary embodiment;
[0046] Figure 6 This is a schematic diagram illustrating an application scenario according to another exemplary embodiment;
[0047] Figure 7 This is a schematic diagram illustrating an application scenario according to another exemplary embodiment;
[0048] Figure 8 This is a schematic diagram illustrating an application scenario according to another exemplary embodiment;
[0049] Figure 9 This is a flowchart illustrating a method for adjusting frequency according to another exemplary embodiment;
[0050] Figure 10 This is a schematic diagram illustrating an application scenario according to another exemplary embodiment;
[0051] Figure 11 This is a schematic diagram illustrating the working state of a stylus during a work cycle, according to another exemplary embodiment.
[0052] Figure 12 This is a flowchart illustrating a method for adjusting frequency according to another exemplary embodiment;
[0053] Figure 13 This is a schematic diagram of the structure of a handheld device according to another exemplary embodiment. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0055] It should be understood that "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " indicates "or," for example, A / B can mean A or B; "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist, for example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.
[0056] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0057] Before providing a detailed description of the methods provided in the embodiments of this application, the execution subject involved in the embodiments of this application will be introduced first. As an example and not a limitation, the execution subject can be a handheld device; please refer to [reference needed]. Figure 1 , Figure 1 This is a schematic diagram illustrating the structure of a handheld device according to an exemplary embodiment. The handheld device includes a touch sensor 10 and a microcontroller unit (MCU) 11.
[0058] Touch sensor 10 is used to detect touch operations applied to or near it. Touch sensor 10 can transmit the detected touch data to MCU 11 to determine the type of touch event. In one example, touch sensor 10 includes touch panel 101 and touch module 102, MCU 11 establishes a communication connection with touch module 102, and touch module 102 is connected to touch panel 101. In some embodiments, touch module 102 may also be referred to as touch IC (integrated circuit).
[0059] The touch panel 101 has multiple channels, and the touch module 102 is used to collect touch data on the touch panel 101 (such as the capacitance values of each channel). As an example and not a limitation, after each data acquisition operation, the touch module 102 can notify the MCU 11 to prepare to receive data via an interrupt pin. Afterwards, the touch module 102 sends the collected touch data to the MCU 11 for data analysis to determine the type of touch event.
[0060] After detecting an interrupt from the touch module 102, the MCU 11 prepares to receive data. Upon receiving touch data sent by the touch module 102, it calls a specified touch algorithm to analyze the received touch data to determine whether a touch event has occurred. If a touch event is determined, the event type is identified, and a touch command is generated based on the touch event. This touch command is then sent to an electronic device connected to the handheld device. For example, the touch command might be a swipe touch command, used to instruct the electronic device to move the cursor along a certain trajectory, thereby realizing the touch event detection function. The specified touch algorithm can be selected according to requirements. For example, the specified touch algorithm could be a method that compares the change in touch data over a period of time with a preset threshold. This embodiment of the application does not limit this approach.
[0061] As an example of this application, the MCU11 can also send a corresponding frequency adjustment command to the touch module 102 when it is determined that the operating frequency of the touch module 102 needs to be adjusted, so that the touch module 102 performs the frequency adjustment operation.
[0062] In one example, MCU11 receives touch data sent by touch module 102 through bus interfaces such as inter-integrated circuit (I2C) interface or serial peripheral interface (SPI).
[0063] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the MCU11 may include multiple I2C interfaces. The MCU11 can couple to the touch module 102 through the I2C interface, enabling the MCU11 and the touch module 102 to communicate via the I2C interface and realize the touch detection function of the handheld device.
[0064] SPI is a high-speed, full-duplex, synchronous communication bus that only occupies four pins on the chip, saving pins and providing convenience. MCU11 can couple with touch module 102 via SPI, enabling MCU11 and touch module 102 to communicate via SPI and realize the touch detection function of handheld devices.
[0065] The MCU11 can also include a memory for storing instructions and data. In one example, this memory is a cache memory. This memory can hold instructions or data that the MCU11 has just used or is reusing. If the MCU11 needs to use the same instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces the MCU11's waiting time, and thus improves system efficiency.
[0066] Furthermore, the handheld device also includes a pressure sensor 12 and an acceleration (ACC) sensor 13. The pressure sensor 12 communicates with the MCU 11 via a bus, and similarly, the acceleration sensor 13 communicates with the MCU 11 via a bus.
[0067] Pressure sensor 12 is used to sense pressure signals and convert them into electrical signals. There are many types of pressure sensors 12, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may consist of at least two parallel plates made of conductive material. When force is applied to pressure sensor 12, the capacitance between the electrodes changes. The handheld device determines the pressure intensity based on the change in capacitance. As an example of this application, when the handheld device is used for information input (e.g., writing) on the electronic device, the detection signal of pressure sensor 12 is non-zero, thus the MCU 11 can determine that the handheld device is in information input mode. Conversely, if the detection signal of pressure sensor 12 is zero, it indicates that the handheld device is not in information input mode. Furthermore, if the handheld device is a stylus, the stylus can determine the font thickness of the input characters based on the magnitude of the detection signal of pressure sensor 12, thereby reflecting the corresponding level of detail on the electronic device.
[0068] Accelerometer 13 can detect the magnitude of acceleration of the handheld device in various directions (generally three axes). When the handheld device is stationary, it can detect the magnitude and direction of gravity. In this embodiment, MCU 11 can detect whether the handheld device is stationary or in motion using accelerometer 13.
[0069] It should be noted that, Figure 1The illustration only shows a portion of the structure in the handheld device and does not limit its components. Furthermore, the handheld device may also include, but is not limited to, a charging management module, a power management module, and a Bluetooth module.
[0070] The charging management module receives charging input from a charger, which can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module receives charging input from the wired charger via a USB interface. In some wireless charging embodiments, the charging management module receives wireless charging input via a wireless charging coil. While charging the handheld device's battery, the charging management module can also supply power to the handheld device via the power management module.
[0071] The power management module connects to the battery, charging management module, and MCU11. The power management module receives input from the battery and / or charging management module to power the MCU11, touch module 102, and Bluetooth module, among others. The power management module can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module may be integrated into the MCU11. In other embodiments, the power management module and charging management module may be housed in the same device.
[0072] The Bluetooth module is used to establish a communication connection. For example, the MCU11 interacts with electronic devices via the Bluetooth module.
[0073] By way of example and not limitation, the electronic device connected to the stylus can be a terminal such as a tablet or a laptop, and this application does not limit it.
[0074] It should be noted that the method provided in this application embodiment can be applied to scenarios where the MCU platform needs to reduce the power consumption of peripheral devices, such as handheld devices. This application embodiment uses a stylus as an example of a handheld device for illustration. Of course, in another embodiment, the handheld device can also be a smart laser pointer or other similar product, and this application embodiment does not limit this.
[0075] Low-power products such as styluses have become increasingly widespread with the development of terminal technology. Users can use styluses to write, draw, and perform other operations on the screens of electronic devices, bringing numerous conveniences to users' operation of electronic devices. Currently, styluses also have touch panels, such as... Figure 2 As shown, Figure 2This is a schematic diagram of a stylus according to an exemplary embodiment, with a touch panel as shown at 21 in section 2. Thus, users can not only use the stylus to input information on the electronic device, but also control the electronic device through touch operations on the stylus's touch panel, such as controlling cursor movement and clicking.
[0076] To detect user touch operations in real time, the stylus controls the touch module 102 to operate at a fixed frequency. Typically, to ensure accurate touch event detection, the operating frequency of the touch module 102 ranges from 60Hz to 100Hz. Within each working cycle, the touch module 102 generally goes through three stages: touch data acquisition, touch data reporting, and low-power operation. Specifically, within each working cycle, the touch module 102 initially acquires the capacitance values of each channel on the touch panel 101, i.e., acquires touch data; then, the touch module 102 sends the touch data to the MCU 11; afterwards, the touch module 102 enters a low-power operation state.
[0077] For example, taking an operating frequency of 100Hz as an example, please refer to... Figure 3 , Figure 3 This is a schematic diagram illustrating the working state of a touch module 102 according to an exemplary embodiment. In one working cycle (10ms), during the time period from 0 milliseconds to 2 milliseconds, the touch module 102 collects touch data. During the time period from 2 milliseconds to 4 milliseconds, the touch module 102 reports the collected touch data to the MCU 11. During the time period from 4 milliseconds to 10 milliseconds, the touch module 102 is in a low-power operation state.
[0078] During the touch data acquisition and reporting phases, the touch module 102 operates in normal mode. During low-power operation, it operates in power-saving mode. The power consumption of the touch module 102 is higher in normal mode, typically 200 to 500 times that in low-power mode. Since the touch module 102 generally operates in normal mode for a fixed period of time, such as... Figure 3As shown, the stylus operates in normal mode for 40% of the time. If the stylus works periodically, its power consumption will be high, resulting in reduced usage time and thus lower battery life. Furthermore, frequent data acquisition by the MCU11 can overload the bus. Therefore, this application provides a method for adjusting the frequency. This method dynamically adjusts the operating frequency of the touch module 102 based on the stylus usage to avoid the problem of high power consumption caused by the touch module 102 always operating at a fixed frequency. In other words, the method provided in this application can save power as much as possible and increase the stylus's battery life. Specific implementation details can be found in the following embodiments.
[0079] Please refer to Figure 4 , Figure 4 This is a schematic diagram illustrating an application scenario according to an exemplary embodiment. The application scenario involved in this application embodiment includes a stylus 41 and an electronic device 42. The stylus 41 can establish a communication connection with the electronic device 42 via Bluetooth. The use of the stylus 41 and the electronic device 42 includes a variety of possible scenarios. The method for adjusting the frequency provided in this application embodiment will be described below in conjunction with different usage scenarios.
[0080] Please refer to Figure 5 , Figure 5 This is a flowchart illustrating a method for adjusting frequency according to an exemplary embodiment. This method can be applied to handheld devices and is not intended to be limiting. Taking a stylus as an example, the method may include some or all of the following:
[0081] A1: When the touch module is operating at the second frequency, determine whether the stylus is stationary.
[0082] The second frequency generally refers to the operating frequency of the stylus in normal mode. The second frequency can be preset by technicians according to actual needs, and its value range can be [60Hz, 100Hz], for example, 100Hz. The second frequency can be denoted as f1.
[0083] When the touch module operates at frequency f1, to avoid excessive power consumption of the stylus, it's possible to check if the operating frequency can be adjusted. This can be achieved by determining if the stylus is stationary. In one example, the stylus can be monitored by the MCU, which can determine this based on the detection signal from the ACC sensor on the stylus. The ACC sensor can detect in real-time or periodically. In the case of periodic detection, to ensure the effectiveness and accuracy of the detection, the detection period is typically set to a small value.
[0084] If the stylus is not stationary, meaning it is in motion, it indicates that the stylus may be in use. In this case, proceed to step A2. Otherwise, if the stylus is stationary, it usually indicates that the stylus is not in use. Figure 4 As shown, the stylus is merely placed on the table, and the user is not holding it in their hand. It's easy to understand that in this situation, touch data collection and reporting are usually unnecessary, so the operating frequency of the touch module can be adjusted, and the stylus proceeds to step A4.
[0085] A2: Determine whether the stylus is in input mode.
[0086] In one possible scenario, when the stylus is in motion, that is, when the stylus is in use, the user may be using the stylus to write or draw on the electronic device. In this case, it is not necessary to monitor touch events, that is, the touch module does not need to collect and report touch data on the touch panel. For this purpose, the operating frequency of the touch module can be adjusted, that is, the touch module can be controlled to no longer work at the second frequency.
[0087] In another possible scenario, when the stylus is in motion, that is, when the stylus is in use, the user may be touching the stylus's touch panel, that is, the user may be sending touch commands to the electronic device through the stylus. In this case, the stylus needs to continue to work at a second frequency in order to be able to collect touch data in real time.
[0088] Therefore, in order to further determine whether the operating frequency of the touch module needs to be adjusted, the current working mode of the stylus can be checked, that is, whether the stylus is inputting information on the electronic device.
[0089] In one example, the stylus can be determined by the MCU, which can make a judgment based on the pressure value detected by the pressure sensor configured on the stylus. As an example and not a limitation, if the pressure value detected by the pressure sensor is less than a pressure value threshold, it is determined that the stylus is not in the information input state; otherwise, if the pressure value detected by the pressure sensor is greater than or equal to the pressure value threshold, it is determined that the stylus is in the information input state.
[0090] The pressure threshold can be set according to actual needs. For example, the pressure threshold is 0. That is, when the pressure value detected by the pressure sensor is not zero, it means that the stylus is currently inputting information, so it can be determined that the stylus is in the information input state; otherwise, when the pressure value detected by the pressure sensor is zero, it means that the stylus is not inputting information, so it can be determined that the stylus is not in the information input state.
[0091] If the stylus is in input mode, for example... Figure 6 As shown, the user is drawing on the electronic device using a stylus. Touch event detection is not required at this time, so the stylus proceeds to step A4. Otherwise, if the stylus is not in an input state, further determination is needed to determine whether touch event detection is required. In this case, the stylus proceeds to step A3.
[0092] A3: Determine whether a lock screen message from an electronic device has been received.
[0093] Lock screen messages are used to indicate that an electronic device connected to a stylus has entered a lock screen state. In one example, the stylus can receive lock screen messages via an MCU.
[0094] It's easy to understand that if an electronic device is locked, meaning the user is not currently using it, it usually means the user doesn't need to use the stylus. For example, in one possible scenario... Figure 7 As shown, the user is holding and using the stylus, but the electronic device associated with the stylus is locked. In this situation, the stylus detects movement but is not in input mode; the user doesn't need to use it. For this scenario, the stylus doesn't need to detect touch events; the touch module doesn't need to collect or report touch data. Therefore, if the stylus receives a lock screen message from the electronic device, it proceeds to step A4.
[0095] Of course, if the electronic device is not in lock screen mode, meaning the user is currently using the device, it indicates that the user may need to use a stylus. Therefore, if the stylus detects movement, is not in a locked state, and has not received a lock screen message from the electronic device, it means the user may currently be holding the stylus and may subsequently need to control the electronic device through touch operations on the stylus's touch panel, for example... Figure 8 As shown, the cursor of the electronic device is subsequently controlled by touching the touch panel on the stylus. In order to detect touch events in real time, the stylus ends the judgment logic, that is, it continues to operate at the second frequency.
[0096] It is worth mentioning that, when the stylus is in motion and not currently in input mode, the system further determines whether the stylus has unlocked to the lock screen. This allows the system to assess whether the user needs to send control commands to the electronic device using the stylus, thus improving the accuracy of the assessment and consequently the accuracy of the adjustment frequency.
[0097] It should be noted that the embodiments of this application only take the execution of step A3 when the stylus is not in the information input state as an example. In another embodiment, if the stylus is not in the information input state, the logic judgment process can be directly terminated. That is, if the stylus body is in motion and the stylus is not in the information input state, it can be assumed that the user is currently using the stylus and will control the electronic device through the stylus's touch panel, so the stylus can continue to maintain the second frequency.
[0098] A4: Adjust the operating frequency to the first frequency, which is lower than the second frequency.
[0099] The first frequency can be set according to actual needs. In one example, the first frequency can be set to the value that causes the touch module to enter sleep mode; for example, the first frequency can be 0. In sleep mode, since the stylus runs in power-saving mode, the power consumption of the stylus can be reduced, thereby improving battery life.
[0100] As an example of this application, when the MCU determines that the operating frequency of the touch module can be adjusted, it can send a second frequency adjustment command to the touch module. Accordingly, after receiving the second frequency adjustment command, the touch module adjusts its operating frequency to the first frequency.
[0101] This achieves the goal of dynamically adjusting the stylus's power consumption. Furthermore, when the stylus is operating at its primary frequency, the frequency can be reverted to a secondary frequency when the user requires real-time touch event detection. One example could include the following implementation:
[0102] A5: When the working frequency is the first frequency, detect whether the stylus body is in motion.
[0103] In one example, the stylus can be used by the MCU to make a judgment based on the detection signal from the ACC sensor configured on the stylus.
[0104] If the stylus is not in motion, it means the user is not currently using the stylus. In this case, continue checking if the stylus is in motion. Otherwise, if the stylus is in motion, it means the stylus may be in use. In this case, proceed to step A6 below.
[0105] A6: Determine whether the stylus is in information input mode.
[0106] The stylus can be used by the MCU to make a judgment, based on the pressure value detected by the pressure sensor on the stylus. The specific judgment process can be found in step A2 above.
[0107] If the stylus is in input mode, such as when the user is writing or drawing on an electronic device, there is no need to monitor touch events. Therefore, the stylus can continue to operate at the first frequency, meaning it does not need to revert to the second frequency. Conversely, if the stylus is not in input mode, the user may control the electronic device by touching the stylus's touch panel, so the stylus can proceed to step A7 below.
[0108] A7: Detects whether an unlock message for an electronic device has been received.
[0109] This unlock message is used to indicate that the electronic device is in an unlocked state.
[0110] If the stylus is operating at its primary frequency, and while the stylus itself is in motion and not actively inputting data, but the associated electronic device is locked, the user may not use the stylus. For example, see reference [link to reference]. Figure 7 If the user is simply holding and using the stylus, there's no need to restore the touch module's operating frequency. Therefore, to more accurately determine whether the user needs to use the stylus, even when the stylus is in motion and not in input mode, it's also possible to detect whether the stylus has received an unlock message from the electronic device. If the stylus hasn't received an unlock message, its operating frequency remains at the first frequency, meaning it doesn't revert to the second frequency. Conversely, if the stylus has received an unlock message, step A8 can be executed to detect the user's touch operation in real time.
[0111] A8: Adjust the stylus's operating frequency to the second frequency.
[0112] As an example of this application, when the MCU determines that the operating frequency of the touch module needs to be restored, it can send a first frequency adjustment command to the touch module. Accordingly, after receiving the first frequency adjustment command, the touch module adjusts its operating frequency to a second frequency, that is, restores the operating frequency to normal mode.
[0113] It should be noted that the above description assumes the stylus is operating at its first frequency. If the stylus is in motion, not in input mode, and receives an unlock message from the electronic device, the touch module's operating frequency is adjusted to the first frequency. In another embodiment, even when the electronic device is unlocked, it may not send an unlock message to the stylus. Therefore, if the stylus is in motion and not in input mode, even with the first frequency, it can be determined that the user may control the electronic device by touching the touch panel. In this case, the stylus's operating frequency can be adjusted to the second frequency, effectively restoring the touch module's operating frequency.
[0114] It is worth mentioning that since the data collection and reporting time of the stylus's touch module in each working cycle is usually fixed, that is, the time when the touch module is in normal mode is fixed, the power consumption of the touch module can be dynamically adjusted by changing the working frequency, depending on the usage scenario of the stylus, so as to minimize the power consumption of the touch module and thus increase the stylus's battery life.
[0115] In this embodiment, when the operating frequency of the touch module is the second frequency, if the stylus is stationary, or the stylus is in an information input state, or the stylus receives a screen lock message, the operating frequency is adjusted to the first frequency, which is lower than the second frequency. This reduces the operating frequency of the touch module, preventing the stylus from continuously operating in a high-power state, thereby achieving the purpose of saving power.
[0116] In another embodiment, the system can also determine whether the user is controlling the electronic device by touching the touch panel based on the stylus's physical state, whether the stylus is in input mode, whether a lock screen message has been received, and the changes in capacitance values of various channels on the stylus's touch panel. This allows for accurate determination of whether the operating frequency of the touch module needs to be adjusted. For example, please refer to... Figure 9 , Figure 9 This is a flowchart illustrating a method for adjusting frequency according to another exemplary embodiment. The method may include some or all of the following:
[0117] Step B1: When the touch module is operating at the second frequency, determine whether the stylus is stationary.
[0118] For specific judgment methods, please refer to the above. Figure 5 Step A1 in the illustrated embodiment will not be repeated here.
[0119] If the stylus is not stationary, meaning it is in motion, it indicates that the stylus may be in use. In this case, proceed to step B2. Otherwise, if the stylus is stationary, it indicates that the stylus may be in unused mode, for example... Figure 4 As shown, the stylus is merely placed on the table, and the user is not holding it in their hand. In this situation, touch data collection and reporting are usually not required, so the operating frequency of the touch module can be adjusted, and the stylus proceeds to step B4 below.
[0120] Step B2: Determine if the stylus is in input mode.
[0121] For specific judgment methods, please refer to the above. Figure 5 Step A2 in the illustrated embodiment will not be repeated here.
[0122] If the stylus is in input mode, for example... Figure 6 As shown, if the user is drawing on the electronic device using a stylus, proceed to step B4 below. Otherwise, if the stylus is not in input mode, the user may touch the stylus's touch panel to control the electronic device. To further determine this, the stylus proceeds to step B3 below.
[0123] Step B3: Determine whether a screen lock message from the electronic device has been received.
[0124] For specific judgment methods, please refer to the above. Figure 5 Step A3 in the illustrated embodiment will not be repeated here.
[0125] If an electronic device is locked, meaning the user is not currently using the device, it usually indicates that the user does not need to use the stylus. For example, in one possible scenario, such as... Figure 7 As shown, the user is holding and using the stylus, but the electronic device associated with the stylus is locked. In this situation, the stylus detects movement but is not in input mode, even though the user doesn't need to use it. For this scenario, the stylus doesn't need to detect touch events; the touch module doesn't need to collect or report touch data. Therefore, if the stylus receives a lock screen message from the electronic device, it proceeds to step B4.
[0126] If the electronic device is not in lock screen mode, meaning the user is currently using the device, it indicates the user may need to operate the device using a stylus. Therefore, if the stylus detects the device is in motion, is not in active mode, and has not received a lock screen message from the electronic device, it can be assumed the user is currently holding the stylus and may need to control the electronic device via touch operations on the stylus's touch panel. To further determine this, the stylus proceeds to step B9.
[0127] Step B4: Adjust the operating frequency to the first frequency, which is lower than the second frequency.
[0128] For example, the touch module is switched to sleep mode. The specific implementation can be found above. Figure 5 Step A4 in the illustrated embodiment will not be repeated here.
[0129] It should be noted that when the stylus's touch module is operating at the first frequency, in order to detect the user's touch operation in a timely manner when the user touches the touch panel, the stylus also performs the steps shown in B5 to B8 below.
[0130] Step B5: Check if the stylus is in motion.
[0131] If the stylus body is not in motion, continue checking whether the stylus body is in motion. Otherwise, if the stylus body is in motion, the stylus proceeds to step B6 below.
[0132] Step B6: Determine if the stylus is in input mode.
[0133] If the stylus is in input mode, it will continue to operate at the first frequency, meaning it does not need to revert to the second frequency. Conversely, if the stylus is not in input mode, it can proceed to step B7 below.
[0134] Step B7: Check if an unlock message for the electronic device has been received.
[0135] If the stylus does not receive an unlock message from the electronic device, it can maintain the stylus's operating frequency at the first frequency, that is, it will not revert to the second frequency; conversely, if the stylus receives a lock screen message from the electronic device, it can execute the following step B8.
[0136] Step B8: Adjust the stylus's operating frequency to the second frequency.
[0137] It should be noted that the specific implementation of steps B5 to B8 above can be found in steps A5 to A8 of the above embodiments.
[0138] Step B9: Determine whether a touch event exists based on the touch data.
[0139] As an example of this application, the touch data includes the capacitance values of each channel on the touch panel. In this case, the specific implementation of determining whether a touch event has occurred based on the touch data may include: determining the changes in the capacitance values on the touch panel. If the capacitance values on the touch panel do not change within a first time period, it is determined that no touch event has occurred. Otherwise, if the capacitance values on the touch panel change within the first time period, it is determined that a touch event has occurred.
[0140] The duration can be set according to actual needs.
[0141] Normally, if the user does not touch the touch panel, the capacitance value on the touch panel does not change. After the user touches the touch panel, the capacitance value on the touch panel will change over time. Therefore, the stylus can determine whether a touch event has occurred based on the changes in capacitance values of each channel reported by the touch module within a first time period.
[0142] If a touch event is confirmed, it means that the user is most likely controlling the electronic device by touching the touch panel, for example... Figure 8 As shown, the stylus controls the cursor movement of the electronic device. In this case, the stylus maintains the touch module's operating frequency at the second frequency. Conversely, if no touch event is detected, it means the user is not currently touching the touch panel, for example, in a possible scenario such as... Figure 10 As shown, the stylus is powered on and the electronic device is unlocked, but both are placed in a bag. The user is carrying the bag and walking. In this situation, the stylus detects that its body is in motion, it is not in input mode, it has not received a lock screen message from the electronic device, and it has not detected any touch events. However, because the stylus is in motion, not in input mode, and has not received a lock screen message (i.e., the electronic device is unlocked), the user may still use the touch panel to control the electronic device via the stylus in the short term. For example, after arriving at a location (e.g., moving from room A to room B), the user may take the stylus and electronic device out of the bag to continue working and may use the stylus to control the electronic device. To detect touch events in the future, the stylus proceeds to step B10.
[0143] Step B10: Adjust the operating frequency of the touch module to the third frequency, which is lower than the second frequency but higher than the first frequency.
[0144] The third frequency can be set according to actual requirements. Assume the third frequency is denoted as f2, and the first frequency is 0, then 0 < f2 < f1. For example, if the second frequency is 100 Hz and the third frequency is 60 Hz.
[0145] That is, the stylus can reduce the operating frequency of the touch control module, making the operating frequency of the touch control module lower than the second frequency, but still in the working mode of collection and reporting. In this way, not only can the operating power consumption of the touch control module be reduced, but it can also ensure that the touch operation of the user on the touch panel can continue to be detected, that is, control the touch control module to collect and report with low power consumption.
[0146] For example, please refer to Figure 11 , Figure 11 . The (a) diagram in shows the operating situation of the touch control module within a single working cycle when the touch control module operates at the second frequency. At this time, the duration of the working cycle is t1. Touch data is collected in the time period from the 0th millisecond to the ath millisecond, touch data is reported to the MCU in the time period from the ath to the bth millisecond, and it is in a low-power operating state in the time period from the bth millisecond to t1 millisecond. Figure 11 . The (b) diagram in shows the operating situation of the touch control module within a single working cycle when the touch control module operates at the third frequency. At this time, the duration of the working cycle is t2, t2 > t1. Touch data is collected in the time period from the 0th millisecond to the ath millisecond, touch data is reported to the MCU in the time period from the ath to the bth millisecond, and it is in a low-power operating state in the time period from the bth millisecond to t2 millisecond. It can be easily seen that after the operating frequency of the touch control module is adjusted to the third frequency, the proportion of the touch control module in the low-power state is increased, thereby reducing the power consumption of the touch control module.
[0147] In one example, the MCU can instruct the touch control module to perform frequency adjustment.
[0148] Furthermore, after adjusting the operating frequency of the touch control module to the third frequency, the following operations can also be included:
[0149] Step B11: Whether the capacitance value on the touch panel changes within the second duration.
[0150] The second duration can be set according to actual requirements. As an example but not a limitation, the second duration can be less than the first duration.
[0151] If the capacitance value on the touch panel does not change within the second duration, it means that no touch event has been detected for a relatively long time, which indicates that the user has not touched the touch panel for a long time. In this case, the operating frequency of the touch control module can be reduced again, and the stylus enters the following step B12.
[0152] If the capacitance value on the touch panel changes within the second time period, it indicates that the user uses the stylus again and controls the electronic device through the touch operation on the touch panel of the stylus. In this case, in order to be able to respond to the user's touch operation in real time, the stylus adjusts the working frequency of the touch module to the second frequency to restore the working frequency of the touch module.
[0153] Step B12: Adjust the working frequency of the touch module to the fourth frequency, where the fourth frequency is less than the third frequency and greater than the first frequency.
[0154] The fourth frequency can be set by technicians according to actual needs. Assume the fourth frequency is denoted as f3, and the first frequency is 0, then 0 < f3 < f2. For example, if the second frequency is 100 Hz, the third frequency is 60 Hz, and the fourth frequency is 30 Hz.
[0155] It should be noted that since the body of the stylus is still in motion, the stylus is not in the information input state, and the electronic device is in the unlocked state, the user may still control the electronic device by touching the touch module of the stylus subsequently. Therefore, the value of the fourth frequency is not zero, that is, the stylus will still perform the operations of collecting and reporting, but the working frequency is lower at this time.
[0156] Exemplarily, please refer to Figure 11 , Figure 11 In the case where the touch module works at the fourth frequency shown in the (c) diagram in. At this time, the duration of the working cycle is t3, where t3 > t2 > t1. Touch data is collected in the time period from the 0th millisecond to the a millisecond, the touch data is reported to the MCU in the time period from the a to the b millisecond, and the touch module is in the low-power operation state in the time period from the b millisecond to the t3 millisecond. It can be seen from this that after the working frequency of the touch module is adjusted to the fourth frequency, the proportion of the touch module in the low-power state is increased again, that is, it is larger than the proportion of the touch module in the low-power state at the third frequency, thereby further reducing the power consumption of the touch module.
[0157] In one example, the MCU can instruct the touch module to have a working frequency of the fourth frequency.
[0158] As an example of the present application, after the working frequency of the touch module is adjusted to the fourth frequency, when the body of the stylus is in motion, the stylus is not in the information input state, and no lock screen message is received, if the capacitance values of each channel on the touch panel do not change, the stylus can continue to keep the working frequency of the touch module at the fourth frequency so as to be able to detect the touch operation when the user touches the touch panel of the stylus.
[0159] Furthermore, after adjusting the operating frequency of the touch module to the fourth frequency, the following operations may also be performed:
[0160] Step B13: If the capacitance value on the touch panel changes, adjust the operating frequency of the touch module to the second frequency.
[0161] In other words, if the stylus is in motion, not in input mode, and has not received a lock screen message, and the capacitance value on the touch panel changes, it means that the user may be sending touch commands to the electronic device by touching the touch panel. In this case, the stylus adjusts the operating frequency of the touch module to the second frequency, that is, restores the operating frequency of the touch module, so as to respond to the user's touch operation on the touch panel in real time.
[0162] Furthermore, after adjusting the operating frequency of the touch module to the fourth frequency, if the stylus is stationary, or the stylus is in information input mode, or the stylus receives a screen lock message, it indicates that the user may no longer be using the stylus to operate the electronic device. In this case, the operating frequency of the touch module is adjusted to the first frequency, for example, to zero.
[0163] It is worth mentioning that by dynamically switching the operating frequency of the touch module in this way, which follows the method of "slowly decreasing in stages and quickly recovering", the power consumption of the stylus can be reduced to a certain extent, while the detection of touch events can continue.
[0164] In this embodiment, when the stylus is in motion, not in input mode, and not receiving a lock screen message, it is further determined whether a touch event is detected on the stylus's touch panel. If a touch event is detected on the stylus's touch panel, it indicates that the user is currently touching the touch panel, and the touch module's operating frequency remains at the second frequency. Otherwise, if no touch event is detected on the stylus's touch panel, it indicates that the user is not currently touching the touch panel, and the touch module's operating frequency can be reduced to lower the stylus's power consumption, while continuing to detect touch events on the touch panel.
[0165] Please refer to Figure 12 , Figure 12 This is a schematic flowchart illustrating a method for adjusting frequency according to an exemplary embodiment. This method can be applied to the above-described... Figure 1 In the handheld device shown, the method may include the following:
[0166] Step 1201: If the current usage scenario of the handheld device meets the target conditions, adjust the working frequency of the touch module to the first frequency, which is lower than the working frequency before adjustment.
[0167] In one example, the first frequency is the frequency at which the touch module enters sleep mode; for example, the first frequency is zero.
[0168] As an example of this application, the target conditions may include: the handheld device is in a stationary state, or the handheld device is in an information input state, or the handheld device receives a lock screen message, which is used to instruct the electronic device connected to the handheld device to enter a lock screen state.
[0169] As an example of this application, the touch module operates at a second frequency. That is, when the touch module is in normal mode, if the current usage scenario is detected to meet the target conditions, the operating frequency of the touch module is reduced to avoid the handheld device operating in a high-power state when not in use, thereby improving the battery life of the handheld device. For specific implementation details, please refer to the above. Figure 5 The illustrated embodiment.
[0170] As an example, and not a limitation, after adjusting the operating frequency of the touch module to the first frequency, the following operations can also be performed:
[0171] Step 1202: If the handheld device is in motion, not in information input mode, or receives an unlock message, adjust the operating frequency of the touch module to the second frequency. The unlock message is used to indicate that the electronic device has entered the unlock state.
[0172] Thus, if it is determined that the user may need to control the electronic device by touching the touch panel of the handheld device, the operating frequency of the touch module is restored so that the handheld device can respond to the user's touch operation in real time.
[0173] As an example of this application, the touch data includes the capacitance values on the touch panel. The method further includes: when the touch module operates at a second frequency, if the handheld device is in motion, not in an information input state, and has not received a screen lock message, determining the changes in the capacitance values of each channel on the touch panel. If the capacitance values of each channel on the touch panel do not change within a first time period, adjusting the operating frequency of the touch module to a third frequency, where the third frequency is lower than the second frequency and higher than the first frequency.
[0174] In other words, if it is determined that the user has not touched the touch panel of the handheld device, but may send touch commands to the electronic device by touching the touch panel, the operating frequency of the touch module can be reduced, that is, adjusted to the third frequency, but the touch module does not enter the sleep state. In this way, the power consumption of the handheld device is reduced, and the ability to continue to detect touch events is ensured.
[0175] As an example of this application, after adjusting the operating frequency of the touch module to the third frequency, if the capacitance value on the touch panel does not change within the second time period, the operating frequency of the touch module is adjusted to the fourth frequency, which is less than the third frequency and greater than the first frequency.
[0176] If no touch operation is detected for an extended period, it indicates that the user may not need to control the electronic device by touching the touch panel. In this case, the operating frequency of the touch module can be reduced again, that is, the operating frequency can be adjusted from the third frequency to the fourth frequency, in order to further reduce the power consumption of the handheld device and enable the handheld device to detect touch events at a very low operating frequency.
[0177] As an example of this application, if the capacitance value on the touch panel changes after adjusting the operating frequency of the touch module to the fourth frequency, the operating frequency of the touch module is then adjusted to the second frequency.
[0178] It's easy to understand that if the capacitance value on the touch panel changes, it means a touch event has been detected. In this case, in order to respond to the user's touch operation in a timely manner, the handheld device restores the operating frequency of the touch module to the second frequency to improve the accuracy of touch event detection.
[0179] As an example of this application, after adjusting the operating frequency of the touch module to the third frequency, if the capacitance value on the touch panel changes within the second time period, the operating frequency of the touch module is then adjusted to the second frequency.
[0180] Similarly, after adjusting the operating frequency of the touch module to the third frequency, if the capacitance value on the touch panel changes, it indicates that a touch event has been detected. In this case, in order to respond to the user's touch operation in a timely manner, the handheld device restores the operating frequency of the touch module to the second frequency to improve the accuracy of touch event detection.
[0181] In this embodiment, if the handheld device is stationary, in an information input state, or receives a lock screen message instructing a connected electronic device to enter a lock screen state, indicating that the user does not currently need to use the handheld device, the operating frequency of the touch module can be reduced to a first frequency. Thus, by dynamically adjusting the operating frequency of the touch module according to the usage scenario of the handheld device, the handheld device is prevented from continuously operating in a high-power state, thereby improving its battery life.
[0182] Figure 13 This is a schematic diagram of a frequency adjustment device provided in an embodiment of this application. The device can be implemented as part or all of a stylus by software, hardware, or a combination of both. The stylus can function as follows: Figure 1 As shown. Please see below. Figure 13 The device includes at least one processor 1310, a communication bus 1320, a memory 1330, and at least one communication interface 1340. The communication bus 1320 is used to establish a connection between the processor 1310 and the memory 1330. As an example of this application, the processor 1310 includes an MCU.
[0183] The memory 1330 is used to store programs that support the device in executing the methods provided in the above embodiments, and to store data related to implementing the methods described in the above embodiments. The processor 1310 is configured to execute the programs stored in the memory 1330. Specifically, the processor 1310 is used to:
[0184] If the current usage scenario of the handheld device meets the target conditions, the operating frequency of the touch module is adjusted to a first frequency, which is lower than the operating frequency before adjustment.
[0185] The target conditions include: the handheld device is in a stationary state, or the handheld device is in an information input state, or the handheld device receives a screen lock message, which is used to instruct the electronic device connected to the handheld device to enter a screen lock state.
[0186] As an example of this application, the processor 1310 is used for:
[0187] If the operating frequency of the touch module is the second frequency, and the current usage scenario of the handheld device meets the target conditions, then the operating frequency of the touch module is adjusted to the first frequency.
[0188] As an example of this application, the processor 1310 is also used for:
[0189] If the handheld device is in motion, not in information input mode, or receives an unlock message, the operating frequency of the touch module is adjusted to the second frequency. The unlock message is used to instruct the electronic device to enter the unlock state.
[0190] As an example of this application, the first frequency is the frequency at which the touch module enters a sleep mode.
[0191] As an example of this application, the touch data includes the capacitance value on the touch panel; the processor 1310 is further configured to:
[0192] When the operating frequency of the touch module is the second frequency, if the handheld device is in motion, the handheld device is not in the information input state, and the handheld device does not receive the screen lock message, then the change in the capacitance value on the touch panel is determined.
[0193] If the capacitance value on the touch panel does not change within a first time period, the operating frequency of the touch module is adjusted to a third frequency, which is less than the second frequency and greater than the first frequency.
[0194] As an example of this application, the processor 1310 is also used for:
[0195] If the capacitance value on the touch panel does not change within the second time period, the operating frequency of the touch module is adjusted to a fourth frequency, which is less than the third frequency and greater than the first frequency.
[0196] As an example of this application, the processor 1310 is also used for:
[0197] If the capacitance value on the touch panel changes, the operating frequency of the touch module is adjusted to the second frequency.
[0198] As an example of this application, the processor 1310 is also used for:
[0199] If the capacitance value on the touch panel changes during the second time period, the operating frequency of the touch module is adjusted to the second frequency.
[0200] In this embodiment, if the handheld device is stationary, in an information input state, or receives a lock screen message instructing a connected electronic device to enter a lock screen state, indicating that the user does not currently need to use the handheld device, the operating frequency of the touch module can be reduced to a first frequency. Thus, by dynamically adjusting the operating frequency of the touch module according to the usage scenario of the handheld device, the handheld device is prevented from continuously operating in a high-power state, thereby improving its battery life.
[0201] It should be noted that the frequency adjustment device provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0202] The functional units and modules in the above embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of the embodiments of this application.
[0203] The frequency adjustment device and frequency adjustment method provided in the above embodiments belong to the same concept. The specific working process and technical effects of the units and modules in the above embodiments can be found in the method embodiment section, and will not be repeated here.
[0204] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0205] The above-described embodiments are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
Claims
1. A method for adjusting frequency, characterized in that, Applied to a handheld device, the handheld device including a touch module, the touch module being used to collect touch data on the touch panel of the handheld device, the method comprising: When the operating frequency of the touch module is the second frequency, if the current usage scenario of the handheld device meets the target conditions, the operating frequency of the touch module is adjusted to the first frequency, which is lower than the operating frequency before adjustment. The target conditions include: the handheld device is in a stationary state, or the handheld device is in an information input state, or the handheld device receives a screen lock message, the screen lock message being used to instruct the electronic device connected to the handheld device to enter a screen lock state; The method further includes: When the operating frequency of the touch module is the second frequency, if the handheld device is in motion, the handheld device is not in the information input state, and the handheld device does not receive the screen lock message, then the change in the capacitance value on the touch panel is determined. If the capacitance value on the touch panel does not change within a first time period, the operating frequency of the touch module is adjusted to a third frequency, which is less than the second frequency and greater than the first frequency. If the capacitance value on the touch panel does not change within the second time period, the operating frequency of the touch module is adjusted to a fourth frequency, which is less than the third frequency and greater than the first frequency.
2. The method as described in claim 1, characterized in that, After adjusting the operating frequency of the touch module to the first frequency, the method further includes: If the handheld device is in motion, not in information input mode, or receives an unlock message, the operating frequency of the touch module is adjusted to the second frequency. The unlock message is used to instruct the electronic device to enter the unlock state.
3. The method as described in claim 1 or 2, characterized in that, The first frequency is the frequency at which the touch module enters sleep mode.
4. The method as described in claim 1, characterized in that, If the capacitance value on the touch panel does not change within the second time period, then after adjusting the operating frequency of the touch module to the fourth frequency, the method further includes: If the capacitance value on the touch panel changes, the operating frequency of the touch module is adjusted to the second frequency.
5. The method as described in claim 1, characterized in that, If the capacitance value on the touch panel does not change within the first time period, then after adjusting the operating frequency of the touch module to the third frequency, the method further includes: If the capacitance value on the touch panel changes within a second time period, the operating frequency of the touch module is adjusted to the second frequency.
6. A handheld device, characterized in that, The handheld device includes a touch panel, a touch module, and a microcontroller unit (MCU); The touch module is used to collect touch data on the touch panel; The microcontroller unit (MCU) is used to detect touch events based on the touch data and to perform the method as described in any one of claims 1-5.
7. The handheld device as described in claim 6, characterized in that, The handheld device also includes a pressure sensor and an acceleration sensor; The MCU is used to determine whether the handheld device is in an information input state through the pressure sensor; The MCU is used to determine whether the handheld device is stationary via the accelerometer.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Power-saving capacitance touch control device and method thereof
CN101561730A
Control method and electronic device, recovery method and electronic device
CN103838348A
Stylus With Touch Sensor
CN105718079A