CN107294522B - Response method and device based on touch key, storage medium and electronic equipment - Google Patents

Response method and device based on touch key, storage medium and electronic equipment Download PDF

Info

Publication number
CN107294522B
CN107294522B CN201710542694.5A CN201710542694A CN107294522B CN 107294522 B CN107294522 B CN 107294522B CN 201710542694 A CN201710542694 A CN 201710542694A CN 107294522 B CN107294522 B CN 107294522B
Authority
CN
China
Prior art keywords
capacitance value
touch key
preset
capacitance
value
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.)
Expired - Fee Related
Application number
CN201710542694.5A
Other languages
Chinese (zh)
Other versions
CN107294522A (en
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710542694.5A priority Critical patent/CN107294522B/en
Publication of CN107294522A publication Critical patent/CN107294522A/en
Application granted granted Critical
Publication of CN107294522B publication Critical patent/CN107294522B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K17/00Electronic switching or gating, i.e. not by contact-making and –breaking
    • H03K17/94Electronic switching or gating, i.e. not by contact-making and –breaking characterised by the way in which the control signals are generated
    • H03K17/96Touch switches
    • H03K17/962Capacitive touch switches

Abstract

The embodiment of the invention discloses a response method and device based on touch keys, a storage medium and electronic equipment. The method comprises the following steps: after a pressing event of the touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency; when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times; and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is greater than a second preset threshold value and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event. By adopting the technical scheme, the embodiment of the invention can effectively reduce the occurrence of delayed response of the electronic equipment to the touch operation of the touch key due to external factors.

Description

Response method and device based on touch key, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of touch control, in particular to a response method and device based on touch keys, a storage medium and electronic equipment.
Background
Currently, touch keys are widely applied to electronic devices such as mobile terminals, household appliances, and vehicle-mounted devices. According to different touch sensing principles, the touch keys include resistive touch keys, capacitive touch keys, and the like. Among them, the capacitive touch key can penetrate through an insulating material housing (such as glass or plastic) with a certain thickness to detect a touch action of a finger, and has relatively high performance indexes such as sensitivity, stability and reliability, so that the capacitive touch key becomes the most widely applied touch key. However, in some cases, the sensitivity of the touch key may still be affected, so the response control scheme for the touch key still needs to be further refined.
Disclosure of Invention
The embodiment of the invention provides a response method and device based on a touch key, a storage medium and electronic equipment, which can optimize a response control scheme based on the touch key.
In a first aspect, an embodiment of the present invention provides a response method based on a touch key, including:
after a pressing event of a touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency;
when the variation value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times;
and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event.
In a second aspect, an embodiment of the present invention provides a response apparatus based on a touch key, including:
the first capacitance acquisition module is used for acquiring a capacitance value corresponding to the touch key according to a preset frequency after a pressing event of the touch key is detected;
the second capacitance acquisition module is used for continuously acquiring capacitance values of preset times when the change value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value;
and the response module is used for determining that the lifting event of the touch key is detected and responding to the lifting event when the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is greater than a second preset threshold value and the change rule of the capacitance values acquired within the preset times meets the preset requirement.
In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a touch key based response method according to an embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the touch key based response method according to the embodiment of the present invention.
According to the response scheme based on the touch key, provided by the embodiment of the invention, after a pressing event of the touch key is detected, the capacitance value corresponding to the touch key is collected according to the preset frequency; when the variation value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times; and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event. By adopting the technical scheme, the condition that the response of the electronic equipment to the touch operation of the touch key is slow due to external factors can be effectively reduced.
Drawings
Fig. 1 is a schematic flowchart of a response method based on a touch key according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another response method based on touch keys according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of another response method based on touch keys according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another response method based on touch keys according to an embodiment of the present invention;
fig. 5 is a block diagram of a response apparatus based on touch keys according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
In general electronic equipment, a touch key is a device which is directly contacted by a user and frequently used, and it is very important to ensure that the touch key can normally work under various conditions. For the capacitive touch key, the operation process is roughly as follows: recording a capacitance value of the key in a normal state (not touched or covered) as a reference capacitance value, if a finger presses the touch key, the capacitance value of the touch key changes, when the change value exceeds a certain threshold value, the touch key is considered to be pressed, a pressing event is reported, and after the finger leaves the touch key, the capacitance value of the touch key is restored to the reference capacitance value, at the moment, a lifting event is reported, the lifting event is responded, and the function operation corresponding to the touch key is executed. The capacitive touch keys can be subdivided according to different working principles, for example, the capacitance value of the self-contained touch key can be increased when a finger presses down, and the capacitance value of the mutual-contained touch key can be reduced when the finger presses down. The specific type of the capacitive touch key is not limited in the embodiments of the present invention, and the following description will take a self-contained type as an example. Under normal conditions, after the finger leaves the touch key, the capacitance value of the touch key is quickly restored to the reference capacitance value (for example, about 30 milliseconds), but the inventor finds that an abnormal condition occurs when there are interferents such as sweat or oil stains on the surface of the finger or the surface of the touch key, and after the finger leaves the touch key, the capacitance value of the touch key is slowly restored to the reference capacitance value (for example, 2 to 3 seconds), so that the time for reporting the lift event is delayed, and the touch operation response of the electronic device to the touch key is delayed. The response scheme based on the touch keys provided by the embodiment of the invention can effectively reduce the occurrence of the slow response.
Fig. 1 is a flowchart illustrating a touch key based response method according to an embodiment of the present invention, where the method may be executed by a touch key based response apparatus, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in an electronic device. As shown in fig. 1, the method includes:
step 101, after a pressing event of a touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency.
For example, the electronic device in the embodiment of the present invention may include a device provided with a touch key, such as a mobile phone, a tablet computer, a media player, and a home appliance. The touch key is a capacitive touch key. The specific type of the touch key may also be different according to the specific situation of the key design of the electronic device, and the embodiment of the present invention is not limited, and taking a mobile phone as an example, the touch key may include a home key, a menu key, a back key, and the like, but may also be a touch key of another type or function.
For example, the capacitance value in the embodiment of the present invention may specifically be a value of an actual capacitance after analog-to-digital conversion, that is, the capacitance value may be represented by an analog-to-digital conversion value (also referred to as an AD value or an ADC value).
Optionally, before performing this step, the method may further include: acquiring a reference capacitance value of a touch key; and when the difference between the current capacitance value of the touch key and the reference capacitance value is judged to be larger than a preset touch threshold value, generating a pressing event of the touch key. The reference capacitance value may be set before the electronic device leaves a factory, or may be obtained after the electronic device is calibrated at a start or at other time that needs to be calibrated, and may be recorded by the key chip and obtained when a touch needs to be determined. In order to ensure real-time availability of the touch key, capacitance values corresponding to the touch key are continuously collected according to a set frequency, when the difference value between the current capacitance value and the reference capacitance value is judged to be larger than a preset touch threshold value, the touch key can be determined to be touched (pressed) by a user, and therefore a pressing event of the touch key can be generated and reported to an upper layer, and the pressing event of the touch key can be detected.
For example, the preset frequency may be the same as or different from the acquisition frequency before the pressing event of the touch key is detected, and the specific value is not limited, and may be, for example, 10 milliseconds each time.
And 102, when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is greater than a first preset threshold value, continuously acquiring capacitance values for preset times.
In the embodiment of the invention, the response method based on the touch key is designed according to the change rule of the capacitance value under the abnormal condition discovered by the inventor. Taking the self-contained touch key as an example, the inventor finds that when there are interferents such as sweat or oil stains on the surface of the finger or the touch key, after the finger leaves the touch key, the capacitance value gradually decreases, and a difference between the capacitance values of two adjacent frames of data exceeds a certain value (the value is recorded as a first preset threshold) in a descending curve of the capacitance value, while the subsequent capacitance value gradually decreases until reaching a reference capacitance value, and the time consumed in the whole process is relatively long under a normal condition, thereby causing the slow response of the electronic device to the touch operation of the touch key. In this step, it is determined whether the characteristic that the difference between the capacitance values of the two adjacent frames of data exceeds the first preset threshold (hereinafter, referred to as a dip characteristic) occurs after the pressing event of the touch key is detected, and then the change of the capacitance values collected several times later is determined, so that it can be determined whether the finger of the user leaves before the capacitance value returns to the reference capacitance value. The specific numerical value of the first preset threshold is not limited, and can be determined according to the characteristics of the touch key, and can be a set proportion value of the preset touch threshold, wherein the set proportion value can be 20% to 50%; it may also be a specific value, for example 40 (expressed in analog-to-digital converted values).
For example, the preset number of times may be determined according to several factors: (in general) the length of time (denoted as T) from the pressing of the touch key to the leaving of the touch key by the user's finger1Determined by investigation or simulation), the time length (denoted as T) required for the capacitance value to recover to the reference capacitance value when the user finger leaves the touch key under normal conditions2) And the difference between the capacitance values of the two adjacent frames of data after the pressing event is detected exceeds a first preset threshold (namely: go outThe time length (marked as T) of the dip characteristic of the second capacitance value acquired this time and the first capacitance value acquired last time is greater than a first preset threshold value3) And the value of the preset frequency (denoted as F), and so on. For example, the preset number of times (denoted as N) may be determined (or approximately determined) by the following formula:
N=(T1+T2-T3)*F
the specific value of the preset number of times is not limited, and may be 3 times, for example.
Step 103, if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is greater than a second preset threshold value, and the variation rule of the capacitance values acquired within the preset times meets a preset requirement, determining that a lift-up event of the touch key is detected and responding to the lift-up event.
It is understood that, under the influence of the environment and the like, the capacitance value of the touch key may not return to be identical to the reference capacitance value after the user's finger leaves, and there may be a small difference, and in consideration of this situation, a second preset threshold may be set, and the threshold may be set to a small capacitance value, for example, 1% or 5% or 0 of the preset touch threshold. When the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is greater than the second preset threshold value, it can be shown that the capacitance value of the touch key is still not restored to the reference capacitance value, so that the touch operation based on the touch key cannot be responded when the lifting event is not reported according to the existing event reporting strategy. In the embodiment of the invention, the sudden drop characteristic is generated, which indicates that the finger of the user is likely to leave the touch key, at this time, the change rule of the capacitance value collected within the preset times is further judged, and if the change rule meets the preset requirement, the fact that the finger of the user leaves the touch key is determined, and the response to the touch operation is needed.
Specifically, a lift-off event of the touch key can be generated and reported to an upper layer, so that the lift-off event is detected and responded; or the upper layer is directly informed to execute corresponding operation according to a mode of responding to the lifting event without generating the lifting event of the touch key, and the previously received pressing event is cleared.
For example, the manner of responding to the lift-off event may be determined according to the type of touch key. For example, when the touch key is a menu key, the electronic device may be controlled to display a menu interface in a manner of responding to the lift-up event; when the touch key is a home key, the electronic device may be controlled to enter a home page (or a desktop) in response to the lift event.
According to the response scheme based on the touch key, after a pressing event of the touch key is detected, the capacitance value corresponding to the touch key is collected according to the preset frequency; when the variation value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times; and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event. By adopting the technical scheme, the condition that the response of the electronic equipment to the touch operation of the touch key is slow due to external factors can be effectively reduced.
In one embodiment, the rule of change of the capacitance value collected within the preset number of times meets a preset requirement, and includes: the capacitance values acquired within the preset times are monotonically changed according to the acquisition sequence, and the second change rate of each capacitance value relative to the previous capacitance value is smaller than the first change rate of the second capacitance value relative to the first capacitance value, wherein when the first capacitance value is larger than the second capacitance value, the monotonic change is a decreasing change, and when the first capacitance value is smaller than the second capacitance value, the monotonic change is an increasing change. Note that the change rate in the embodiment of the present invention is an absolute value. For the self-capacitance type touch key, after the finger of the user leaves the touch key, the capacitance value is monotonically decreased; for the mutual capacitance type touch key, the capacitance value is monotonically increased after the finger of the user leaves the touch key. The inventor finds that after the collapse characteristic occurs, the change rate of the capacitance values acquired subsequently is smaller than that when the collapse characteristic occurs, whether the finger of the user leaves the touch key or not can be further confirmed according to the rule, and judgment accuracy is improved.
Optionally, the trend of the second rate of change is a decreasing trend. The above determination accuracy can be further enhanced.
In one embodiment, after a pressing event of a touch key is detected, acquiring a capacitance value corresponding to the touch key according to a preset frequency, including: when a pressing event of the touch key is detected, after a preset time length, capacitance values corresponding to the touch key are collected according to a preset frequency. Illustratively, the user's finger generally takes a certain amount of time from pressing the touch key to leaving the touch key, as indicated by T above1And the capacitance value corresponding to the touch key can be temporarily collected within the preset time length so as to reduce the power consumption.
In one embodiment, in the process of continuously acquiring the capacitance values for the preset number of times, the method further includes: and if the difference between the currently acquired capacitance value and the reference capacitance value of the touch key is smaller than or equal to a second preset threshold value, generating a lifting event of the touch key and responding to the lifting event. It can be understood that, if no abnormal condition occurs in the touch key, in the process of continuously acquiring the capacitance values for the preset times, it is likely that the capacitance values are restored to the reference capacitance values, that is, the difference between the currently acquired capacitance values and the reference capacitance values of the touch key is smaller than the second preset threshold value, a lift-up event of the touch key can be generated and a response is made to the lift-up event, so as to implement a timely response to the touch operation under normal conditions.
Fig. 2 is a schematic flow chart of another response method based on a touch key according to an embodiment of the present invention, which takes a self-contained touch key as an example, and includes the following steps:
step 201, after a pressing event of the touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency.
Step 202, when the difference value between the capacitance value a collected last time and the capacitance value B collected this time is judged to be larger than the first preset threshold value, capacitance values are collected continuously for N times.
Preferably, the capacitance value is represented by an analog-to-digital conversion value, and the first preset threshold value is 40.
Step 203, it is determined that the difference between the last capacitance value of the N capacitance values and the reference capacitance value is greater than a second preset threshold, the N capacitance values monotonically decrease according to the acquisition sequence, and the change rate of each capacitance value relative to the previous capacitance value is smaller than the change rate of the capacitance value a relative to the capacitance value B.
Wherein the rate of change is an absolute value.
And step 204, determining that the lift-off event of the touch key is detected and responding to the lift-off event.
The response method based on the touch key provided by the embodiment of the invention is suitable for the self-contained touch key, can respond to the touch operation based on the touch key in time when the touch key is in an abnormal condition, reduces the condition of response delay and improves the sensitivity of the touch key.
Fig. 3 is a schematic flow chart of another response method based on a touch key according to an embodiment of the present invention, which takes a mutual capacitance type touch key as an example, and includes the following steps:
step 301, after a pressing event of the touch key is detected, acquiring a capacitance value corresponding to the touch key according to a preset frequency.
And step 302, when the difference value between the capacitance value D acquired this time and the capacitance value C acquired last time is judged to be larger than a first preset threshold value, continuously acquiring the capacitance values for N times.
Preferably, the capacitance value is represented by an analog-to-digital conversion value, and the first preset threshold value is 40.
And 303, judging that the difference value between the reference capacitance value and the last capacitance value in the N capacitance values is greater than a second preset threshold value, wherein the N capacitance values are monotonically increased according to the acquisition sequence, and the change rate of each capacitance value relative to the previous capacitance value is smaller than the change rate of the capacitance value D relative to the capacitance value C.
Wherein the rate of change is an absolute value.
Step 304, determining that a lift-off event of the touch key is detected and responding to the lift-off event.
The response method based on the touch key provided by the embodiment of the invention is suitable for the mutual capacitance type touch key, can respond to the touch operation based on the touch key in time when the touch key is in an abnormal condition, reduces the condition of response delay and improves the sensitivity of the touch key.
Fig. 4 is a schematic flowchart of another response method based on a touch key according to an embodiment of the present invention, where the method includes the following steps:
step 401, obtaining a reference capacitance value of the touch key.
Step 402, when it is determined that the difference between the current capacitance value and the reference capacitance value of the touch key is greater than the preset touch threshold, a pressing event of the touch key is generated.
And 403, detecting a pressing event of the touch key, and collecting a capacitance value corresponding to the touch key according to a preset frequency.
And step 404, when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is greater than a first preset threshold value, continuing to acquire the capacitance value and starting to count the acquisition times.
Step 405, judging whether the difference between the currently acquired capacitance value and the reference capacitance value is smaller than or equal to a second preset threshold value, if so, executing step 408; otherwise, step 406 is performed.
Step 406, judging whether the acquisition times reach preset times, if so, executing step 407; otherwise, step 405 is performed.
407, judging whether the change rule of the capacitance value collected within the preset times meets the preset requirement, if so, executing 408; otherwise, the flow ends.
Step 408, generating a lift-off event for the touch key and responding to the lift-off event.
In the embodiment of the invention, the response strategies of the normal condition and the abnormal condition are fused, so that the touch key can respond to the touch operation of a user on the touch key in time under various conditions, and the stability and the response speed of the touch key are improved on the whole.
Fig. 5 is a block diagram of a touch key based response apparatus according to an embodiment of the present invention, where the apparatus may be implemented by software and/or hardware, and is generally integrated in an electronic device, and may control a response based on a touch key by executing a touch key based response method. As shown in fig. 5, the apparatus includes:
the first capacitance acquisition module 501 is configured to acquire a capacitance value corresponding to a touch key according to a preset frequency after a pressing event of the touch key is detected;
a second capacitance collecting module 502, configured to continue to collect capacitance values for a preset number of times when a variation value between a first capacitance value collected this time and a second capacitance value collected last time is greater than a first preset threshold;
the response module 503 is configured to determine that a lift-up event of the touch key is detected and respond to the lift-up event when a difference between a last capacitance value acquired within the preset number of times and a reference capacitance value of the touch key is greater than a second preset threshold and a change rule of the capacitance value acquired within the preset number of times meets a preset requirement.
According to the response device based on the touch key, provided by the embodiment of the invention, after a pressing event of the touch key is detected, a capacitance value corresponding to the touch key is collected according to a preset frequency; when the variation value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times; and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event. By adopting the technical scheme, the condition that the response of the electronic equipment to the touch operation of the touch key is slow due to external factors can be effectively reduced.
Optionally, a change rule of the capacitance value collected within the preset number of times meets a preset requirement, including:
the capacitance values acquired within the preset times are monotonously changed according to the acquisition sequence, the second change rate of each capacitance value relative to the previous capacitance value is smaller than the first change rate of the second capacitance value relative to the first capacitance value, and the first change rate and the second change rate are expressed by absolute values.
Optionally, after detecting a pressing event of the touch key, acquiring a capacitance value corresponding to the touch key according to a preset frequency, including:
when a pressing event of the touch key is detected, after a preset time length, capacitance values corresponding to the touch key are collected according to a preset frequency.
Optionally, the apparatus further includes a reference capacitance value obtaining module, configured to obtain a reference capacitance value of the touch key before a pressing event of the touch key is detected;
and the pressing event judging module is used for generating a pressing event of the touch key when the difference between the current capacitance value of the touch key and the reference capacitance value is judged to be larger than a preset touch threshold value.
Optionally, the response module is further configured to: and in the process of continuously acquiring the capacitance values for the preset times, if the difference between the currently acquired capacitance value and the reference capacitance value of the touch key is less than or equal to the second preset threshold, generating a lifting event of the touch key and responding to the lifting event.
Optionally, the first preset threshold is a set proportion value of a preset touch threshold.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a touch key-based response method, the method comprising:
after a pressing event of a touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency;
when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times;
and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present invention is not limited to the response operation based on the touch key described above, and may also perform related operations in the response method based on the touch key provided in any embodiment of the present invention.
The embodiment of the invention provides electronic equipment, and a response device based on touch keys provided by the embodiment of the invention can be integrated in the electronic equipment. Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 6, the electronic device may include: a casing (not shown), a touch button (not shown), a memory 601, a Central Processing Unit (CPU) 602 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU602 and the memory 601 are disposed on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the electronic equipment; the memory 601 is used for storing executable program codes; the CPU602 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 601 to implement the steps of:
after a pressing event of a touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency;
when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times;
and if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets the preset requirement, determining that the lift-up event of the touch key is detected and responding to the lift-up event.
The electronic device further includes: peripheral interfaces 603, RF (Radio Frequency) circuitry 605, audio circuitry 606, speakers 611, power management chip 608, input/output (I/O) subsystem 609, touch screen 612, other input/control devices 610, and external ports 604, which communicate via one or more communication buses or signal lines 607.
It should be understood that the illustrated electronic device 600 is merely one example of an electronic device, and that the electronic device 600 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail the electronic device for responding to a touch operation of a touch key provided in this embodiment, and the electronic device is exemplified by a mobile phone.
A memory 601, the memory 601 being accessible by the CPU602, the peripheral interface 603, and the like, the memory 601 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 603, said peripheral interface 603 may connect input and output peripherals of the device to the CPU602 and the memory 601.
An I/O subsystem 609, the I/O subsystem 609 may connect input and output peripherals on the device, such as a touch screen 612 and other input/control devices 610, to the peripheral interface 603. The I/O subsystem 609 may include a display controller 6091 and one or more input controllers 6092 for controlling other input/control devices 610. Where one or more input controllers 6092 receive electrical signals from or transmit electrical signals to other input/control devices 610, the other input/control devices 610 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 6092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 612, which touch screen 612 is an input interface and an output interface between the user electronic device and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 6091 in the I/O subsystem 609 receives electrical signals from the touch screen 612 or transmits electrical signals to the touch screen 612. The touch screen 612 detects a contact on the touch screen, and the display controller 6091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 612, that is, to implement a human-computer interaction, where the user interface object displayed on the touch screen 612 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 605 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 605 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 605 converts electrical signals to or from electromagnetic signals and communicates with a communication network and other devices. RF circuitry 605 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 606 is mainly used to receive audio data from the peripheral interface 603, convert the audio data into an electric signal, and transmit the electric signal to the speaker 611.
The speaker 611 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 605 into sound and play the sound to the user.
And a power management chip 608 for supplying power and managing power to the hardware connected to the CPU602, the I/O subsystem, and the peripheral interface.
The electronic equipment provided by the embodiment of the invention can effectively reduce the occurrence of delayed touch operation response of the electronic equipment to the touch keys due to external factors.
The touch key based response device, the storage medium and the electronic device provided in the above embodiments can execute the touch key based response method provided in any embodiment of the present invention, and have corresponding functional modules and beneficial effects for executing the method. Technical details that are not described in detail in the above embodiments may be referred to a response method based on a touch key provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A response method based on touch keys is characterized by comprising the following steps:
after a pressing event of a touch key is detected, collecting a capacitance value corresponding to the touch key according to a preset frequency;
when the variation value between the second capacitance value acquired this time and the first capacitance value acquired last time is larger than a first preset threshold value, continuously acquiring capacitance values for preset times;
if the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value, and the change rule of the capacitance values acquired within the preset times meets a preset requirement, determining that a lift-up event of the touch key is detected and responding to the lift-up event;
wherein, the change law of the capacitance value of gathering in the preset number of times accords with and predetermines the requirement, includes:
the capacitance values acquired within the preset times are monotonically changed according to the acquisition sequence, and a second change rate of each capacitance value relative to a previous capacitance value is smaller than a first change rate of a second capacitance value relative to the first capacitance value, wherein when the first capacitance value is larger than the second capacitance value, the monotonic change is a decreasing change, when the first capacitance value is smaller than the second capacitance value, the monotonic change is an increasing change, and the first change rate and the second change rate are represented by absolute values.
2. The method according to claim 1, wherein after detecting a pressing event of a touch key, acquiring a capacitance value corresponding to the touch key according to a preset frequency comprises:
when a pressing event of the touch key is detected, after a preset time length, capacitance values corresponding to the touch key are collected according to a preset frequency.
3. The method of claim 1, prior to detecting a press event of a touch key, comprising:
acquiring a reference capacitance value of a touch key;
and when the difference between the current capacitance value of the touch key and the reference capacitance value is judged to be larger than a preset touch threshold value, generating a pressing event of the touch key.
4. The method according to claim 3, wherein the first preset threshold is a set proportion of the preset touch threshold.
5. The method according to claim 1, further comprising, during the step of continuously acquiring the capacitance values for the preset number of times:
and if the difference between the currently acquired capacitance value and the reference capacitance value of the touch key is smaller than or equal to the second preset threshold value, generating a lifting event of the touch key and responding to the lifting event.
6. A touch key based response device, comprising:
the first capacitance acquisition module is used for acquiring a capacitance value corresponding to the touch key according to a preset frequency after a pressing event of the touch key is detected;
the second capacitance acquisition module is used for continuously acquiring capacitance values of preset times when the change value between the first capacitance value acquired this time and the second capacitance value acquired last time is larger than a first preset threshold value;
the response module is used for determining that a lifting event of the touch key is detected and responding to the lifting event when the difference between the last capacitance value acquired within the preset times and the reference capacitance value of the touch key is larger than a second preset threshold value and the change rule of the capacitance values acquired within the preset times meets the preset requirement;
wherein, the change law of the capacitance value of gathering in the preset number of times accords with and predetermines the requirement, includes:
the capacitance values acquired within the preset times are monotonically changed according to the acquisition sequence, and a second change rate of each capacitance value relative to a previous capacitance value is smaller than a first change rate of a second capacitance value relative to the first capacitance value, wherein when the first capacitance value is larger than the second capacitance value, the monotonic change is a decreasing change, when the first capacitance value is smaller than the second capacitance value, the monotonic change is an increasing change, and the first change rate and the second change rate are represented by absolute values.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the touch key based response method according to any one of claims 1-5.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the touch key based response method according to any of claims 1-5 when executing the computer program.
CN201710542694.5A 2017-07-05 2017-07-05 Response method and device based on touch key, storage medium and electronic equipment Expired - Fee Related CN107294522B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710542694.5A CN107294522B (en) 2017-07-05 2017-07-05 Response method and device based on touch key, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710542694.5A CN107294522B (en) 2017-07-05 2017-07-05 Response method and device based on touch key, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN107294522A CN107294522A (en) 2017-10-24
CN107294522B true CN107294522B (en) 2020-09-01

Family

ID=60100200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710542694.5A Expired - Fee Related CN107294522B (en) 2017-07-05 2017-07-05 Response method and device based on touch key, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN107294522B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108595044B (en) * 2018-03-29 2020-08-04 维沃移动通信有限公司 Control method of touch screen and terminal
CN108717335B (en) * 2018-05-21 2021-12-21 深圳和而泰智能控制股份有限公司 Anti-error detection method and device
CN111371462B (en) * 2018-12-26 2024-03-05 无锡飞翎电子有限公司 Anti-interference method and device for touch keys, electronic equipment and storage medium
CN110048703A (en) * 2019-04-18 2019-07-23 珠海格力电器股份有限公司 A kind of method, apparatus and terminal device improving touch key-press sensitivity
CN110310391B (en) * 2019-05-21 2021-11-30 深圳绿米联创科技有限公司 Touch wake-up method and device, electronic equipment and storage medium
CN112073778A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and fault-tolerant method for key transmission
CN110502143B (en) * 2019-07-18 2022-02-15 深圳贝特莱电子科技股份有限公司 Capacitive screen touch detection method and device
CN113168258B (en) * 2019-10-30 2022-09-20 深圳市汇顶科技股份有限公司 Touch event detection method, MCU, touch device and storage medium
CN110824378B (en) * 2019-10-31 2022-02-15 中电海康无锡科技有限公司 Touch key detection method
CN111026300B (en) * 2019-11-19 2021-04-02 维沃移动通信有限公司 Screen display method and electronic equipment
CN110989817B (en) * 2019-11-29 2021-07-30 Oppo广东移动通信有限公司 Electronic equipment and electronic equipment starting management method
CN111151000B (en) * 2019-12-26 2023-08-29 歌尔股份有限公司 Method, device, equipment and storage medium for adjusting operation lever
CN111291653B (en) * 2020-01-21 2023-06-16 Oppo(重庆)智能科技有限公司 Fingerprint event reporting method and device and electronic equipment
CN111404534B (en) * 2020-03-18 2023-08-08 北京经纬恒润科技股份有限公司 Triggering judgment method and device of capacitive touch switch
CN111625174B (en) * 2020-05-06 2022-01-04 Oppo(重庆)智能科技有限公司 Touch screen control method and device, electronic equipment and storage medium
CN113126813B (en) * 2021-03-01 2023-03-21 卧安科技(深圳)有限公司 Correction method and device for key misjudgment, terminal equipment and storage medium
CN114099035B (en) * 2021-12-30 2023-10-24 东莞市力博得电子科技有限公司 Electric toothbrush control method, electric toothbrush and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908875A (en) * 2010-07-23 2010-12-08 中颖电子有限公司 Key-judging method for capacitive touch keys
CN101968530A (en) * 2010-09-30 2011-02-09 江苏惠通集团有限责任公司 Key detection method and device
CN102833398A (en) * 2012-08-09 2012-12-19 广东欧珀移动通信有限公司 Method for rapidly entering shooting mode and mobile terminal
CN103677452A (en) * 2012-08-30 2014-03-26 华为终端有限公司 Capacitive touch screen calibration method and capacitive touch device
CN104716944A (en) * 2015-03-30 2015-06-17 广东美的厨房电器制造有限公司 Trigging judgement method of touch key and household appliance
CN105790747A (en) * 2016-02-25 2016-07-20 广东美的厨房电器制造有限公司 Touch key triggering detection method and triggering detection device
CN105824479A (en) * 2015-08-28 2016-08-03 维沃移动通信有限公司 Terminal touch button implementation method and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908875A (en) * 2010-07-23 2010-12-08 中颖电子有限公司 Key-judging method for capacitive touch keys
CN101968530A (en) * 2010-09-30 2011-02-09 江苏惠通集团有限责任公司 Key detection method and device
CN102833398A (en) * 2012-08-09 2012-12-19 广东欧珀移动通信有限公司 Method for rapidly entering shooting mode and mobile terminal
CN103677452A (en) * 2012-08-30 2014-03-26 华为终端有限公司 Capacitive touch screen calibration method and capacitive touch device
CN104716944A (en) * 2015-03-30 2015-06-17 广东美的厨房电器制造有限公司 Trigging judgement method of touch key and household appliance
CN105824479A (en) * 2015-08-28 2016-08-03 维沃移动通信有限公司 Terminal touch button implementation method and terminal
CN105790747A (en) * 2016-02-25 2016-07-20 广东美的厨房电器制造有限公司 Touch key triggering detection method and triggering detection device

Also Published As

Publication number Publication date
CN107294522A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN107294522B (en) Response method and device based on touch key, storage medium and electronic equipment
CN107340910B (en) Touch key response method and device, storage medium and electronic equipment
CN106775087B (en) Touch screen control method and device of mobile terminal and mobile terminal
US10747368B2 (en) Method and device for preventing false-touch on touch screen, mobile terminal and storage medium
CN106708407B (en) Prevent the method, device and mobile terminal of touch key-press false triggering
CN107463289B (en) Calibration method and device of touch screen, storage medium and terminal
EP3336679B1 (en) Method and terminal for preventing unintentional triggering of a touch key and storage medium
CN107357458B (en) Touch key response method and device, storage medium and mobile terminal
WO2018107849A1 (en) Method for controlling touch operation on mobile terminal, and related product
CN109583356B (en) Fingerprint identification method and related product
CN106855784A (en) Prevent method, device and the terminal of touch key-press false triggering
CN106681635B (en) Split screen false touch prevention method and device and mobile terminal
CN106681554B (en) A kind of control method of mobile terminal touch screen, device and mobile terminal
CN106681637B (en) A kind of touch screen display methods, device and mobile terminal
CN107390931B (en) Response control method and device for touch operation, storage medium and mobile terminal
CN106909250B (en) Touch operation processing method and device and mobile terminal
CN109240991B (en) File recommendation method and device, storage medium and intelligent terminal
CN109033247B (en) Application program management method and device, storage medium and terminal
CN107105090B (en) A kind of control method, device and the mobile terminal of suspension button
CN109460364B (en) Application program detection method and device, storage medium and mobile terminal
CN106502470A (en) Prevent method, device and the terminal of touch key-press false triggering
CN107402712B (en) Touch operation response method and device, storage medium and terminal
CN106776259B (en) Mobile terminal frame rate detection method and device and mobile terminal
EP3444717B1 (en) Volume adjustment method, mobile terminal and storage medium
CN105159548A (en) List interface operating method and electronic terminal

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200901

CF01 Termination of patent right due to non-payment of annual fee