Touch detection method and device, electronic equipment, storage medium and program product

By dynamically adjusting the update time interval and scanning mode of the reference capacitance parameters in touch detection, the problem of low accuracy of the reference capacitance parameters is solved, and a balance between the accuracy and power consumption of touch detection is achieved.

CN121996091APending Publication Date: 2026-05-08BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-11-05
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, the accuracy of the reference capacitance parameters during touch detection is low, leading to inaccurate touch detection results, especially when the ambient temperature changes after the electronic device has not been used for a long time.

Method used

By updating the reference capacitance parameter of the second scanning mode based on the first time interval in the first scanning mode, and dynamically adjusting the time interval to the second time interval when the preset trigger condition is met, the update frequency and timeliness of the reference capacitance parameter are improved. Different scanning mode switching and capacitance parameter detection methods are adopted to adapt to environmental changes.

Benefits of technology

It improves the accuracy of reference capacitance parameters and touch detection results, reduces power consumption, and enhances the flexibility and timeliness of touch detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121996091A_ABST
    Figure CN121996091A_ABST
Patent Text Reader

Abstract

The invention provides a touch detection method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: updating a first reference capacitance parameter of a second scanning mode based on a first time interval under the condition that capacitance scanning is carried out based on a first scanning mode; wherein the reference capacitance parameter represents a capacitance parameter of the touch screen under the condition that the touch operation does not exist; under the condition that capacitance scanning is carried out based on the first scanning mode, if a preset triggering condition is met, the first reference capacitance parameter is updated based on a second time interval; wherein the second time interval is smaller than the first time interval. According to the embodiment of the invention, the timeliness of updating the first reference capacitance parameter of the second scanning mode can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of touch detection, and more particularly to a touch detection method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] In related technologies, when a user interacts with a touchscreen, the screen's capacitance parameters change. At this time, a capacitance scan can be performed on the touchscreen in scanning mode to obtain its capacitance parameters. By analyzing these parameters, the touch detection result can be determined.

[0003] For example, the capacitance parameters obtained in scanning mode can be compared with preset reference capacitance parameters to determine the touch detection result. However, in the touch detection process of related technologies, the accuracy of the reference capacitance parameters is not considered. In this case, if the accuracy of the reference capacitance parameters used is low, the touch detection result determined based on the reference capacitance parameters may also be inaccurate. Summary of the Invention

[0004] To overcome the problems in related technologies, this disclosure provides a touch detection method, apparatus, electronic device, storage medium, and program product to improve the timeliness of updating the first reference capacitance parameter.

[0005] According to a first aspect of the present disclosure, a touch detection method is provided, the method comprising:

[0006] When performing capacitive scanning based on the first scanning mode, the first reference capacitance parameter of the second scanning mode is updated based on the first time interval; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation;

[0007] When performing capacitance scanning based on the first scanning mode, if a preset trigger condition is met, the first reference capacitance parameter is updated based on the second time interval.

[0008] The second time interval is shorter than the first time interval.

[0009] In one embodiment, the method further includes:

[0010] The first time interval is determined from at least two candidate time intervals;

[0011] The candidate time interval is used to update the first reference capacitance parameter; the first time interval is the maximum value among at least two candidate time intervals.

[0012] In one embodiment, the method further includes:

[0013] Based on the cumulative number of times the preset trigger conditions are met in the first scanning mode, the first time interval is adjusted to obtain the second time interval;

[0014] Among them, the cumulative number of times and the second time interval are negatively correlated.

[0015] In one embodiment, the method further includes:

[0016] If the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, it is determined that a preset trigger condition is met; and / or,

[0017] If the second change range of the temperature parameter of the electronic device is within the second preset range, it is determined that the preset trigger condition is met.

[0018] In one embodiment, the method further includes:

[0019] If the first reference capacitor parameter is updated based on the second time interval, and the preset trigger condition is not met in the first scan mode, if the duration of the failure to meet the preset trigger condition reaches the preset duration, then the first reference capacitor parameter is updated based on the first time interval.

[0020] In one embodiment, updating the first reference capacitance parameter includes:

[0021] The parameters of the first reference capacitance are updated based on the first and / or second change magnitudes.

[0022] Among them, the update magnitude and the change magnitude of updating the first reference capacitor parameters are positively correlated.

[0023] In one embodiment, the method further includes:

[0024] The second reference capacitance parameter of the first scanning mode is updated based on at least one of the first capacitance parameter, the first change amplitude, and the second change amplitude.

[0025] In one embodiment, updating the first reference capacitance parameter includes:

[0026] In response to switching from the first scan mode to the second scan mode, the first reference capacitance parameter is updated based on the second capacitance parameter detected in the second scan mode;

[0027] The method also includes:

[0028] Upon detecting the second capacitor parameter and / or completing the update of the first reference capacitor parameter, switch from the second scan mode to the first scan mode.

[0029] In one embodiment, the method further includes:

[0030] In the second scanning mode, the touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

[0031] In one embodiment, the method further includes:

[0032] The first time interval is determined based on the power consumption parameters in the second scan mode;

[0033] Among them, the power consumption parameter is positively correlated with the power consumption generated in the second scan mode, and the power consumption parameter is positively correlated with the first time interval.

[0034] In one embodiment, the first scanning mode is a mode for performing self-capacitance scanning, and the second scanning mode is a mode for performing mutual capacitance scanning; or, the first scanning mode is a mode for performing mutual capacitance scanning, and the second scanning mode is a mode for performing self-capacitance scanning.

[0035] According to a second aspect of the present disclosure, a touch detection device is provided, comprising:

[0036] The first update module is configured to update the first reference capacitance parameter of the second scan mode based on a first time interval when performing capacitance scanning based on the first scan mode; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation.

[0037] The second update module is configured to update the first reference capacitance parameters based on a second time interval if a preset trigger condition is met when performing capacitance scanning based on the first scanning mode.

[0038] The second time interval is shorter than the first time interval.

[0039] In one embodiment, the device further includes:

[0040] The module is configured to determine the first time interval from at least two candidate time intervals;

[0041] The candidate time interval is used to update the first reference capacitance parameter; the first time interval is the maximum value among at least two candidate time intervals.

[0042] In one embodiment, the device further includes:

[0043] The adjustment module is configured to adjust the first time interval based on the cumulative number of times the preset trigger conditions are met in the first scanning mode, so as to obtain the second time interval;

[0044] Among them, the cumulative number of times and the second time interval are negatively correlated.

[0045] In one embodiment, the determining module is further configured as follows:

[0046] If the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, it is determined that a preset trigger condition is met; and / or,

[0047] If the second change range of the temperature parameter of the electronic device is within the second preset range, it is determined that the preset trigger condition is met.

[0048] In one embodiment, the update module is further configured as follows:

[0049] If the first reference capacitor parameter is updated based on the second time interval, and the preset trigger condition is not met in the first scan mode, if the duration of the failure to meet the preset trigger condition reaches the preset duration, then the first reference capacitor parameter is updated based on the first time interval.

[0050] In one embodiment, the update module is further configured as follows:

[0051] The parameters of the first reference capacitance are updated based on the first and / or second change magnitudes.

[0052] Among them, the update magnitude and the change magnitude of updating the first reference capacitor parameters are positively correlated.

[0053] In one embodiment, the update module is further configured as follows:

[0054] The second reference capacitance parameter of the first scanning mode is updated based on at least one of the first capacitance parameter, the first change amplitude, and the second change amplitude.

[0055] In one embodiment, the updating module is further configured to: update the first reference capacitance parameter based on the second capacitance parameter detected in the second scanning mode in response to switching from the first scanning mode to the second scanning mode;

[0056] The device also includes:

[0057] The switching module is configured to switch from the second scan mode to the first scan mode when the second capacitor parameter is detected and / or the update of the first reference capacitor parameter is completed.

[0058] In one embodiment, the determining module is further configured as follows:

[0059] In the second scanning mode, the touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

[0060] In one embodiment, the determining module is further configured as follows:

[0061] The first time interval is determined based on the power consumption parameters in the second scan mode;

[0062] Among them, the power consumption parameter is positively correlated with the power consumption generated in the second scan mode, and the power consumption parameter is positively correlated with the first time interval.

[0063] In one embodiment, the first scanning mode is a mode for performing self-capacitance scanning, and the second scanning mode is a mode for performing mutual capacitance scanning; or, the first scanning mode is a mode for performing mutual capacitance scanning, and the second scanning mode is a mode for performing self-capacitance scanning.

[0064] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0065] processor;

[0066] Memory used to store computer programs or instructions;

[0067] The processor executes computer programs or instructions to implement the steps in any of the touch detection methods in the first aspect described above.

[0068] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, comprising:

[0069] When a computer program or instruction in a storage medium is executed by a processor, the steps in any of the touch detection methods in the first aspect described above are implemented.

[0070] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of any of the touch detection methods in the first aspect described above.

[0071] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0072] In this embodiment of the disclosure, when performing capacitance scanning based on a first scanning mode, if a preset trigger condition is met, the time interval for updating the first reference capacitance parameter can be dynamically adjusted to reduce the first time interval for updating the first reference capacitance parameter to a second time interval. This improves the flexibility and frequency of updating the first reference capacitance parameter, thereby enhancing the timeliness of the update and ensuring the accuracy of the first reference capacitance parameter used.

[0073] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0074] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0075] Figure 1 This is a flowchart illustrating a touch detection method according to an exemplary embodiment. Figure 1 .

[0076] Figure 2 This is a flowchart illustrating a touch detection method according to an exemplary embodiment. Figure 2 .

[0077] Figure 3 This is a structural block diagram of a touch detection device according to an exemplary embodiment.

[0078] Figure 4 This is a structural block diagram of an electronic device according to an exemplary embodiment.

[0079] Figure 5 This is a block diagram of an apparatus according to an exemplary embodiment. Detailed Implementation

[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0081] The touch detection method shown in this disclosure can be applied to electronic devices with touchscreens. Here, the electronic device can include a mobile electronic device or a fixed electronic device. The mobile electronic device can include devices such as mobile phones, tablets, laptops, and in-vehicle electronic devices. The fixed electronic device can include desktop computers, smart TVs, etc. In some embodiments, the operating system of the electronic device can include an Input Output System (IOS) operating system, an Android operating system, etc.

[0082] It should be noted that electronic devices may include, but are not limited to, mobile communication electronic devices, portable entertainment devices, wearable devices, home appliances, augmented reality devices, virtual reality devices, and special-purpose devices. Among these, mobile communication electronic devices may include, but are not limited to, mobile phones, tablets, and smartwatches; portable entertainment devices may include, but are not limited to, digital cameras; wearable devices may include, but are not limited to, smart bracelets and smart glasses; home appliances may include, but are not limited to, televisions and video recorders; augmented reality (AR) devices may include, but are not limited to, AR glasses; virtual reality (VR) devices may include, but are not limited to, VR glasses; and special-purpose devices may include, but are not limited to, professional cameras (such as SLR cameras and point-and-shoot cameras).

[0083] It should be noted that the execution entity of the embodiments of this disclosure can be the central processing unit (CPU) in an electronic device in terms of hardware, and can be, for example, a related background service or application in an electronic device in terms of software, without limitation.

[0084] In related technologies, with the rapid development and widespread adoption of electronic devices, touchscreens, as the most important interface for human-computer interaction, have diverse application scenarios. In these technologies, to save power, touchscreens enter an idle mode, during which a self-capacitance scan is performed. When a finger touches the screen, a touch operation is detected in idle mode. At this point, the system can switch back to active mode for mutual capacitance scanning, and the touch detection result is determined based on the baseline capacitance parameters of the mutual capacitance determined in the previous active mode.

[0085] However, if an electronic device remains in idle mode for an extended period, and the ambient temperature changes, the reference capacitance parameters of the touchscreen in active mode will also change significantly even without touch operation. In other words, if the electronic device remains in idle mode for a long time, even after switching back to active mode for mutual capacitance scanning following a finger touch, there will be a significant difference between the reference capacitance parameters determined in active mode and those after switching back. In this case, it becomes impossible to accurately determine the touch detection result in active mode based on reference capacitance parameters adapted to the current environment of the electronic device, leading to the risk of generating ghost points (i.e., the identified touch point is not actually the touch point used by the user). Therefore, timely maintenance of the reference capacitance parameters of mutual capacitance during idle mode is crucial for improving the accuracy of touch detection.

[0086] In related technologies, the reference capacitance value in active mode is tracked and maintained by periodically scanning the mutual capacitance in idle mode. However, if the timing interval is too short, it will increase power consumption, while if the timing interval is too long, it will result in poor timeliness of updating the reference capacitance parameters in active mode.

[0087] Based on this Figure 1 This is a flowchart illustrating a touch detection method according to an exemplary embodiment, such as... Figure 1 As shown, the method includes:

[0088] Step 11: When performing capacitance scanning based on the first scanning mode, update the first reference capacitance parameter of the second scanning mode based on the first time interval; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation.

[0089] In one embodiment, the scanning mode can be a capacitive scanning mode for the touchscreen. For example, the touchscreen may include touch units, and the scanning mode can be a capacitive scanning mode for the touch units of the touchscreen. Here, the touch unit can be an object capable of generating capacitance; for example, the touch unit can be a touch electrode.

[0090] It should be noted that when touch operations are performed on the touchscreen, the capacitance of the touch unit can change. In this case, by scanning the capacitance of the touch unit in scanning mode and obtaining the capacitance parameters, it is possible to determine whether a touch operation has occurred on the touchscreen.

[0091] In one embodiment, the capacitance parameters of the touchscreen include: self-capacitance parameters and / or mutual capacitance parameters. Different scanning modes result in different types of capacitance parameters after capacitance scanning.

[0092] In one embodiment, the touchscreen includes at least two first touch units arranged along a first direction and at least two second touch units arranged along a second direction. The first and second directions intersect. Exemplarily, the first and second directions may be perpendicular.

[0093] In one embodiment, the mutual capacitance parameter may include the capacitance value between the first touch unit and the second touch unit. The touchscreen also includes a ground terminal, and the self-capacitance parameter may include the capacitance value between the touch unit and the ground terminal.

[0094] In one embodiment, different scanning modes correspond to different scanning frequencies and / or scanning durations. Here, the scanning frequency can be the frequency at which capacitive scanning is performed on all touch units. The scanning duration can be the duration for capacitive scanning of all touch units.

[0095] In one embodiment, a first reference capacitance parameter can be determined based on a first performance parameter of the touchscreen; wherein the first performance parameter of the touchscreen is positively correlated with the capacitance storage of the touch unit of the touchscreen in a first scanning mode. The first performance parameter of the touchscreen can be positively correlated with the first reference capacitance parameter. Here, the first reference capacitance parameter can be directly determined based on the first performance parameter of the touchscreen, that is, the capacitance parameter of the touchscreen in the absence of touch operation can be directly characterized based on the first performance parameter of the touchscreen. In this case, it is unnecessary to detect the capacitance parameter of the touchscreen in the absence of touch operation.

[0096] In one embodiment, the first reference capacitance parameter can be the capacitance parameter of the touch screen obtained in the second scanning mode when there is no touch operation. In this case, the capacitance parameter of the touch screen in the second scanning mode when there is no touch operation can be detected to accurately determine the first reference capacitance parameter.

[0097] In one embodiment, the first reference capacitance parameter can be the capacitance parameter of the touchscreen detected in the second scanning mode when the electronic device is in a preset state. The preset state can be a screen-off state. Alternatively, the preset state can be a startup state. The startup state can be the state of the electronic device during the process of starting from a power-off state to a power-on state. It should be noted that the probability of touch operation is low when the electronic device is in the preset state. In this case, the capacitance parameter of the touchscreen in the preset state can characterize the capacitance parameter of the touchscreen when there is no touch operation.

[0098] In one embodiment, the touch detection function may be disabled when the electronic device is powered off or powered on. When the electronic device is powered on, the touch detection function may be enabled. The touch detection function can be a function that determines the touch detection result using capacitance parameters obtained in a scanning mode.

[0099] In one embodiment, the touch detection result can be used to indicate whether a touch operation was detected. If a touch operation was detected, the touch detection result can also be used to indicate the touch type and / or the touch location of the touch operation.

[0100] In one embodiment, the touch type can be used to determine the number of touch objects corresponding to the touch operation. For example, the touch object can be a finger, and the touch type can include at least one of the following: single-finger touch operation, two-finger touch operation, and multi-finger touch operation. The touch type can also be used to determine whether the touch operation is a click operation or a swipe operation.

[0101] Step 12: When performing capacitance scanning based on the first scanning mode, if the preset trigger condition is met, update the first reference capacitance parameter based on the second time interval.

[0102] The second time interval is shorter than the first time interval.

[0103] In one embodiment, the preset trigger condition can be a change in the ambient temperature of the environment in which the electronic device is located. It should be noted that when the ambient temperature of the environment in which the electronic device is located changes, the capacitance parameters of the touchscreen will change even without touch operation. In this case, the first reference capacitance parameter needs to be updated, and the frequency of updating the first reference capacitance parameter can be appropriately increased to ensure timely updates to the first reference capacitance parameter even when the ambient temperature of the environment in which the electronic device is located may continue to change.

[0104] In one embodiment, when performing capacitance scanning based on a first scanning mode, updating the first reference capacitance parameter of the second scanning mode based on a first time interval or a second time interval can be understood as: updating the first reference capacitance parameter of the second scanning mode based on the first time interval or the second time interval during the capacitance scanning process in the first scanning mode. In this case, there is no need to switch from the first scanning mode to the second scanning mode. Alternatively, when performing capacitance scanning based on the first scanning mode, updating the first reference capacitance parameter of the second scanning mode based on the first time interval or the second time interval can be understood as: when the duration of the electronic device in the first scanning mode reaches the first time interval or the second time interval, switching from the first scanning mode to the second scanning mode, and performing capacitance scanning in the second scanning mode, updating the first reference capacitance parameter.

[0105] In one embodiment, a first time interval and / or a second time interval can be determined based on a first frequency of detected touch operations; wherein the first time interval is positively correlated with the first frequency, and / or the second time interval is positively correlated with the first frequency.

[0106] Here, the frequency of detected touch operations is positively correlated with the time interval for updating the reference capacitance parameters. In other words, the frequency of detected touch operations is positively correlated with the frequency of updates to the reference capacitance parameters. For example, when the frequency of detected touch operations is high, the reference capacitance parameters can be updated quickly with shorter time intervals, thereby improving the accuracy of the reference capacitance parameters used to provide a standard for the detected capacitance parameters. When the frequency of detected touch operations is low, the reference capacitance parameters can be updated with longer time intervals, thereby reducing the frequency of updates and thus reducing the power consumption of the electronic device during the process of updating the reference capacitance parameters.

[0107] In one embodiment, the first frequency may include: the frequency of detecting the first touch operation in a first scanning mode, or the frequency of detecting the second touch operation in a second scanning mode.

[0108] In one embodiment, a first preset mapping relationship may exist between the first time interval, the second time interval, and the first frequency. The first time interval and / or the second time interval can be determined based on the first preset mapping relationship and the first frequency.

[0109] In one embodiment, the first time interval and / or the second time interval can be determined based on the second frequency of switching from the first scanning mode to the second scanning mode. Wherein, the first time interval and the second frequency are positively correlated, and / or, the second time interval and the second frequency are positively correlated. Here, the second frequency can be: the frequency of switching to the second scanning mode in response to a touch operation detected in the first scanning mode.

[0110] Here, the frequency of switching to the second scanning mode can be positively correlated with the second time interval for updating the first reference capacitance parameter. That is, when switching from the first scanning mode to the second scanning mode based on the second time interval is required to update the first reference capacitance parameter in the second scanning mode, the second frequency of switching to the second scanning mode can be positively correlated with the frequency of updating the reference capacitance parameter. For example, when the frequency of detected touch operations is high, the reference capacitance parameter can be updated quickly based on a shorter time interval, thereby improving the accuracy of the reference capacitance parameter used to provide a reference standard for the detected capacitance parameter. When the frequency of detected touch operations is low, the reference capacitance parameter can be updated based on a longer time interval, thereby reducing the frequency of updating the reference capacitance parameter and thus reducing the power consumption generated by the electronic device during the updating of the reference capacitance parameter.

[0111] In one embodiment, a second preset mapping relationship may exist between the first time interval, the second time interval, and the second frequency. The first time interval and / or the second time interval can be determined based on the second preset mapping relationship and the second frequency.

[0112] In this embodiment of the disclosure, when performing capacitance scanning based on a first scanning mode, if a preset trigger condition is met, the time interval for updating the first reference capacitance parameter can be dynamically adjusted, reducing the first time interval for updating the first reference capacitance parameter to a second time interval. This improves the flexibility and frequency of updating the first reference capacitance parameter, thereby enhancing the timeliness of updating the first reference capacitance parameter.

[0113] At this time, when touch detection needs to be performed based on the first reference capacitance parameter in the second scanning mode, the touch detection result can be determined based on the timely updated and accurate first reference capacitance parameter, thereby ensuring the accuracy of the determined touch detection result.

[0114] In one embodiment, the method further includes:

[0115] The first time interval is determined from at least two candidate time intervals;

[0116] The candidate time interval is used to update the first reference capacitance parameter; the first time interval is the maximum value among at least two candidate time intervals.

[0117] For example, at least two candidate time intervals may include time intervals of 1s, 5s, and 10s. In this case, the first time interval can be 10s. The first reference capacitance parameter can be updated once every 10s.

[0118] In this embodiment of the disclosure, when at least two candidate time intervals exist, the first reference capacitor parameter can be updated using the largest of the at least two candidate time intervals. This reduces the possibility of excessive power consumption due to excessively high update frequencies of the first reference capacitor parameter.

[0119] In one embodiment, the method further includes:

[0120] Based on the cumulative number of times the preset trigger conditions are met in the first scanning mode, the first time interval is adjusted to obtain the second time interval;

[0121] Among them, the cumulative number of times and the second time interval are negatively correlated.

[0122] It should be noted that the cumulative count can be the number of times the preset trigger condition is met in the first scanning mode during the entire period after the electronic device is powered on. Alternatively, the cumulative count can be the number of times the preset trigger condition is met in the first scanning mode during a portion of the period after the electronic device is powered on. For example, the cumulative count can be the number of times the preset trigger condition is met in the first scanning mode within a predetermined period.

[0123] In one embodiment, a first adjustment magnitude can be determined based on the cumulative number of times; based on the first adjustment magnitude, a first time interval is reduced to a second time interval; wherein the cumulative number of times can be positively correlated with the first adjustment magnitude.

[0124] In this embodiment, when the first time interval for updating the first reference capacitor parameter needs to be adjusted after a preset trigger condition is met, in order to increase the update frequency of the first reference capacitor parameter, the second time interval obtained after adjusting the first time interval can be negatively correlated with the cumulative number of times the preset trigger condition is met in the first scanning mode. In this case, the first time interval can be flexibly reduced to different degrees to accommodate different cumulative counts. This improves the timeliness and flexibility of updating the first reference capacitor parameter.

[0125] In one embodiment, the method further includes:

[0126] If the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, it is determined that a preset trigger condition is met; and / or,

[0127] If the second change range of the temperature parameter of the electronic device is within the second preset range, it is determined that the preset trigger condition is met.

[0128] In one embodiment, the first change magnitude can be the change magnitude between the first capacitance parameter detected at different times. Alternatively, the first change magnitude can be the change magnitude of the first capacitance parameter relative to a first reference capacitance parameter.

[0129] In one embodiment, the endpoints of the first preset range can be a first threshold and a second threshold, respectively. A preset triggering condition is determined to be met when the first change amplitude is greater than the first threshold and less than the second threshold. The first threshold can be greater than or equal to zero. The second threshold can be determined based on a third change amplitude of the touchscreen's capacitance parameter under touch operation.

[0130] It should be noted that when a human body (such as a finger) touches a touchscreen, an electric field is formed between the conductive human body and the touchscreen, causing a change in the touchscreen's capacitance parameters. Alternatively, changes in a first temperature inside the electronic device or a second temperature in its environment may generate additional noise in the touchscreen or cause a change in the dielectric constant of the dielectric material within the touchscreen, resulting in a change in the touchscreen's capacitance parameters. However, the magnitude of the capacitance parameter change caused by a change in the ambient temperature is smaller than the magnitude of the capacitance parameter change caused by touch operation. In this case, by setting a first preset range, the changes in the touchscreen's capacitance parameters caused by touch operation and those caused by temperature changes can be distinguished. When the capacitance parameters change due to temperature changes, the first reference capacitance parameter can be updated, thereby improving the accuracy of updating the first reference capacitance parameter.

[0131] It should be noted that when touch operation is present, there is no need to update the reference capacitance parameters. In this case, the touch detection result can be determined based on the reference capacitance parameters and the detected capacitance parameters of the touch screen.

[0132] In this embodiment, whether a preset trigger condition is met can be accurately determined based on the magnitude of the change in the first capacitance parameter detected in the first scanning mode. In this case, if the magnitude of the change in the first capacitance parameter is within a first preset range—that is, if there is no touch operation and the capacitance parameter of the touchscreen changes due to other factors—it can be determined that the preset trigger condition is met, and the update frequency of the first reference capacitance parameter can be increased. Thus, the timeliness of updating the first reference capacitance parameter can be improved, and the accuracy of the first reference capacitance parameter used can be improved, especially when the capacitance parameter of the touchscreen is prone to change.

[0133] In one embodiment, the ratio of the second threshold to the third change amplitude can be less than a preset ratio. For example, the preset ratio can be 1, in which case the second threshold can be less than the third change amplitude. For example, the preset ratio can be 0.5, in which case the second threshold can be less than 50% of the third change amplitude. For example, the preset ratio can be 0.25, in which case the second threshold can be less than 25% of the third change amplitude.

[0134] In one embodiment, the second change magnitude can be the change magnitude of the temperature parameter of the electronic device detected at different times. Alternatively, the second change magnitude can be the change magnitude of the current temperature parameter of the electronic device compared to a preset temperature parameter. The preset temperature parameter can be the temperature parameter of the electronic device detected when the first reference capacitor parameter was last updated.

[0135] In one embodiment, the temperature parameters of the electronic device may include: the temperature of the electronic components inside the electronic device and / or the ambient temperature of the environment in which the electronic device is located. Temperature parameters of the electronic device can be collected by placing temperature sensors at different locations within the electronic device.

[0136] In one embodiment, the endpoints of the second preset range can be a third threshold and a fourth threshold, respectively. A preset trigger condition is determined to be met when the second change amplitude is greater than the third threshold and less than the fourth threshold. The third threshold can be greater than or equal to zero. The fourth threshold can be positively correlated with the safe operating temperature range of the electronic device. The safe operating range can be the temperature range within which the electronic device can operate stably under normal operating conditions. For example, the safe temperature range of the electronic device can be between -10 degrees Celsius and 50 degrees Celsius.

[0137] In this embodiment, it can be precisely determined whether a preset trigger condition is met based on the temperature parameters of the electronic device. In this case, if the temperature parameter variation is within a second preset range—that is, if the temperature parameters of the electronic device affect the capacitance parameters of the touchscreen—it can be determined that the preset trigger condition is met, and the update frequency of the first reference capacitance parameter can be increased. Thus, when the capacitance parameters of the touchscreen are easily affected by temperature changes, the timeliness of updating the first reference capacitance parameter can be improved, and the accuracy of the first reference capacitance parameter used can be enhanced.

[0138] In one embodiment, the method further includes:

[0139] If the first reference capacitor parameter is updated based on the second time interval, and the preset trigger condition is not met in the first scan mode, if the duration of the failure to meet the preset trigger condition reaches the preset duration, then the first reference capacitor parameter is updated based on the first time interval.

[0140] In one embodiment, if the first reference capacitance parameter is updated based on a second time interval, and a preset trigger condition is not met in the first scan mode, and the duration for which the preset trigger condition is not met reaches a first preset duration, then the first reference capacitance parameter is updated based on a third time interval; wherein the third time interval may be greater than the second time interval and may be less than the first time interval. In the first scan mode, if the duration for which the preset trigger condition is not met reaches the second preset duration, the first reference capacitance parameter can be updated based on the first time interval. The second preset duration is greater than the first preset duration. In the first scan mode, if the first reference capacitance parameter is updated based on the third time interval and the preset trigger condition is met, the first reference capacitance parameter can be updated based on the second time interval.

[0141] Here, if the duration for which the preset trigger condition is not met reaches the first preset duration (i.e., the duration for which the touchscreen's capacitance parameter is unaffected by interference reaches the first preset duration), the first reference capacitance parameter can be updated based on a third time interval located between the first and second time intervals, instead of directly updating it based on the first time interval. In this case, regardless of whether the preset condition is met after the first preset duration, the time interval for updating the first reference capacitance parameter can be flexibly adjusted from the third time interval to either the first or second time interval with a small adjustment range, based on the third time interval located between the first and second time intervals. This gradually reduces the frequency of updating the first reference capacitance parameter, thereby reducing power consumption and improving the flexibility of updating the first reference capacitance parameter.

[0142] In this embodiment of the disclosure, during the process of updating the first reference capacitor parameter based on the second time interval, if the duration for which the preset trigger condition is not met reaches the preset duration, the time interval for updating the first reference capacitor parameter can be restored to a longer first time interval, thereby reducing the frequency of updating the first reference capacitor parameter. This reduces the power consumption generated during the updating of the first reference capacitor parameter.

[0143] In one embodiment, updating the first reference capacitance parameter includes:

[0144] The parameters of the first reference capacitance are updated based on the first and / or second change magnitudes.

[0145] Among them, the update magnitude and the change magnitude of updating the first reference capacitor parameters are positively correlated.

[0146] In one embodiment, a first update magnitude can be determined based on a first change magnitude; the first reference capacitance parameter is then updated based on the first update magnitude. The first change magnitude can be positively correlated with the first update magnitude. Here, the first reference capacitance parameter can be accurately updated based on the actual detected change trend of the first capacitance parameter, thereby ensuring the accuracy of updating the first reference capacitance parameter.

[0147] In one embodiment, there may be a third preset mapping relationship between the first change magnitude and the first update magnitude, and the first update magnitude can be determined based on the first change magnitude and the third preset mapping relationship.

[0148] In one embodiment, a second update magnitude can be determined based on a second change magnitude; the first reference capacitance parameter is then updated based on the second update magnitude. The second change magnitude can be positively correlated with the second update magnitude.

[0149] Here, when temperature parameters can affect the capacitance parameters of the touch screen, the first reference capacitance parameter can be accurately updated by adapting to the actual detected temperature parameter change trend, thereby ensuring the accuracy of updating the first reference capacitance parameter.

[0150] In one embodiment, there may be a fourth preset mapping relationship between the second change magnitude and the second update magnitude, and the second update magnitude may be determined based on the second change magnitude and the fourth preset mapping relationship.

[0151] In one embodiment, a first update magnitude can be determined based on a first change magnitude, and a second update magnitude can be determined based on a second change magnitude; a target update magnitude can be determined based on a preset weight parameter, the first update magnitude, and the second update magnitude; and the first reference capacitance parameter is updated based on the target update magnitude. The preset weight parameter may include a first weight value corresponding to the first update magnitude during the update of the first reference capacitance parameter, and a second weight value corresponding to the second update magnitude. Compared to determining the update magnitude of the first reference capacitance parameter based on a single first change magnitude or second change magnitude, in this embodiment, the target update magnitude for updating the first reference capacitance parameter can be determined by combining the first change magnitude and the second change magnitude, thereby improving the accuracy of updating the first reference capacitance parameter.

[0152] In one embodiment, the first update magnitude can be weighted based on a first weight value to obtain a weighted first update magnitude. The second update magnitude can be weighted based on a second weight value to obtain a weighted second update magnitude. The sum of the weighted first update magnitude and the weighted second update magnitude can be determined as the target update magnitude.

[0153] In one embodiment, if the accuracy of the first capacitance parameter is greater than the accuracy of the temperature parameter, the first weight value can be greater than the second weight value. If the accuracy of the first capacitance parameter is less than the accuracy of the temperature parameter, the first weight value can be less than the second weight value. Here, during the process of updating the first reference capacitance parameter based on the first capacitance parameter and the temperature parameter, appropriate weight values ​​can be configured for the first capacitance parameter and the temperature parameter respectively, adapting to the detected accuracy of the first capacitance parameter and the temperature parameter, to improve the accuracy of updating the first reference capacitance parameter.

[0154] In one embodiment, the method further includes:

[0155] The second reference capacitance parameter of the first scanning mode is updated based on at least one of the first capacitance parameter, the first change amplitude, and the second change amplitude.

[0156] In one embodiment, a second reference capacitance parameter can be determined based on a second performance parameter of the touchscreen; wherein the second performance parameter of the touchscreen is positively correlated with the capacitance storage of the touch unit in the second scanning mode. The second performance parameter of the touchscreen can be positively correlated with the second reference capacitance parameter. Here, the second reference capacitance parameter can be directly determined based on the second performance parameter of the touchscreen, that is, the capacitance parameter of the touchscreen in the absence of touch operation can be directly characterized based on the second performance parameter of the touchscreen. In this case, it is unnecessary to detect the capacitance parameter of the touchscreen in the absence of touch operation.

[0157] In one embodiment, the second reference capacitance parameter can be the capacitance parameter of the touchscreen detected in the first scanning mode when there is no touch operation. In this case, the capacitance parameter of the touchscreen when there is no touch operation can be detected to accurately determine the second reference capacitance parameter.

[0158] In one embodiment, the second reference capacitance parameter can be the capacitance parameter of the touchscreen obtained in the first scanning mode when the electronic device is in a preset state. The preset state can be any preset state disclosed herein, and will not be elaborated upon here. It should be noted that the probability of touch operation is low when the electronic device is in the preset state. In this case, the capacitance parameter of the touchscreen in the preset state can be considered as the capacitance parameter of the touchscreen when no touch operation occurs.

[0159] In one embodiment, when performing capacitance scanning based on a first scanning mode, the second reference capacitance parameter of the first scanning mode can be updated based on a first time interval. When performing capacitance scanning based on the first scanning mode, if a preset trigger condition is met, the first reference capacitance parameter is updated based on a second time interval.

[0160] In one embodiment, if no touch operation is detected in the first scanning mode, the second reference capacitance parameter can be updated to the detected first capacitance parameter.

[0161] In one embodiment, the first reference capacitor parameter can be updated based on a first deviation value between the second reference capacitor parameter before and after the update. The update magnitude of the first reference capacitor parameter can be positively correlated with the first deviation value.

[0162] Here, there's no need to switch to a second scanning mode and update the first reference capacitance parameter based on the second capacitance parameter obtained in the second scanning mode. Instead, the first reference capacitance parameter can be quickly updated directly in the first scanning mode based on the first deviation value of the second reference capacitance parameter before and after the update. Furthermore, the changing trends of the touchscreen's capacitance parameters are similar across different scanning modes. Therefore, based on the first deviation value of the second reference capacitance parameter before and after the update in the first scanning mode, the first reference capacitance parameter in the second scanning mode can be accurately updated. This ensures the timeliness and accuracy of updating the second reference capacitance parameter.

[0163] In one embodiment, a first touch detection result can be determined based on a first capacitance parameter and a second reference capacitance parameter detected in a first scanning mode. The first touch detection result indicates whether a first touch operation was detected in the first scanning mode. If a first touch operation is detected, the first touch detection result further indicates the touch location and / or the type of touch operation corresponding to the first touch operation.

[0164] In one embodiment, if a second deviation value between the first capacitance parameter and the second reference capacitance parameter is greater than a first deviation threshold, a first touch operation is determined to exist; if the second deviation value is less than the first deviation threshold, a first touch operation is determined not to exist. The first deviation threshold can be determined based on a fourth change in the capacitance parameter of the touchscreen in the first scanning mode under the action of a touch operation. Here, the first reference capacitance parameter of the first scanning mode and the first capacitance parameter detected in the first scanning mode can be compared to determine the first detection result.

[0165] In one embodiment, determining a first detection result based on a first capacitance parameter and a second reference capacitance parameter detected in a first scanning mode includes: in the presence of a first touch operation, determining the touch position of the first touch operation based on the position of a first target touch unit in the touch unit. The second deviation value corresponding to the first target touch unit is greater than a first deviation threshold.

[0166] In this embodiment of the disclosure, when performing capacitance scanning in the first scanning mode, not only can the second reference capacitance parameter of the second scanning mode be updated based on time intervals, but the first reference capacitance parameter of the first scanning mode can also be updated. This ensures the accuracy of the reference capacitance parameters for each scanning mode.

[0167] In one embodiment, updating the first reference capacitance parameter includes:

[0168] In response to switching from the first scan mode to the second scan mode, the first reference capacitance parameter is updated based on the second capacitance parameter detected in the second scan mode;

[0169] The method also includes:

[0170] Upon detecting the second capacitor parameter and / or completing the update of the first reference capacitor parameter, switch from the second scan mode to the first scan mode.

[0171] In one embodiment, in response to switching from a first scanning mode to a second scanning mode and no touch operation is detected, the first reference capacitance parameter is updated based on the second capacitance parameter.

[0172] In one embodiment, updating the first reference capacitance parameter based on a first time interval includes: switching from the first scanning mode to a second scanning mode when the second duration of the electronic device being in the first scanning mode reaches the first time interval; and updating the first reference capacitance parameter based on the second capacitance parameter detected in the second scanning mode when performing capacitance scanning in the second scanning mode.

[0173] In one embodiment, updating the first reference capacitance parameter based on a second time interval includes: switching from the first scanning mode to the second scanning mode when the second duration of the electronic device being in the first scanning mode reaches the second time interval; and updating the first reference capacitance parameter based on the second capacitance parameter detected in the second scanning mode when performing capacitance scanning in the second scanning mode.

[0174] In one embodiment, upon detecting a second capacitance parameter, the system can switch from a second scan mode to a first scan mode; in the first scan mode, a first reference capacitance parameter is updated based on the second capacitance parameter. Here, upon detecting a second capacitance parameter that can be used to update the first reference capacitance parameter, the system can quickly switch back to the first scan mode and perform capacitance scanning using the first scan mode, thereby improving the speed of switching back to the first scan mode.

[0175] In this embodiment of the disclosure, when it is necessary to update the first reference capacitance parameter for the second scanning mode in the first scanning mode, the first reference capacitance parameter can be updated based on the second capacitance parameter actually detected in the second scanning mode. This ensures the accuracy of updating the first reference capacitance parameter.

[0176] In one embodiment, the method further includes:

[0177] In the second scanning mode, the touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

[0178] To distinguish it from the first touch detection result mentioned above, the touch detection result determined in the second scanning mode is referred to as the second touch detection result.

[0179] In one embodiment, in response to switching from a first scanning mode to a second scanning mode, and upon detecting a touch operation in the first scanning mode and / or the second scanning mode, a second touch detection result is determined based on a second capacitance parameter and a first reference capacitance parameter detected in the second scanning mode.

[0180] It should be noted that if a first touch operation is detected in the first scanning mode and the system switches from the first scanning mode to the second scanning mode, there is no need to update the first reference capacitance parameter and / or the second reference capacitance parameter. Alternatively, if the system switches from the first scanning mode to the second scanning mode and a second touch operation is detected in the second scanning mode, there is no need to update the first reference capacitance parameter and / or the second reference capacitance parameter. This reduces the possibility of erroneous updates to the reference capacitance parameters.

[0181] In one embodiment, a first touch detection result can be determined based on a first capacitance parameter and a second reference capacitance parameter in a first scanning mode; if the first touch detection result indicates the presence of a first touch operation, the system can switch from the first scanning mode to a second scanning mode, and a second touch detection result can be determined based on the second capacitance parameter and the second reference capacitance parameter. In this way, touch detection can be performed more accurately based on touch detection results obtained in different scanning modes.

[0182] In one embodiment, in response to detecting a first touch operation in a first scanning mode and the amount of data of the second capacitance parameter obtained in the second scanning mode being greater than the amount of data of the first capacitance parameter obtained in the first scanning mode, the system switches from the first scanning mode to the second scanning mode; a capacitance scan is performed in the second scanning mode to obtain the second capacitance parameter, and a second touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

[0183] It should be noted that when the amount of data for the second capacitance parameter obtained in the second scanning mode is greater than the amount of data for the first capacitance parameter obtained in the first scanning mode, the second scanning mode provides a richer set of capacitance parameters for determining the touch detection result. Therefore, the touch detection result determined in the second scanning mode is more accurate. Thus, if a first touch operation is detected in the first scanning mode, the system can promptly switch to the second scanning mode to accurately determine the second touch detection result, ensuring the accuracy of the touch detection result even in situations where touch operations may occur.

[0184] In one embodiment, a first touch operation is determined to have been detected if the first change in the first capacitance parameter detected in the first scanning mode is greater than a second threshold, and / or the second deviation between the first capacitance parameter and the second reference capacitance parameter is greater than a first deviation threshold.

[0185] In one embodiment, the first scanning mode can be a mode for performing self-capacitance scanning, and the second scanning mode can be a mode for performing mutual capacitance scanning. The first capacitance parameter detected in the first scanning mode can be a self-capacitance parameter, and the second capacitance parameter detected in the second scanning mode can be a mutual capacitance parameter. If a first touch operation is detected in the first scanning mode, the system can switch from the first scanning mode to the second scanning mode, and a second touch detection result can be determined based on the second capacitance parameter and the first reference capacitance parameter detected in the second scanning mode; wherein the second touch detection result indicates whether a second touch operation exists and the touch position corresponding to the second touch operation.

[0186] Here, in the first scanning mode, the self-capacitance parameters between each first touch unit and the ground terminal, and between each second touch unit and the ground terminal, can be detected separately. At this time, it can be determined whether each first touch unit and each second touch unit is a target unit touched by the user. However, when there are two or more touch points, it is impossible to determine the specific location of the touch points on the touchscreen. For example, for two touch points, it can be detected that two first touch units and two second touch units have been touched by the user. However, the two first touch units and two second touch units can form four position points. In this case, it is impossible to accurately determine which two position points out of the four position points are the touch points actually touched by the user.

[0187] In the second scanning mode, the mutual capacitance parameters between each first touch unit and each second touch unit can be detected. At this time, it is possible to accurately determine whether all intersection points formed between the first and second touch units are touch points. In other words, regardless of whether the number of touch points is greater than two, the position of the touch points can be accurately determined.

[0188] Based on this, in this disclosure, when a touch operation is detected in the first scanning mode, the electronic device can be controlled to enter the second scanning mode to accurately detect the touch position corresponding to the touch operation. That is to say, the first scanning mode is mainly used to detect whether there is a touch operation on the touch screen; the second scanning mode can not only be used to detect whether there is a touch operation on the touch screen, but also to accurately determine the touch position corresponding to the touch operation.

[0189] In one embodiment, in the second scanning mode, determining the touch detection result based on the second capacitance parameter and the updated first reference capacitance parameter includes: determining that a second touch operation exists if a third deviation value between the second capacitance parameter and the updated first reference capacitance parameter is greater than a second deviation threshold; and determining that no second touch operation exists if the third deviation value between the second capacitance parameter and the updated first reference capacitance parameter is less than the second deviation threshold. The second deviation threshold can be determined based on a fifth change in the capacitance parameter of the touch screen in the second scanning mode under the action of a touch operation.

[0190] In one embodiment, in the second scanning mode, determining the touch detection result based on the second capacitance parameter and the updated first reference capacitance parameter includes: if a second touch operation exists, determining the touch position of the second touch operation based on the position of the second target touch unit in the touch unit. The third deviation value corresponding to the second target touch unit is greater than the second deviation threshold.

[0191] In one embodiment, if no second touch operation is detected in the second scanning mode, the system can switch from the second scanning mode to the first scanning mode and perform capacitive scanning in the first scanning mode.

[0192] In one embodiment, if no second touch operation is detected in the second scanning mode and the scanning frequency of the first scanning mode is greater than that of the second scanning mode, the system can switch from the second scanning mode to the first scanning mode and perform capacitive scanning in the first scanning mode. Here, since no second touch operation is detected in the second scanning mode, i.e., when it is not necessary to use the second scanning mode to detect touch operation, the system can quickly switch to the first scanning mode with a higher scanning frequency to improve the efficiency of detecting whether a touch operation exists.

[0193] In this disclosure, after updating the first reference capacitance parameter to an accurate parameter, the updated accurate first reference capacitance parameter can be used to accurately determine the second touch detection result, thereby ensuring the accuracy of the second touch detection result determined in the second scanning mode.

[0194] In one embodiment, the method further includes:

[0195] The first time interval is determined based on the power consumption parameters in the second scan mode;

[0196] Among them, the power consumption parameter is positively correlated with the power consumption generated in the second scan mode, and the power consumption parameter is positively correlated with the first time interval.

[0197] In one embodiment, power consumption parameters may include: the number of touch units in the touchscreen and / or the scan duration required to perform one capacitive scan of the touchscreen in the second scan mode. The scan duration may be the time required to perform one capacitive scan of all touch units in the touchscreen. It should be noted that the more touch units in the touchscreen and / or the longer the scan duration for one capacitive scan, the greater the power consumption generated by performing one capacitive scan of the touchscreen.

[0198] In one embodiment, when the first reference capacitance parameter is determined based on the second capacitance parameter obtained in the second scan mode, the first time interval is determined based on the power consumption parameter in the scan mode.

[0199] In this embodiment, when it is necessary to switch to a second scan mode and update the first reference capacitor parameter using the second capacitor parameter obtained after performing a capacitor scan in the second scan mode, the first time interval can be accurately determined by adapting to the power consumption generated during capacitor scanning in the second scan mode. For example, the greater the power consumption generated during capacitor scanning in the second scan mode, the larger the initial first time interval for updating the first reference capacitor parameter can be, thereby reducing the frequency of entering the second scan mode for capacitor scanning. In this way, the power consumption generated during the process of updating the first reference capacitor parameter can be effectively reduced.

[0200] In one embodiment, the first scanning mode is a mode for performing self-capacitance scanning, and the second scanning mode is a mode for performing mutual capacitance scanning; or, the first scanning mode is a mode for performing mutual capacitance scanning, and the second scanning mode is a mode for performing self-capacitance scanning.

[0201] In one embodiment, when the first scanning mode is for performing self-capacitance scanning, the second reference capacitance parameter can characterize the self-capacitance parameter of the touchscreen in the absence of touch operation. When the first scanning mode is for performing mutual capacitance scanning, the second reference capacitance parameter can characterize the mutual capacitance parameter of the touchscreen in the absence of touch operation.

[0202] In one embodiment, when the second scanning mode is for performing self-capacitance scanning, the first reference capacitance parameter can characterize the self-capacitance parameter of the touchscreen in the absence of touch operation. When the second scanning mode is for performing mutual capacitance scanning, the first reference capacitance parameter can characterize the mutual capacitance parameter of the touchscreen in the absence of touch operation.

[0203] In one embodiment, the first scanning mode can be a mode for performing self-capacitance scanning, and the second scanning mode can be a mode for performing both self-capacitance scanning and mutual capacitance scanning. In the second scanning mode, a self-capacitance scan is performed on the touchscreen to obtain a third capacitance parameter, and a mutual capacitance scan is performed on the touchscreen to obtain a second capacitance parameter. A second touch detection result can be determined based on the second capacitance parameter and a first reference capacitance parameter; and a determination can be made, based on the third capacitance parameter and the first reference capacitance parameter, whether to correct the second touch detection result.

[0204] It should be noted that when the second scanning mode is a combination of self-capacitance scanning and mutual capacitance scanning, since self-capacitance scanning has stronger anti-interference capabilities than mutual capacitance scanning, the reliability of the mutual capacitance scanning results can be aided in determining the reliability of the mutual capacitance scanning results in the second scanning mode. For example, if the mutual capacitance parameters obtained through mutual capacitance scanning determine the existence of a touch position, the self-capacitance parameters obtained through self-capacitance scanning determine whether a touch operation exists. If the self-capacitance parameters determine that a touch operation exists, then the touch position determined by the mutual capacitance parameters obtained through mutual capacitance scanning is reliable; if the self-capacitance parameters determine that no touch operation exists, then the touch position determined by the mutual capacitance parameters obtained through mutual capacitance scanning is unreliable.

[0205] Here, the first scan mode can be an idle mode, and the second scan mode can be an active mode. The power consumption generated in the active mode is greater than that generated in the idle mode.

[0206] In one embodiment, when the first scanning mode is a mode for performing self-capacitance scanning and the second scanning mode is a mode for performing mutual capacitance scanning, the scanning frequency of the first scanning mode can be higher than the scanning frequency of the second scanning mode.

[0207] For example, the scanning frequency of the first scanning mode can be 2160Hz, meaning a self-capacitance scan of the touchscreen is performed every 463µs. Here, to meet the requirement of fast response to touch operations on the touchscreen, a high refresh rate mode is used to obtain the self-capacitance parameters of the touchscreen. In this case, to save time, mutual capacitance scanning is not required.

[0208] For example, the scanning frequency of the second scanning mode can be 120Hz or 240Hz. In this case, when the second scanning mode is used for self-capacitance scanning and mutual capacitance scanning, a self-capacitance scan and a mutual capacitance scan can be performed every 8.3ms.

[0209] Figure 2 This is a flowchart illustrating a touch detection method according to an exemplary embodiment, such as... Figure 2 As shown, the method includes:

[0210] Step 21: The electronic device enters the first scanning mode;

[0211] Step 22: Determine the first time interval.

[0212] Step 23: Determine whether the second reference capacitance parameter of the first scan mode needs to be updated.

[0213] If it is determined that the second reference capacitor parameter needs to be updated, proceed to step 24. If it is determined that the first reference capacitor parameter does not need to be updated, proceed to step 26.

[0214] Here, if the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, the second reference capacitance parameter is updated; or, if the first change is outside the first preset range, the second reference capacitance parameter is not updated.

[0215] Step 24: Adjust the first time interval to the second time interval.

[0216] Here, adjusting the first duration can refer to reducing the first duration. The adjusted first duration can be any second duration disclosed herein.

[0217] Step 25: Determine whether the duration of the electronic device in the first scanning mode has reached the second time interval;

[0218] If the duration of the first scanning mode of the electronic device is longer than the second time interval, then step 27 is executed.

[0219] Step 26: Determine whether the duration of the electronic device in the first scanning mode has reached the first time interval;

[0220] If the duration of the first scanning mode of the electronic device is longer than the second time interval, then step 27 is executed.

[0221] Step 27: Switch from the first scan mode to the second scan mode, and update the first reference capacitance parameter based on the second capacitance parameter obtained in the second scan mode.

[0222] Here, after updating the first reference capacitance value parameter, step 23 can be performed.

[0223] It should be noted that after updating the first reference capacitance parameter, the electronic device can be immediately controlled to switch to the first scanning mode, which has a faster scanning speed and lower scanning power consumption, and the capacitance parameter of the touch screen can be detected in the first scanning mode.

[0224] Here, self-capacitance scanning can be performed in the first scanning mode (such as idle mode). If the tracking and maintenance of the second reference capacitance parameter of the first scanning mode is triggered due to factors such as ambient temperature in the first scanning mode, the tracking value can be recorded. Then, the interval between switching from the first scanning mode to the second scanning mode (such as mutual capacitance scanning mode) to perform one capacitance scan can be dynamically adjusted according to the magnitude of the value, thereby performing the tracking and maintenance of the first reference capacitance parameter.

[0225] In this embodiment of the disclosure, by dynamically adjusting the time interval for tracking and maintaining the first reference capacitor parameter based on the tracking data of the second reference capacitor parameter in the first scanning mode, it is ensured that the power consumption is not too high due to the excessive frequency of mutual capacitance scanning when switching from the first scanning mode to the second scanning mode, and that the tracking and maintenance of the first reference capacitor parameter is effective.

[0226] Figure 3 This is an example of a touch detection device illustrated according to an embodiment of the present disclosure, the device comprising:

[0227] The first update module 31 is configured to update the first reference capacitance parameter of the second scan mode based on a first time interval when performing capacitance scanning based on the first scan mode; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation.

[0228] The second update module 32 is configured to update the first reference capacitance parameters based on a second time interval if a preset trigger condition is met when performing capacitance scanning based on the first scanning mode.

[0229] The second time interval is shorter than the first time interval.

[0230] In one embodiment, the device further includes:

[0231] The module is configured to determine the first time interval from at least two candidate time intervals;

[0232] The candidate time interval is used to update the first reference capacitance parameter; the first time interval is the maximum value among at least two candidate time intervals.

[0233] In one embodiment, the device further includes:

[0234] The adjustment module is configured to adjust the first time interval based on the cumulative number of times the preset trigger conditions are met in the first scanning mode, so as to obtain the second time interval;

[0235] Among them, the cumulative number of times and the second time interval are negatively correlated.

[0236] In one embodiment, the determining module is further configured as follows:

[0237] If the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, it is determined that a preset trigger condition is met; and / or,

[0238] If the second change range of the temperature parameter of the electronic device is within the second preset range, it is determined that the preset trigger condition is met.

[0239] In one embodiment, the update module is further configured as follows:

[0240] If the first reference capacitor parameter is updated based on the second time interval, and the preset trigger condition is not met in the first scan mode, if the duration of the failure to meet the preset trigger condition reaches the preset duration, then the first reference capacitor parameter is updated based on the first time interval.

[0241] In one embodiment, the update module is further configured as follows:

[0242] The parameters of the first reference capacitance are updated based on the first and / or second change magnitudes.

[0243] Among them, the update magnitude and the change magnitude of updating the first reference capacitor parameters are positively correlated.

[0244] In one embodiment, the update module is further configured as follows:

[0245] The second reference capacitance parameter of the first scanning mode is updated based on at least one of the first capacitance parameter, the first change amplitude, and the second change amplitude.

[0246] In one embodiment, the updating module is further configured to: update the first reference capacitance parameter based on the second capacitance parameter detected in the second scanning mode in response to switching from the first scanning mode to the second scanning mode;

[0247] The device also includes:

[0248] The switching module is configured to switch from the second scan mode to the first scan mode when the second capacitor parameter is detected and / or the update of the first reference capacitor parameter is completed.

[0249] In one embodiment, the determining module is further configured as follows:

[0250] In the second scanning mode, the touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

[0251] In one embodiment, the determining module is further configured as follows:

[0252] The first time interval is determined based on the power consumption parameters in the second scan mode;

[0253] Among them, the power consumption parameter is positively correlated with the power consumption generated in the second scan mode, and the power consumption parameter is positively correlated with the first time interval.

[0254] In one embodiment, the first scanning mode is a mode for performing self-capacitance scanning, and the second scanning mode is a mode for performing mutual capacitance scanning; or, the first scanning mode is a mode for performing mutual capacitance scanning, and the second scanning mode is a mode for performing self-capacitance scanning.

[0255] Figure 4 This is a structural block diagram illustrating an electronic device 400 according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0256] Reference Figure 4 The electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.

[0257] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with at least one of display, telephone call, data communication, camera operation, and recording operation. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0258] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of such data include at least one of the following: instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, and videos. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0259] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.

[0260] Multimedia component 408 includes a screen that provides an output interface between electronic device 400 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a Touch Panel, the screen may be implemented as a touchscreen to receive input signals from the user. The Touch Panel includes one or more touch sensors to sense touches, swipes, and gestures on the Touch Panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0261] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0262] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, and buttons. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0263] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or one of its components, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include an optical sensor, such as a complementary metal-oxide-semiconductor (CMOS) or charge-coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include, but is not limited to, at least one of the following: an accelerometer, a gyroscope, a magnetometer, a pressure sensor, and a temperature sensor.

[0264] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other devices. Electronic device 400 can access wireless networks based on communication standards, such as Wi-Fi, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0265] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0266] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including executable instructions or a computer program, which can be executed by a processor 420 of an electronic device 400 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0267] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a mobile electronic device, enables the mobile electronic device to perform any of the touch detection methods described in the embodiments of this disclosure. For example, the touch detection method includes:

[0268] When performing capacitive scanning based on the first scanning mode, the first reference capacitance parameter of the second scanning mode is updated based on the first time interval; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation;

[0269] When performing capacitance scanning based on the first scanning mode, if a preset trigger condition is met, the first reference capacitance parameter is updated based on the second time interval.

[0270] The second time interval is shorter than the first time interval. This disclosure provides a computer program product comprising: a computer program or executable instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform any of the touch detection methods described above in this disclosure.

[0271] Figure 5 This is a block diagram illustrating a display device 500 according to an exemplary embodiment. For example, device 500 may be provided as a server. (Refer to...) Figure 5 The device 500 includes a processing component 522, which further includes one or more processors, and memory resources represented by memory 532 for storing instructions executable by the processing component 522, such as application programs. The application programs stored in memory 532 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 522 is configured to execute instructions to perform the aforementioned touch detection method:

[0272] When performing capacitive scanning based on the first scanning mode, the first reference capacitance parameter of the second scanning mode is updated based on the first time interval; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation;

[0273] When performing capacitance scanning based on the first scanning mode, if a preset trigger condition is met, the first reference capacitance parameter is updated based on the second time interval.

[0274] The second time interval is shorter than the first time interval. Device 500 may also include a power supply component 526 configured to perform power management of device 500, a wired or wireless network interface 550 configured to connect device 500 to a network, and an input / output (I / O) interface 558. Device 500 can operate an operating system stored in memory 532, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0275] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the foregoing claims.

[0276] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A touch detection method, characterized in that, include: When performing capacitive scanning based on the first scanning mode, the first reference capacitance parameter of the second scanning mode is updated based on the first time interval; wherein, the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation; When performing capacitance scanning based on the first scanning mode, if a preset trigger condition is met, the first reference capacitance parameter is updated based on a second time interval. The second time interval is shorter than the first time interval.

2. The touch detection method according to claim 1, characterized in that, The method further includes: The first time interval is determined from at least two candidate time intervals; The candidate time interval is used to update the first reference capacitance parameter; the first time interval is the maximum value among the at least two candidate time intervals.

3. The touch detection method according to claim 1, characterized in that, The method further includes: Based on the cumulative number of times the preset trigger condition is met in the first scanning mode, the first time interval is adjusted to obtain the second time interval; The cumulative number of times is negatively correlated with the second time interval.

4. The touch detection method according to claim 1, characterized in that, The method further includes: If the first change in the first capacitance parameter detected in the first scanning mode is within a first preset range, it is determined that the preset trigger condition is met; and / or, If the second change range of the temperature parameter of the electronic device is within the second preset range, the preset trigger condition is determined to be met.

5. The touch detection method according to any one of claims 1 to 4, characterized in that, The method further includes: If the first reference capacitance parameter is updated based on the second time interval, and the preset trigger condition is not met in the first scanning mode, if the duration of the failure to meet the preset trigger condition reaches a preset duration, then the first reference capacitance parameter is updated based on the first time interval.

6. The touch detection method according to claim 4, characterized in that, The update of the first reference capacitance parameter includes: The first reference capacitance parameter is updated based on the first change magnitude and / or the second change magnitude. The update magnitude of the first reference capacitance parameter is positively correlated with the change magnitude.

7. The touch detection method according to claim 4, characterized in that, The method further includes: The second reference capacitance parameter of the first scanning mode is updated based on at least one of the first capacitance parameter, the first change amplitude, and the second change amplitude.

8. The touch detection method according to any one of claims 1 to 4, characterized in that, The update of the first reference capacitance parameter includes: In response to switching from the first scanning mode to the second scanning mode, the first reference capacitance parameter is updated based on the second capacitance parameter detected in the second scanning mode; The method further includes: Upon detecting the second capacitance parameter and / or completing the update of the first reference capacitance parameter, switch from the second scan mode to the first scan mode.

9. The touch detection method according to claim 8, characterized in that, The method further includes: In the second scanning mode, the touch detection result is determined based on the second capacitance parameter and the updated first reference capacitance parameter.

10. The touch detection method according to claim 8, characterized in that, The method further includes: The first time interval is determined based on the power consumption parameters in the second scanning mode; The power consumption parameter is positively correlated with the power consumption generated in the second scanning mode, and the power consumption parameter is positively correlated with the first time interval.

11. The touch detection method according to any one of claims 1 to 4, characterized in that, The first scanning mode is a mode for performing self-capacitance scanning, and the second scanning mode is a mode for performing mutual capacitance scanning; or, The first scanning mode is used for mutual capacitance scanning, and the second scanning mode is used for self-capacitance scanning.

12. A touch device, characterized in that, The device includes: The first update module is configured to update the first reference capacitance parameter of the second scan mode based on a first time interval when performing capacitance scanning based on the first scan mode; wherein the reference capacitance parameter represents the capacitance parameter of the touch screen when there is no touch operation. The second update module is configured to update the first reference capacitance parameter based on a second time interval if a preset trigger condition is met when performing capacitance scanning based on the first scanning mode. The second time interval is shorter than the first time interval.

13. An electronic device, characterized in that, include: processor; Memory used to store computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the method according to any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium storing a computer program or instructions, characterized in that, When the computer program or instructions in the storage medium are executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.

15. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 11.