CN113037268B - Method and device for adjusting key touch threshold - Google Patents
Method and device for adjusting key touch threshold Download PDFInfo
- Publication number
- CN113037268B CN113037268B CN202110302434.7A CN202110302434A CN113037268B CN 113037268 B CN113037268 B CN 113037268B CN 202110302434 A CN202110302434 A CN 202110302434A CN 113037268 B CN113037268 B CN 113037268B
- Authority
- CN
- China
- Prior art keywords
- key
- capacitance
- value
- threshold
- adjusted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 230000001105 regulatory effect Effects 0.000 claims abstract description 53
- 238000004364 calculation method Methods 0.000 claims abstract description 11
- 238000004590 computer program Methods 0.000 claims description 10
- 230000035945 sensitivity Effects 0.000 abstract description 13
- 238000010586 diagram Methods 0.000 description 8
- 230000002159 abnormal effect Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000007257 malfunction Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H03—ELECTRONIC CIRCUITRY
- H03K—PULSE TECHNIQUE
- H03K17/00—Electronic switching or gating, i.e. not by contact-making and –breaking
- H03K17/94—Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
- H03K17/96—Touch switches
- H03K17/962—Capacitive touch switches
Landscapes
- Position Input By Displaying (AREA)
- Electronic Switches (AREA)
Abstract
The disclosure discloses a method and a device for adjusting a key touch threshold, and relates to the field of key control. The method comprises the following steps: judging whether the capacitance value of the key to be regulated is recorded as a first capacitance value or not according to the number of the effective keys, the touched effective time of the key to be regulated, the updated lower limit value of the capacitance threshold and the average value of the noise capacitance; and when the number of the recorded first capacitance values of the keys to be adjusted is larger than a first number threshold value, adjusting the touch threshold value of the keys to be adjusted according to the average value of the recorded first capacitance values of the keys to be adjusted. According to the method for adjusting the touch threshold of the key, the accuracy of calculation of the touch threshold is improved, the sensitivity of the touch key is ensured to be kept at a proper level all the time, and the touch threshold can be adjusted when the capacitance value of the touch key is small, so that the key can be operated normally.
Description
Technical Field
The present disclosure relates to the field of key control, and in particular, to a method and apparatus for adjusting a key touch threshold.
Background
Touch keys are increasingly widely used, and the problem of sensitivity of the touch keys directly affects the application of the keys. In the related art, the capacitance value of each time the key is touched is recorded, the number of times of touching the key is counted, and when the number of times of touching the key reaches a set number of times, whether abnormal data exists in the data is judged. If abnormal data exist, deleting the abnormal data and re-acquiring the capacitance value to complement the touch capacitance value of the set times until the abnormal data do not exist, and calculating the average value of the capacitance values of the keys of the set times to further obtain a touch capacitance value threshold.
In the related art, consideration is not comprehensive enough when recording the capacitance value of each touch key, which can lead to non-ideal touch threshold value obtained by final calculation and still affect the sensitivity of the key.
Disclosure of Invention
The technical problem to be solved by the present disclosure is to provide a method and an apparatus for adjusting a touch threshold of a key, which can improve the accuracy of calculating the touch threshold and ensure that the sensitivity of the touch key is always kept at a proper level.
According to an aspect of the present disclosure, a method for adjusting a key touch threshold is provided, including: judging whether the capacitance value of the key to be regulated is recorded as a first capacitance value or not according to the number of the effective keys, the touched effective time of the key to be regulated, the updated lower limit value of the capacitance threshold and the average value of the noise capacitance; and when the number of the recorded first capacitance values of the keys to be adjusted is larger than a first number threshold value, adjusting the touch threshold value of the keys to be adjusted according to the average value of the recorded first capacitance values of the keys to be adjusted.
In some embodiments, determining whether to record the capacitance value of the key to be adjusted as the first capacitance value includes: when the key to be regulated is an effective key, and the effective time of the key to be regulated is less than the effective duration time, and the number of the effective keys in the same time is less than or equal to a second number threshold value, recording the capacitance value of the key to be regulated as a first capacitance value; recording the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an invalid key but the capacitance value of the key to be regulated is larger than the updated lower limit value of the capacitance threshold; and recording the capacitance value of the key to be regulated as a first capacitance value if the number of times that the capacitance value of the key to be regulated is detected to be larger than the first multiple of the average value of the noise capacitance is larger than the number threshold under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is smaller than or equal to the threshold updating lower limit value.
In some embodiments, when the capacitance value of the key to be adjusted is smaller than the noise capacitance threshold and is smaller than a second multiple of the average value of the noise capacitances, recording the capacitance value of the key to be adjusted as the second capacitance value, wherein the second multiple is smaller than the first multiple, and the noise capacitance threshold is smaller than the threshold updating lower limit value; and calculating the average value of the second capacitance values of the keys to be adjusted recorded for multiple times to obtain the average value of the noise capacitance.
In some embodiments, the key to be adjusted is determined to be a valid key when the capacitance value of the key to be adjusted is greater than the valid capacitance threshold.
In some embodiments, adjusting the touch threshold of the key to be adjusted according to the recorded average value of the first capacitance values of the key to be adjusted includes: and removing the second multiple of the average value of the noise capacitance from the average value of the first capacitance value of the key to be regulated, and taking the capacitance value as the touch threshold value of the key to be regulated.
In some embodiments, adjusting the touch threshold of the key to be adjusted according to the recorded average value of the first capacitance values of the key to be adjusted includes: and multiplying the average value of the first capacitance values of the keys to be regulated by a noise influence factor coefficient to obtain a capacitance value which is used as a touch threshold value of the keys to be regulated, wherein the noise influence factor coefficient is smaller than 1.
According to another aspect of the present disclosure, there is also provided an apparatus for adjusting a key touch threshold, including: the capacitance value recording unit is configured to judge whether the capacitance value of the key to be adjusted is recorded as a first capacitance value according to the number of the effective keys, the touched effective time of the key to be adjusted, the updated lower limit value of the capacitance threshold value and the average value of the noise capacitance; and the touch threshold adjusting unit is configured to adjust the touch threshold of the key to be adjusted according to the average value of the recorded first capacitance values of the key to be adjusted when the recorded first capacitance values of the key to be adjusted are larger than the first number threshold.
In some embodiments, the capacitance value recording unit is configured to record the capacitance value of the key to be adjusted as the first capacitance value when the key to be adjusted is an effective key and the effective time of the key to be adjusted is less than the effective duration and the number of the effective keys in the same time is less than or equal to the second number threshold; recording the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an invalid key but the capacitance value of the key to be regulated is larger than the updated lower limit value of the capacitance threshold; and recording the capacitance value of the key to be regulated as a first capacitance value if the number of times that the capacitance value of the key to be regulated is detected to be larger than the first multiple of the average value of the noise capacitance is larger than the number threshold under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is smaller than or equal to the threshold updating lower limit value.
In some embodiments, the noise capacitance average value adjusting unit is configured to perform average value calculation on a second capacitance value of the key to be adjusted recorded for a plurality of times to obtain a noise capacitance average value, where the capacitance value recording unit is further configured to record the capacitance value of the key to be adjusted as the second capacitance value when the capacitance value of the key to be adjusted is smaller than a noise capacitance threshold value and smaller than a second multiple of the noise capacitance average value, where the second multiple is smaller than the first multiple, and the noise capacitance threshold value is smaller than a threshold value updating lower limit value.
According to another aspect of the present disclosure, there is also provided an apparatus for adjusting a key touch threshold, including: a memory; and a processor coupled to the memory, the processor configured to perform the method of adjusting the key touch threshold as described above based on instructions stored in the memory.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method of adjusting a key touch threshold.
In the embodiment of the disclosure, the accuracy of calculation of the touch threshold is improved by optimizing the adjustment method of the touch threshold of the key, the sensitivity of the touch key is ensured to be always kept at a proper level, and the touch threshold can be adjusted when the capacitance value of the touch key is small, so that the key is normally operated.
Other features of the present disclosure and its advantages will become apparent from the following detailed description of exemplary embodiments of the disclosure, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The disclosure may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings in which:
Fig. 1 is a flow diagram of some embodiments of a method of adjusting a key touch threshold of the present disclosure.
FIG. 2 is a flow chart of other embodiments of a method of adjusting a key touch threshold of the present disclosure.
Fig. 3 is a schematic structural view of some embodiments of an apparatus for adjusting key touch threshold of the present disclosure.
Fig. 4 is a schematic structural view of other embodiments of a device for adjusting a key touch threshold of the present disclosure.
Fig. 5 is a schematic structural view of other embodiments of a device for adjusting a key touch threshold of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but should be considered part of the specification where appropriate.
In all examples shown and discussed herein, any specific values should be construed as merely illustrative, and not a limitation. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
For the purposes of promoting an understanding of the principles and advantages of the disclosure, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same.
In the process of using the touch key, when a user presses the key for a long time, the harder the user presses, the larger the capacitance value of the key is, if the capacitance value of the key at the moment is recorded, the higher the finally calculated touch threshold value is, and the lower the sensitivity of the key is. If the capacitance values of a plurality of keys are changed at the same time, the normal key operation is not indicated. For example, when the user wipes the key panel, if the capacitance value of the key is recorded at this time, the calculated threshold value is not the threshold value obtained when the user normally presses the key, resulting in that the adjusted key sensitivity is not an appropriate sensitivity.
In addition, in the related art, the difference value between the capacitance value of the key and the average value is normal data only when the difference value is within a preset difference value range, otherwise, the normal data is not recorded. However, the "preset difference" is fixed, and cannot be automatically adjusted, and in order to prevent malfunction, the "preset difference" is not generally set to be very small, which results in that if an extreme situation occurs, such as when a gap between the touch key board and the panel is large, the capacitance value changes less when the key is pressed, the "preset difference" is not reached, and the threshold value is not adjusted, so that the key is completely failed.
Fig. 1 is a flow diagram of some embodiments of a method of adjusting a key touch threshold of the present disclosure.
In step 110, it is determined whether to record the capacitance value of the key to be adjusted as the first capacitance value according to the number of the effective keys, the touched effective time of the key to be adjusted, the updated lower limit value of the capacitance threshold and the average value of the noise capacitance.
In this step, the capacitance value of the key to be adjusted is not recorded as the first capacitance value every time the capacitance value is detected. The first capacitance threshold is a parameter for subsequently calculating a touch threshold of the key. The key to be adjusted is a touch key.
In some embodiments, when the key to be adjusted is an effective key, and the effective time of the key to be adjusted is less than the effective duration, the capacitance value of the key to be adjusted is recorded as the first capacitance value when the number of the effective keys in the same time is less than or equal to the second number threshold.
When a human body or other conductive object approaches the touch key, the capacitance value of the key changes. In some embodiments, the capacitance value C of each key is detected at predetermined intervals, and when the capacitance value C of a key is greater than the effective capacitance threshold Cy, the key is determined to be an effective key, i.e. the key is effectively touched. When a plurality of keys exist, the number N of the effective keys in the same time and the duration T of the effective keys are recorded. When the number of effective keys in the same time is greater than the second threshold number, for example, greater than 1 or 2, the key operation is not normal, so that the capacitance value at the moment is not used as a parameter for calculating the touch threshold value of the key subsequently. When the effective time of the key being touched is longer than the effective duration, for example, longer than 1 second, it is indicated that the capacitance value of the key will be larger and larger when the user presses the key for a long time, so that the capacitance value at this time is not taken as a parameter for calculating the touch threshold value of the key subsequently.
In some embodiments, when the key to be adjusted is an invalid key, but the capacitance value of the key to be adjusted is greater than the updated lower limit value of the capacitance threshold, the capacitance value of the key to be adjusted is recorded as the first capacitance value.
If the capacitance value of the key is too small, the capacitance value of the key may be slightly changed due to noise or abnormal operation in a short time, so that the capacitance value C of the key to be adjusted needs to be used as a parameter for calculating the touch threshold value of the key later when the capacitance value C is larger than the capacitance threshold value updating lower limit value Cj.
In some embodiments, when the key to be adjusted is an invalid key and the capacitance value of the key to be adjusted is less than or equal to the threshold updating lower limit value, if the number of times that the capacitance value of the key to be adjusted is detected to be greater than the first multiple of the average value of the noise capacitance is greater than the number of times threshold value, the capacitance value of the key to be adjusted is recorded as the first capacitance value.
When the capacitance value of the key is relatively small, for example, smaller than the capacitance threshold update lower limit value Cj, if the capacitance value is detected to be greater than 1+k times the noise capacitance average value Cn a plurality of times, the capacitance value of the key may be reduced due to the fact that the key sheet and the panel directly have a gap or the like, and the capacitance value may be used as a parameter for calculating the touch threshold value of the key subsequently.
In step 120, when the number of the recorded first capacitance values of the keys to be adjusted is greater than the first number threshold, the touch threshold of the key to be adjusted is adjusted according to the average value of the recorded first capacitance values of the keys to be adjusted.
In some embodiments, when the number of the recorded first capacitance values of the keys to be adjusted reaches the preset number, a touch threshold of the keys to be adjusted is calculated.
In some embodiments, the average value of the first capacitance values of the key to be adjusted is taken as the capacitance value obtained by removing the second multiple of the average value of the noise capacitance, and the second multiple is smaller than the first multiple. The touch threshold is smaller than the average capacitance value of the key, and the noise value is accumulated by the detected capacitance values, so that the touch threshold can be determined after the noise value is subtracted.
In some embodiments, the average value of the first capacitance values of the key to be adjusted is multiplied by a noise influence factor coefficient, and the capacitance value is used as a touch threshold of the key to be adjusted, wherein the noise influence factor coefficient is smaller than 1. The noise influence factor coefficient is set to, for example, 0.5 to 0.8, and the influence of noise on the touch threshold can be reduced.
In the above embodiment, by optimizing the adjustment method of the touch threshold of the key, the accuracy of the calculation of the touch threshold is improved, the sensitivity of the touch key is ensured to be always kept at a proper level, and the touch threshold can be adjusted when the capacitance value of the touch key is small, so that the key can be operated normally.
In other embodiments of the disclosure, when the capacitance value of the key to be adjusted is smaller than the noise capacitance threshold value and is smaller than a second multiple of the average value of the noise capacitances, the capacitance value of the key to be adjusted is recorded as the second capacitance value, wherein the second multiple is smaller than the first multiple, and the noise capacitance threshold value is smaller than the threshold updating lower limit value; and carrying out average value calculation on the second capacitance values of the buttons to be adjusted recorded for multiple times to obtain a noise capacitance average value.
When no object is close to the key, the capacitance value C of the key may also change due to power supply fluctuation, device parameter fluctuation, environmental change or other reasons, the capacitance value is called noise capacitance value, and the capacitance value C may be negative. In some embodiments, when the capacitance value C of the key to be adjusted is greater than 0, less than the noise capacitance threshold Ci, and less than K times the noise capacitance average Cn, the capacitance value is recorded as a parameter for calculating the noise capacitance average subsequently. The value of K is 1.5-2, for example, namely, when the capacitance value C of the key is smaller than 1.5-2 times of the average value of the noise capacitance, the capacitance value C participates in the calculation of the noise capacitance.
In some embodiments, the noise capacitance average Cn is calculated using the formula cn= Σcm/m, where Cm is the second capacitance value recorded in the mth time, in some embodiments, the value of m is 100 at the maximum, when the second capacitance values recorded exceeds 100, the second capacitance value recorded earlier is removed to update the noise capacitance average, and those skilled in the art will understand that the maximum value of m can be set according to the actual situation.
In the above embodiment, the noise capacitance average value can be dynamically adjusted, and then when the capacitance value of the key is smaller, whether the capacitance value of the key is recorded is judged according to the capacitance value of the key and the size of the noise capacitance average value, so that when the capacitance value of the key is smaller, the malfunction of the key caused by noise is avoided, and meanwhile, the threshold value can be adjusted, so that the key can respond normally.
FIG. 2 is a flow chart of other embodiments of a method of adjusting a key touch threshold of the present disclosure.
In step 210, the number of active keys N and the active time T for which each key is touched are recorded.
In some embodiments, each key has a corresponding effective capacitance threshold Cy, and the capacitance value C of each key is periodically detected, for example, every 10ms, and when the capacitance value of the key reaches the effective capacitance threshold Cy, the key is recorded as an effective key.
In step 220, it is determined whether the key to be adjusted is a valid key, if so, step 230 is executed, otherwise, step 270 is executed.
In step 230, it is determined whether the number N of valid keys in the same time period is greater than 0 and less than or equal to 2, if yes, step 240 is performed, otherwise, step 260 is performed.
In this step, the number threshold is set to 2, and two of the linked keys or the combination keys may be touched at the same time. It will be appreciated by those skilled in the art that if there are no combination keys, the number threshold should be set to 1, and if there are combination keys, but the number of combination keys is 3, the number threshold is set to 3.
In step 240, it is determined whether the effective time T of the key to be adjusted being touched is less than or equal to 1S, if yes, step 250 is executed, otherwise, step 260 is executed.
In step 250, the capacitance value is recorded as a first capacitance value.
In step 260, the capacitance value is not recorded.
Because the user presses the key for a long time, the harder the user presses, the larger the key capacitance value is, if the key capacitance value at the moment is recorded, the finally calculated threshold value is higher, and the sensitivity of the next key of the user is lower; in addition, if the capacitance values of a plurality of keys are changed at the same time, the key panel is wiped by a user when the key is operated, and if the capacitance values of the keys are recorded at the moment, the calculated threshold value is not the threshold value obtained when the user normally keys, so that the adjusted key sensitivity is not proper. Therefore, when the number of effective keys is greater than 2, or the effective time T for which the keys are touched is greater than 1 second, the capacitance value is not recorded.
In step 270, it is determined whether the capacitance value C of the key to be adjusted is greater than the capacitance threshold updating lower limit Cj, if yes, step 250 is performed, otherwise, step 280 is performed.
The effective capacitance threshold Cy > capacitance threshold update lower limit Cj > noise capacitance threshold Ci.
A too small capacitance value may be a small change in the capacitance value of the key caused by noise or abnormal operation in a short time, and cannot be calculated as a normal capacitance value, so when no effective key is available, only when the capacitance value of the key to be adjusted is greater than a certain value Cj, the capacitance value is recorded to participate in calculation of the touch threshold.
In step 280, it is determined whether the capacitance value C of the key to be adjusted is greater than 1+k times the average value Cn of the noise capacitances k times, if yes, step 250 is performed, otherwise step 260 is performed.
When the key capacitance value is relatively small, it is also possible that the key capacitance value becomes small due to the fact that a gap or the like occurs between the key sheet and the panel directly, and in this case, when the capacitance value is detected to be greater than 1+k times the noise capacitance average Cn a plurality of times, it is considered to be normal user key operation, so that the capacitance value is also recorded to update the threshold value, so that the user key operation can be responded in this case as well.
In step 290, it is determined whether the number of the recorded first capacitance values reaches a predetermined number, if so, step 2100 is executed, otherwise, step 210 is continued.
In step 2100, a touch threshold for a key is calculated.
In some embodiments, the touch threshold Cq is calculated using the formula cq= Σcp/p-Cn, where Cp is the first capacitance value recorded for the p-th time. In some embodiments, p has a maximum value of 100. And when the recorded first capacitance values exceed the preset number, eliminating the earliest recorded first capacitance threshold value to update and calculate the touch threshold value.
In the above embodiment, the records of the capacitance values when the duration of the plurality of valid keys exceeds 1 second can be removed, so that the new threshold calculated by the capacitance values recorded in the cases is avoided being not a proper threshold; in addition, when the capacitance value of the key is smaller, the threshold can be automatically adjusted so that the key can normally respond while avoiding misoperation of the key caused by noise, and the sensitivity of the touch key is always kept at a proper level.
Fig. 3 is a schematic structural view of some embodiments of an apparatus for adjusting key touch threshold of the present disclosure. The apparatus includes a capacitance value recording unit 310 and a touch threshold adjusting unit 320.
The capacitance value recording unit 310 is configured to determine whether to record the capacitance value of the key to be adjusted as the first capacitance value according to the number of effective keys, the touched effective time of the key to be adjusted, the capacitance threshold update lower limit value and the noise capacitance average value.
In some embodiments, the capacitance value recording unit 310 is configured to record the capacitance value of the key to be adjusted as the first capacitance value when the key to be adjusted is an active key and the touched active time is less than the active duration and the number of active keys in the same time is less than or equal to the second number threshold; recording the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an invalid key but the capacitance value of the key to be regulated is larger than the updated lower limit value of the capacitance threshold; and recording the capacitance value of the key to be regulated as a first capacitance value if the number of times that the capacitance value of the key to be regulated is detected to be larger than the first multiple of the average value of the noise capacitance is larger than the number threshold under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is smaller than or equal to the threshold updating lower limit value.
In some embodiments, the key to be adjusted is determined to be a valid key when the capacitance value of the key to be adjusted is greater than the valid capacitance threshold.
The touch threshold adjustment unit 320 is configured to adjust the touch threshold of the key to be adjusted according to the average value of the recorded first capacitance values of the key to be adjusted when the recorded first capacitance values of the key to be adjusted are greater than the first number threshold.
In some embodiments, the touch threshold adjustment unit 320 is configured to use the average value of the first capacitance values of the keys to be adjusted, and the capacitance value obtained by removing the second multiple of the average value of the noise capacitances, as the touch threshold of the keys to be adjusted.
In some embodiments, the touch threshold adjustment unit 320 is configured to multiply the average value of the first capacitance values of the keys to be adjusted by a noise influence factor coefficient, where the noise influence factor coefficient is smaller than 1, to obtain the capacitance value as the touch threshold of the keys to be adjusted.
In the above embodiment, by optimizing the adjustment method of the touch threshold of the key, it is ensured that the sensitivity of the touch key is always kept at a proper level, and the touch threshold can be adjusted when the capacitance value of the touch key is small, so that the key operates normally.
Fig. 4 is a schematic structural view of other embodiments of a device for adjusting a key touch threshold of the present disclosure. The apparatus further comprises a noise capacitance average value adjusting unit 410.
The capacitance value recording unit 310 is further configured to record the capacitance value of the key to be adjusted as a second capacitance value when the capacitance value of the key to be adjusted is smaller than the noise capacitance threshold and smaller than a second multiple of the average value of the noise capacitance, wherein the second multiple is smaller than the first multiple, and the noise capacitance threshold is smaller than the threshold updating lower limit value.
The noise capacitance average value adjusting unit 410 is configured to perform average value calculation on the second capacitance values of the key to be adjusted recorded for a plurality of times, so as to obtain a noise capacitance average value.
In the above embodiment, the noise capacitance average value can be dynamically adjusted, and then when the capacitance value of the key is smaller, whether the capacitance value of the key is recorded is judged according to the capacitance value of the key and the size of the noise capacitance average value, so that when the capacitance value of the key is smaller, the malfunction of the key caused by noise is avoided, and meanwhile, the threshold value can be adjusted, so that the key can respond normally.
Fig. 5 is a schematic structural view of other embodiments of a device for adjusting a key touch threshold of the present disclosure. The apparatus 500 includes a memory 510 and a processor 520. Wherein: memory 510 may be a magnetic disk, flash memory, or any other non-volatile storage medium. The memory 510 is used to store instructions in the embodiments corresponding to fig. 1 and 2. Processor 520 is coupled to memory 510 and may be implemented as one or more integrated circuits, such as a microprocessor or microcontroller. The processor 520 is configured to execute instructions stored in the memory.
In some embodiments, processor 520 is coupled to memory 510 by BUS 530. The device 500 may also be coupled to external storage 550 via a storage interface 540 for invoking external data, and may also be coupled to a network or another computer system (not shown) via a network interface 560, which will not be described in detail herein.
In the embodiment, the data instruction is stored by the memory, and then the instruction is processed by the processor, so that the problem that the existing touch threshold is unreasonable or incomplete to adjust, and the key is insensitive or fails can be solved.
In other embodiments, a computer readable storage medium has stored thereon computer program instructions which, when executed by a processor, implement the steps of the method of the corresponding embodiments of fig. 1, 2. It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Thus far, the present disclosure has been described in detail. In order to avoid obscuring the concepts of the present disclosure, some details known in the art are not described. How to implement the solutions disclosed herein will be fully apparent to those skilled in the art from the above description.
Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It will be appreciated by those skilled in the art that modifications may be made to the above embodiments without departing from the scope and spirit of the disclosure. The scope of the present disclosure is defined by the appended claims.
Claims (9)
1. A method of adjusting a key touch threshold, comprising:
When the key to be regulated is an effective key, and the effective time of the key to be regulated is less than the effective duration time, and the number of the effective keys in the same time is less than or equal to a second number threshold value, recording the capacitance value of the key to be regulated as a first capacitance value;
recording the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is larger than the updated lower limit value of the capacitance threshold;
When the to-be-adjusted key is an invalid key and the capacitance value of the to-be-adjusted key is smaller than or equal to the threshold updating lower limit value, if the times that the capacitance value of the to-be-adjusted key is larger than the first times of the noise capacitance average value is detected to be larger than the times threshold value, recording that the capacitance value of the to-be-adjusted key is the first capacitance value; and
When the recorded number of the first capacitance values of the keys to be adjusted is larger than a first number threshold, adjusting the touch threshold of the keys to be adjusted according to the recorded average value of the first capacitance values of the keys to be adjusted.
2. The method of claim 1, further comprising:
When the capacitance value of the key to be adjusted is smaller than a noise capacitance threshold value and is smaller than a second multiple of the average value of the noise capacitance, recording the capacitance value of the key to be adjusted as a second capacitance value, wherein the second multiple is smaller than the first multiple, and the noise capacitance threshold value is smaller than the threshold updating lower limit value; and
And carrying out average value calculation on the second capacitance value of the key to be regulated recorded for multiple times to obtain the noise capacitance average value.
3. The method according to claim 1 or 2, wherein,
And when the capacitance value of the key to be regulated is larger than the effective capacitance threshold value, determining that the key to be regulated is an effective key.
4. The method of claim 2, wherein adjusting the touch threshold of the key to be adjusted according to the recorded average value of the first capacitance values of the key to be adjusted comprises:
and removing the average value of the first capacitance values of the keys to be adjusted, and taking the capacitance value obtained after the second multiple of the average value of the noise capacitance as the touch threshold value of the keys to be adjusted.
5. The method according to claim 1 or 2, wherein adjusting the touch threshold of the key to be adjusted according to the recorded average value of the first capacitance values of the key to be adjusted comprises:
And multiplying the average value of the first capacitance values of the keys to be regulated by a noise influence factor coefficient to obtain a capacitance value which is used as a touch threshold value of the keys to be regulated, wherein the noise influence factor coefficient is smaller than 1.
6. An apparatus for adjusting a key touch threshold, comprising:
The capacitance value recording unit is configured to record the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an effective key, the effective time of the key to be regulated is smaller than the effective duration time, and the number of the effective keys in the same time is smaller than or equal to a second number threshold value; recording the capacitance value of the key to be regulated as a first capacitance value under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is larger than the updated lower limit value of the capacitance threshold; and recording the capacitance value of the key to be regulated as a first capacitance value if the number of times that the capacitance value of the key to be regulated is detected to be larger than the first multiple of the average value of the noise capacitance is larger than a threshold value of times under the condition that the key to be regulated is an invalid key and the capacitance value of the key to be regulated is smaller than or equal to the lower limit value of the threshold value update; and
And the touch threshold adjusting unit is configured to adjust the touch threshold of the key to be adjusted according to the average value of the recorded first capacitance values of the key to be adjusted when the recorded first capacitance values of the key to be adjusted are larger than a first number threshold.
7. The apparatus of claim 6, further comprising:
A noise capacitance average value adjusting unit configured to perform average value calculation on the second capacitance values of the key to be adjusted recorded for a plurality of times to obtain the noise capacitance average value,
The capacitance value recording unit is further configured to record the capacitance value of the key to be adjusted as a second capacitance value when the capacitance value of the key to be adjusted is smaller than a noise capacitance threshold value and smaller than a second multiple of the average value of the noise capacitance, wherein the second multiple is smaller than the first multiple, and the noise capacitance threshold value is smaller than the threshold updating lower limit value.
8. An apparatus for adjusting a key touch threshold, comprising:
A memory; and
A processor coupled to the memory, the processor configured to perform the method of adjusting a key touch threshold of any of claims 1-5 based on instructions stored in the memory.
9. A non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the method of adjusting a key touch threshold of any of claims 1 to 5.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110302434.7A CN113037268B (en) | 2021-03-22 | 2021-03-22 | Method and device for adjusting key touch threshold |
PCT/CN2021/135655 WO2022199121A1 (en) | 2021-03-22 | 2021-12-06 | Method and apparatus for adjusting touch threshold of key |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110302434.7A CN113037268B (en) | 2021-03-22 | 2021-03-22 | Method and device for adjusting key touch threshold |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113037268A CN113037268A (en) | 2021-06-25 |
CN113037268B true CN113037268B (en) | 2024-07-16 |
Family
ID=76472317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110302434.7A Active CN113037268B (en) | 2021-03-22 | 2021-03-22 | Method and device for adjusting key touch threshold |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113037268B (en) |
WO (1) | WO2022199121A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113037268B (en) * | 2021-03-22 | 2024-07-16 | 珠海格力电器股份有限公司 | Method and device for adjusting key touch threshold |
CN113391588A (en) * | 2021-06-28 | 2021-09-14 | 佛山市顺德区美的电子科技有限公司 | Household appliance, self-checking control method and system thereof and storage medium |
CN117687535B (en) * | 2024-02-01 | 2024-04-16 | 苏州华芯微电子股份有限公司 | Capacitance touch key reference value correction method, device, equipment and readable medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101566901A (en) * | 2008-04-23 | 2009-10-28 | 索尼爱立信移动通信日本株式会社 | Contact-sensing device, mobile information terminal, and capacitance calibration program and method |
CN111934660A (en) * | 2020-07-15 | 2020-11-13 | 珠海格力电器股份有限公司 | Method for adjusting key touch threshold and touch key display screen |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102386904A (en) * | 2010-08-31 | 2012-03-21 | 康佳集团股份有限公司 | Response method and system of capacitive sensing touch key and touch equipment |
EP2626778B1 (en) * | 2012-02-09 | 2017-04-05 | Sony Mobile Communications, Inc. | Capacitive touch panel device |
CN102751972A (en) * | 2012-07-27 | 2012-10-24 | 冠捷显示科技(厦门)有限公司 | Implement method for learning and correcting of touch button |
CN105487697B (en) * | 2014-09-15 | 2021-04-02 | 中兴通讯股份有限公司 | Method and device for preventing touch screen key failure |
CN107395877B (en) * | 2015-08-27 | 2021-07-30 | Oppo广东移动通信有限公司 | Terminal false touch prevention method and terminal |
CN107291226A (en) * | 2017-06-12 | 2017-10-24 | 深圳市创梦天地科技股份有限公司 | Control method and device, terminal based on touch gestures |
CN110824378B (en) * | 2019-10-31 | 2022-02-15 | 中电海康无锡科技有限公司 | Touch key detection method |
CN111352534B (en) * | 2020-03-13 | 2021-05-28 | 珠海格力电器股份有限公司 | Touch key touch threshold correction method, wire controller, electric appliance and computer readable storage medium |
CN111953326A (en) * | 2020-07-16 | 2020-11-17 | 珠海格力电器股份有限公司 | Dynamic adjustment method for key touch threshold and touch key display screen |
CN113037268B (en) * | 2021-03-22 | 2024-07-16 | 珠海格力电器股份有限公司 | Method and device for adjusting key touch threshold |
-
2021
- 2021-03-22 CN CN202110302434.7A patent/CN113037268B/en active Active
- 2021-12-06 WO PCT/CN2021/135655 patent/WO2022199121A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101566901A (en) * | 2008-04-23 | 2009-10-28 | 索尼爱立信移动通信日本株式会社 | Contact-sensing device, mobile information terminal, and capacitance calibration program and method |
CN111934660A (en) * | 2020-07-15 | 2020-11-13 | 珠海格力电器股份有限公司 | Method for adjusting key touch threshold and touch key display screen |
Also Published As
Publication number | Publication date |
---|---|
CN113037268A (en) | 2021-06-25 |
WO2022199121A1 (en) | 2022-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113037268B (en) | Method and device for adjusting key touch threshold | |
CN109601015B (en) | Touch screen reference determination method and device, touch screen and electronic terminal | |
CN108512542B (en) | Touch key signal processing method and device and computer readable storage medium | |
WO2018205485A1 (en) | False touch prevention method and system for touch control screen | |
CN113253878B (en) | Touch screen report point determining method and device, electronic equipment and storage medium | |
JP7490819B2 (en) | Method and device for adjusting touch capacitance data, electronic device, and storage medium | |
WO2017052595A1 (en) | Variable cache for non-volatile memory | |
CN111400141B (en) | Abnormity detection method and device | |
JP2024528871A (en) | Temperature treatment method and device | |
CN113126815A (en) | Key response control method and device, terminal equipment and storage medium | |
CN107272947B (en) | Method and device for determining thickness of touch screen film and terminal | |
US10311031B2 (en) | Method, apparatus, and storage medium for removing redundant information from terminal | |
CN108256311B (en) | Authorization authentication method and device and electronic equipment | |
JP2014115967A (en) | Detecting method for touch device | |
CN110109970B (en) | Data query processing method and device | |
CN114781312B (en) | Semiconductor device modeling parameter adjustment calculation auxiliary method, system and device | |
US20170061935A1 (en) | Adaptive message display duration | |
CN115393087A (en) | Data processing method, device and equipment and readable storage medium | |
TW201913346A (en) | Capacitance value detecting method of touch device | |
CN104881187A (en) | Signal processing method | |
WO2021000656A1 (en) | Control method, apparatus and communication device for deadlock detection, and computer storage medium | |
US20190188143A1 (en) | Systems and methods for accelerating data computation | |
CN100451962C (en) | Adaptive control of loading a program in a disk-based operating system | |
CN116400871B (en) | Defragmentation method, defragmentation device, storage medium and electronic device | |
CN114518849B (en) | Data storage method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |