Touch button control method, controller and touch device

By obtaining and comparing the current value of the touch button with the threshold, clearing it to zero when it exceeds the range, and combining it with the count value to handle sudden changes, the problem of poor touch button sensitivity is solved, and the stability of the device and user experience are improved.

CN115291743BActive Publication Date: 2025-09-30ZHEJIANG SHAOXING SUPOR DOMESTIC ELECTRICAL APPLIANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210404531.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-09-30
Estimated Expiration
2042-04-18

Smart Images

  • Figure CN115291743B_ABST
    Figure CN115291743B_ABST
Patent Text Reader

Abstract

The present application provides a touch button control method, controller, and touch device. The method includes: a controller obtaining a current key value for each key. The current key value is used to indicate the electrical signal of the key at the current moment. When the current key value is greater than the key threshold, the controller can determine that the current key value is outside the normal range. When the controller determines that the current key value is outside the normal range, the controller can reset the current key value of the key to zero. The method of the present application improves the sensitivity of the key by filtering the current key value of the key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronics and electrical engineering, and in particular to a touch button control method, a controller, and a touch device. Background Art

[0002] In daily life, most devices that require interaction are usually provided with buttons, through which users can control the devices.

[0003] Currently, the most commonly used buttons are usually touch buttons, which all use AD sampling to obtain control signals.

[0004] However, in the prior art, touch buttons tend to have a problem of poor sensitivity. Summary of the Invention

[0005] The present application provides a touch key control method, a controller, and a touch device to solve the problem of poor sensitivity of touch keys.

[0006] In a first aspect, the present application provides a touch key control method, comprising:

[0007] Obtaining a current key value of a key, where the current key value is used to indicate an electrical signal of the key at the current moment;

[0008] Comparing the current key value with a key threshold to determine whether the current key value of the key exceeds a normal range;

[0009] When the current key value exceeds a normal range, the current key value of the key is cleared.

[0010] Optionally, obtaining the current key value of the key includes:

[0011] Acquire the voltage signal of the key in real time;

[0012] The current key value of the key at the current moment is calculated according to the voltage signal.

[0013] Optionally, before comparing the current key value with a key threshold to determine whether the current key value of the key exceeds a normal range, the method further includes:

[0014] When the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, the current key value is adjusted to the historical key value; wherein the historical key value is the current key value at the previous moment.

[0015] Optionally, the method further includes:

[0016] Comparing a count value of a key with a count threshold, wherein the count value is used to indicate a sudden change in a current key value of the key;

[0017] When the count value of the button is greater than or equal to the count threshold, the current button value of the button is cleared.

[0018] Optionally, before comparing the count value of the key and the count threshold, the method includes:

[0019] The count value of the key is adjusted according to the current key value and the historical key value of the key; wherein the historical key value is the current key value at the previous moment.

[0020] Optionally, adjusting the count value of the key according to the current key value and the historical key value of the key specifically includes:

[0021] When the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter, adjusting the count value to the sum of the count value and the second parameter;

[0022] When the absolute value of the difference between the current key value and the historical key value is smaller than the first parameter, and the count value is not zero, the count value is adjusted to the difference between the count value and the third parameter.

[0023] In a second aspect, the present application provides a touch key control device, comprising:

[0024] An acquisition module, configured to acquire a current key value of a key, wherein the current key value is used to indicate an electrical signal of the key at a current moment;

[0025] The processing module is used to compare the current key value with the key threshold to determine whether the current key value of the key exceeds a normal range; when the current key value exceeds the normal range, clear the current key value of the key to zero.

[0026] Optionally, the acquisition module is specifically configured to:

[0027] Acquire the voltage signal of the key in real time;

[0028] The current key value of the key at the current moment is calculated according to the voltage signal.

[0029] Optionally, the processing module is further configured to:

[0030] When the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, the current key value is adjusted to the historical key value; wherein the historical key value is the current key value at the previous moment.

[0031] Optionally, the processing module is further configured to:

[0032] Comparing a count value of a key with a count threshold, wherein the count value is used to indicate a sudden change in a current key value of the key;

[0033] When the count value of the button is greater than or equal to the count threshold, the current button value of the button is cleared.

[0034] Optionally, the processing module is further configured to:

[0035] The count value of the key is adjusted according to the current key value and the historical key value of the key; wherein the historical key value is the current key value at the previous moment.

[0036] Optionally, the processing module is specifically configured to:

[0037] When the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter, adjusting the count value to the sum of the count value and the second parameter;

[0038] When the absolute value of the difference between the current key value and the historical key value is smaller than the first parameter, and the count value is not zero, the count value is adjusted to the difference between the count value and the third parameter.

[0039] In a third aspect, the present application provides a controller, comprising: a memory and a processor;

[0040] The memory is used to store calculation instructions; the processor is used to execute the touch key control method in the first aspect and any possible design of the first aspect according to the calculation instructions stored in the memory.

[0041] In a fourth aspect, the present application provides a touch device, wherein the touch device is provided with at least one touch button and a controller as in the second aspect and any possible design of the second aspect.

[0042] In a fifth aspect, the present application provides a computer-readable storage medium, which stores calculation instructions. When at least one processor of a touch device executes the calculation instructions, the touch device executes the touch button control method in the first aspect and any possible design of the first aspect.

[0043] The touch key control method provided by the present application obtains the current key value of each key. The current key value is used to indicate the electrical signal of the key at the current moment; when the current key value is greater than the key threshold, it is determined that the current key value is outside the normal range; when the controller determines that the current key value is outside the normal range, the current key value of the key is cleared to zero, thereby filtering the current key value of the key and improving the sensitivity of the key. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] Figure 1 A schematic structural diagram of a touch device provided in one embodiment of the present application;

[0046] Figure 2 A flowchart of a touch button control method provided in one embodiment of the present application;

[0047] Figure 3 A flowchart of a touch button control method provided in one embodiment of the present application;

[0048] Figure 4 A flowchart of a touch button control method provided in one embodiment of the present application;

[0049] Figure 5 A schematic structural diagram of a touch button control device provided in one embodiment of the present application;

[0050] Figure 6 A schematic diagram of the hardware structure of a controller provided in one embodiment of the present application. DETAILED DESCRIPTION

[0051] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0052] In the specification and claims of this application, as well as in the accompanying drawings, the terms "first," "second," "third," "fourth," and the like are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that such terms are interchangeable where appropriate. For example, first information could be referred to as second information, and similarly, second information could be referred to as first information without departing from the scope of this disclosure.

[0053] The word "if" as used herein may be interpreted as "when" or "when" or "in response to determining," depending on the context.

[0054] Furthermore, as used herein, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise.

[0055] It should be further understood that the terms “comprises” and “includes” indicate the existence of features, steps, operations, elements, components, items, types, and / or groups, but do not preclude the existence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, types, and / or groups.

[0056] The terms "or" and "and / or" as used herein are to be interpreted as inclusive, or mean any one or any combination. Thus, "A, B, or C" or "A, B, and / or C" means "any one of the following: A; B; C; A and B; A and C; B and C; A, B, and C." An exception to this definition occurs only when a combination of elements, functions, steps, or operations are inherently mutually exclusive in some manner.

[0057] In our daily lives, most interactive devices are typically equipped with buttons. Users can control the device through these buttons. Currently, the most commonly used buttons are usually touch buttons. Touch buttons all use AD sampling to acquire control signals. However, during use, users may encounter problems such as touch insensitivity, false button triggering, and susceptibility to external interference. The existence of these problems not only easily leads to device safety issues but also creates a poor user experience. These problems may be caused by abnormal usage environment. For example, high humidity increases the conductivity of the air, which in turn causes the touch buttons to discharge in the air. Alternatively, these problems may arise due to improper design of components such as the device structure and printed circuit boards.

[0058] In the prior art, the device housing is typically a completely enclosed metal conductor housing designed according to electromagnetic compatibility (EMC) principles. Such metal conductor housings often have critical creepage distances to ground. During use, secondary arcing may occur between the device's circuit board and the housing, leading to conductive coupling. Therefore, in the prior art, when designing a housing, an insulating housing is often added to the metal shield to enhance the metal housing's insulation performance. Alternatively, when designing the housing, portions of the metal housing (such as the control panel portion with touch buttons) can be made of insulating material. This prevents electrostatic discharge (ESD) from occurring when a charged conductor contacts an insulated conductor within the touch device housing. However, microcrystalline panels commonly used in the prior art have a high number of free electrons and crystallizers. During testing, the high metal content in these panels can easily lead to an increased refractive index and enhanced conductivity. Furthermore, while maintaining integrity, the housings of most touch devices also include holes, vents, screws, and other features. For these openings in the housing, the principle of "replacing one large hole with several small holes" should be followed to improve electromagnetic emission suppression. In addition, when there are gap edges in the shell, electrical connection should be used between the two gaps to reduce electromagnetic noise.

[0059] In response to the above problems, the present application proposes a touch button control method. After the touch device is powered on and initialized, the current key value of each touch button changes. Since each touch button is actually equivalent to a capacitor, the current key value of the touch button can be an electrical signal of the capacitor corresponding to the touch button. When normal operation begins, the current key value will change accordingly as the button is used or affected by the environment. The controller in the touch device can determine whether the current key value is within a normal range based on the current key value. If the current key value is within the normal range, the touch button is in a normal state. Otherwise, the controller can clear the current key value of the touch button to zero and reset the triggering process of the touch button.

[0060] In addition, the touch device used in the present application is provided with a metal casing of the entire device configuration. And the power cord of the touch device needs to be grounded. Under conditions of high ambient humidity, the touch buttons are easily affected by the environment, resulting in problems such as key jumping. Therefore, using the touch button control method of the present application can make the touch device more stable. The touch button control method of the present application is mainly used to test whether the current key value of a button is a sudden change. If the current key value of the button exceeds the threshold after the button is touched, the button needs to be cleared. If the current key value of the button becomes higher but does not reach the threshold after the first touch of the button, and the current key value of the button is less than the current key value of the first touch after the second touch of the button, it is a rapid sudden change and the button needs to be cleared.

[0061] The following specific embodiments are used to describe the technical solution of the present application in detail. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0062] Figure 1 FIG. 1 shows a schematic structural diagram of a touch device provided by an embodiment of the present application. Figure 1 As shown, the touch device may include a touch button. During the touch device testing process, a user may use an electrostatic gun to output a voltage to the touch button to trigger the touch button. Alternatively, during use of the touch device, a user may touch the touch button to trigger the touch button. A measuring device may be provided within the touch device to measure the key value of the touch button. The measuring device may transmit the measured key value to a controller. The controller may then perform a corresponding operation based on the key value.

[0063] In this application, the controller in the touch device is used as the execution entity to execute the touch key control method of the following embodiments. Specifically, the execution entity can be a hardware device of the controller, or a software application in the controller that implements the following embodiments, or a computer-readable storage medium that has installed thereon the software application that implements the following embodiments, or the code of the software application that implements the following embodiments.

[0064] Figure 2 FIG1 shows a flow chart of a touch key control method provided by an embodiment of the present application. Figure 1 Based on the embodiment shown, Figure 2 As shown, with the controller as the execution subject, the method of this embodiment may include the following steps:

[0065] S101. Obtain a current key value of a key, where the current key value is used to indicate an electrical signal of a key pressed at a current moment.

[0066] In this embodiment, the controller obtains the current key value of each key. The current key value indicates the electrical signal of the key at the current moment. The controller can obtain the voltage signal of the key in real time using a measuring device provided in the touch-sensitive device. The controller can calculate the current key value of the key at the current moment based on the voltage signal.

[0067] S102: Compare the current key value with the key threshold to determine whether the current key value of the key exceeds a normal range.

[0068] In this embodiment, a key threshold may be configured in the controller. This threshold indicates the maximum value that may be achieved under normal use. For example, if a user presses the key firmly and for a long time, the maximum value that can be measured is 70. The controller may then set this threshold to 65. When the current key value exceeds the threshold, the controller may determine that the current key value is outside the normal range. In this case, the key may be considered to have been triggered abnormally. Otherwise, the controller may determine that the key is in a normal state.

[0069] In one example, before executing the above steps, the controller may further adjust the current key value to the historical key value when the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, wherein the historical key value is the current key value at the previous moment.

[0070] S103: When the current key value exceeds a normal range, the current key value of the key is cleared.

[0071] In this embodiment, when the controller determines that the current key value exceeds the normal range, the controller may reset the current key value of the key. Since the current key value of a key accumulates during continuous pressing, in one case, when the accumulated current key value exceeds the normal range, the current key value may be reset, i.e., the key may be reset. Alternatively, if the current key value suddenly exceeds the normal range during a trigger, it may be considered that the trigger is abnormal. In this case, the key may be reset to reset the current key value.

[0072] The touch key control method provided in the present application is a method in which the controller obtains the current key value of each key. The current key value is used to indicate the electrical signal of the key at the current moment. When the current key value is greater than the key threshold, the controller can determine that the current key value is out of the normal range. When the controller determines that the current key value is out of the normal range, the controller can clear the current key value of the key to zero. In the present application, by obtaining the current key value, a more detailed division of the current key value of the key is achieved, and the current key value that may be abnormal is filtered out. By filtering the current key value of the key, the sensitivity of the key is improved.

[0073] Figure 3 FIG1 shows a flow chart of a touch key control method provided by an embodiment of the present application. Figure 1 and Figure 2 Based on the embodiment shown, Figure 3 As shown, with the controller as the execution subject, the method of this embodiment may include the following steps:

[0074] S201. Obtain a current key value of a key, where the current key value is used to indicate an electrical signal of a key pressed at a current moment.

[0075] Among them, step S201 and Figure 2 The implementation of step S101 in the embodiment is similar and will not be described in detail in this embodiment.

[0076] S202: Adjust the key count value according to the current key value and the historical key values ​​of the key.

[0077] In this embodiment, the controller may also be provided with a key count value. The key count value may be initialized to 0 when the touch device is powered on. The controller may adjust the key count value based on the current key value and the historical key value each time the controller obtains the current key value and the historical key value. The adjustment may specifically include the following two methods:

[0078] When the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter, the controller can adjust the count value to the sum of the count value and the second parameter. In this case, it can be considered that the change in the current key value is greater than the normal change that may occur compared to the historical key value. This situation may specifically include that the current key value is greater than or equal to the sum of the historical key value and the first parameter, and that the current key value is less than or equal to the difference between the historical key value and the first parameter. The controller needs to adjust the count value for this situation to record the situation of this mutation. Therefore, the controller can adjust the count value to the sum of the count value and the second parameter. The second parameter is used to record this mutation. The setting of the second parameter is related to the number of mutations that the touch device can tolerate.

[0079] When the absolute value of the difference between the current key value and the historical key value is less than the first parameter and the count value is not zero, the count value is adjusted to the difference between the count value and the third parameter. This situation can specifically include the current key value being less than the sum of the historical key value and the first parameter, and the current key value being greater than the difference between the historical key value and the first parameter. In this case, the change in the current key value is within a normal range, so the controller can adjust the count value to the difference between the count value and the third parameter. The setting of the third parameter can be used to record the current key value.

[0080] The first parameter, the second parameter, and the third parameter may be three values ​​set by the administrator based on experience. For example, the first parameter may be 4, 5, or 6. For another example, the second parameter may be 1, 2, or 4. For another example, the third parameter may be 1, 2, or 3.

[0081] S203: When the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, adjust the current key value to the historical key value.

[0082] S204: Compare the current key value with the key threshold to determine whether the current key value of the key exceeds a normal range.

[0083] Among them, steps S202 and S203 are Figure 2 The implementation of steps S102 and S103 in the embodiment is similar and will not be described in detail in this embodiment.

[0084] S205: When the current key value is greater than the key threshold, the controller may adjust the count value to a fourth parameter. The fourth parameter may be a parameter greater than the count threshold. The fourth parameter is set to ensure that the count value is greater than or equal to the count threshold.

[0085] S206: Compare the count value of the key and the count threshold, where the count value is used to indicate a sudden change in the current key value of the key.

[0086] In this embodiment, the controller can determine whether the number of sudden changes in a key on the touch device has reached the touch device's tolerance range by comparing the count value with a count threshold. Because the count value increases by a second parameter each time the current key value of the key suddenly changes, the controller can determine that the number of sudden changes has exceeded the touch device's tolerance range when the count value is greater than or equal to the count threshold. Otherwise, the controller can determine that the sudden change in the key is within the touch device's tolerance range.

[0087] S207: When the count value of the key is greater than or equal to the count threshold, the current key value of the key is cleared.

[0088] In this embodiment, when the count value of a key is greater than or equal to the technical threshold, the controller can determine that the key of the touch device is abnormal. Therefore, the controller can reset the current key value of the key to zero so that the key can continue to be pressed.

[0089] In the touch key control method provided in this application, a controller obtains the current key value of each key. This current key value indicates the electrical signal of the key at the current moment. When the absolute value of the difference between the current key value and the historical key value of a key is greater than or equal to a first parameter, the current key value is adjusted to the historical key value. Simultaneously, the controller adjusts the key count value based on the current key value and the historical key value of the key. The controller compares the current key value with a key threshold to determine whether the current key value of the key exceeds a normal range. When the current key value is greater than the key threshold, the controller may adjust the count value to a fourth parameter. This fourth parameter may be a parameter greater than the count threshold. This fourth parameter is set to ensure that the count value is greater than or equal to the count threshold. The controller can determine whether the number of sudden key changes in the touch device is within the tolerance range of the touch device by comparing the count value with the count threshold. When the count value of the key is greater than or equal to the count threshold, the current key value of the key is reset to zero. In this application, by obtaining the key count value, the icon status of the key in the touch device is controlled and the sensitivity of the key is improved.

[0090] Based on the above embodiments, the flow chart of this embodiment can be as follows: Figure 4 Parameter A is used to represent the current key value, parameter B is used to represent the historical key value, and parameter C is used to represent the count value. The specific steps may include:

[0091] S301: The touch device is powered on and initialized.

[0092] S302: After the touch device is powered on and initialized, the controller may initialize parameter A and parameter B to X. X may be a specific value, which may be an empirical value. The controller may also initialize parameter C to 0.

[0093] S303: After the controller completes initialization, the touch-sensitive device can begin normal operation. During normal operation, the controller can obtain the current key value of the key in real time. Alternatively, the controller periodically obtains the current key value according to a preset period. Each time the controller obtains the current key value, the controller needs to complete a corresponding detection.

[0094] S304: After the controller obtains the current key value, the controller first determines whether the current key value is greater than the historical key value. If the determination result is yes, the controller executes S305; otherwise, the controller executes S306.

[0095] S305: When S304 is satisfied, the controller will further determine whether the current key value is greater than the sum of the historical key value and the first parameter. Figure 4 In the example, the first parameter may be 4. When the judgment result is yes, S312 is executed, otherwise S309 is executed.

[0096] S306: When S304 is not satisfied, the controller determines whether the current key value is less than the historical key value. If the determination result is yes, S307 is executed, otherwise S308 is executed.

[0097] S307: When S306 is satisfied, the controller further determines whether the sum of the current key value and the first parameter is less than the historical key value. If the determination result is yes, S312 is executed; otherwise, S310 is executed.

[0098] S308. When S306 is not satisfied, the controller will execute S314 when the count value is not 0.

[0099] S309: If S305 is not satisfied, the controller determines whether the current key value is less than the sum of the historical key values ​​and the first parameter, and the count value is not 0. If yes, S311 is executed, otherwise S313 is executed.

[0100] S310: If S307 is not satisfied, the controller determines whether the sum of the current key value and the first parameter is greater than or equal to the historical key value, and the count value is not 0. If yes, S314 is executed, otherwise S313 is executed.

[0101] S311: When S309 is satisfied, the controller adjusts the count value to the difference between the count value and the third parameter. Figure 4 , the third parameter is 1.

[0102] S312: When S305 or S307 is satisfied, the controller adjusts the count value to the sum of the count value and the second parameter. Figure 4 In the example, the second parameter is 4. At this point, the absolute value of the difference between the current key value and the historical key value is greater than the first parameter. At this point, it can be considered that the current key value has experienced a sudden change. To record this sudden change, the controller can add the second parameter to the count value to record this sudden change.

[0103] S313: When S312 is completed, or S309 or S310 is not satisfied, the controller adjusts the current key value to a historical key value.

[0104] S314: When S310 is satisfied, the controller adjusts the count value to the difference between the count value and the third parameter.

[0105] S315. After completing S311 or S313 or S314, the controller may output parameter A.

[0106] S316: The controller can compare the current key value with the key threshold. Figure 4 As shown, the key threshold can be 0XF0. This value is in hexadecimal, and after conversion to decimal, it is 240. When the current key value is greater than the key threshold, S317 is executed, otherwise, S318 is executed.

[0107] S317: When the current key value is greater than the key threshold, the controller may determine that the current key value is outside a normal range. The controller may assign the count value to a fourth parameter. The fourth parameter may be 10. The fourth parameter is a parameter greater than the count threshold and determined based on the count threshold. The fourth parameter is set to ensure that the key value is reset to zero when the current key value is abnormal.

[0108] S318: The controller can compare the count value with the count threshold. Figure 4 As shown, the key threshold can be 8. When the count value is greater than or equal to the count threshold, it can be determined that the key is abnormal. Therefore, when the judgment result is yes, execute S319, otherwise end the loop.

[0109] S319. The controller control button value is cleared.

[0110] When the cycle is finished, the controller will obtain the next current key value and execute the above steps again until the test of the touch device is finished or the touch device is powered off.

[0111] Figure 5 FIG. 1 shows a schematic structural diagram of a touch key control device provided by an embodiment of the present application. Figure 5 As shown, the touch key control device 10 of this embodiment is used to implement the operation corresponding to the controller in any of the above method embodiments. The touch key control device 10 of this embodiment includes:

[0112] An acquisition module 11 is used to acquire a current key value of a key, where the current key value is used to indicate an electrical signal of a key pressed at the current moment;

[0113] The processing module 12 is configured to compare the current key value with the key threshold to determine whether the current key value of the key exceeds a normal range; when the current key value exceeds the normal range, the current key value of the key is cleared to zero.

[0114] Optionally, the acquisition module 11 is specifically configured to:

[0115] Get the voltage signal of the key in real time;

[0116] Calculate the current key value of the key at the current moment according to the voltage signal.

[0117] Optionally, the processing module 12 is further configured to:

[0118] When the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, the current key value is adjusted to the historical key value; wherein the historical key value is the current key value at the previous moment.

[0119] Optionally, the processing module 12 is further configured to:

[0120] Compare the key count value with the count threshold, where the count value is used to indicate the sudden change of the key value.

[0121] When the count value of the button is greater than or equal to the count threshold, the current button value of the button is cleared.

[0122] Optionally, the processing module 12 is further configured to:

[0123] Adjust the key count value according to the current key value and the historical key value of the key; wherein the historical key value is the current key value at the previous moment.

[0124] Optionally, the processing module 12 is specifically configured to:

[0125] When the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter, the count value is adjusted to the sum of the count value and the second parameter;

[0126] When the absolute value of the difference between the current key value and the historical key value is smaller than the first parameter and the count value is not zero, the count value is adjusted to the difference between the count value and the third parameter.

[0127] The touch button control device 10 provided in the embodiment of the present application can execute the above method embodiment. Its specific implementation principles and technical effects can be found in the above method embodiment, and this embodiment will not be repeated here.

[0128] Figure 6 FIG. 1 shows a hardware structure diagram of a controller provided in an embodiment of the present application. Figure 6 As shown, the controller 20 is used to implement the operations corresponding to the controller in any of the above method embodiments. The controller 20 of this embodiment may include: a memory 21 and a processor 22.

[0129] Memory 21 is used to store computer programs. Memory 21 may include high-speed random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. It may also be a USB flash drive, a mobile hard drive, a read-only memory, a magnetic disk, or an optical disk.

[0130] The processor 22 is used to execute the computer program stored in the memory to implement the touch key control method in the above embodiment. For details, please refer to the relevant description in the above method embodiment. The processor 22 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.

[0131] Optionally, the memory 21 may be independent or integrated with the processor 22 .

[0132] When the memory 21 is a device independent of the processor 22, the controller 20 may further include a bus 23. The bus 23 is used to connect the memory 21 and the processor 22. The bus 23 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of this application are not limited to only one bus or one type of bus.

[0133] The controller provided in this embodiment can be used to execute the above-mentioned touch key control method. Its implementation method and technical effects are similar and will not be described in detail in this embodiment.

[0134] The present application also provides a touch device, wherein the touch device is provided with at least one touch button and Figure 6 Controller shown.

[0135] The present application also provides a computer-readable storage medium, in which computing instructions are stored. When the computing instructions are executed by a processor, they are used to implement the methods provided in the various embodiments described above.

[0136] Among them, the computer-readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a computer-readable storage medium is coupled to a processor so that the processor can read information from the computer-readable storage medium and write information to the computer-readable storage medium. Of course, the computer-readable storage medium can also be an integral part of the processor. The processor and the computer-readable storage medium can be located in an application-specific integrated circuit (ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the computer-readable storage medium can also exist in a communication device as discrete components.

[0137] Specifically, the computer-readable storage medium 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. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0139] The modules may be physically separate, for example, installed in different locations on a single device, or installed on different devices, or distributed across multiple network units, or distributed across multiple processors. The modules may also be integrated, for example, installed in the same device, or integrated into a set of codes. The modules may exist in the form of hardware, or in the form of software, or may be implemented in the form of software plus hardware. The present application may select some or all of the modules according to actual needs to achieve the purpose of the present embodiment.

[0140] When each module is implemented as an integrated module in the form of a software function module, it can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the methods of each embodiment of the present application.

[0141] It should be understood that, although the various steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they may be performed in other orders. Moreover, at least a portion of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed at the same time, but may be performed at different times, and their execution order is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of sub-steps or stages of other steps.

[0142] Finally, it should be noted that the above embodiments are intended only to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the aforementioned embodiments, those skilled in the art will appreciate that they may modify the technical solutions described in the aforementioned embodiments or replace some or all of the technical features therein with equivalents. However, such modifications or replacements do not deviate from the essence of the corresponding technical solutions within the scope of the various embodiments of this application.

Claims

1. A touch key control method, characterized in that: The method comprises: Obtaining a current key value of a key, where the current key value is used to indicate an electrical signal of the key at the current moment; When the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter, the count value is adjusted to the sum of the count value and the second parameter; wherein the historical key value is the current key value at the previous moment; When the absolute value of the difference between the current key value and the historical key value is less than the first parameter, and the count value is not zero, adjusting the count value to the difference between the count value and the third parameter; When the current key value is greater than the key threshold, adjusting the count value to a fourth parameter, the fourth parameter being greater than the count threshold; Comparing the count value of the key with the count threshold, the count value being used to indicate a sudden change in the current key value of the key; When the count value of the button is greater than or equal to the count threshold, the current button value of the button is cleared.

2. The method according to claim 1, characterized in that The step of obtaining the current key value of a key includes: Acquire the voltage signal of the key in real time; The current key value of the key at the current moment is calculated according to the voltage signal.

3. The method according to claim 1, characterized in that Before comparing the current key value with the key threshold to determine whether the current key value of the key exceeds a normal range, the method further includes: When the absolute value of the difference between the current key value and the historical key value of the key is greater than or equal to the first parameter, the current key value is adjusted to the historical key value; wherein the historical key value is the current key value at the previous moment.

4. A touch key control device, characterized in that: The device comprises: An acquisition module, configured to acquire a current key value of a key, wherein the current key value is used to indicate an electrical signal of the key at a current moment; A processing module is configured to adjust the count value to the sum of the count value and the second parameter when the absolute value of the difference between the current key value and the historical key value is greater than or equal to the first parameter; wherein the historical key value is the current key value at the previous moment; when the absolute value of the difference between the current key value and the historical key value is less than the first parameter and the count value is not zero, adjust the count value to the difference between the count value and the third parameter; when the current key value is greater than a key threshold, adjust the count value to a fourth parameter, wherein the fourth parameter is greater than the count threshold; compare the count value of a key with the count threshold, wherein the count value is used to indicate a sudden change in the current key value of the key; and when the count value of the key is greater than or equal to the count threshold, clear the current key value of the key.

5. A controller, characterized in that: The controller includes: a memory and a processor; The memory is used to store calculation instructions; the processor is used to implement the touch key control method according to any one of claims 1 to 3 according to the calculation instructions stored in the memory.

6. A touch device, characterized in that: The touch device is provided with at least one touch button and the controller as shown in claim 5.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, which, when executed by a processor, are used to implement the touch key control method according to any one of claims 1 to 3.