CN117170532A - Touch key control method, device, equipment and storage medium - Google Patents

Touch key control method, device, equipment and storage medium Download PDF

Info

Publication number
CN117170532A
CN117170532A CN202311236249.8A CN202311236249A CN117170532A CN 117170532 A CN117170532 A CN 117170532A CN 202311236249 A CN202311236249 A CN 202311236249A CN 117170532 A CN117170532 A CN 117170532A
Authority
CN
China
Prior art keywords
key
touch
duration
touch key
state
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.)
Pending
Application number
CN202311236249.8A
Other languages
Chinese (zh)
Inventor
韦嘉
徐明燕
蔡碧娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202311236249.8A priority Critical patent/CN117170532A/en
Publication of CN117170532A publication Critical patent/CN117170532A/en
Pending legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Abstract

The invention relates to the technical field of touch key control, and discloses a touch key control method, a device, equipment and a storage medium, wherein the method comprises the following steps: recording the duration of touching the touch key when the touch key is in a key pressing state; judging whether the duration of touching the touch key reaches the preset duration of touching; and when the duration of the touch key being touched reaches the touch preset duration, controlling the touch key to be in a key release state. According to the invention, the problem that no reaction occurs when other key operations are performed due to misjudgment that the key is kept in an unclamped state for a long time due to noise interference or other reasons such as residual substances of the key after the key is pressed and released by touching the key can be solved, so that subsequent other key operations can be effectively performed, and the experience effect of a user is improved.

Description

Touch key control method, device, equipment and storage medium
Technical Field
The present invention relates to the field of touch key control technologies, and in particular, to a touch key control method, device, equipment, and storage medium.
Background
Touch keys are increasingly used in modern life, and the actual state of the key is often determined by the change of the touch signal of the key. However, when a key is pressed and released, the key is misjudged to remain in an unclamped state for a long time due to noise interference or other reasons such as residual substances in the key, so that no reaction is caused when other key operations are performed, and the effective proceeding of the subsequent other key operations is affected.
Disclosure of Invention
In view of the above, the present invention provides a touch key control method, apparatus, device and storage medium, which can update the key state after the key is pressed and released, so that other subsequent key operations can be effectively performed, so as to solve the technical problems set forth in the background above.
In a first aspect, the present invention provides a touch key control method, including:
recording the duration of touching the touch key when the touch key is in a key pressing state;
judging whether the duration of touching the touch key reaches the preset duration of touching;
and when the duration of the touch key being touched reaches the touch preset duration, controlling the touch key to be in a key release state.
According to the touch key control method, when the touch key is in the key pressing state, the touch time of the touch key is recorded, and the recorded touch time of the key is judged from the touch preset time, so that the touch key is controlled to be in the key releasing state when the touch preset time is reached. The invention can solve the problem that after the key is pressed and released, the key is misjudged to be in an unclamped state for a long time due to noise interference or other reasons such as residual substances in the key, so that no reaction is caused when other key operations are performed, and update processing is performed on the key state after the key is pressed and released, so that the subsequent other key operations can be effectively performed, and the experience of a user is improved.
In an alternative embodiment, when the touch key is in the key-down state, the touch key control method further includes:
calculating the variation of the touch signal based on the touch signal of the touch key and a reference signal, wherein the reference signal is the corresponding touch signal when the touch key is not pressed;
the current key state of the touch key is determined based on a relationship of the touch signal variation to a first touch signal threshold, the first touch signal threshold being greater than the reference signal.
According to the invention, the current key state of the touch key is determined by calculating the touch signal variation and judging the magnitude of the touch signal variation and the first touch signal threshold, so that the accuracy of a calculation result can be improved, and the true and accurate state of the current key can be obtained.
In an alternative embodiment, determining the current key state of the touch key based on the relationship between the touch signal variation and the first touch signal threshold includes:
judging whether the variation of the touch signal is larger than a first touch signal threshold value or not;
recording a first duration of time when the touch signal variation is not greater than the first touch signal threshold continuously;
when the first time length is longer than the first preset time length, determining that the current key state of the touch key is a key release state, and the first preset time length is the anti-shake time for releasing the touch key.
According to the invention, based on the judgment of the magnitude of the touch signal variation and the first touch signal threshold and the judgment of the magnitude of the first duration and the first preset duration of the touch signal variation which are not larger than the first touch signal threshold continuously, the erroneous judgment or the erroneous judgment of the current state of the touch key caused by signal jitter can be reduced by a multiple judgment mode of the variation and the variation duration, so that the judgment of the released state of the touch key is more accurate and reliable.
In an alternative embodiment, the touch key control method further includes:
recording a second duration of time when the touch signal variation is continuously larger than the first touch signal threshold when the touch signal variation is larger than the first touch signal threshold;
and when the second time length is longer than a second preset time length, determining that the current key state of the touch key is a key release state, wherein the second preset time length is the maximum pressing time length of the touch key, and the second preset time length is not longer than the touch preset time length.
According to the method and the device, based on the judgment of the magnitude of the touch signal variation and the first touch signal threshold and the judgment of the magnitude of the second duration and the second preset duration, in which the touch signal variation is continuously larger than the first touch signal threshold, the keys can be in a released state, so that subsequent other key operations can be effectively performed, and the user operation experience is improved.
In an alternative embodiment, the touch key control method further includes: and when the current key state of the touch key is a key release state, controlling the touch key to be in the key release state.
According to the method and the device, the current key state is accurately judged to be the key release state, and the corresponding touch key is controlled to be in the key release state, so that the problem that no response is caused when other key operations are performed due to misjudgment that the key remains in the non-release state for a long time after the key is pressed and released can be solved, the subsequent other key operations can be effectively performed, and the user operation experience is improved.
In an alternative embodiment, the touch key control method further includes: and when the duration of the touch key being touched does not reach the touch preset duration, executing the step of calculating the variation of the touch signal based on the touch signal and the reference signal of the touch key being touched.
According to the invention, through setting the determination of the key release state after the key is pressed and the cyclic execution mode of control, the misjudgment and misjudgment of the key release state can be reduced, and the more true and accurate touch key release state can be obtained.
In an alternative embodiment, the touch key control method further includes:
detecting whether a touch key is touched;
after a touch signal of a touch key is detected, calculating a touch signal variation according to a reference signal;
when the touch signal variation meets a preset key pressing condition, determining that the touch key is in a key pressing state, wherein the preset key pressing condition is that the touch signal variation is not smaller than a second touch signal threshold and the duration reaches a third preset duration, the third preset duration is anti-shake time of the touch key pressing, and the first touch signal threshold is smaller than the second touch signal threshold.
According to the invention, the touch key pressing state can be accurately obtained through judging the touch signal variation and the preset key pressing condition.
In a second aspect, the present invention provides a touch key control apparatus, the apparatus comprising:
the recording module is used for recording the duration of touching the touch key when the touch key is in the key pressing state;
the judging module is used for judging whether the duration of touching the touch key reaches the touch preset duration or not;
the control module is used for controlling the touch key to be in a key release state when the touch duration of the touch key reaches the touch preset duration.
According to the touch key control device provided by the invention, the touch key can be controlled to be in the key release state by judging the touched time length and the touch preset time length of the touch key, so that the problem that no reaction is caused when other key operations are performed because the key is erroneously judged to be in the non-release state for a long time due to noise interference or other reasons such as residual substances of the key after the key is pressed and released is solved.
In a third aspect, the present invention provides a touch key control apparatus, the apparatus comprising: the touch key control device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the touch key control method of the first aspect or any corresponding implementation mode is executed.
In an alternative embodiment, the touch keys are capacitive touch keys.
The capacitive touch key has the advantages of long service life, high sensitivity and wide application.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the touch key control method of the first aspect or any one of the embodiments corresponding thereto.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a touch key control method according to an embodiment of the invention;
fig. 2 is a schematic diagram of the touch signal of the present embodiment;
FIG. 3 is a flowchart of another touch key control method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram showing the flow of key release and key long press of the present embodiment;
fig. 5 is a schematic diagram of a key press flow in the present embodiment;
FIG. 6 is a flowchart of a touch key control method according to an embodiment of the present invention;
FIG. 7 is a block diagram of a touch key control apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a touch key control apparatus according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
With the wide application of touch keys in modern life, it is particularly important to accurately identify the true state of the touch key and respond to operation. However, in the use process of the touch key, when the key is pressed and released, the key is affected by the surrounding environment, such as water drops on the touch key, or the touch key is affected by electromagnetic interference or noise interference, so that the actual state of the touch key is easily misjudged as the key is kept in an unclamped state for a long time, and no response is caused when other key operations are performed, thereby affecting the effective performance of the subsequent other key operations. The invention provides a touch key control method, a device, equipment and a storage medium, which can solve the problem that after a touch key is pressed and released, the key is misjudged to remain in an unclamped state for a long time due to noise interference or other reasons such as residual substances in the key, so that no reaction is caused when other key operations are performed, so that subsequent other key operations can be effectively performed, and the experience effect of a user is improved.
According to an embodiment of the present invention, there is provided a touch key control method embodiment, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order other than that shown or described herein.
In this embodiment, a touch key control method is provided, fig. 1 is a schematic flow chart of the touch key control method according to an embodiment of the present invention, as shown in fig. 1, the flow includes the following steps:
in step S101, when the touch key is in the key-down state, the duration of the touch key being touched is recorded.
In this embodiment, when the touch key is touched, that is, the touch key is pressed, the timer automatically starts to record the corresponding pressing time.
Step S102, judging whether the duration of touching the touch key reaches the preset duration of touching.
In this embodiment, the specific value of the touch preset duration is not limited herein, and is set according to the actual application requirement. For example, the touch preset time period is 40s, which is merely illustrative.
Step S103, when the duration that the touch key is touched reaches the touch preset duration, the touch key is controlled to be in a key release state.
The touch key control method provided by the embodiment of the invention can update the key state after the key is pressed and released, so that other subsequent key operations can be effectively performed, and the problem that no reaction is caused when other key operations are performed because the key is erroneously judged to remain in the unclamped state for a long time due to noise interference or other reasons such as residual substances of the key after the key is pressed and released is solved.
In this embodiment, a touch key control method is provided, fig. 2 is a schematic flow chart of another touch key control method according to an embodiment of the present invention, as shown in fig. 2, the flow includes the following steps:
in step S201, when the touch key is in the key-down state, the duration of the touch key being touched is recorded.
Specifically, in step S201, when the touch key is in the key-down state, the touch key control method further includes:
in step S2011, the touch signal variation is calculated based on the touch signal of the touch key and the reference signal, which is the corresponding touch signal when the touch key is not pressed.
In this embodiment, the reference signal is an average value of the corresponding touch signals when the touch key is not pressed (the touch key is not touched), which is merely used as an example, and the specific value of the reference signal is determined according to the actual application requirement without being limited thereto.
In step S2012, the current key state of the touch key is determined based on the relationship between the touch signal variation and the first touch signal threshold, the first touch signal threshold being greater than the reference signal. Note that the touch keys include resistive touch keys and capacitive touch keys. The resistance type touch key changes the resistance value through the pressure of hands, so that the touch key function is realized; the capacitive touch key can change the voltage of the key by forming capacitance between the hand or other objects capable of carrying charges and the key, thereby realizing the function of touching the key. In the present embodiment, taking a capacitive touch key as an example, the touch key state is determined by the amount of capacitance change generated when the key is touched. The touch key state includes: a key-down state, a key-up state, and a key-down state.
Fig. 3 is a schematic diagram of the touch signal of the present embodiment, and as can be seen from fig. 3, the touch signal variation=touch signal-reference signal. It should be noted that, when the touch key is in the key-down state, the subsequent state of the touch key may be a key-release state or a key-long-press state, where the state is determined based on the touch signal variation, including: if the touch signal variation is not greater than the first touch signal threshold value and lasts for a period of time, the touch key is in a key release state; and if the touch signal variation is larger than the first touch signal threshold, the touch key is in a key long-press state.
Fig. 4 is a schematic flow chart of key release and key long press in this embodiment, taking a capacitive touch key as an example, as can be seen from fig. 4, t2 is an anti-shake time (a first preset duration) of touch key release, C2 is a first touch signal threshold, and the determining flow chart of key release and key long press includes: detecting a touch signal variation Diff after a certain key is pressed; if the Diff of the key is less than or equal to C2 and the time t2 is continued, the key is judged to be released; if the Diff > C2 of the key is detected, the key is judged to be pressed for a long time, and the time is counted for a long time.
Specifically, in the step S2012, the determining the current key state of the touch key based on the relationship between the touch signal variation amount and the first touch signal threshold includes:
and a step a1, judging whether the variation of the touch signal is larger than a first touch signal threshold value.
And a step a2 of recording a first duration in which the touch signal variation is continuously not greater than the first touch signal threshold value when the touch signal variation is not greater than the first touch signal threshold value.
And a step a3 of determining that the current key state of the touch key is a key release state when the first time length is longer than the first preset time length, wherein the first preset time length is the anti-shake time for releasing the touch key.
It should be noted that, in this embodiment, the values of the first touch signal threshold and the first preset duration are not limited in particular, and are determined according to the actual application requirements. For example, the first touch signal threshold is 250F and the first preset duration is 25s, for illustration only.
In this embodiment, when the touch signal variation is greater than the first touch signal threshold, a second period of time during which the touch signal variation is continuously greater than the first touch signal threshold is recorded; and when the second time length is longer than a second preset time length, determining that the current key state of the touch key is a key release state, wherein the second preset time length is the maximum pressing time length of the touch key, and the second preset time length is not longer than the touch preset time length.
It should be noted that, in this embodiment, for the key long-pressed state, a corresponding maximum pressing time length is set, when the second time length of the touch signal variation continuously greater than the first touch signal threshold reaches a second preset time length, the current key state is forcedly updated to be in a key release state, so as to overcome the problem that the key is released after the key is pressed, but the touch signal variation is reduced due to noise interference or other reasons such as residual substances in the key, but the touch signal variation is kept greater than the first touch signal threshold state, i.e. the key is kept in a long-pressed state, so that no reaction is caused when other key operations are performed. Specifically, when the duration of the long-press state meets the maximum-press duration, the corresponding touch signal variation quantity is enabled to meet the key release condition by forcedly updating the key touch signal; when the current key state of the touch key is a key release state, the touch key is controlled to be in the key release state, so that other subsequent key operations can be effectively performed.
Step S202, judging whether the duration of touching the touch key reaches the preset duration of touching. Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
In step S203, when the duration of touching the touch key reaches the touch preset duration, the touch key is controlled to be in the key release state. Please refer to step S103 in the embodiment shown in fig. 1 in detail, which is not described herein.
In this embodiment, when the duration of the touch key being touched does not reach the touch preset duration, a step of calculating the amount of change of the touch signal based on the touch signal and the reference signal of the touch key being touched is performed. Specifically, by setting the determination and the control cycle execution mode of the key release state after the key is pressed, the misjudgment and the misjudgment of the key release state can be reduced, and the more true and accurate touch key release state can be obtained.
In this embodiment, taking a capacitive touch key as an example, determining a key-down state based on a touch signal variation includes: if the touch signal variation is not smaller than the second touch signal threshold value and lasts for a period of time, the touch key is in a key-press state. Fig. 5 is a schematic flow chart of key pressing in the present embodiment, taking a capacitive touch key as an example, as can be seen from fig. 5, t1 is an anti-shake time (a third preset duration) of the touch key pressing, C1 is a second touch signal threshold, and the determining process of the touch key pressing state includes:
step b1, detecting whether the touch key is touched.
And b2, after the touch signal of the touch key is detected, calculating the change amount of the touch signal according to the reference signal.
And b3, when the touch signal variation meets the preset key pressing condition, determining that the touch key is in a key pressing state, wherein the preset key pressing condition is that the touch signal variation is not less than a second touch signal threshold and the duration reaches a third preset duration (Diff is not less than C1 and the duration is t 1), the third preset duration is the anti-shake time of the touch key pressing, and the first touch signal threshold is less than the second touch signal threshold. The reference signal is a touch signal corresponding to a case where the touch key is not pressed (the touch key is not touched), the second touch signal threshold C1 is a touch signal corresponding to a case where the key is pressed (the touch key is touched), the first touch signal threshold C2 is a touch signal corresponding to a case where the touch key is pressed and just released, and the magnitude relation is as follows: the reference signal is less than the first touch signal threshold C2 and less than the second touch signal threshold C1.
It should be noted that, the values of the second touch signal threshold and the third preset duration are not limited in particular, and are set according to the actual requirements. According to the embodiment of the invention, the touch key pressing state can be accurately obtained through judging the touch signal variation and the preset key pressing condition.
In a specific embodiment, taking a capacitive touch key as an example, referring to fig. 6, it should be noted that in the figure, t2 is an anti-shake time (a first preset time period) for releasing the touch key, t3 is a maximum pressing time period (a second preset time period) for touching the key, t4 is a touch preset time period, and C2 is a first touch signal threshold. When the key is pressed, the flow of the touch key control method comprises the following steps:
in step c1, specific values of t3 and t4 are set according to actual requirements, where t3 is equal to or less than t4, for example, t3=30s and t4=40s.
And c2, after a certain key is detected to be pressed, firstly cleaning t2, t3 and t4 for timing, and then detecting the variation Diff of the touch signal.
Step C3, if the Diff > C2 of the key is detected, starting t3 timing and clearing t2 timing, otherwise starting t2 timing and clearing t3 timing.
Step c4, if t2 reaches the preset anti-shake time for releasing the touch key, judging that the key is released; otherwise, t4 timing is performed.
Step c5, if t3 reaches the preset maximum pressing duration of the touch key, clearing t3 time, and forcedly updating the key Baseline value (reference signal) to enable the touch signal variation Diff to be 0, namely enabling the reference signal to be equal to the touch signal, and then re-detecting the touch signal variation Diff; otherwise, t4 timing is performed.
It should be noted that, the key Baseline value is forcedly updated, and the touch signal Finger value of the key is assigned to the reference signal Baseline, that is, baseline=finger, then the touch signal diff=finger-Baseline=0 is detected again, so as to satisfy Diff being less than or equal to C2, and the key release is judged.
Step c6, if t4 reaches the preset touch duration, clearing t2 and t3, forcedly updating the key Baseline value, and then re-detecting the touch signal variation Diff; otherwise Diff is directly re-detected.
It should be noted that, in this embodiment, the key state may also be determined by presetting the number of times of scanning the key, that is, presetting the number of times of scanning the key×scanning interval=duration, which is merely illustrative. In addition, the touch key control method of the embodiment of the invention can be applied to household appliances with touch keys, such as electric fans, electric heaters and the like, and is used for accurately judging and controlling the release of the keys.
In summary, according to the touch key control method of the embodiment of the invention, when the touch key is in the key-down state, the time length of the touch key which is touched is recorded, and the recorded time length of the touch key which is touched and the touch preset time length are judged, so that the touch key is controlled to be in the key-release state when the touch preset time length is reached. The invention can solve the problem that after the key is pressed and released, the key is misjudged to be in an unclamped state for a long time due to noise interference or other reasons such as residual substances in the key, so that no reaction is caused when other key operations are performed, and update processing is performed on the key state after the key is pressed and released, so that the subsequent other key operations can be effectively performed, and the experience of a user is improved.
In this embodiment, a touch key control device is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. The term "module" as used below may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The invention provides a touch key control device, as shown in FIG. 7, the device comprises:
the recording module 701 is configured to record a duration of time that the touch key is touched when the touch key is in a key-down state.
The judging module 702 is configured to judge whether a duration of touching the touch key reaches a touch preset duration.
The control module 703 is configured to control the touch key to be in a key release state when the duration of touching the touch key reaches a touch preset duration.
In some alternative embodiments, the recording module 701 includes: a calculation submodule and a determination submodule; the computing sub-module is used for computing the variation of the touch signal based on the touch signal of the touch key and a reference signal, wherein the reference signal is a corresponding touch signal when the touch key is not pressed; the determining submodule is used for determining the current key state of the touch key based on the relation between the touch signal variation and a first touch signal threshold value, and the first touch signal threshold value is larger than a preset reference signal.
In some alternative embodiments, determining the sub-module includes: the device comprises a judging unit, a first recording unit and a first determining unit; the judging unit is used for judging whether the variation of the touch signal is larger than a first touch signal threshold value or not; a first recording unit configured to record a first duration in which the touch signal variation is continuously not greater than the first touch signal threshold when the touch signal variation is not greater than the first touch signal threshold; the first determining unit is used for determining that the current key state of the touch key is a key release state when the first time length is longer than a first preset time length, and the first preset time length is the anti-shake time for releasing the touch key.
In some alternative embodiments, determining the sub-module includes: a second recording unit and a second determining unit; the second recording unit is used for recording a second duration of time that the touch signal variation is continuously larger than the first touch signal threshold value when the touch signal variation is larger than the first touch signal threshold value; the second determining unit is configured to determine that the current key state of the touch key is a key release state when the second time period is longer than a second preset time period, where the second preset time period is the maximum pressing time period of the touch key, and the second preset time period is not longer than the touch preset time period.
In some alternative embodiments, the apparatus further comprises: the touch key control module is used for controlling the touch key to be in a key release state when the current key state of the touch key is the key release state.
In some alternative embodiments, the apparatus further comprises: the device comprises a touch detection module, a variation calculation module and a key press determination module; the touch detection module is used for detecting whether the touch key is touched or not; the change amount calculating module is used for calculating the change amount of the touch signal according to the reference signal after detecting the touch signal of the touch key; the key pressing determining module is used for determining that the touch key is in a key pressing state when the touch signal variation meets a preset key pressing condition, wherein the preset key pressing condition is that the touch signal variation is not smaller than a second touch signal threshold and the duration reaches a third preset duration, the third preset duration is anti-shake time of the touch key pressing, and the first touch signal threshold is smaller than the second touch signal threshold.
Further functional descriptions of the above respective modules are the same as those of the above corresponding embodiments, and are not repeated here.
The touch key control apparatus in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the above-described functions.
The touch key control device provided by the embodiment of the invention can update the key state after the key is pressed and released, so that other subsequent key operations can be effectively performed, and the problem that no response is caused when other key operations are performed because the key is erroneously judged to be in the unclamped state for a long time after the key is pressed and released is solved.
An embodiment of the present invention further provides a touch key control device, referring to fig. 8, fig. 8 is a schematic structural diagram of the touch key control device provided in an alternative embodiment of the present invention, and as shown in fig. 8, the touch key control device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the touch key control device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple touch key control devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multi-processor system). One processor 10 is illustrated in fig. 8.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created according to the use of the touch key control device, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the touch key control device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The touch key control device further comprises a communication interface 30 for the touch key control device to communicate with other devices or a communication network.
In this embodiment, the touch key is a capacitive touch key, and the household appliance with the capacitive touch key includes: the electric fan, the electric heater and the like can perform corresponding touch key control based on the device provided by the embodiment of the invention.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor master chip or programmable hardware includes a storage component that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the embodiments described above.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (11)

1. A touch key control method, the method comprising:
recording the duration of the touch key when the touch key is in a key-press state;
judging whether the duration of the touch key being touched reaches the preset duration of touch or not;
and when the duration of the touch key being touched reaches the touch preset duration, controlling the touch key to be in a key release state.
2. The method of claim 1, wherein when the touch key is in a key-down state, the method further comprises:
calculating a touch signal variation based on a touch signal of the touch key and a reference signal, wherein the reference signal is a corresponding touch signal when the touch key is not pressed;
and determining the current key state of the touch key based on the relation between the touch signal variation and a first touch signal threshold, wherein the first touch signal threshold is larger than the reference signal.
3. The method of claim 2, wherein the determining the current key state of the touch key based on the relationship of the touch signal variance to a first touch signal threshold comprises:
judging whether the touch signal variation is larger than a first touch signal threshold value or not;
recording a first duration that the touch signal variation is continuously not greater than a first touch signal threshold when the touch signal variation is not greater than the first touch signal threshold;
and when the first time length is longer than a first preset time length, determining that the current key state of the touch key is a key release state, wherein the first preset time length is the anti-shake time for releasing the touch key.
4. A method according to claim 3, characterized in that the method further comprises:
recording a second duration that the touch signal variation is continuously larger than the first touch signal threshold when the touch signal variation is larger than the first touch signal threshold;
and when the second time length is longer than a second preset time length, determining that the current key state of the touch key is a key release state, wherein the second preset time length is the maximum pressing time length of the touch key, and the second preset time length is not longer than the touch preset time length.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
and when the current key state of the touch key is a key release state, controlling the touch key to be in the key release state.
6. The method according to claim 2, wherein the method further comprises:
and executing the step of calculating the change amount of the touch signal based on the touch signal and the reference signal of the touch key when the touch time of the touch key does not reach the touch preset time.
7. The method according to any one of claims 2-6, further comprising:
detecting whether a touch key is touched;
after a touch signal of the touch key is detected, calculating a touch signal variation according to a reference signal;
when the touch signal variation meets a preset key pressing condition, determining that the touch key is in a key pressing state, wherein the preset key pressing condition is that the touch signal variation is not smaller than a second touch signal threshold and the duration reaches a third preset duration, the third preset duration is anti-shake time of the touch key pressing, and the first touch signal threshold is smaller than the second touch signal threshold.
8. A touch key control device, the device comprising:
the recording module is used for recording the duration of the touch key when the touch key is in a key-press state;
the judging module is used for judging whether the duration of the touch key touched reaches the touch preset duration or not;
and the control module is used for controlling the touch key to be in a key release state when the touch duration of the touch key reaches the touch preset duration.
9. A touch key control device, the device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the touch key control method of any one of claims 1 to 7.
10. The device of claim 9, wherein the touch key is a capacitive touch key.
11. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the touch key control method according to any one of claims 1 to 7.
CN202311236249.8A 2023-09-22 2023-09-22 Touch key control method, device, equipment and storage medium Pending CN117170532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311236249.8A CN117170532A (en) 2023-09-22 2023-09-22 Touch key control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311236249.8A CN117170532A (en) 2023-09-22 2023-09-22 Touch key control method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117170532A true CN117170532A (en) 2023-12-05

Family

ID=88933615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311236249.8A Pending CN117170532A (en) 2023-09-22 2023-09-22 Touch key control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117170532A (en)

Similar Documents

Publication Publication Date Title
US4405982A (en) Arrangement for monitoring the function of a programmable electronic switching circuit
CN105487809A (en) Terminal control method and device
CN109002230B (en) Touch screen calibration method and device and electronic equipment
CN106685752B (en) A kind of information processing method and terminal
CN109614016B (en) Touch identification method and device of capacitive touch screen and electronic equipment
CN107579864B (en) Request monitoring method and device and server
CN113126835A (en) Detection method, touch device and storage medium
WO2019148956A1 (en) Touch control identification method, device, and system
CN113126815A (en) Key response control method and device, terminal equipment and storage medium
CN113037268A (en) Method and device for adjusting key touch threshold
US10318731B2 (en) Detection system and detection method
CN104077050A (en) Terminal operating method
CN108717335B (en) Anti-error detection method and device
CN117170532A (en) Touch key control method, device, equipment and storage medium
WO2021036718A1 (en) Touch point determining method and device
CN107943536B (en) Method and device for adjusting threshold, storage medium and electronic equipment
US20190138144A1 (en) Touch device and touch signal processing method thereof
TWI622921B (en) Capacitance value detecting method of touch device
CN111459346B (en) Capacitive touch device and gesture recognition method, chip and storage medium thereof
CN105988835B (en) Software upgrading method and terminal
CN108717349B (en) Terminal bright screen control method and device, terminal and storage medium
CN113126813A (en) Correction method and device for key misjudgment, terminal equipment and storage medium
CN113126814A (en) Key no-response correction method and device, terminal equipment and storage medium
CN111956077B (en) Control method of cooking equipment and cooking equipment
JP3088395B2 (en) Switch interrupt processing circuit and switch interrupt processing method

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