CN-121996091-A - Touch detection method, device, electronic equipment, storage medium and program product
Abstract
The disclosure provides a touch detection method, a touch detection device, an electronic device, a storage medium and a program product, wherein the touch detection method comprises the steps of updating a first reference capacitance parameter of a second scanning mode based on a first time interval under the condition of capacitive scanning based on the first scanning mode; the method comprises the steps of determining a reference capacitance parameter, representing the capacitance parameter of a touch screen under the condition that touch operation does not exist, updating the first reference capacitance parameter based on a second time interval if a preset trigger condition is met under the condition that capacitive scanning is performed based on a first scanning mode, wherein the second time interval is smaller than the first time interval. The timeliness of updating the first reference capacitance parameter of the second scanning mode can be improved in the embodiment of the disclosure.
Inventors
- Guo Kairong
Assignees
- 北京小米移动软件有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241105
Claims (15)
- 1. The touch detection method is characterized by comprising the following steps of: Updating a first reference capacitance parameter of a second scanning mode based on a first time interval under the condition of capacitive scanning based on the first scanning mode, wherein the reference capacitance parameter characterizes a capacitance parameter of a touch screen under the condition that no touch operation exists; Under the condition of capacitive scanning based on the first scanning mode, if a preset triggering condition is met, updating the first reference capacitance parameter based on a second time interval; Wherein the second time interval is less than the first time interval.
- 2. The touch detection method of claim 1, further comprising: determining the first time interval from at least two candidate time intervals; The candidate time intervals are used for updating the first reference capacitance parameter, and the first time interval is the maximum value of the at least two candidate time intervals.
- 3. The touch detection method of claim 1, further comprising: Based on the accumulated times meeting the preset triggering condition in the first scanning mode, the first time interval is adjusted to obtain the second time interval; wherein the accumulated number of times is inversely related to the second time interval.
- 4. The touch detection method of claim 1, further comprising: And determining that the preset trigger condition is met when the first variation amplitude of the first capacitance parameter detected in the first scanning mode is within a first preset range, and/or, And determining that the preset trigger condition is met under the condition that the second variation amplitude of the temperature parameter of the electronic equipment is in a second preset range.
- 5. The touch detection method according to any one of claims 1 to 4, further comprising: and updating the first reference capacitance parameter based on a second time interval if the duration of the preset trigger condition is not met to a preset duration under the condition that the preset trigger condition is not met in the first scanning mode.
- 6. The touch detection method according to claim 4, wherein the updating the first reference capacitance parameter includes: Updating the first reference capacitance parameter based on the first variation amplitude and/or the second variation amplitude; Wherein an update magnitude of the update of the first reference capacitance parameter is positively correlated with the change magnitude.
- 7. The touch detection method of claim 4, further comprising: updating a second reference capacitance parameter of the first scan pattern based on at least one of the first capacitance parameter, the first amplitude of variation, and the second amplitude of variation.
- 8. The touch detection method according to any one of claims 1 to 4, wherein the updating the first reference capacitance parameter includes: updating the first reference capacitance parameter based on a second capacitance parameter detected in the second scanning mode in response to switching from the first scanning mode to the second scanning mode; The method further comprises the steps of: Switching from the second scanning mode to the first scanning mode in case the second capacitance parameter is detected and/or an update of the first reference capacitance parameter is completed.
- 9. The touch detection method of claim 8, further comprising: and in the second scanning mode, determining a touch detection result based on the second capacitance parameter and the updated first reference capacitance parameter.
- 10. The touch detection method of claim 8, further comprising: determining the first time interval based on a power consumption parameter in the second scan mode; Wherein the power consumption parameter and the power consumption generated in the second scanning mode are positively correlated, and the power consumption parameter and the first time interval are positively correlated.
- 11. The method for touch detection according to any one of claim 1 to 4, wherein, The first scanning mode is a mode for carrying out self-capacitance scanning, the second scanning mode is a mode for carrying out 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.
- 12. A touch device, the device comprising: The touch screen comprises a first updating module, a second updating module and a first control module, wherein the first updating module is configured to update a first reference capacitance parameter of a second scanning mode based on a first time interval under the condition of capacitive scanning based on the first scanning mode, wherein the reference capacitance parameter represents a capacitance parameter of the touch screen under the condition that no touch operation exists; The second updating module is configured to update the first reference capacitance parameter based on a second time interval if a preset trigger condition is met under the condition of capacitive scanning based on the first scanning mode; Wherein the second time interval is less than the first time interval.
- 13. An electronic device, comprising: A processor; a memory for storing a computer program or instructions; Wherein the processor executes the computer program or instructions to implement the steps of the method of any one of claims 1 to 11.
- 14. A non-transitory computer readable storage medium storing a computer program or instructions, characterized in that the computer program or instructions in the storage medium, when executed by a processor, implement the steps of the method of any one of claims 1 to 11.
- 15. A computer program product comprising a computer program or instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 11.
Description
Touch detection method, device, electronic equipment, storage medium and program product Technical Field The disclosure relates to the field of touch detection, and in particular, to a touch detection method, a touch detection device, an electronic device, a storage medium and a program product. Background In the related art, when a user performs a touch operation on a touch screen, a capacitance parameter of the touch screen may change. At this time, the capacitive scanning can be performed on the touch screen in the scanning mode to obtain the capacitive parameter of the touch screen, and the capacitive parameter of the touch screen is analyzed, so that the touch detection result is determined. For example, the capacitance parameter obtained in the scan mode may be compared with a preset reference capacitance parameter to determine the touch detection result. However, in the touch detection process of the related art, the accuracy of the reference capacitance parameter is not considered. At this time, in the case where the accuracy of the reference capacitance parameter used is low, the accuracy of the touch detection result determined based on the reference capacitance parameter may be low. Disclosure of Invention In order to overcome the problems in the related art, the present disclosure provides a touch detection method, a touch detection device, an electronic device, a storage medium, and a program product, so as to improve timeliness of updating a first reference capacitance parameter. According to a first aspect of an embodiment of the present disclosure, there is provided a touch detection method, including: Updating a first reference capacitance parameter of a second scanning mode based on a first time interval under the condition of capacitive scanning based on the first scanning mode, wherein the reference capacitance parameter characterizes a capacitance parameter of a touch screen under the condition that no touch operation exists; under the condition of capacitive scanning based on the first scanning mode, if a preset triggering condition is met, updating the first reference capacitance parameter based on a second time interval; Wherein the second time interval is smaller than the first time interval. In one embodiment, the method further comprises: determining a first time interval from the at least two candidate time intervals; The candidate time intervals are used for updating the first reference capacitance parameter, and the first time interval is the maximum value of at least two candidate time intervals. In one embodiment, the method further comprises: Based on the accumulated times meeting the preset triggering condition in the first scanning mode, the first time interval is adjusted to obtain a second time interval; Wherein the accumulated number of times is inversely related to the second time interval. In one embodiment, the method further comprises: In case the first amplitude of variation of 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 fulfilled, and/or, And under the condition that the second variation amplitude of the temperature parameter of the electronic equipment is in a second preset range, determining that the preset trigger condition is met. In one embodiment, the method further comprises: and updating the first reference capacitance parameter based on the first time interval if the duration of the preset trigger condition is not met to reach the preset duration under the condition that the preset trigger condition is not met in the first scanning mode. In one embodiment, updating the first reference capacitance parameter includes: updating the first reference capacitance parameter based on the first variation amplitude and/or the second variation amplitude; Wherein the update amplitude and the change amplitude of the update of the first reference capacitance parameter are positively correlated. In one embodiment, the method further comprises: the second reference capacitance parameter of the first scan pattern is updated based on at least one of the first capacitance parameter, the first amplitude of variation, and the second amplitude of variation. In one embodiment, updating the first reference capacitance parameter includes: in response to switching from the first scan mode to the second scan mode, updating the first reference capacitance parameter based on the second capacitance parameter detected in the second scan mode; The method further comprises the steps of: In case a second capacitance parameter is detected and/or an update of the first reference capacitance parameter is completed, switching from the second scanning mode to the first scanning mode. In one embodiment, the method further comprises: And in the second scanning mode, determining a touch detection result based on the second capacitance parameter and the updated first reference capacitance par