CN113126813B - Correction method and device for key misjudgment, terminal equipment and storage medium - Google Patents

Correction method and device for key misjudgment, terminal equipment and storage medium Download PDF

Info

Publication number
CN113126813B
CN113126813B CN202110223688.XA CN202110223688A CN113126813B CN 113126813 B CN113126813 B CN 113126813B CN 202110223688 A CN202110223688 A CN 202110223688A CN 113126813 B CN113126813 B CN 113126813B
Authority
CN
China
Prior art keywords
key
value
preset
data set
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110223688.XA
Other languages
Chinese (zh)
Other versions
CN113126813A (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.)
Wocao Technology Shenzhen Co ltd
Original Assignee
Wocao Technology Shenzhen Co 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 Wocao Technology Shenzhen Co ltd filed Critical Wocao Technology Shenzhen Co ltd
Priority to CN202110223688.XA priority Critical patent/CN113126813B/en
Publication of CN113126813A publication Critical patent/CN113126813A/en
Application granted granted Critical
Publication of CN113126813B publication Critical patent/CN113126813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
    • G06F3/04186Touch location disambiguation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Electronic Switches (AREA)

Abstract

The application is applicable to the technical field of signal processing, and provides a correction method and device for key misjudgment, terminal equipment and a storage medium. In the embodiment of the application, the key values to be processed are obtained at intervals of a first preset period; when the key value to be processed is smaller than a preset key threshold value, acquiring a first preset number of key values at intervals of a second preset period to obtain a key data set; the second preset period is less than the first preset period; when all the key values in the key data set are smaller than the key threshold, calculating a first average value of all the key values in the key data set; and determining a trigger result according to the first mean value, so that the problem that the current state is misjudged due to inaccuracy of a detection result after the key touch is finished is solved.

Description

Correction method and device for key misjudgment, terminal equipment and storage medium
Technical Field
The present application belongs to the technical field of signal processing, and in particular, to a method and an apparatus for correcting a key misjudgment, a terminal device, and a storage medium.
Background
With the development of society, touch keys are more and more common in life of people due to the characteristics that the touch keys are superior to traditional mechanical keys in aspects of appearance, service life and the like, and capacitive touch keys are more widely applied in touch keys and are applied to household appliances, consumer electronics, industrial control, mobile equipment and the like.
However, the capacitive touch key has no mechanical structure, and the detected electric quantity is a slight change, so that various interferences can be encountered in the detection process, and further, sometimes after the key touch is finished, the current state is erroneously determined to be in the key touch state due to inaccuracy of the detection result.
Disclosure of Invention
The embodiment of the application provides a correction method and device for key misjudgment, terminal equipment and a storage medium, and can solve the problem that after key touch is finished, the current state is misjudged due to inaccurate detection results.
In a first aspect, an embodiment of the present application provides a method for correcting a key misjudgment, including:
acquiring to-be-processed key values at intervals of a first preset period;
when the key value to be processed is smaller than a preset key threshold value, acquiring a first preset number of key values at intervals of a second preset period to obtain a key data set; the second preset period is less than the first preset period;
when all the key values in the key data set are smaller than the key threshold, calculating a first average value of all the key values in the key data set;
and determining a trigger result according to the first average value.
In a second aspect, an embodiment of the present application provides a device for correcting a key misjudgment, including:
the acquisition module is used for acquiring the key values to be processed at intervals of a first preset period;
the judgment module is used for acquiring a first preset number of key values at intervals of a second preset period to obtain a key data set when the key value to be processed is smaller than a preset key threshold value; the second preset period is less than the first preset period;
the calculation module is used for calculating a first average value of each key value in the key data set when each key value in the key data set is smaller than the key threshold;
and the result determining module is used for determining a trigger result according to the first average value.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements any one of the above key misjudgment correction methods when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the above methods for correcting a key misjudgment.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, enables the terminal device to execute any one of the above correction methods for key misjudgment in the first aspect.
In the embodiment of the application, the key values to be processed are obtained at intervals of a first preset period, when the key values to be processed are smaller than a preset key threshold value, it is indicated that touch key operation is currently performed, then a first preset number of key values are obtained at intervals of a second preset period, a key data set is obtained, and then judgment after touch key generation is performed according to the obtained key data set, wherein the second preset period is smaller than the first preset period, and the judgment result after touch key generation is more accurate through the improvement of the key value obtaining frequency. When all the key values in the key data set are smaller than the key threshold value, the current state is still in a key touch state, a first mean value of all the key values in the key data set is calculated, and a trigger result is determined according to the first mean value so as to further determine the current state after the key is touched, so that the problem that the current state is misjudged due to inaccuracy of a detection result after the key touch is finished is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a method for correcting a key misjudgment according to an embodiment of the present application;
fig. 2 is a second flowchart illustrating a method for correcting a key misjudgment according to an embodiment of the present application;
fig. 3 is a third flowchart illustrating a method for correcting a key misjudgment according to an embodiment of the present application;
fig. 4 is a fourth flowchart illustrating a method for correcting a key misjudgment according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a correction apparatus for key misjudgment according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Fig. 1 is a schematic flow chart of a method for correcting a key misjudgment in an embodiment of the present application, where an execution main body of the method may be a terminal device, and as shown in fig. 1, the method for correcting a key misjudgment may include the following steps:
step S101, obtaining the key values to be processed at intervals of a first preset period.
In this embodiment, the capacitive touch key is more sensitive to various interferences because it detects a small change in the electrical quantity. For example, interference of power supply voltage, static electricity, temperature and humidity of the device in different environments, or interference caused by differences in the manufacturing process easily causes that after key touch is finished, the current state is judged to be in the key touch state by mistake due to inaccuracy of detection results, and therefore, the terminal needs to process the key value to be processed after obtaining the key value to be processed at intervals of a first preset period, so as to accurately judge whether the key is touched currently or not, or whether touch is released or not, namely, touch is finished. The first predetermined period may be set to 200ms.
It is understood that any two conductive objects have an induced capacitance therebetween, and one key, i.e., one pad and the ground, can also form an induced capacitance therebetween. The value of the sensing capacitor is a fixed and unchanging tiny value under the condition that the surrounding environment is unchanged. When a human finger is close to the touch key, the total induction capacitance value can be increased by the induction capacitance formed by the human finger and the ground and the induction capacitance formed by the parallel connection pad and the ground. And after the capacitive touch key IC detects that the value of the induction capacitor of a certain key changes, a determination signal that the certain key is pressed is output, so that response is triggered.
In one embodiment, before step S101, the method includes: when the initialization of the equipment is detected, acquiring an initial key value; and setting the product of the initial key value and a preset threshold calculation coefficient as a key threshold.
In this embodiment, after detecting that the device is initialized, the terminal device obtains a current initial key value, multiplies the initial key value by a preset threshold calculation base number to obtain a key threshold, and determines the key threshold according to the initialized key value, so that the accuracy of determining the key threshold is improved, and the subsequent determination result is more accurate. The preset threshold calculation coefficient may be set to 96%, and the determination threshold may be decreased by decreasing the threshold calculation coefficient, so as to improve the sensitivity of the touch operation.
Further, the terminal device may set a touch sensitivity fine-tuning interface to adjust the threshold setting during touch operation determination, so that the user can adjust the threshold setting as required, thereby being able to handle the response sensitivity problem that has not been covered.
It can be understood that, in the key touch process, the key threshold set when the key is touched is different according to different touch key designs, and may include two cases, that is, the set key threshold is lower than the key value when the touch operation occurs and the set key threshold is higher than the key value when the touch operation occurs, in the embodiment of the present application, the case where the key threshold set when the key is touched is higher than the key value when the touch operation occurs is taken as an example for explanation, that is, when the touch operation occurs, the acquired key value is lower than the key threshold; and when the key is not touched, the key value is higher than the key threshold value. The key misjudgment condition that the key still recognized as the touch state after touch release occurs is generally because the key value after touch and release does not recover to be higher than the set key threshold value.
In one embodiment, before step S101, the method includes: and when the initialization of the equipment is detected, acquiring a second preset number of key data sets, and respectively carrying out filtering processing on the second preset number of key data sets to obtain corresponding target key values. Carrying out mean value processing on a second preset number of target key values to obtain initial key values; and calculating the product of the initial key value and the threshold calculation coefficient to obtain the key threshold, and improving the accuracy of determining the key threshold, so that the subsequent judgment result is more accurate. Wherein, the second preset number may be 5.
In one embodiment, the threshold may be made more accurate by delaying the acquisition of the threshold in the face of inaccuracies in the threshold due to interference from user touches or from key sampling while the device is powered on. For example, in the face of the problem of voltage drop caused by large current of other modules when the device is powered on, the initial key threshold value can be determined after a period of time is delayed after the device is powered on, so that the interference is avoided by key initialization, and the accuracy of the initial threshold value is improved. And if the sampling value read normally by the touch key is set to be S1 and the sampling value in the power-on process is set to be S2, (S1-S2)/S1 > +/-5 percent, the threshold value is delayed for a period of time if the sampling value in the current power-on process influences the threshold value, and then the threshold value is determined.
Step S102, when the key value to be processed is smaller than a preset key threshold, obtaining a first preset number of key values at intervals of a second preset period to obtain a key data set; the second predetermined period is less than the first predetermined period.
In this embodiment, when the terminal device determines that the acquired to-be-processed key value is smaller than the set key threshold, it indicates that the touch operation is currently performed. The terminal equipment acquires a certain number of key values at a frequency faster than the acquisition frequency of the key values to be processed, wherein the faster frequency is a second period; the certain number is the first preset number, so that the acquired key values of the first preset number form a key data set, subsequent comparison and judgment are facilitated, touch release is judged in time, and corresponding response is carried out. The second preset period can be set to 10ms, and the data sampling frequency can be improved by shortening the period, so that the result value is more accurate; the first predetermined number may be set to 10.
And S103, when all the key values in the key data set are smaller than the key threshold, calculating a first average value of all the key values in the key data set.
And step S104, determining a trigger result according to the first average value.
In this embodiment, if the terminal device determines that all the key values in the key data set are smaller than the key threshold, which indicates that the current state may still be in the touch state, the terminal device needs to further confirm the current state, that is, the terminal device calculates a first average value of all the key values in the touch key data set, and determines the trigger result according to the obtained first average value. Correspondingly, if a key value which is not smaller than the key threshold value exists in the key data set, the terminal device determines the current trigger result as touch release, that is, the current touch is finished, and the terminal device continues to acquire the key value to be processed at intervals of the first preset period and then performs discrimination.
In one embodiment, as shown in fig. 2, step S104 includes:
step S201, continuously obtaining the key values at intervals of a second preset period to obtain the latest key data set.
And S202, calculating a second average value of each key value in the latest key data set.
And S203, when the second average value is larger than the first average value, determining that the trigger result is touch release.
In this embodiment, the terminal device continues to obtain key values at intervals of a second preset period to form a latest key data set, the terminal device compares the average value, that is, a second average value, of each key value in the latest key data set with the first average value to determine, if the second average value is greater than the first average value, that is, the second average value indicates that the key value result representing the current time is greater than the key value that may be in the touch state at the beginning, the terminal device determines that the current trigger result is touch release, that is, the current touch is finished, and the terminal device continues to obtain key values to be processed at intervals of the first preset period to determine.
In one embodiment, as shown in fig. 3, step S201 includes:
step S301, at least one group of key values with a second preset number is obtained.
And step S302, carrying out average value processing on the second preset number of key values to obtain a key average value.
And step S303, replacing the key mean value with the key data set to obtain the key value with the earliest time, and obtaining the latest key data set.
In this embodiment, the terminal device obtains at least one group of second preset number of key values, performs averaging processing on the key values to obtain a key average value that can represent the time period, and replaces the key value with the earliest time in the key data set with the obtained key average value to obtain a latest key data set, so as to facilitate subsequent result determination.
As a specific example, but not limited to, it is set that {2, 3, 2, 4, 5} exists in the current key data set, the key values are arranged in the morning and evening of time, when two groups of key values of the second preset number are obtained, and after the two groups of key values of the second preset number are subjected to averaging processing, the key mean values 3 and 4 are obtained, then after the key mean values are replaced, the latest key data set is obtained as {3, 4, 2, 4, 5}.
In one embodiment, as shown in fig. 4, after step S202, the method includes:
and S401, when the second average value is smaller than or equal to the first average value, continuously acquiring key values at intervals of a second preset period to obtain a latest key data set.
Step S402, judging a third average value of each key value in the latest key data set until the third average value is larger than the first average value, and determining that the trigger result is touch release.
In this embodiment, if the terminal device determines that the second average value is smaller than or equal to the first average value, it indicates that the key value result representing the current time is smaller than the key value that may be in the touch state initially, the current trigger result of the terminal device is still a touch key, the terminal device continues to obtain key values at intervals of the second preset period, and obtains a latest key data set, and then determines a third average value and a first average value of each key value in the latest key data set until the third average value is greater than the first average value, that is, the key value result representing the current time is larger than the key value that may be in the touch state initially, which indicates that the current touch is ended, and the terminal device continues to obtain key values to be processed at intervals of the first preset period, and then determines.
In one embodiment, after step S203, comprising: and calculating the product of the second average value and a preset threshold value calculation coefficient, and setting the product as a key threshold value.
In this embodiment, when the terminal device determines that the current trigger result is touch release, that is, when the current touch is finished, the key threshold value compared with the key value needs to be updated, so as to accurately determine the subsequent state and perform a relevant response, therefore, the terminal device needs to set the product of the second average value and the preset threshold calculation coefficient as the key threshold value.
In the embodiment of the application, the key values to be processed are obtained at intervals of a first preset period, when the key values to be processed are smaller than a preset key threshold value, it is indicated that touch key operation is currently performed, then a first preset number of key values are obtained at intervals of a second preset period, a key data set is obtained, and then judgment after touch key generation is performed according to the obtained key data set, wherein the second preset period is smaller than the first preset period, and the judgment result after touch key generation is more accurate through the improvement of the key value obtaining frequency. When all the key values in the key data set are smaller than the key threshold, the current state is still in a key touch state, then a first mean value of all the key values in the key data set is calculated, and a trigger result is determined according to the first mean value so as to further determine the current state after the key is touched, thereby solving the problem that the current state is misjudged due to inaccuracy of a detection result after the key touch is finished.
In an embodiment, because some interference exists, the capacitance value sampled by the touch key is inaccurate, and the touch key is prone to causing slow response to the touch operation, the terminal device needs to determine a currently detected key value to determine whether the touch key occurs currently, therefore, the terminal device performs comparison determination by obtaining a currently obtained first key value and a last obtained second key value, when the terminal device determines that the first key value is smaller than the second key value, it indicates that the current key value is smaller, when the obtained key value is lower than a set key threshold, the touch operation occurs, and if the first key value is larger than the preset key threshold, it indicates that although the current first key value is smaller, it cannot be accurately determined whether the touch operation occurs, and possibly due to the influence of environmental factors, the first key value is smaller, so that a first difference value between the first key value and the key threshold and a second difference value between the second key value and the key threshold are obtained, and whether the trigger result of the touch key occurs currently is further determined according to the first difference value and the second difference value.
In an embodiment, the determining the trigger result according to the first difference and the second difference includes: and the terminal equipment compares the second difference with a first product and a first difference of a preset first comparison coefficient, if the first difference is larger than the first product, the fact that the reduction of the current touch value is possibly caused by factors such as external environment and the like is indicated, the triggering result is set to be without a touch key, and the terminal equipment continues to acquire a key value.
Correspondingly, if the first difference is smaller than or equal to the first product, it is indicated that the reduction of the current key values may be caused by the user touching the keys, and further judgment needs to be performed, so the terminal device obtains a second preset number of key values at intervals of a second preset period, sorts the second preset number of key values by size, selects a third preset number of key values located in the middle from the sorted second preset number of key values, and uses the mean value of the third preset number of key values as the latest judgment basis. Specifically, if the mean value is judged to be less than or equal to a second product of the second difference value and a preset second comparison coefficient, the reduction of the current touch value is that the user touches the key, and the triggering result is set as the touch key; if the mean value is greater than the second product, it indicates that the decrease of the current key values may be caused by factors such as external environment, and the like, the mean values of the fourth preset number need to be continuously obtained by the above method for obtaining the mean values of the key values of the third preset number, and if all the mean values of the fourth preset number are less than the first product, the trigger result is set as the touch key. The current trigger result, namely whether touch operation is currently carried out or not, is determined through the means, so that the problem that the touch key is not responded is solved. The key value is obtained by the terminal equipment every other first preset period; the third preset number may be set to 3; the fourth preset number may be set to 4; the first comparison coefficient may be set to 10%; the second comparison coefficient is larger than the first comparison coefficient, and the second comparison coefficient may be set to 20%.
In one embodiment, the terminal device may adjust a key threshold value compared with the key values to increase a success rate of response when the key is touched, so that the terminal device may obtain a first preset number of key values at intervals of a third preset period, and select a maximum value and a minimum value from the first preset number of key values; the terminal equipment can judge the current sampling environment according to the difference value of the maximum value and the minimum value in the acquired key values. The accuracy of the final result is low due to the unstable sampling environment, so that the product of the minimum value and the preset threshold value calculation coefficient needs to be calculated under the condition that the sampling environment is stable, namely the difference value between the maximum value and the minimum value is smaller than the product of the maximum value and the preset stability coefficient, so as to be convenient for comparing with the current key threshold value to judge whether touch operation is performed currently, if the product is larger than the preset key threshold value, the touch operation is not performed currently, and therefore in order to enable subsequent touch to successfully respond, the key threshold value needs to be corrected in time, and the key threshold value is closer to a reasonable range. Therefore, the product of the minimum value and the preset threshold calculation coefficient can be replaced by the key threshold, so that the key threshold is corrected, and the success rate of response when the key is touched is improved. Wherein the third predetermined period may be set to 300s; the preset stability factor can be set to 1%, and the stability interval can be enlarged by increasing the stability factor to adapt to the user requirement.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the above-mentioned correction method for key misjudgment, fig. 5 is a schematic structural diagram of a correction device for key misjudgment in the embodiment of the present application, and as shown in fig. 5, the correction device for key misjudgment may include:
an obtaining module 501, configured to obtain the to-be-processed key value at intervals of a first preset period.
The determining module 502 is configured to, when the key value to be processed is smaller than a preset key threshold, obtain a first preset number of key values at intervals of a second preset period to obtain a key data set; the second predetermined period is less than the first predetermined period.
The calculating module 503 is configured to calculate a first average value of each key value in the key data set when each key value in the key data set is smaller than the key threshold.
A result determining module 504, configured to determine a trigger result according to the first average value.
In one embodiment, the result determination module may include:
and the first acquisition unit is used for continuously acquiring the key values at intervals of a second preset period to obtain the latest key data set.
And the calculating unit is used for calculating a second average value of each key value in the latest key data set.
And the result determining unit is used for determining that the trigger result is touch release when the second average value is larger than the first average value.
In one embodiment, the acquiring unit may include:
and the obtaining subunit is used for obtaining at least one group of key values with a second preset number.
And the average value processing subunit is used for carrying out average value processing on the second preset number of key values to obtain a key average value.
And the replacing subunit is used for replacing the key value with the earliest acquisition time in the key data set with the key mean value to obtain the latest key data set.
In one embodiment, the result determining module may further include:
and the second obtaining unit is used for continuously obtaining the key values at intervals of a second preset period to obtain the latest key data set when the second average value is smaller than or equal to the first average value.
And the judging unit is used for judging a third mean value of each key value in the latest key data set until the third mean value is larger than the first mean value, and determining that the triggering result is touch release.
In an embodiment, the device for correcting a key press misjudgment may further include:
and the first setting module is used for calculating the product of the second average value and a preset threshold calculation coefficient and setting the product as a key threshold.
In an embodiment, the device for correcting a key press misjudgment may further include:
and the detection module is used for acquiring the initial key value when the initialization of the equipment is detected.
And the second setting module is used for setting the product of the initial key value and a preset threshold value calculation coefficient as a key threshold value.
In the embodiment of the application, the key values to be processed are obtained at intervals of a first preset period, when the key values to be processed are smaller than a preset key threshold value, it is indicated that touch key operation is currently performed, then a first preset number of key values are obtained at intervals of a second preset period, a key data set is obtained, and judgment after touch key operation is performed according to the obtained key data set, wherein the second preset period is smaller than the first preset period, and a result judgment result after touch key operation is more accurate through improvement of key value obtaining frequency. When all the key values in the key data set are smaller than the key threshold, the current state is still in a key touch state, then a first mean value of all the key values in the key data set is calculated, and a trigger result is determined according to the first mean value so as to further determine the current state after the key is touched, thereby solving the problem that the current state is misjudged due to inaccuracy of a detection result after the key touch is finished.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the apparatus and the module described above may refer to corresponding processes in the foregoing system embodiments and method embodiments, and are not described herein again.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application. For convenience of explanation, only portions related to the embodiments of the present application are shown.
As shown in fig. 6, the terminal device 6 of this embodiment includes: at least one processor 600 (only one is shown in fig. 6), a memory 601 connected to the processor 600, and a computer program 602 stored in the memory 601 and operable on the at least one processor 600, such as a key press misjudgment correction program. When the processor 600 executes the computer program 602, steps in the embodiment of the method for correcting the key misjudgment, such as steps S101 to S104 shown in fig. 1, are implemented. Alternatively, the processor 600 executes the computer program 602 to implement the functions of the modules in the device embodiments, such as the modules 501 to 504 shown in fig. 5.
Illustratively, the computer program 602 may be divided into one or more modules, and the one or more modules are stored in the memory 601 and executed by the processor 600 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 602 in the terminal device 6. For example, the computer program 602 may be divided into an obtaining module 501, a determining module 502, a calculating module 503, and a result determining module 504, and the specific functions of the modules are as follows:
an obtaining module 501, configured to obtain to-be-processed key values at intervals of a first preset period;
the determining module 502 is configured to, when the key value to be processed is smaller than a preset key threshold, obtain a first preset number of key values at intervals of a second preset period to obtain a key data set; the second preset period is less than the first preset period;
the calculating module 503 is configured to calculate a first average value of each key value in the key data set when each key value in the key data set is smaller than the key threshold;
a result determining module 504, configured to determine a trigger result according to the first average value.
The terminal device 6 may include, but is not limited to, a processor 600 and a memory 601. Those skilled in the art will appreciate that fig. 6 is merely an example of the terminal device 6, and does not constitute a limitation to the terminal device 6, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, a bus, etc.
The Processor 600 may be a Central Processing Unit (CPU), and the Processor 600 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 601 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6 in some embodiments. In other embodiments, the memory 601 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the terminal device 6. Further, the memory 601 may include both an internal storage unit and an external storage device of the terminal device 6. The memory 601 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The memory 601 described above may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described or recited in any embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-drive, a removable hard drive, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (7)

1. A correction method for key misjudgment is characterized by comprising the following steps:
acquiring to-be-processed key values at intervals of a first preset period;
when the key value to be processed is smaller than a preset key threshold value, indicating that touch operation occurs, and then acquiring a first preset number of key values at intervals of a second preset period to obtain a key data set; the second preset period is less than the first preset period;
when all the key values in the key data set are smaller than the key threshold value, calculating a first average value of all the key values in the key data set;
determining a trigger result according to the first average value;
when a key value with a key value not less than a key threshold value exists in the key data set, determining the current trigger result as touch release;
the determining a trigger result according to the first mean value includes:
continuously acquiring key values at intervals of a second preset period to obtain a latest key data set;
calculating a second average value of each key value in the latest key data set;
when the second average value is larger than the first average value, determining that the trigger result is touch release;
before obtaining the key value to be processed at intervals of a first preset period, the method comprises the following steps:
when the initialization of the equipment is detected, acquiring an initial key value;
setting the product of the initial key value and a preset threshold value calculation coefficient as the key threshold value;
the correction method for the key misjudgment further comprises the following steps:
acquiring a first preset number of key values at intervals of a third preset period, and selecting a maximum value and a minimum value from the first preset number of key values;
when the difference between the maximum value and the minimum value is smaller than the product of the maximum value and a preset stability coefficient, calculating the product of the minimum value and a preset threshold calculation coefficient;
and if the product of the minimum value and the preset threshold value calculation coefficient is larger than the preset key threshold value, replacing the product of the minimum value and the preset threshold value calculation coefficient with the key threshold value.
2. The method for correcting the key misjudgment according to claim 1, wherein the step of continuously obtaining the key values at intervals of a second preset period to obtain a latest key data set comprises:
acquiring at least one group of key values of a second preset number;
carrying out average processing on the second preset number of key values to obtain a key average value;
and replacing the key mean value with the key value with the earliest acquisition time in the key data set to obtain the latest key data set.
3. The method for correcting erroneous judgment of a key set according to claim 1, wherein after calculating the second mean value of each key value in the latest key data set, the method comprises:
when the second mean value is smaller than or equal to the first mean value, continuously acquiring key values at intervals of a second preset period to obtain a latest key data set;
and judging a third mean value of each key value in the latest key data set until the third mean value is larger than the first mean value, and determining that the trigger result is touch release.
4. The method for correcting the key misjudgment according to claim 1, wherein after determining that the triggering result is the touch release, the method comprises:
and calculating the product of the second average value and a preset threshold calculation coefficient, and setting the product as the key threshold.
5. A correction device for key misjudgment is characterized by comprising:
the acquisition module is used for acquiring the key values to be processed at intervals of a first preset period;
the judging module is used for indicating that touch operation occurs when the key value to be processed is smaller than a preset key threshold value, and then acquiring a first preset number of key values at intervals of a second preset period to obtain a key data set; the second preset period is shorter than the first preset period, and when one key value which is not smaller than a key threshold value exists in the key data set, the current trigger result is determined to be touch release;
the calculation module is used for calculating a first average value of each key value in the key data set when each key value in the key data set is smaller than the key threshold value;
the result determining module is used for determining a trigger result according to the first average value;
the result determination module includes:
the acquisition unit is used for continuously acquiring the key values at intervals of a second preset period to obtain a latest key data set;
the calculation unit is used for calculating a second average value of each key value in the latest key data set;
a result determining unit, configured to determine that the trigger result is a touch release when the second average is greater than the first average;
the device comprises a detection module, a judgment module and a processing module, wherein the detection module is used for acquiring an initial key value when detecting that the device is initialized;
the second setting module is used for setting the product of the initial key value and a preset threshold value calculation coefficient as a key threshold value;
the device further comprises:
acquiring a first preset number of key values at intervals of a third preset period, and selecting a maximum value and a minimum value from the first preset number of key values;
when the difference between the maximum value and the minimum value is smaller than the product of the maximum value and a preset stability coefficient, calculating the product of the minimum value and a preset threshold calculation coefficient;
and if the product of the minimum value and the preset threshold value calculation coefficient is larger than the preset key threshold value, replacing the product of the minimum value and the preset threshold value calculation coefficient with the key threshold value.
6. A terminal device comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the method for correcting a key press misjudgment according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of a method for correcting a key press misjudgment according to any one of claims 1 to 4.
CN202110223688.XA 2021-03-01 2021-03-01 Correction method and device for key misjudgment, terminal equipment and storage medium Active CN113126813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110223688.XA CN113126813B (en) 2021-03-01 2021-03-01 Correction method and device for key misjudgment, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110223688.XA CN113126813B (en) 2021-03-01 2021-03-01 Correction method and device for key misjudgment, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113126813A CN113126813A (en) 2021-07-16
CN113126813B true CN113126813B (en) 2023-03-21

Family

ID=76772338

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110223688.XA Active CN113126813B (en) 2021-03-01 2021-03-01 Correction method and device for key misjudgment, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113126813B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115793869B (en) * 2022-10-27 2023-08-25 广芯微电子(广州)股份有限公司 Key state identification method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512542A (en) * 2018-03-29 2018-09-07 上海东软载波微电子有限公司 Touch key-press signal processing method and device, computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102495682B (en) * 2011-11-23 2015-05-20 江苏惠通集团有限责任公司 Touch recognition method, device, spatial mouse and control method thereof
CN107294522B (en) * 2017-07-05 2020-09-01 Oppo广东移动通信有限公司 Response method and device based on touch key, storage medium and electronic equipment
CN111352534B (en) * 2020-03-13 2021-05-28 珠海格力电器股份有限公司 Touch key touch threshold correction method, wire controller, electric appliance and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108512542A (en) * 2018-03-29 2018-09-07 上海东软载波微电子有限公司 Touch key-press signal processing method and device, computer readable storage medium

Also Published As

Publication number Publication date
CN113126813A (en) 2021-07-16

Similar Documents

Publication Publication Date Title
KR101455145B1 (en) User touch operation mode adaptive method and device
CN102968217B (en) The datum renewal method of touch-screen, system and touch control terminal
CN101963873B (en) Method for setting and calibrating capacitive-type touch panel capacitance base value
CN105388992A (en) Fingerprint recognition method and apparatus and terminal
EP2631744A1 (en) Touch panel device
CN111352534B (en) Touch key touch threshold correction method, wire controller, electric appliance and computer readable storage medium
CN108759892B (en) Sensor calibration method, electronic device and computer-readable storage medium
CN113126815B (en) Key response control method and device, terminal equipment and storage medium
CN104881174B (en) A kind of method and device of dynamic adjustment sensitivity of touch screen
CN107330308B (en) Terminal locking/unlocking method, device, terminal and computer readable storage medium
CN113126813B (en) Correction method and device for key misjudgment, terminal equipment and storage medium
CN108399042B (en) Touch identification method, device and system
CN106295595A (en) A kind of method of fingerprint recognition and terminal
CN106354300A (en) Method and terminal for preventing misoperation
CN110945464B (en) Identification method of sliding signal, MCU, touch equipment and storage medium
CN113126814B (en) Key non-response correction method and device, terminal equipment and storage medium
CN106980402B (en) Method and device for judging reset calibration and terminal
CN102495691B (en) touch point sensing method
CN115694464B (en) Pressure-sensitive switch control method, pressure-sensitive switch control device, electronic equipment and readable storage medium
CN105159555A (en) User equipment control method and user equipment
CN115904103A (en) Control method of terminal touch screen, terminal equipment and storage medium
CN111459346B (en) Capacitive touch device and gesture recognition method, chip and storage medium thereof
CN114003147A (en) Signal detection device, touch pad and electronic equipment
CN110737359A (en) Point reporting method, touch screen and storage medium
EP3220243B1 (en) Input device, control method of input device, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant