Touch signal recognition method, device and electronic device for touch button
By calculating the tolerance value and duration of the touch buttons, distinguishing liquid interference from finger touch, solving the problem of false triggering in the prior art, and achieving high accuracy and stability in the use of touch buttons in complex environments.
Patent Information
- Application Number
- CN202411476333.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-10-22
AI Technical Summary
Existing touch buttons are easily triggered incorrectly in liquid coverage or other disturbing environments, and cannot work normally, resulting in poor user experience, especially in outdoor, bathroom and other scenarios.
By defining the first reference capacitance value and the second reference capacitance value, calculating the difference and duration, distinguishing between real touch signals and interference signals, setting capacitance thresholds and time thresholds to distinguish liquid interference from finger touch, ensuring accurate identification and reduction Triggered by mistake.
It realizes accurate identification of real touch signals and interference signals in complex environments, improves anti-interference and stability, avoids false triggering, and ensures that the touch buttons are used normally in liquid or other interference environments.
Smart Images

Figure CN119002732B_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of touch technology, and in particular to a touch signal recognition method, device and electronic equipment for a touch button. Background Art
[0002] With the diversification and intelligence of electrical appliances, more and more electrical appliances need to be equipped with touch buttons. Different electrical appliances have different application occasions and environments. The existing touch technology is greatly affected by interference and is prone to false triggering.
[0003] Most of the touch buttons commonly seen on the market use capacitive touch detection. The fatal disadvantage of capacitive touch detection is that capacitive sensing can sense any object with a certain degree of conductivity, resulting in weak anti-interference ability of capacitive touch detection and easy false triggering. The most common effect in daily life is the impact of liquids (such as water) on touch buttons. Since water accounts for about 70% of the human body, the changes in capacitive sensing when a button is touched by a human hand and when a button is covered by water are very similar, which can easily lead to false triggering of buttons. At the same time, the design of touch button functions often involves multi-key suppression. When liquid causes one of the buttons to be falsely triggered, it will suppress the keystrokes of other buttons, causing the buttons to malfunction and the human hand to be unable to control the buttons normally until the liquid on the touch panel is wiped dry before returning to normal.
[0004] However, as people's requirements for quality of life become higher and higher, touch buttons have been favored by consumers due to their unique operational advantages and beautiful design. Touch products have entered thousands of households. Existing touch products cannot work properly in an environment where liquid covers the touch buttons. For example, touch screen mobile phones will be falsely triggered when there is water, and fingers cannot be triggered normally. Shower controllers mostly use mechanical buttons to avoid false triggering of touch buttons when water is sprayed. The structural design of dishwashers often needs to avoid water covering the touch panel, which limits the product design and poor user experience.
[0005] In the prior art, the difference between the real-time value of the capacitive touch button and the reference value is detected to determine whether a button is touched. However, only focusing on the difference cannot distinguish whether the button is touched by a human hand or covered by liquid (or other interference). The actual application scenario requires that the use environment is dry and the electromagnetic power grid environment is stable, and the application scenario requirements are high, resulting in many products being unable to use touch buttons and poor user experience. It is easy to trigger by mistake when there is liquid or other interference, and it cannot be controlled by hand, making it difficult to use the touch button normally. Summary of the invention
[0006] The technical problem to be solved by the present invention is to provide a touch signal recognition method, device and electronic device for a touch button, which can accurately identify real touch signals and interference touch signals, thereby realizing the effective use of touch buttons in complex environmental scenarios.
[0007] To solve the above technical problems, in a first aspect, the present invention provides a method for identifying touch signals of a touch button, including: defining a first reference capacitance value A and a second reference capacitance value B, and detecting a real-time capacitance value C of the touch button; at time t0, the first reference capacitance value A t0 and the second reference capacitance value B t0 are both assigned the capacitance value C t0 ; at time tn, calculate a first difference X tn =C tn -A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch button detected at time tn, and A tn-1 is the first reference capacitance value at time tn-1, n≥1; judge the relationship between the first difference X tn and the capacitance threshold D. When X tn <D / 4, then the first reference capacitance value A tn and the second reference capacitance value B tn are both assigned the capacitance value C tn ; when D / 4<X tn <D, record the first duration T1 of D / 4<X tn <D. If T1>Ts or T1<Ts / 2, it indicates that the current touch signal is an interfering touch signal. If Ts / 2<T1<Ts, it indicates that the current touch signal is a real touch signal, where Ts represents the time threshold.
[0008] Optionally, the capacitance threshold D and the time threshold Ts are values set to distinguish interfering touch signals generated by liquids or other interferences from real touch signals generated by finger touches.
[0009] Optionally, it further includes: calculating a second difference Y tn =A tn -B tn , where the first reference capacitance value A tn and the second reference capacitance value B tn are the capacitance values assigned at time tn.
[0010] Optionally, the second difference Y tn is calculated at each touch signal detection time.
[0011] Optionally, when D / 4<X tn <D and T1>Ts or T1<Ts / 2, calculate the second difference Y tn .
[0012] Optionally, if the second difference Y tn is greater than 0, it indicates that the touch signal of the touch button is an interfering touch signal.
[0013] Optionally, when D / 4 < X tn < D, and the first duration Ts / 2 < T1 < Ts, then it is determined that after X tn > D starts, the second duration T2 during which X tn > D remains. If the second duration T2 includes at least the time of two sampling points, it indicates that the touch signal is a real touch signal.
[0014] In a second aspect, the present invention provides a touch signal recognition device for a touch button, including: a detection module, configured to define a first reference capacitance value A and a second reference capacitance value B, and detect a real-time capacitance value C of the touch button; an initialization module, configured to, at time t0, assign the first reference capacitance value A t0 and the second reference capacitance value B t0 both to the capacitance value C t0 ; a calculation module, configured to, at time tn, calculate a first difference X tn = C tn - A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch button detected at time tn, and A tn-1 is the first reference capacitance value at time tn-1, n ≥ 1; a judgment module, configured to judge the relationship between the first difference X tn and a capacitance threshold D. When X tn < D / 4, then assign the first reference capacitance value A tn and the second reference capacitance value B tn both to the capacitance value C tn ; when D / 4 < X tn < D, record the first duration T1 during which D / 4 < X tn < D. If T1 > Ts or T1 < Ts / 2, it indicates that the current touch signal is an interfering touch signal. If Ts / 2 < T1 < Ts, it indicates that the current touch signal is a real touch signal, where Ts represents a time threshold.
[0015] In a third aspect, the present invention provides an electronic device, including: a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the touch signal recognition method for the touch button as described in the first aspect are implemented.
[0016] In a fourth aspect, the present invention provides a readable storage medium storing a program or instruction. When the program or instruction is executed by a processor, the steps of the touch signal recognition method for a touch key as described in the first aspect are implemented.
[0017] Compared with the prior art, the present invention has the following advantages: it can accurately identify real touch signals and interference touch signals, has strong anti-interference and stability; it can be triggered without error when there is a large amount of liquid covering the touch panel; it can be widely used in outdoor, bathroom, kitchen and other fields with liquid interference or other interference, and realizes the effective use of touch buttons in complex environmental scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are included to provide a further understanding of the present application. They are included and constitute a part of the present application. The accompanying drawings illustrate embodiments of the present application and together with the present specification serve to explain the principles of the present application. In the accompanying drawings:
[0019] Figure 1 is a schematic flow chart of a touch signal recognition method for a touch key according to an embodiment of the present invention;
[0020] Figure 2 1 is a schematic diagram of a model of X value changes when a finger touches a key in one embodiment of the present invention;
[0021] Figure 3 1 is a schematic diagram of a model of X value variation when liquid covers a touch key in one embodiment of the present invention;
[0022] Figure 4 It is a structural schematic diagram of a touch signal recognition device for a touch key according to an embodiment of the present invention;
[0023] Figure 5 FIG. 4 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.
[0025] As shown in this application and the claims, unless the context clearly indicates otherwise, words such as "a", "an", "one", and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of the clearly identified steps and elements, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.
[0026] In addition, it should be noted that the use of words such as "first" and "second" to limit components is only for the convenience of distinguishing the corresponding components. Without additional statements, the above words have no special meaning, so it cannot be understood as a limitation on the protection scope of this application. In addition, although the terms used in this application are selected from well-known and commonly used terms, some of the terms mentioned in the specification of this application may be selected by the applicant according to his or her judgment, and their detailed meanings are described in the relevant parts of this description. In addition, it is required to understand this application not only through the actual terms used, but also through the meaning implied by each term.
[0027] Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the previous or subsequent operations do not necessarily need to be performed precisely in sequence. On the contrary, they can be performed in reverse order or simultaneously. At the same time, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0028] Figure 1 is a schematic flowchart of a method for identifying touch signals of a touch button according to an embodiment of the present invention. Refer to Figure 1 As shown, method 100 includes: S110, defining a first reference capacitance value A and a second reference capacitance value B, and detecting the real-time capacitance value C of the touch button, which represents the quantization value of the parasitic capacitance value of the touch button; S120, at time t0, the first reference capacitance value A t0 and the second reference capacitance value B t0 are both assigned the capacitance value C t0 ; S130, at time tn, calculating a first difference X tn =C tn -A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch button detected at time tn, and A tn-1 is the first reference capacitance value at time tn-1, n≥1; S140, judging the relationship between the first difference X tn and the capacitance threshold D. When X tn <D / 4, then the first reference capacitance value A at time tn tnand the second reference capacitance value B tn are both assigned the capacitance value C tn ; when D / 4 < X tn < D, record the first duration T1 of D / 4 < X tn < D. If T1 > Ts or T1 < Ts / 2, it indicates that the current touch signal is an interfering touch signal. If Ts / 2 < T1 < Ts, it indicates that the current touch signal is a real touch signal, where Ts represents the time threshold.
[0029] The biggest difference between an interfering touch signal, especially the interference signal generated by liquid covering the touch button, and a real touch signal is the different speeds of capacitance value change they cause. For example, Figure 2 is a schematic diagram of the X value change model when a finger touches a button in an embodiment of the present invention, Figure 3 is a schematic diagram of the X value change model when a liquid covers a touch button in an embodiment of the present invention. Referring to Figure 2 and Figure 3 as shown, when a finger touches the touch button, the X slope is large, indicating that the capacitance value changes faster, while when a liquid covers the touch button, the slope is small, indicating that the capacitance value changes slower. Of course, there is also a jitter situation in the X slope when a liquid covers the touch button. This embodiment realizes the effective identification of touch signals according to the different characteristics of finger touch and liquid covering the touch button.
[0030] This embodiment introduces two references (or reference lines), namely the first reference capacitance value A and the second reference capacitance value B. By corresponding calculations, the difference between the reference and the capacitive touch button data after the real-time detected capacitance value of the touch button is obtained, so as to determine the update speed of the reference, ensuring normal touch button control and detecting the existence of interference (such as liquid) at the same time, making corresponding processing in time, and then being able to operate the machine normally and make corresponding alarms. In this embodiment, the update of the reference is to assign a value to the reference when the update condition of the reference is met.
[0031] In an example, the capacitance threshold D and the time threshold Ts are set values for distinguishing the interfering touch signal generated by liquid from the real touch signal generated by finger touch.
[0032] When environmental changes (such as humidity, temperature, etc.) occur around the touch button, the real-time capacitance value C of the touch button detected will also change, but this change is not obvious. Among various interference factors, the most obvious one is the interference generated by liquid. Since liquid interference is the most common, the capacitance threshold D and the time threshold Ts are often set with the goal of distinguishing finger touch and liquid covering interference. It can be understood that the specific capacitance threshold D and time threshold Ts need to be determined according to the specific situation of the touch button, and no specific limitation is made here, but it does not affect the understanding of the essence of this embodiment.
[0033] In one example, the method of this embodiment further includes calculating a second difference Y tn =A tn -B tn , where the first reference capacitance value A tn and the second reference capacitance value B tn are the capacitance values after assignment at time tn, and the second difference Y can be calculated at each touch signal detection time tn , or when D / 4 < X tn < D and T1 > Ts or T1 < Ts / 2, calculate the second difference Y tn .
[0034] As described above, when the environment around the touch button changes (such as humidity, temperature, etc.), the real-time capacitance value C of the touch button will also change, but this change is not obvious. In addition, the first reference capacitance value A and the second reference capacitance value B also change with the real-time capacitance value C. In most cases, there is no difference between the first reference capacitance value A and the second reference capacitance value B. When there is a strong interference signal, such as liquid interference, based on the method of this embodiment, the first reference capacitance value A will continue to be updated, while the second reference capacitance value B remains the value of the previous moment. In this case, a difference is generated between the first reference capacitance value A and the second reference capacitance value B. It can be seen that the second difference Y (at time tn, represented by Y tn ) is a judgment parameter for characterizing whether there is liquid interference, so it needs to be calculated. In this embodiment, since the values of the first reference capacitance value A and the second reference capacitance value B are the same in most cases, the second difference Y tn is always equal to 0. From the perspective of operation efficiency, this method can calculate the second difference Y tn when D / 4 < X tn < D and T1 > Ts or T1 < Ts / 2. On the other hand, from the perspective of the accuracy and reliability of touch signal recognition, in order to exclude the influence of accidental factors, this method can also calculate the second difference Y tn at each touch signal detection time.
[0035] In one example, if the second difference Y tn is greater than 0, it indicates that the current touch signal of the touch button is an interfering touch signal.
[0036] In this embodiment, the second difference Y tn is a judgment parameter for characterizing whether there is liquid or other large interference. If the second difference Y tnIf it is greater than 0, it means that the current touch button situation is that the capacitance value has a large change, which excludes the influence of the environment on the touch button. If the duration of this change in the range of D / 4 to D is different from that of finger touch, that is, T1 > Ts or T1 < Ts / 2, it excludes the normal finger touch situation, and then it can be known that the touch signal of the touch button is an interference touch signal.
[0037] In an example, when D / 4 < X tn < D, and the first duration Ts / 2 < T1 < Ts, then it is determined that X tn > After D starts, keep X tn > The second duration T2 of the D state. If the second duration T2 includes at least the time of two sampling points, it means that the touch signal is a real touch signal.
[0038] Due to accidental factors, these accidental factors will also produce an effect similar to that of a finger touching a button, but the touch effect produced by these accidental factors will not exist for a long time. Therefore, in order to more accurately judge the current touch signal situation, when X tn > D, and X tn > The D state lasts for a period of time, then it is determined that a finger touches the button, excluding the influence produced by accidental factors.
[0039] In one implementation, assume that when there is no finger touch and liquid coverage, the capacitance value C = 5000. At this time, both the first reference capacitance value A and the second reference capacitance value B are equal to the capacitance value C, that is, A = B = 5000. The power-on initial state will default to no finger touch and liquid coverage, that is, when powering on initially, the first reference capacitance value A and the second reference capacitance value B will be initialized to the capacitance value C. When the environment around the touch button changes (such as humidity, temperature, etc.), the capacitance value C will change. Since the changes in the environment are all slow processes, it takes dozens of seconds or even several months for the changes that affect the touch function to occur. Therefore, the influence of the environment on the capacitance value C is a slow change process. When the environment changes, both the first reference capacitance value A and the second reference capacitance value B will change slowly following the capacitance value C, and the changes of the first reference capacitance value A and the second reference capacitance value B will lag behind the capacitance value C. For example, at the moment tn, calculate the first difference X tn = C tn - A tn-1 , where X tn represents the first difference at the moment tn, C tn is the capacitance value of the touch button detected at the moment tn, A tn-1 is the first reference capacitance value at the moment tn - 1. Therefore, the magnitude of the first difference X tn can characterize the speed of change of the capacitance value C, X tnThe larger the absolute value of X is, the faster the capacitance value C changes. Conversely, the slower it changes. When only the inherent environment around the touch button changes without finger touch or liquid coverage, the value of X tn is very small. Generally, the value of X tn will fluctuate around 0.
[0040] When X tn is in different size ranges, it represents different touch signal generation situations. The following gives examples of X tn in different size ranges. Assume the capacitance threshold D is 200, then:
[0041] a. When X tn < D / 4, that is, when X tn < 50, both the first reference capacitance value A and the second reference capacitance value B will synchronously follow the update of the capacitance value C. At this time, the first reference capacitance value A and the second reference capacitance value B are equal. Exemplarily, at time tn, then A tn = B tn = C tn . When the capacitance value C does not change rapidly continuously, the first reference capacitance value A and the second reference capacitance value B will gradually approach the capacitance value C until they are basically equal to the capacitance value C. At this time, X tn will tend to 0 again, and the situation of X tn > D / 4 will not occur.
[0042] b. When D / 4 < X tn < D, it is considered that there may be finger touch on the button or liquid covering the button at this time. By detecting the duration T1 of X tn falling within D / 4~D, it is determined whether it is liquid covering the button or finger touching the button. Assume the set time threshold is Ts = 20ms, then:
[0043] When T1 > 20ms or T1 < 10ms, it is liquid covering the touch button. At this time, the first reference capacitance value A of the touch button is updated quickly, reducing C tn - A tn = X tn = X tn to avoid the value of X tn from entering the X tn > D interval, thus avoiding mis-triggering of the touch button. And the second reference capacitance value B tn will not be updated in this stage. So there is a difference between the first reference capacitance value A tn and the second reference capacitance value B tn , denoted as Y tn . In other intervals, the value of Y tn is 0. Through Y tnThe size can be used to determine whether there is liquid coverage and give a signal for the liquid coverage button, for the actual project to make corresponding processing.
[0044] When 10ms < T1 < 20ms, it is a finger touching the touch button. At this time, the first reference capacitance value A tn and the second reference capacitance value B tn are not updated. The first reference capacitance value A tn and the second reference capacitance value B tn remain equal, then Y tn = 0. As the capacitance value C increases, C tn - A tn = X tn may be greater than the capacitance threshold D and enter the X tn > D interval. When X tn is greater than the capacitance threshold D and lasts for a period of time, it is determined as a finger touching the button.
[0045] c. When X tn > D and lasts for a period of time T2, it is further determined as a finger touching the touch button and gives a signal for the finger touch button, for the actual project to make corresponding processing.
[0046] It can be understood that the specific implementation methods achievable in this embodiment are not limited to this. The core lies in detecting the change model of the real-time capacitance value C (including the change magnitude, slope, fluctuation situation, etc.), thereby determining the update speed of the first reference capacitance value A and the second reference capacitance value B, and whether to update, and then judging whether it is interference such as liquid coverage or real finger touch.
[0047] The touch signal recognition method of the touch button in this embodiment can accurately recognize real touch signals and interference touch signals, and then effectively use the touch button in a complex environment. For example, it can effectively distinguish liquid interference and finger buttons, achieve effective touch in scenarios such as flushing, overflowing, and spraying water, and ensure that there will be no mis-triggering due to liquid interference, so as to meet the requirement that the touch button can still be used in a liquid environment and other complex scenarios.
[0048] Figure 4 is a schematic structural diagram of a touch signal recognition device for a touch button according to an embodiment of the present invention. Refer to Figure 4 shown. The device 400 mainly includes: a detection module 401, used to define the first reference capacitance value A and the second reference capacitance value B, and detect the real-time capacitance value C of the touch button; an initialization module 402, used to assign the capacitance value C t0 to both the first reference capacitance value A t0 and the second reference capacitance value B t0 at the moment t0.; A calculation module 403, configured to calculate a first difference X at time tn tn = C tn - A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch button detected at time tn, and A tn-1 is the first reference capacitance value at time tn-1, n ≥ 1; A judgment module 404, configured to judge the relationship between the first difference X tn and the capacitance threshold D. When X tn < D / 4, the first reference capacitance value A tn and the second reference capacitance value B tn at time tn are both assigned the capacitance value C tn ; When D / 4 < X tn < D, record the first duration T1 of D / 4 < X tn < D. If T1 > Ts or T1 < Ts / 2, it indicates that the current touch signal is an interfering touch signal. If Ts / 2 < T1 < Ts, it indicates that the current touch signal is a real touch signal, where Ts represents the time threshold.
[0049] In one example, the capacitance threshold D and the time threshold Ts are values set to distinguish the interfering touch signal generated by the liquid from the real touch signal generated by the finger touch.
[0050] In one example, the device 400 further includes an additional calculation module, configured to calculate a second difference Y tn = A tn - B tn , where the first reference capacitance value A tn and the second reference capacitance value B tn are the capacitance values after assignment at the current moment.
[0051] In one example, the second difference Y is calculated at each touch signal detection moment tn .
[0052] In one example, when D / 4 < X tn < D and T1 > Ts or T1 < Ts / 2, calculate the second difference Y tn .
[0053] In one example, the judgment module 404 further includes: If the second difference Y tn is greater than 0, it indicates that the touch signal of the touch button is an interfering touch signal.
[0054] In one example, the judgment module 404 further includes: When D / 4 < X tn < D, and the first duration Ts / 2 < T1 < Ts, then judge Xtn >D starts and then keeps X tn >The second duration T2 of the D state, if the second duration T2 includes at least two sampling points, it indicates that the touch signal is a real touch signal.
[0055] The details of other operations performed by each module in this embodiment can be referred to the aforementioned embodiments and will not be elaborated here.
[0056] The touch signal recognition device of the touch key of this embodiment can accurately identify the real touch signal and the interference touch signal, thereby realizing the effective use of the touch key in the scene with complex environment. For example, it can effectively distinguish between liquid interference and finger key, realize effective touch in the scene of flushing, overflowing, and pouring, and ensure that there will be no false triggering due to the interference of liquid, so as to meet the requirement that the touch key can still be used in the scene with complex liquid environment.
[0057] A touch signal recognition device for a touch key in the embodiment of the present application may be a device, or a component, integrated circuit, or chip in a terminal. A touch signal recognition device for a touch key in the embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0058] The present application also provides an electronic device, comprising: a memory for storing programs or instructions executable by a processor; and a processor for executing the above-mentioned programs or instructions to implement the various processes of the touch signal recognition method embodiment of the above-mentioned touch button, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0059] Figure 55 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device 500 may include an internal communication bus 501, a processor (Processor) 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, and a communication port 505. When applied to a personal computer, the electronic device 500 may also include a hard disk 506. The internal communication bus 501 can realize data communication between components of the electronic device 500. The processor 502 can make judgments and issue prompts. In some embodiments, the processor 502 can be composed of one or more processors. The communication port 505 can realize data communication between the electronic device 500 and the outside. In some embodiments, the electronic device 500 can send and receive information and data from the network through the communication port 505. The electronic device 500 may also include different forms of program storage units and data storage units, such as a hard disk 506, a read-only memory (ROM) 503 and a random access memory (RAM) 504, which can store various data files used for computer processing and / or communication, and possible programs or instructions executed by the processor 502. The processing result of the processor 502 is transmitted to the user equipment through the communication port 505 and displayed on the user interface.
[0060] The above-mentioned touch signal recognition method for a touch button can be implemented as a computer program, stored in the hard disk 506, and recorded in the processor 502 for execution to implement any touch signal recognition method for a touch button in the present application.
[0061] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the touch signal recognition method embodiment of the above-mentioned touch button is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0062] Similarly, it should be noted that in order to simplify the description of the disclosure of this application and thus help understand one or more embodiments of the invention, in the above description of the embodiments of this application, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the object of this application are more than the features mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.
[0063] Although the present application has been described with reference to the current specific embodiments, ordinary technicians in this technical field should recognize that the above embodiments are only used to illustrate the present application, and various equivalent changes or substitutions may be made without departing from the spirit of the present application. Therefore, as long as the changes and modifications to the above embodiments are within the essential spirit of the present application, they will fall within the scope of the claims of the present application.
Claims
1. A touch signal recognition method for a touch key, characterized in that: include: Define a first reference capacitance value A and a second reference capacitance value B, and detect a real-time capacitance value C of the touch button; At time t0, the first reference capacitance value A t0 and the second reference capacitance value B t0 are assigned the capacitance value C t0 ; At time tn, calculate the first difference X tn =C tn -A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch key detected at time tn, A tn-1 is the first reference capacitance value at time tn-1, n≥1; Calculate the second difference Y tn =A tn -B tn , where the first reference capacitance value is A tn and the second reference capacitance value B tn is the capacitance value after assignment at time tn; Determine the first difference X tn The relationship between the capacitance threshold D and X tn < D / 4, then the first reference capacitance value A at time tn is tn and the second reference capacitance value B tn are assigned the capacitance value C tn ; When D / 4 < X tn < D, record the first duration T1 of D / 4 < X tn < D. If T1 > Ts or T1 < Ts / 2, it indicates that the current touch signal is an interfering touch signal; if Ts / 2 < T1 < Ts, determine X tn > D and keep X after it starts tn > D for the second duration T2 of the state. If the second duration T2 includes at least the time of two sampling points, it indicates that the current touch signal is a real touch signal, where Ts represents the time threshold; the capacitance threshold D and the time threshold Ts are values set to distinguish the interfering touch signal generated by the liquid from the real touch signal generated by finger touch; If the second difference Y tn If it is greater than 0, it indicates that the touch signal of the touch key is an interference touch signal.
2. The touch signal recognition method of a touch key according to claim 1, characterized in that: The second difference Y is calculated at each touch signal detection moment. tn .
3. The touch signal recognition method of a touch key according to claim 1, characterized in that: When D / 4 < X tn < D and T1 > Ts or T1 < Ts / 2, calculate the second difference Y tn .
4. A touch signal recognition device for a touch key, characterized in that: include: A detection module, used to define a first reference capacitance value A and a second reference capacitance value B, and detect a real-time capacitance value C of the touch button; Initialization module, used for at time t0, the first reference capacitance value A t0 and the second reference capacitance value B t0 are assigned the capacitance value C t0 ; A calculation module is used to calculate the first difference X at time tn. tn =C tn -A tn-1 , where X tn represents the first difference at time tn, C tn is the capacitance value of the touch key detected at time tn, A tn-1 is the first reference capacitance value at time tn-1, n≥1; Additional calculation module, used to calculate the second difference Y tn =A tn -B tn , where the first reference capacitance value is A tn and the second reference capacitance value B tn is the capacitance value after assignment at time tn; A judgment module is used to judge the first difference X tn The relationship between the capacitance threshold D and X tn < D / 4, then the first reference capacitance value A at time tn is tn and the second reference capacitance value B tn are assigned the capacitance value C tn ; When D / 4 < X tn < D, record the first duration T1 of D / 4 < X tn < D. If T1 > Ts or T1 < Ts / 2, it indicates that the current touch signal is an interfering touch signal; if Ts / 2 < T1 < Ts, determine X tn > D and keep X after the start tn > D for the second duration T2 of the state. If the second duration T2 includes at least the time of two sampling points, it indicates that the current touch signal is a real touch signal, where Ts represents the time threshold; the capacitance threshold D and the time threshold Ts are values set to distinguish the interfering touch signal generated by the liquid from the real touch signal generated by finger touch; If the second difference Y tn If it is greater than 0, it indicates that the touch signal of the touch key is an interference touch signal.
5. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the touch signal recognition method for a touch key as described in any one of claims 1 to 3 are implemented.
6. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the touch signal recognition method for a touch key as described in any one of claims 1 to 3 are implemented.