Touch optimization method and device, electronic equipment and storage medium

CN117666835BActive Publication Date: 2026-10-30GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311650350.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-04
Publication Date
2026-10-30
Estimated Expiration
2043-12-04

AI Technical Summary

Technical Problem

[0004]本申请提出了一种触控优化方法、装置、电子设备及存储介质,以避免因优化触摸检测,导致电子设备耗电过快等问题的发生

Benefits of technology

[0009]本申请提供的方案中,电子设备可以获取自身的当前剩余电量,并对触摸屏上触摸事件的检测进行与当前剩余电量对应的优化处理。也就是说,电子设备根据自身的当前剩余电量的变化,可以对触摸事件的检测进行与当前剩余电量相适配的优化处理,即有效且充分地利用了当前剩余电量进行适配的触控性能效果的调优,无需增加硬件成本即可实现对触控性能的优化,同时,也避免了因引入其他硬件导致电子设备功耗增加以及耗电过快等问题的发生。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666835B_ABST
    Figure CN117666835B_ABST
Patent Text Reader

Abstract

The application discloses a touch optimization method and device, electronic equipment and a storage medium, and relates to the technical field of screen touch. The method comprises the following steps: an electronic device can acquire the current residual power of the electronic device, and performs optimization processing corresponding to the current residual power on the detection of a touch event on a touch screen. That is, according to the change of the current residual power of the electronic device, the electronic device can perform optimization processing on the detection of the touch event, which is adapted to the current residual power, that is, the touch performance effect is effectively and sufficiently adapted, the optimization of the touch performance can be realized without increasing the hardware cost, and meanwhile, the problems of the increase of the power consumption of the electronic device and the too fast power consumption caused by the introduction of other hardware are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of screen touch technology, and in particular to a touch optimization method, apparatus, electronic device and storage medium. Background Technology

[0002] Touchscreen technology is the most widely accepted computer input method among ordinary people after keyboards, mice, handwriting tablets, and voice input. Using this technology, users can operate electronic devices simply by lightly touching icons or text on the touchscreen display, making human-computer interaction more direct.

[0003] In related technologies, the accuracy or response speed of touch detection is generally optimized from the hardware level of the touch screen. For example, an external high-voltage analog power supply is introduced to emit a very high voltage to scan the touch screen sensor, thereby increasing the power consumption of the electronic device and causing the electronic device to consume power too quickly. Summary of the Invention

[0004] This application proposes a touch optimization method, apparatus, electronic device, and storage medium to avoid problems such as excessive power consumption of electronic devices due to optimized touch detection.

[0005] In a first aspect, embodiments of this application provide a touch optimization method applied to an electronic device, the electronic device including a touch screen, the method including: obtaining the current remaining battery power of the electronic device; and performing optimization processing on the detection of touch events on the touch screen corresponding to the current remaining battery power.

[0006] Secondly, embodiments of this application provide a touch optimization device applied to an electronic device, the electronic device including a touch screen, the device including: a power acquisition module for acquiring the current remaining power of the electronic device; and a touch optimization module for performing optimization processing on the detection of touch events on the touch screen corresponding to the current remaining power.

[0007] Thirdly, embodiments of this application provide an electronic device, including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the methods described above.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code that can be invoked by a processor to execute the methods described above.

[0009] In the solution provided in this application, the electronic device can obtain its current remaining battery power and optimize the detection of touch events on the touchscreen accordingly. In other words, based on changes in its current remaining battery power, the electronic device can optimize the detection of touch events to match the current battery level. This effectively and fully utilizes the current remaining battery power to optimize touch performance without increasing hardware costs. Furthermore, it avoids problems such as increased power consumption and rapid battery drain caused by introducing additional hardware. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart illustrating a touch optimization method provided in an embodiment of this application is shown.

[0012] Figure 2 A flowchart illustrating a touch optimization method provided in another embodiment of this application is shown.

[0013] Figure 3 A flowchart illustrating a touch optimization method provided in an embodiment of this application is shown.

[0014] Figure 4 It shows Figure 2 A flowchart illustrating a sub-step of step 230 in one embodiment.

[0015] Figure 5 It shows Figure 2 A flowchart illustrating a sub-step of step 230 in another embodiment.

[0016] Figure 6 A flowchart illustrating a touch optimization method provided in another embodiment of this application is shown.

[0017] Figure 7 This is a block diagram of a touch optimization device according to an embodiment of this application.

[0018] Figure 8 This is a block diagram of an electronic device for performing a touch optimization method according to an embodiment of this application.

[0019] Figure 9This is a storage unit in this application embodiment for storing or carrying program code that implements the touch optimization method according to this application embodiment. Detailed Implementation

[0020] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0021] It should be noted that some processes described in the specification, claims, and accompanying drawings of this application include multiple operations that appear in a specific order. These operations may not be performed in the order they appear herein, or they may be performed in parallel. Operation numbers such as S110, S120, etc., are merely used to distinguish different operations and do not represent any execution order. Furthermore, these processes may include more or fewer operations, and these operations may be performed sequentially or in parallel. Also, the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or server that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules that are explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to such process, method, product, or device.

[0022] The inventors have proposed a touch optimization method, apparatus, electronic device, and storage medium. The touch optimization method provided in the embodiments of this application will be described in detail below.

[0023] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a touch optimization method according to an embodiment of this application, applied to an electronic device, which includes a touchscreen. The following will describe the method in conjunction with... Figure 1 The touch optimization method provided in this application embodiment will be described in detail. The touch optimization method may include the following steps:

[0024] Step S110: Obtain the current remaining battery power of the electronic device.

[0025] In this embodiment, the electronic device can be a device with data processing capabilities, including but not limited to smartphones, tablets, laptops, desktop computers, smartwatches, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, and MP4 (Moving Picture Experts Group Audio Layer IV) players. The touchscreen includes, but is not limited to, capacitive touchscreens, surface acoustic wave touchscreens, resistive touchscreens, and infrared touchscreens.

[0026] Considering that optimizing either the accuracy or speed of touch event detection on a touchscreen will increase the power consumption of the electronic device to some extent, thus increasing its power consumption rate, this application first obtains the current remaining battery power of the electronic device before optimizing touch event detection on the touchscreen, and then performs more suitable optimization processing based on the current remaining battery power.

[0027] Step S120: Optimize the detection of touch events on the touch screen according to the current remaining battery power.

[0028] Understandably, electronic devices can have multiple pre-set optimization processes. Different optimization processes have varying effects on touch event detection, and the resulting power consumption also differs. It's also understandable that the optimization effect of touch event detection and the resulting power consumption are positively correlated with the remaining battery power; in other words, the more battery power the electronic device has, the better the optimization process for touch event detection can be, and the more effective the optimization will be, the higher the power consumption associated with touch event detection.

[0029] In essence, process scheduling priority refers to how the operating system determines the order in which processes execute based on their priority during process scheduling. Generally, processes with higher scheduling priority are executed first and consume more Central Processing Unit (CPU) resources. In other words, process scheduling priority affects the electronic device's response speed and resource allocation for that process. Therefore, the optimization described above can be used to adjust the scheduling priority of the touch process used to detect touch time, i.e., by increasing or decreasing the scheduling priority of the touch process based on the current remaining battery power. For example, if the current remaining battery power is greater than a first battery threshold, the electronic device can increase the scheduling priority of the touch process, thereby improving the electronic device's response speed to touch events.

[0030] Optionally, CPU clock speed refers to the internal clock frequency of the CPU, usually measured in Hertz (Hz). It is one of the important indicators for measuring CPU performance. The higher the CPU clock speed, the more instructions the CPU can execute per second, and the faster the electronic device's processing speed. Therefore, the above optimization process can be to adjust the CPU clock speed of the processing core used to handle touch processes, that is, to increase or decrease the clock speed of the processing core based on the current remaining battery power. For example, if the current remaining battery power is greater than a first battery power threshold, the electronic device can increase the clock speed of the processing core used to handle touch processes, thereby improving the electronic device's response speed to touch events.

[0031] Optionally, electronic devices typically include a multi-core processor, which has multiple processor cores of varying sizes. Larger cores generally result in faster processing speeds and better data processing performance. Therefore, the aforementioned optimization could also involve switching the touch process to a larger or smaller core within the multi-core processor. For example, if the remaining battery power is greater than a first battery threshold, the electronic device can switch the touch process to a larger core in the multi-core processor, thereby improving the device's response speed to touch events.

[0032] Optionally, the touchscreen's detection of touch events relies on the touch chip within the touchscreen. A higher sampling frequency of the touch chip results in a faster response to touch signals, leading to more sensitive and accurate touch operations. In other words, the sampling frequency of the touch chip directly impacts the user's touch experience. Generally, a higher sampling rate leads to faster touchscreen response and higher accuracy. Therefore, the aforementioned optimization could involve adjusting the touch chip's sampling frequency, specifically by adjusting it based on the remaining battery power. For example, if the remaining battery power exceeds a first battery threshold, the electronic device can increase the touch chip's sampling frequency.

[0033] Optionally, to remove noise and interference from the touch coordinate data collected by the touchscreen, filtering optimization algorithms can generally be used to filter out various noise data, thereby improving the accuracy and stability of the coordinate data. These filtering optimization algorithms include, but are not limited to, average filtering, median filtering, and Kalman filtering. Through filtering, noise and interference in the coordinate data can be removed, improving the touchscreen's response speed and accuracy. Therefore, the above optimization process can be to adjust the filtering optimization algorithm currently used by the electronic device to detect the touch event; that is, it can reduce, increase, or switch the filtering optimization algorithm used to detect the touch event based on the current remaining battery power. For example, if the current remaining battery power is greater than a first battery power threshold, the electronic device can increase the currently used filtering optimization algorithm, or the electronic device can call a more complex filtering optimization algorithm.

[0034] Of course, optimizing the detection of touch events in accordance with the current remaining battery power may also include one or more of the following optimization processes: adjusting the scheduling priority of the touch process used to detect the touch event; switching the touch process to a large core or a small core in the multi-core processor; adjusting the main frequency of the processing core used to process the touch process; adjusting the data sampling frequency of the touch detection chip; and adjusting the filtering optimization algorithm currently used to detect the touch event.

[0035] Therefore, this embodiment does not solely optimize the detection accuracy and speed of touch events, but also considers the remaining battery power of the electronic device. That is, the electronic device optimizes touch event detection based on its remaining battery power, thereby maximizing the touch detection performance of the electronic device without significantly impacting its power consumption and rate of power drain. This achieves optimal touch detection with the current remaining battery power. Furthermore, since no hardware optimization is performed, such as adding new hardware, this avoids increased hardware costs and the potential for excessive power consumption due to added hardware.

[0036] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating another embodiment of a touch optimization method provided in this application, applied to an electronic device, which includes a touchscreen. The following will be combined with... Figure 2 The touch optimization method provided in this application embodiment will be described in detail. The touch optimization method may include the following steps:

[0037] Step S210: Obtain the current remaining battery power of the electronic device.

[0038] In this embodiment, the specific implementation of step S210 can be found in the content of the foregoing embodiments, and will not be repeated here.

[0039] Step S220: Determine the current remaining power range from multiple preset power ranges as the current power range, and each preset power range corresponds to at least one first optimization process.

[0040] In this embodiment, multiple preset power ranges can be pre-set in the electronic device, such as 0%–33.2%, 33.3%–66.6%, 66.7%–99.9%, and 100%. Here, 33.3% can be understood as the percentage between the current remaining power and the total battery capacity of the electronic device, and 100% indicates that the electronic device is at full charge. Alternatively, the preset power ranges could also be 0 mA–332 mA, 333 mA–666 mA, 667 mA–999 mA, and 1000 mA. 333 mA can be understood as the current remaining power value, and 1000 mA can represent the total battery capacity of the electronic device. The specific format of the preset power range can be set according to actual needs, and this embodiment does not limit this.

[0041] Understandably, different preset battery levels can represent different battery states of an electronic device. For example, preset battery levels of 0%–33.2%, 33.3%–66.6%, 66.7%–99.9%, and 100% can be considered as follows: 0%–33.2% can be seen as a low battery state, 33.3%–66.6% as a medium battery state, 66.7%–99.9% as a high battery state, and 100% as a full battery state. Based on this, after obtaining its current remaining battery level, the electronic device can further determine which preset battery level it falls within, and define this preset battery level range as the current battery level range. Thus, based on the current battery level range, the electronic device can determine its current battery state, and subsequently optimize touch event detection to match the battery state, maximizing the current touch detection performance of the electronic device.

[0042] Each preset power range corresponds to at least one first optimization process. The first optimization process includes one or more of the following: increasing the scheduling priority of the touch process used to detect the touch event; switching the touch process to a large core in the multi-core processor; increasing the main frequency of the processing core used to process the touch process; increasing the data sampling frequency of the touch detection chip; and adding a filtering optimization algorithm currently used to detect the touch event. Switching the touch process to a large core in the multi-core processor can be understood as switching the core currently bound to the touch process to a larger core in the multi-core processor. For example, if the touch process is currently bound to a small core in the multi-core processor, switching the touch process to a medium core in the multi-core processor can also be understood as switching the touch process to a large core in the multi-core processor.

[0043] Therefore, the closer the maximum value of the preset power range is to the total battery capacity of the electronic device, the more types of first optimization processes can be applied to that preset power range. Taking the aforementioned four preset power ranges of 0%–33.2%, 33.3%–66.6%, 66.7%–99.9%, and 100% as examples, the preset power range of 0%–33.2% may include only one of the aforementioned first optimization processes; the preset power range of 33.3%–66.6% may include two of the aforementioned first optimization processes; the preset power range of 66.7%–99.9% may include three of the aforementioned first optimization processes; and the preset power range of 100% may include five of the aforementioned first optimization processes. Of course, this embodiment does not impose any limitations on this.

[0044] Step S230: If the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then the detection of the touch event is subjected to a first optimization process corresponding to the current power range. The historical power range is a preset power range in which the remaining power detected at the previous moment is located. The first optimization process is used to improve at least one of the detection accuracy and detection speed of the touch event detection.

[0045] Furthermore, the electronic device can determine whether it is charging at preset intervals based on the charging indicator; if the charging indicator is TRUE, it can determine that it is charging, and if the charging indicator is FALSE, it can determine that it is not charging.

[0046] Optionally, if it is determined that the electronic device is still charging, the current remaining battery level of the electronic device will gradually increase as the charging time increases. Therefore, after determining the current battery level range and that the electronic device is charging, it is further determined whether the minimum value of the current battery level range is greater than the maximum value of the preset battery level range (i.e., the aforementioned historical battery level range) detected at the previous moment, thereby determining whether the electronic device has been charged to the next higher preset battery level range. If the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, it indicates that the electronic device has been charged to the next higher preset battery level range. For example, the remaining battery level detected at the previous moment was 33%, which is within the preset battery level range of 0% to 33.2%, and the current remaining battery level is 40%, which is within the preset battery level range of 33.3% to 66.6%. Obviously, the electronic device has now been charged from a low battery level to a medium battery level. At this time, the detection of touch events can be further optimized according to the current battery level range. Thus, since a first optimization process corresponding to the power state is preset for different preset power ranges, the touch performance can be effectively and fully utilized within the current power range to optimize the touch performance as much as possible, thereby improving the user's touch smoothness.

[0047] In some implementations, if the electronic device is charging and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, with an optimization intensity corresponding to the current battery level range. That is, not only is at least one first optimization process set for each preset battery level range, but a corresponding optimization intensity is also set for each preset battery level range. The closer the maximum value of the preset battery level range is to the total battery capacity of the electronic device, the greater the optimization intensity corresponding to that preset battery level range.

[0048] Optionally, the first optimization process is to increase the scheduling priority of the touch process used to detect the touch event. The optimization intensity of this first optimization process can be understood as the level of the increased scheduling priority. For example, if the current battery level is between 33.3% and 66.6%, the corresponding first optimization process can be understood as increasing the scheduling priority of the touch process to medium priority; if the current battery level is between 66.7% and 99.9%, the corresponding first optimization process can be understood as increasing the scheduling priority of the touch process to high priority. It is evident that the closer the maximum value of the preset battery range is to the total battery capacity of the electronic device, the higher the level of increasing the scheduling priority of the touch process (i.e., the greater the optimization intensity), thereby further improving the response speed and resource utilization of the touch process.

[0049] Optionally, the first optimization process involves switching the touch process to a large core in the multi-core processor. The optimization intensity of this first optimization process can be understood as the size of the core being switched to. Switching to a large core can be understood as switching to a core larger than the core currently bound to the touch process. For example, a multi-core processor includes small cores, medium cores, large cores, and super-large cores. For instance, if the touch process is currently bound to a small core, and the current battery level is between 33.3% and 66.6%, the corresponding first optimization process would be to switch the touch process from the small core to a medium core in the multi-core processor. If the current battery level is between 66.7% and 99.9%, the corresponding first optimization process would be to switch the touch process from the small core to a large core in the multi-core processor. It is evident that the closer the maximum value of the preset battery level range is to the total battery capacity of the electronic device, the larger the core being switched (i.e., the greater the optimization intensity), thereby significantly improving the smoothness of the touch response.

[0050] Optionally, the first optimization process involves increasing the main frequency of the processing core used to process the touch process. The optimization intensity of this first optimization process can be understood as the magnitude of the increase in main frequency. For example, if the current battery level is between 33.3% and 66.6%, the corresponding first optimization process could be increasing the main frequency of the processing core used to process the touch process to 240 Hz; if the current battery level is between 66.7% and 99.9%, the corresponding first optimization process could be increasing the main frequency of the processing core used to process the touch process to 360 Hz. It is evident that the closer the maximum value of the preset battery level range is to the total battery capacity of the electronic device, the greater the increase in the main frequency of the processing core (i.e., the greater the optimization intensity), thereby significantly improving the touch response speed.

[0051] Optionally, the first optimization process is to increase the data sampling frequency of the touch detection chip. The optimization intensity of this first optimization process can be understood as the magnitude of the increased data sampling frequency. For example, if the current battery level is between 33.3% and 66.6%, the corresponding first optimization process could be to increase the main frequency of the processing core used to process the touch process to 240 Hz; if the current battery level is between 66.7% and 99.9%, the corresponding first optimization process could be to increase the main frequency of the processing core used to process the touch process to 360 Hz. It is evident that the closer the maximum value of the preset battery level range is to the total battery capacity of the electronic device, the greater the increase in the data sampling frequency of the touch detection chip (i.e., the greater the optimization intensity), thereby maximizing the smoothness of the touch response.

[0052] Optionally, the first optimization process involves increasing the number of filtering optimization algorithms currently used to detect the touch event. The optimization intensity of this first optimization process can be understood as the number of filtering optimization algorithms added. For example, if the current battery level is between 33.3% and 66.6%, the corresponding first optimization process could be to add one filtering optimization algorithm; if the current battery level is between 66.7% and 99.9%, the corresponding first optimization process could be to add two filtering optimization algorithms. It is evident that the closer the maximum value of the preset battery level range is to the total battery capacity of the electronic device, the more filtering optimization algorithms are added (i.e., the greater the optimization intensity), thereby maximizing the response speed and accuracy of the touch response.

[0053] In this approach, the first optimization process corresponding to different preset battery ranges can be the same. For example, each preset battery range may only include all of the aforementioned first optimization processes. However, the optimization intensity corresponding to different preset battery ranges may be different. Thus, it is still possible to optimize the touch performance to different degrees when the current remaining battery power of the electronic device is in different preset battery ranges. This allows for a more suitable first optimization process within different preset battery ranges without affecting the charging of the electronic device, thereby fully leveraging the strongest touch performance of the electronic device.

[0054] Of course, in this approach, the types of first optimization processes corresponding to different preset battery ranges can be different. Optionally, the closer the maximum value of the preset battery range is to the total battery capacity of the electronic device, the more types of first optimization processes there are for that preset battery range, and the greater the optimization intensity corresponding to that preset battery range. In this way, while the current remaining battery capacity of the electronic device gradually increases during charging, the optimization effect of touch event detection is maximized. For example, by increasing the types of optimization processes and increasing the optimization intensity of each process, the strongest touch performance of the electronic device can be fully utilized without affecting the charging of the electronic device.

[0055] For example, taking multiple preset power ranges as (0, 1 / 3), [1 / 3, 2 / 3), [2 / 3, 1), and 1 as examples, (0, 1 / 3) represents that the current remaining power is greater than 0 and less than 1 / 3 of the total power range of the electronic device's battery; [1 / 3, 2 / 3) represents that the current remaining power is greater than or equal to 1 / 3 of the total power range of the electronic device's battery and less than 2 / 3 of the total power range of the electronic device's battery; 1 represents that the current remaining power is equal to the total power range of the electronic device's battery, that is, it is in a fully charged state.

[0056] The first optimization process corresponding to the preset battery range (0, 1 / 3) can be pre-set, including: increasing the scheduling priority of the touch process to normal priority, switching the touch process to the small core of the multi-core processor, increasing the main frequency of the small core used to process the touch process to 3.0GHz, and increasing the data sampling frequency of the touch detection chip to 125Hz. The first optimization process corresponding to the preset battery range [1 / 3, 2 / 3) includes: increasing the scheduling priority of the touch process to medium priority, switching the touch process to the medium core of the multi-core processor, increasing the main frequency of the medium core used to process the touch process to 3.5GHz, and increasing the data sampling frequency of the touch detection chip to 240Hz. The medium priority level is higher than the aforementioned normal priority level. Clearly, the types of the first optimization processes corresponding to the preset battery range [1 / 3, 2 / 3) are the same as those corresponding to the preset battery range (0, 1 / 3), but the optimization intensity is set differently.

[0057] Similarly, the first optimization process corresponding to the preset battery range [2 / 3, 1) includes: increasing the scheduling priority of the touch process to high priority, switching the touch process to the large core of the multi-core processor, increasing the main frequency of the large core used to process the touch process to 4.0GHz, increasing the data sampling frequency of the touch detection chip to 360Hz, and adding a filtering optimization algorithm while enhancing the filtering strength of the filtering optimization algorithm. The high priority level is higher than the aforementioned medium priority level. The filtering optimization algorithm can be an Infinite Impulse Response (IIR) filtering algorithm. In the IIR filtering algorithm, the current touch position coordinate = the previous touch position coordinate + coefficient * (current touch position coordinate - = previous touch position coordinate). Based on this, the filtering strength of the IIR filtering algorithm can be enhanced by reducing the value of the coefficient, thereby increasing the weight of historical coordinates and strengthening coordinate filtering, thus improving the smoothness of touch operation. Of course, other types of filtering algorithms can also be used. Naturally, if other types of filtering algorithms are used, the corresponding methods for enhancing filtering strength are used to enhance the coordinate filtering strength, which will not be elaborated here.

[0058] Similarly, the first optimization process corresponding to a fully charged state can include: increasing the scheduling priority of the touch process to ultra-high priority, switching the touch process to the ultra-large core of the multi-core processor, increasing the main frequency of the large core used to process the touch process to 6.0GHz, increasing the data sampling frequency of the touch detection chip to 720Hz, and adding filtering optimization algorithms, such as simultaneously using the IIR filtering algorithm and the historical coordinate mean filtering algorithm to enhance the smoothness of touch operation. Optionally, a time-consuming waterproof algorithm can also be added in a fully charged state to avoid problems such as inaccurate touch coordinate calculation caused by water droplets or sweat on the touch screen. In this way, by adding filtering optimization algorithms, the noise released by the charger of the electronic device during charging can be reduced to a certain extent, which can lead to problems such as incorrect touch detection of the electronic device, thus improving the noise resistance of touch detection.

[0059] Based on this, and referring to the examples above... Figure 3 When the remaining battery power of the electronic device is within a preset range (0, 1 / 3), the electronic device enters the normal touch performance mode and performs the first optimization processing corresponding to the preset battery range (0, 1 / 3) for touch event detection with the optimization intensity corresponding to the preset battery range (0, 1 / 3). When the remaining battery power of the electronic device is within the preset battery range [1 / 3, 2 / 3), the electronic device enters the medium touch performance mode and performs the first optimization processing corresponding to the preset battery range [1 / 3, 2 / 3) for touch event detection with the optimization intensity corresponding to the preset battery range [1 / 3, 2 / 3). When the remaining battery power of the electronic device is within the preset battery range [2 / 3, 1), the electronic device enters the high-performance touch mode and performs the first optimization processing corresponding to the preset battery range [2 / 3, 1) for touch event detection with the optimization intensity corresponding to the preset battery range [2 / 3, 1). When the electronic device is at full charge, it enters a high-performance touch mode and performs the first optimization processing for touch event detection according to the optimization intensity corresponding to the full charge state.

[0060] Therefore, when an electronic device detects that its remaining battery level is within different preset ranges while charging, it can perform different first optimization processes for touch event detection, corresponding to different preset battery levels. This means that different touch optimization strategies are invoked. Specifically, when the remaining battery level is low (i.e., low charge), a normal touch performance mode is used; when the remaining battery level is moderate (i.e., moderate charge), a medium touch performance mode is used; when the remaining battery level is high (i.e., high charge), a high-performance touch performance mode is used; and when the remaining battery level is full (i.e., fully charged), a super-high-performance touch performance mode is used. This fully utilizes the remaining battery level of the electronic device to perform the most appropriate touch performance tuning, improving the user's touch experience.

[0061] It should be noted that it can be like this Figure 3 The method shown first detects whether the electronic device is in a charging state, and then determines the current remaining power range of the electronic device. Alternatively, the current remaining power range of the electronic device can be determined first, and then the electronic device can be detected whether it is in a charging state. Of course, the current remaining power range of the electronic device can be determined at the same time as the electronic device is detected whether it is in a charging state. This embodiment does not limit this.

[0062] In other implementations, please refer to Figure 4 Step S230 may include the contents of steps S231A to S233A:

[0063] Step S231A: If the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then obtain the real-time charging rate and the power consumption rate of the application running in the electronic device.

[0064] Step S232A: Obtain the rate difference between the real-time charging rate and the power consumption rate.

[0065] Considering that in practical applications, electronic devices may have background and / or foreground applications running while charging, and some applications, even in the background, can significantly impact the device's power consumption rate. For example, a background video application downloading a large amount of video will increase the device's power consumption rate, as will a large game application updating in the background. Similarly, a video application playing video in the foreground will also consume power. Therefore, given that the electronic device is in a charging state and the minimum current battery level is greater than the maximum historical battery level, we can further obtain the real-time charging rate and the power consumption rate of the applications running on the device. We can then determine if the real-time charging rate is greater than the power consumption rate. If it is, we can obtain the rate difference between the real-time charging rate and the power consumption rate. Based on this rate difference, we can determine the actual charging efficiency. The larger the rate difference, the higher the actual charging efficiency. This allows for more appropriate initial optimization based on the actual charging efficiency, thereby maximizing the touch performance of the electronic device under different charging states.

[0066] Optionally, if the real-time charging rate is less than or equal to the power consumption rate, the difference between the power consumption rate and the real-time charging rate is obtained as the target rate difference. If the target rate difference is less than a second threshold, a first prompt message is output, which prompts the user to close at least some running applications to improve charging efficiency and save charging time. If the target rate difference is greater than or equal to the second threshold, a second prompt message is output, which indicates a charging abnormality and prompts the user to check the battery health of the electronic device and whether the charging cable is making good contact with the electronic device. The second threshold can be a preset value, which can be adjusted according to different actual needs, and will not be elaborated further here.

[0067] Step S233A: Based on the optimization strategy corresponding to the rate difference, perform a first optimization process on the detection of the touch event corresponding to the current battery range.

[0068] In some implementations, if the rate difference is greater than or equal to a first threshold, all the first optimization processes corresponding to the current battery level range are applied to the touch event detection. That is, if there are five first optimization processes corresponding to the current battery level range, then when the rate difference is greater than or equal to the first threshold, i.e., when the actual charging efficiency is high, all five first optimization processes corresponding to the current battery level range can be applied to the touch event detection. In this way, under a charging state with high actual charging efficiency, the detection performance of touch events is maximized, i.e., the touch response speed and the detection accuracy of the touch position are maximized, thereby improving the user's touch experience. The first threshold can be a preset value, which can be adjusted according to different actual needs, and will not be elaborated further here.

[0069] In this approach, if the rate difference is less than a first threshold, the touch event detection undergoes a partial first optimization process corresponding to the current battery level. That is, if there are five first optimization processes corresponding to the current battery level, then when the rate difference is less than the first threshold (i.e., the actual charging efficiency is low), to avoid excessively long charging times, only a partial first optimization process (one or three first optimization processes) corresponding to the current battery level can be performed on the touch event detection to avoid excessively long charging times. Thus, under the condition of low actual charging efficiency, the detection performance of touch events is improved while ensuring charging efficiency. In other words, this improves the touch response speed and the detection accuracy of the touch position to a certain extent, while also ensuring the charging efficiency of the electronic device, ensuring that the electronic device completes charging in a short time and avoiding problems such as excessively long charging times caused by optimizing touch detection performance.

[0070] In other embodiments, if the rate difference is greater than or equal to a second threshold, the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, according to a first optimization intensity corresponding to the current battery level range; if the rate difference is less than the second threshold, the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, according to a second optimization intensity corresponding to the current battery level range, wherein the second optimization intensity is less than the first optimization intensity. The second threshold may be the same as the aforementioned first threshold.

[0071] In other words, regardless of whether the rate difference is greater than the second threshold, the detection of touch events will undergo a first optimization process corresponding to the current battery level. For example, if there are five first optimization processes corresponding to the current battery level, then regardless of whether the rate difference is greater than the second threshold, all five first optimization processes will be applied to the touch event detection, thereby comprehensively improving the touch detection performance of the electronic device. Simultaneously, if the rate difference is less than the second threshold, it indicates that the actual charging efficiency of the electronic device is low. Therefore, the second optimization intensity can be used to apply the first optimization process corresponding to the current battery level for touch event detection. Conversely, if the rate difference is greater than or equal to the second threshold, it indicates that the actual charging efficiency of the electronic device is high. A first optimization intensity greater than the second optimization intensity can be used to apply the first optimization process corresponding to the current battery level for touch event detection. Thus, it is possible to improve the detection performance of touch events while ensuring charging efficiency in charging conditions with low actual charging efficiency, and to maximize the detection performance of touch events in charging conditions with high actual charging efficiency, i.e., to maximize the detection accuracy of touch response speed and touch position, thereby improving the user's touch experience.

[0072] In some other implementations, if the rate difference is less than a first threshold, the touch event detection undergoes a portion of the first optimization processing corresponding to the current battery level range; if the rate difference is greater than or equal to the first threshold and less than a second threshold, then the touch event detection undergoes all of the first optimization processing corresponding to the current battery level range according to a second optimization intensity; if the rate difference is greater than or equal to the second threshold, then the touch event detection undergoes all of the first optimization processing corresponding to the current battery level range according to the first optimization intensity, wherein the second threshold is greater than the first threshold, and the second optimization intensity is less than the first optimization intensity. It is evident that the higher the actual charging efficiency of the electronic device, the more and / or stronger the first optimization processing will be applied to the touch event detection, thereby maximizing the touch detection performance while taking into account the actual charging status of the electronic device, and thus maximizing the touch response speed and the detection accuracy of the touch position.

[0073] In some further embodiments, considering that in practical applications, electronic devices correspond to various types of chargers, such as fast chargers and standard chargers, and that different types of chargers have different charging rates—for example, a fast charger may have a power of 200 watts and a very fast charging rate, while a standard charger may have a power of 60 watts and a slower charging rate—then the charging mode of the electronic device will differ depending on the type of charger used. Therefore, in this approach, the charging mode of the electronic device can be further considered for different initial optimization processes. For details, please refer to [link to relevant documentation]. Figure 5 Step S230 may include the contents of steps S231B to S233B:

[0074] Step S231B: If the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then obtain the charging mode of the electronic device.

[0075] Step S232B: If the charging mode is the first charging mode, then the detection of the touch event is subjected to all the first optimization processes corresponding to the current battery range.

[0076] Step S233B: If the charging mode is the second charging mode, then the detection of the touch event is subjected to the first optimization processing corresponding to the current power range, and the charging rate of the second charging mode is less than the charging rate of the first charging mode.

[0077] In this method, if it is determined that the electronic device is in a charging state and the minimum value of the current power range is greater than the maximum value of the historical power range, the current charging mode of the electronic device can be further determined according to the charger label. If the charger label is a fast charging label, the current charging mode can be determined as the first charging mode, i.e., fast charging mode; if the charger label is a standard charging label, the current charging mode can be determined as the second charging mode, i.e., standard charging mode.

[0078] Optionally, since the charging rate of the first charging mode is greater than that of the second charging mode, when the electronic device is in the first charging mode, all first optimization processes corresponding to the current battery level can be performed on the touch event detection; while when the electronic device is in the second charging mode, only a portion of the first optimization processes corresponding to the current battery level are performed on the touch event detection. Thus, in a charging state with high actual charging efficiency, the detection performance of touch events is maximized, that is, the detection accuracy of touch response speed and touch position is maximized, thereby improving the user's touch experience; while in a charging state with low actual charging efficiency, the detection performance of touch events is improved only after ensuring charging efficiency, avoiding problems such as excessively long charging times caused by optimizing touch detection performance.

[0079] Optionally, when the electronic device is charging in the first charging mode, all first optimization processes corresponding to the current battery level range can be performed on the touch event detection according to the third optimization intensity; when the electronic device is charging in the second charging mode, some first optimization processes corresponding to the current battery level range are performed on the touch event detection according to the fourth optimization intensity, where the fourth optimization intensity is less than the third optimization intensity. In other words, under high charging efficiency, the electronic device not only performs all first optimization processes corresponding to the current battery level range on the touch event detection, but also performs all first optimization processes corresponding to the current battery level range with a larger third optimization intensity, thereby maximizing the detection performance of touch events; while under low charging efficiency, only some first optimization processes corresponding to the current battery level range are performed on the touch event detection, and this part of the first optimization processes is performed with a smaller fourth optimization intensity, thereby ensuring the charging efficiency of the electronic device as much as possible, that is, appropriately improving the detection performance of touch events while ensuring the charging time of the electronic device.

[0080] Optionally, when the electronic device is charging in the first charging mode, it can also perform all first optimization processes corresponding to the current battery level for touch event detection according to a third optimization intensity. When the electronic device is charging in the second charging mode, it performs all first optimization processes corresponding to the current battery level for touch event detection according to a fourth optimization intensity, where the fourth optimization intensity is less than the third optimization intensity. In other words, the electronic device performs all first optimization processes corresponding to the current battery level for touch event detection in both charging modes. However, in the first charging mode, where the actual charging efficiency is higher, a larger third optimization intensity is used for all first optimization processes corresponding to the current battery level, thereby maximizing the detection performance of touch events. In the second charging mode, where the actual charging efficiency is lower, a smaller fourth optimization intensity is used for all first optimization processes corresponding to the current battery level, which also ensures charging efficiency to a certain extent while appropriately improving the detection performance of touch events.

[0081] In other implementations, considering that in practical applications, the power consumption rate of electronic devices increases when running large applications, thus extending the charging time to some extent, if the electronic device is charging and the minimum value of the current power range is greater than the maximum value of the historical power range, it can further detect whether any of the multiple preset applications exist among the currently running (foreground and background) applications. If so, the touch event detection is processed according to the fifth optimization intensity, performing all the first optimization processes corresponding to the current power range; if not, the touch event detection is processed according to the sixth optimization intensity, which is greater than the fifth optimization intensity, performing all the first optimization processes corresponding to the current power range. Here, the multiple preset applications are those with high power consumption rates during operation. In other words, in addition to considering the current remaining power while charging, electronic devices can also consider whether any power-consuming applications are running, thus performing different, more suitable first optimization processes. If no power-consuming applications are running, all first optimization processes corresponding to the current power range can be performed with greater optimization intensity, thereby maximizing the detection performance of touch events. If power-consuming applications are running, all first optimization processes corresponding to the current power range can be performed with less optimization intensity, thus optimizing the detection performance of touch events while also ensuring the charging efficiency of the electronic device.

[0082] In this method, if any of the preset applications among multiple preset applications are detected as running (both in the foreground and background), the number of running preset applications can be further obtained. If the number of applications is less than a first threshold, then all first optimization processes corresponding to the current battery level are performed on the touch event detection according to a sixth optimization intensity. If the number of applications is greater than or equal to the first threshold, then some first optimization processes corresponding to the current battery level are performed on the touch event detection according to a fifth optimization intensity. In other words, if multiple preset applications with high power consumption are running in the electronic device, only some first optimization processes corresponding to the current battery level can be performed with a lower optimization intensity. By reducing the optimization intensity and the number of first optimization processes performed, the power consumption rate of the electronic device can be reduced, thereby ensuring the charging rate of the electronic device. At the same time, it also improves the detection performance of touch events to a certain extent.

[0083] In this embodiment, a preset battery range corresponding to the current remaining battery level of the electronic device is determined as the current battery range. When the electronic device is charging and the minimum value of the current battery range is greater than the maximum value of the preset battery range detected at the previous moment, the detection of touch events undergoes a first optimization process corresponding to the current battery range. This effectively and fully utilizes the current remaining battery level within the current battery range to optimize touch performance as much as possible, improving the user's touch smoothness and accuracy.

[0084] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating a touch optimization method according to another embodiment of this application, applied to an electronic device, which includes a touchscreen. The following will combine... Figure 6 The touch optimization method provided in this application embodiment will be described in detail. The touch optimization method may include the following steps:

[0085] Step S310: Obtain the current remaining battery power of the electronic device.

[0086] Step S320: Determine the current remaining power range from multiple preset power ranges as the current power range.

[0087] In this embodiment, the specific implementation of steps S310 to S320 can be found in the content of the foregoing embodiments, and will not be repeated here.

[0088] Step S330: If the electronic device is not charging and the maximum value of the current power range is less than the minimum value of the historical power range, then the second optimization process corresponding to the current power range is executed. The historical power range is a preset power range in which the power detected at the previous moment is located. The second optimization process is used to reduce the power consumption value caused by the detection of the touch event.

[0089] It should be noted that the specific implementation of this embodiment can be combined with the solutions of the foregoing embodiments. Considering that the electronic device may be in a non-charging state in addition to being in a charging state, the power consumption and battery life of the electronic device are naturally particularly important when the electronic device is not charging. Therefore, at least one second optimization process is also provided for each preset power range. The second optimization process can be understood as an optimization process used to reduce the power consumption value caused by the detection of touch events when the electronic device is not charging.

[0090] Optionally, the electronic device may include a multi-core processor, and the second optimization process described above includes at least one or more of the following optimization processes: reducing the scheduling priority of the touch process used to detect the touch event; switching the touch process to a small core in the multi-core processor; reducing the main frequency of the processing core used to process the touch process; reducing the data sampling frequency of the touch detection chip; and reducing the filtering optimization algorithm currently used to detect the touch event. Switching the touch process to a small core in the multi-core processor can be understood as switching the core currently bound to the touch process to a smaller core in the multi-core processor. For example, if the touch process is currently bound to a large core in the multi-core processor, switching the touch process to a medium core in the multi-core processor can also be understood as switching the touch process to a small core in the multi-core processor. It should be noted that when the multi-core processor includes small cores, medium cores, large cores, and super-large cores, the largest core that the touch process can be bound to in the second optimization process is a medium core. Therefore, running the touch process on a medium or small core can minimize the power consumption of the electronic device due to touch detection.

[0091] In some implementations, if the electronic device is not charging and the maximum value of the current battery range is less than the minimum value of the historical battery range, then the detection of the touch event is subjected to a second optimization process corresponding to the current battery range, according to the optimization intensity corresponding to the current battery range.

[0092] In this embodiment, when the electronic device is not charging, any second optimization process corresponding to a preset battery level range can be seen as an optimization to reduce the power consumption caused by touch event detection. That is, as the battery level of the electronic device gradually decreases while it is not charging, different second optimization processes are performed to reduce the power consumption caused by touch event detection, i.e., to achieve touch event detection with the minimum power consumption possible. Specifically, the closer the minimum value of the preset battery level range is to 0, the more diverse and / or stronger the type of second optimization process corresponding to that range becomes. In other words, as the remaining battery level of the electronic device gradually decreases, the power consumption caused by touch event detection is gradually reduced, thereby ensuring the battery life of the electronic device.

[0093] In other embodiments, if the electronic device is not charging and the maximum value of the current power range is less than the minimum value of the historical power range, then the real-time power consumption rate of the application running in the electronic device is obtained; and according to the optimization strategy corresponding to the real-time power consumption rate, the detection of touch events is subjected to a second optimization process corresponding to the current power range.

[0094] Optionally, if the real-time power consumption rate is greater than or equal to a first rate threshold, all second optimization processes corresponding to the current power range are performed on the touch event detection; if the real-time power consumption rate is less than the first rate threshold, some first optimization processes corresponding to the current power range are performed on the touch event detection. The first rate threshold can be a pre-set value. Thus, when the real-time power consumption rate is high, all second optimization processes corresponding to the current power range are used to minimize the power consumption caused by touch detection; while when the real-time power consumption rate is low, only some second optimization processes corresponding to the current power range are used to appropriately reduce the power consumption caused by touch detection, while maintaining good touch detection performance.

[0095] Optionally, if the real-time power consumption rate is greater than or equal to the second rate threshold, then the touch event detection is subjected to a second optimization process corresponding to the current power range, according to a seventh optimization intensity. If the real-time power consumption rate is less than the second rate threshold, then the touch event detection is subjected to a second optimization process corresponding to the current power range, according to an eighth optimization intensity, where the seventh optimization intensity is greater than the eighth optimization intensity. The second rate threshold can be a pre-set value, and it can be the same as or different from the aforementioned first rate threshold. Thus, when the real-time power consumption rate is high, a higher optimization intensity is used for the second optimization process corresponding to the current power range to minimize the power consumption caused by touch detection; conversely, when the real-time power consumption rate is low, a lower optimization intensity can be used for the second optimization process corresponding to the current power range to appropriately reduce the power consumption caused by touch detection while maintaining good touch detection performance.

[0096] Optionally, if the real-time power consumption rate is less than the first rate threshold, then according to the eighth optimization intensity, partial first optimization processing corresponding to the current battery level is performed on the touch event detection; if the real-time power consumption rate is greater than or equal to the first rate threshold and less than the second rate threshold, then according to the eighth optimization intensity, all first optimization processing corresponding to the current battery level is performed on the touch event detection; if the real-time power consumption rate is greater than or equal to the second rate threshold, then according to the eighth optimization intensity corresponding to the current battery level, all second optimization processing corresponding to the current battery level is performed on the touch event detection. It can be seen that when the real-time power consumption rate is very high, performing all first optimization processing corresponding to the current battery level with a high optimization intensity minimizes the power consumption caused by touch detection, ensuring the battery life of the electronic device.

[0097] In some other implementations, if the electronic device is not charging and the maximum value of the current battery level range is less than the minimum value of the historical battery level range, it can further detect whether any of the multiple preset applications exist among the currently running (foreground and background) applications. If so, the touch event detection is processed according to the ninth optimization intensity, performing all the second optimization processes corresponding to the current battery level range. If not, the touch event detection is processed according to the tenth optimization intensity, performing all the second optimization processes corresponding to the current battery level range, where the ninth optimization intensity is greater than the tenth optimization intensity. The multiple preset applications are those with high power consumption rates during operation.

[0098] Optionally, if any of the preset applications among multiple preset applications is detected as running (both in the foreground and background), the number of running preset applications can be further obtained. If the number of applications is less than a second threshold, then the touch event detection is subjected to partial first optimization processing corresponding to the current battery level, according to a tenth optimization intensity. If the number of applications is greater than or equal to the second threshold, then the touch event detection is subjected to all second optimization processing corresponding to the current battery level, according to a ninth optimization intensity. In other words, if multiple preset applications with high power consumption are running in the electronic device, all second optimization processing corresponding to the current battery level can be performed with a higher optimization intensity, thereby minimizing the power consumption rate caused by touch detection and ensuring the battery life of the electronic device.

[0099] In this embodiment, a preset battery range corresponding to the current remaining battery level of the electronic device is determined as the current battery range. When the electronic device is not charging and the maximum value of the current battery range is less than the minimum value of the preset battery range detected at the previous moment, a second optimization process corresponding to the current battery range is applied to the touch event detection. This effectively and fully utilizes the current remaining battery level within the current battery range, minimizing the power consumption of the electronic device due to touch detection, and maximizing the battery life of the electronic device while ensuring touch performance.

[0100] Please refer to Figure 7 The diagram illustrates a structural block diagram of a touch optimization device 400 according to an embodiment of this application. The device 400 may include a power acquisition module 410 and a touch optimization module 420.

[0101] The power acquisition module 410 is used to acquire the current remaining power of the electronic device.

[0102] In some embodiments, the touch optimization module 420 is used to perform optimization processing on the detection of touch events on the touch screen in accordance with the current remaining battery power.

[0103] In some embodiments, the touch optimization module 420 may include a power range determination unit and a touch optimization unit. The power range determination unit may be used to determine, from a plurality of preset power ranges, the current remaining power range as the current power range, and each preset power range corresponds to at least one first optimization process. The touch optimization unit may be used to perform a first optimization process corresponding to the current power range on the detection of the touch event if the electronic device is in a charging state and the minimum value of the current power range is greater than the maximum value of a historical power range. The historical power range is the preset power range where the remaining power detected at the previous moment was located. The first optimization process is used to improve at least one of the detection accuracy and detection speed of the touch event detection.

[0104] In this approach, the touch optimization unit can be specifically used to: if the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then perform a first optimization process on the detection of the touch event according to the optimization intensity corresponding to the current power range.

[0105] In this approach, the touch optimization unit may include: a power consumption rate acquisition subunit, a rate difference acquisition subunit, and a touch optimization subunit. The power consumption rate acquisition subunit can be used to acquire the real-time charging rate and the power consumption rate of the application running on the electronic device if the electronic device is in a charging state and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range. The rate difference acquisition subunit can be used to acquire the rate difference between the real-time charging rate and the power consumption rate. The touch optimization subunit can be used to perform a first optimization process on the detection of the touch event, corresponding to the current battery level range, based on the optimization strategy corresponding to the rate difference.

[0106] In one possible implementation, the touch optimization subunit may be specifically configured to: if the rate difference is greater than or equal to a first threshold, perform all of the first optimization processes corresponding to the current battery range on the detection of the touch event; if the rate difference is less than the first threshold, perform part of the first optimization processes corresponding to the current battery range on the detection of the touch event.

[0107] In another possible implementation, the touch optimization subunit may be specifically configured to: if the rate difference is greater than or equal to a second threshold, perform a first optimization process on the detection of the touch event corresponding to the current battery range according to a first optimization intensity corresponding to the current battery range; if the rate difference is less than the second threshold, perform a first optimization process on the detection of the touch event corresponding to the current battery range according to a second optimization intensity corresponding to the current battery range, wherein the second optimization intensity is less than the first optimization intensity.

[0108] In some embodiments, the touch optimization unit may further include a charging mode acquisition subunit and a touch optimization subunit. Specifically, the charging mode acquisition subunit may be used to acquire the charging mode of the electronic device if the electronic device is in a charging state and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range. Specifically, the touch optimization subunit may be used to perform all of the first optimization processes corresponding to the current battery level range on the detection of the touch event if the charging mode is a first charging mode; and to perform a portion of the first optimization processes corresponding to the current battery level range on the detection of the touch event if the charging mode is a second charging mode, wherein the charging rate of the second charging mode is less than the charging rate of the first charging mode.

[0109] In this approach, the touch optimization subunit can also be specifically used to: if the charging mode is a first charging mode, then perform all the first optimization processes corresponding to the current battery level range on the touch event detection according to a third optimization intensity. If the charging mode is a second charging mode, then perform part of the first optimization processes corresponding to the current battery level range on the touch event detection according to a fourth optimization intensity, wherein the fourth optimization intensity is less than the third optimization intensity.

[0110] In some embodiments, the electronic device includes a multi-core processor, and the first optimization process includes at least one or more of the following optimization processes: increasing the scheduling priority of the touch process used to detect the touch event; switching the touch process to a large core in the multi-core processor; increasing the main frequency of the processing core used to process the touch process; increasing the data sampling frequency of the touch detection chip; and adding a filtering optimization algorithm currently used to detect the touch event.

[0111] In other embodiments, the touch optimization module 420 may be specifically used to: determine the current remaining power range from a plurality of preset power ranges as the current power range, each preset power range corresponding to at least one second optimization process; if the electronic device is in an uncharged state and the maximum value of the current power range is less than the minimum value of the historical power range, then execute the second optimization process corresponding to the current power range, the historical power range being the preset power range where the detected power was located at the previous moment, the second optimization process being used to reduce the power consumption value caused by the detection of the touch event.

[0112] In this manner, the electronic device includes a multi-core processor, and the second optimization process includes at least one or more of the following optimization processes: reducing the scheduling priority of the touch process used to detect the touch event; switching the touch process to a small core in the multi-core processor; reducing the main frequency of the processing core used to process the touch process; reducing the data sampling frequency of the touch detection chip; and reducing the filtering optimization algorithm currently used to detect the touch event.

[0113] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0114] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.

[0115] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0116] In summary, by determining the current remaining battery level of the electronic device within a preset battery range, and when the electronic device is charging and the minimum value of the current battery range is greater than the maximum value of the previously detected remaining battery level within the preset battery range, the detection of touch events undergoes a first optimization process corresponding to the current battery range. This effectively and fully utilizes the remaining battery level within the current range to optimize touch performance, improving the user's touch smoothness and accuracy.

[0117] The following will combine Figure 8 This application describes an electronic device.

[0118] Reference Figure 8 , Figure 8 This diagram illustrates a structural block diagram of an electronic device 500 provided in an embodiment of this application. The method described above in this embodiment can be executed by this electronic device 500. The electronic device can be an electronic terminal with data processing capabilities, including but not limited to smartphones, tablets, laptops, desktop computers, smartwatches, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, and MP4 (Moving Picture Experts Group Audio Layer IV) players, etc.

[0119] The electronic device 500 in this application embodiment may include one or more of the following components: processor 501, memory 502, and one or more application programs, wherein the one or more application programs may be stored in memory 502 and configured to be executed by one or more processors 501, and the one or more programs are configured to perform the methods as described in the foregoing method embodiments.

[0120] Processor 501 may include one or more processing cores. Processor 501 connects to various parts within the electronic device 500 using various interfaces and lines, and performs various functions and processes data of the electronic device 500 by running or executing instructions, programs, code sets, or instruction sets stored in memory 502, and by calling data stored in memory 502. Optionally, processor 501 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 501 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the aforementioned modem can also be integrated into processor 501 and implemented as a separate communication chip.

[0121] The memory 502 may include random access memory (RAM) or read-only memory (ROM). The memory 502 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 502 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 500 during use (such as the various correspondences described above).

[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0123] In the several embodiments provided in this application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or other forms.

[0124] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0125] Please refer to Figure 9 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 600 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0126] The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for program code 610 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 610 may be compressed, for example, in a suitable form.

[0127] In some embodiments, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the steps in the above-described method embodiments.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A touch optimization method, characterized in that, Applied to an electronic device, the electronic device including a touchscreen, the method includes: Obtain the current remaining battery power of the electronic device; The detection of touch events on the touchscreen is optimized in accordance with the current remaining battery power. The optimization processing of the detection of touch events on the touchscreen corresponding to the current remaining battery power includes: Determine the current remaining power range from multiple preset power ranges and use it as the current power range. Each preset power range corresponds to at least one first optimization process. If the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then the detection of the touch event is subjected to a first optimization process corresponding to the current power range. The historical power range is a preset power range in which the remaining power detected at the previous moment is located. The first optimization process is used to improve at least one of the detection accuracy and detection speed of the touch event detection. If the electronic device is in a charging state, and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, including: If the electronic device is charging, and the minimum value of the current power range is greater than the maximum value of the historical power range, then the real-time charging rate and the power consumption rate of the application running in the electronic device are obtained. Obtain the rate difference between the real-time charging rate and the power consumption rate; Based on the optimization strategy corresponding to the rate difference, the detection of the touch event is subjected to a first optimization process corresponding to the current battery range.

2. The method according to claim 1, characterized in that, If the electronic device is in a charging state, and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, including: If the electronic device is charging, and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, according to the optimization intensity corresponding to the current battery level range.

3. The method according to claim 1, characterized in that, The step of performing a first optimization process on the detection of the touch event according to the optimization strategy corresponding to the rate difference and the current battery range includes: If the rate difference is greater than or equal to the first threshold, the detection of the touch event is subjected to all the first optimization processes corresponding to the current battery range; If the rate difference is less than the first threshold, the detection of the touch event is subjected to the first optimization processing corresponding to the current battery range.

4. The method according to claim 3, characterized in that, The step of performing a first optimization process on the detection of the touch event according to the optimization strategy corresponding to the rate difference and the current battery range includes: If the rate difference is greater than or equal to the second threshold, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery range, according to a first optimization intensity corresponding to the current battery range. If the rate difference is less than the second threshold, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery range according to a second optimization intensity corresponding to the current battery range, wherein the second optimization intensity is less than the first optimization intensity.

5. The method according to claim 1, characterized in that, If the electronic device is in a charging state, and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to a first optimization process corresponding to the current battery level range, including: If the electronic device is in a charging state, and the minimum value of the current power range is greater than the maximum value of the historical power range, then the charging mode of the electronic device is obtained. If the charging mode is the first charging mode, then the detection of the touch event is subjected to all the first optimization processes corresponding to the current battery level range; If the charging mode is the second charging mode, then the detection of the touch event is subjected to the first optimization processing corresponding to the current power range, and the charging rate of the second charging mode is less than the charging rate of the first charging mode.

6. The method according to claim 5, characterized in that, If the charging mode is the first charging mode, then the detection of the touch event is subjected to all the first optimization processes corresponding to the current battery level, including: If the charging mode is the first charging mode, then according to the third optimization intensity, the detection of the touch event is subjected to all the first optimization processes corresponding to the current battery range; The first optimization process, which involves detecting the touch event and performing a portion corresponding to the current battery level, includes: If the charging mode is the second charging mode, then according to the fourth optimization intensity, the detection of the touch event is subjected to the first optimization processing corresponding to the current battery range, and the fourth optimization intensity is less than the third optimization intensity.

7. The method according to any one of claims 1-6, characterized in that, The electronic device includes a multi-core processor, and the first optimization process includes at least one or more of the following optimization processes: Increase the scheduling priority of the touch process used to detect the touch event; Switch the touch process to the large core of the multi-core processor; Increase the main frequency of the processing core used to handle the touch process; Increase the data sampling frequency of the touch detection chip; and, Add an optimized filtering algorithm to the currently used algorithm for detecting the touch event.

8. The method according to claim 1, characterized in that, The optimization processing of the detection of touch events on the touchscreen corresponding to the current remaining battery power includes: Determine the current remaining power range from multiple preset power ranges and use it as the current power range. Each preset power range corresponds to at least one second optimization process. If the electronic device is not charging, and the maximum value of the current power range is less than the minimum value of the historical power range, then the second optimization process corresponding to the current power range is executed. The historical power range is a preset power range in which the power detected at the previous moment is located. The second optimization process is used to reduce the power consumption caused by the detection of the touch event.

9. The method according to claim 8, characterized in that, The electronic device includes a multi-core processor, and the second optimization process includes at least one or more of the following optimization processes: Reduce the scheduling priority of the touch process used to detect the touch event; Switch the touch process to the smaller core of the multi-core processor; Reduce the main frequency of the processing core used to handle the touch process; Reduce the data sampling frequency of the touch detection chip; and, Reduce the current filtering optimization algorithm used to detect the touch event.

10. A touch optimization device, characterized in that, Applied to an electronic device, the electronic device including a touch screen, the device includes: A power acquisition module is used to acquire the current remaining power of the electronic device; The touch optimization module is used to optimize the detection of touch events on the touchscreen according to the current remaining battery power. The touch optimization module is specifically used to determine the current remaining battery level range from multiple preset battery level ranges as the current battery level range, and each preset battery level range corresponds to at least one first optimization process; if the electronic device is in a charging state, and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range, then the detection of the touch event is subjected to the first optimization process corresponding to the current battery level range, where the historical battery level range is the preset battery level range where the remaining battery level detected at the previous moment is located. The first optimization process is used to improve at least one of the detection accuracy and detection speed of the touch event detection; the touch optimization module is also used to obtain the real-time charging rate and the power consumption rate of the application running in the electronic device if the electronic device is in a charging state and the minimum value of the current battery level range is greater than the maximum value of the historical battery level range; obtain the rate difference between the real-time charging rate and the power consumption rate; and perform the first optimization process corresponding to the current battery level range on the detection of the touch event according to the optimization strategy corresponding to the rate difference.

11. An electronic device, characterized in that, include: One or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program code that can be invoked by a processor to perform the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and device for adjusting scheduling priority of touch screen, terminal and storage medium

    CN107479744A

  • Control method of touch pen, touch pen and storage medium

    CN116736991A