Method for preventing reverse mistaken touch of key and computer readable storage medium

By calculating and analyzing the pressure difference and accumulation sum of the buttons, and judging the trigger and release status of the buttons, the problems of accidentally touching and data drift caused by reverse pressing and pressing away from the center of the button are solved, and higher key accuracy and stability are achieved.

CN119995580APending Publication Date: 2025-05-13NANJING PRIME SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510036251.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

When the existing pressure/key touch technology is pressed in reverse or pressed away from the center of the button, it is easy to cause abnormal situations such as false touch and data drift, which are mainly due to the damage to the forward press signal caused by material creep.

Method used

By sampling the pressure data of the button, the pressure difference value is calculated, and the triggering and release state of the button is accumulated and judged based on the positive and negative pressure difference. The total pressure difference and threshold value are used to determine whether to enter the key triggering process, thereby preventing reverse error contact.

Benefits of technology

It effectively reduces key logic errors and data drift problems caused by reverse pressing or pressing away from the center of the key, and improves the accuracy and stability of the key.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995580A_ABST
    Figure CN119995580A_ABST
Patent Text Reader

Abstract

The invention provides a method for preventing reverse mistaken touch of a key and a computer readable storage medium, and a pressure change process of forward pressing or negative pressing is reflected by setting four numerical values of a total pressure difference sum, an effective pressing pressure difference cumulative sum, a positive pressure difference cumulative sum and a negative pressure difference cumulative sum. Through the change characteristics of the four values, effective forward pressing or effective reverse pressing can be identified, the creep influence of a key material is eliminated, and the problems of key misoperation and abnormal data drift are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of key touch technology, and in particular to a method for preventing reverse accidental key touches and a computer-readable storage medium. Background Art

[0002] Existing pressure / button touch button technology generally recognizes pressure by setting a reference value, trigger threshold and follow threshold. However, for sensors that can generate positive and negative pressure or sensors that generate unidirectional pressure. When the reverse pressure is released, due to the influence of material creep, an abnormal positive pressure signal appears, resulting in false touch or false touch of reverse pressure. When the pressing position deviates far from the center of the button, the force direction will change and reverse pressing force will appear. Figure 1 As shown, the key value changes from large to small; when the reverse pressure is released, the key value changes from small to large due to the influence of material deformation recovery. This whole process of change will destroy the logical relationship of the forward pressing algorithm, leading to abnormal situations such as false touch and data drift. When the pressing position deviates far from the center of the key, the force direction will change, and reverse pressing force will appear. At this time, the key value changes from large to small; when the reverse pressure is released, the key value changes from small to large due to the influence of material deformation recovery. This whole process of change will destroy the logical relationship of the forward pressing algorithm, leading to abnormal situations such as false touch and data drift.

[0003] The above abnormal situation may also occur if reverse pressing or a situation equivalent to reverse pressing is accidentally triggered during use, production or maintenance. Summary of the invention

[0004] The purpose of the present invention is to provide a method for preventing false touches of a key in the reverse direction. By taking advantage of the opposite relationship between the waveforms produced by pressing the key in the forward direction and in the reverse direction, a method for determining the touch direction of the key is added, which can effectively solve abnormal situations such as false touches and data drift caused by pressing the key in the reverse direction and pressing the key away from the center position of the key.

[0005] To achieve the above object, the present invention provides a method for preventing a key from being accidentally touched in the reverse direction, which specifically comprises the following steps:

[0006] 1) Initialization: reset the maximum pressure value, minimum pressure value, total pressure difference, cumulative positive pressure difference, cumulative negative pressure difference, and cumulative effective pressing pressure difference to zero;

[0007] 2) within a preset period, sampling the pressure data of the key sensing module at a predetermined frequency;

[0008] 3) Calculate the pressure difference at the current moment. The pressure difference is the difference between the pressure value at the current moment and the pressure value at the previous moment, that is, ΔFt =F t -F t-1, ΔF t When it is greater than or equal to 0, it is defined as a positive pressure difference, and the maximum pressure value is updated to the current pressure value, and the minimum pressure value remains unchanged; ΔF t When it is less than 0, it is defined as a negative pressure difference, and the minimum pressure value is updated to the current pressure value, while the maximum pressure value remains unchanged;

[0009] 4) Add up all the pressure differences at the current moment and before to get the total pressure difference;

[0010] 5) Calculate the cumulative sum of positive pressure differences, the cumulative sum of negative pressure differences, and the cumulative sum of effective pressing pressure differences according to the pressure difference value at the current moment;

[0011] 6) Read the current button status,

[0012] If the key is in the trigger state, execute step 7) to determine whether the key is released according to the cumulative sum of the effective pressing pressure difference, and return to step b);

[0013] If the button is in the untriggered state, execute step 8) to determine whether to enter the button triggering process according to the total pressure difference:

[0014] If the total pressure difference is greater than or equal to the total reset threshold, execute step 9) compare the cumulative sum of the effective pressing pressure difference with the key trigger threshold, and if the cumulative sum of the effective pressing pressure difference is greater than or equal to the key trigger threshold, determine that the key is triggered;

[0015] If the total pressure difference sum is less than the total reset threshold, perform the following steps:

[0016] 9) Accumulate the effective pressing pressure difference and clear it to zero;

[0017] 10) If the cumulative sum of the positive pressure difference and the cumulative sum of the negative pressure difference are both less than the set clearing threshold, the total pressure difference sum is cleared to zero and the process ends; otherwise, if the cumulative sum of the positive pressure difference or the cumulative sum of the negative pressure difference is greater than the set clearing threshold, the process ends directly.

[0018] Further, for a key that is effectively pressed in the forward direction, the above step 5) is specifically as follows:

[0019] If the pressure difference at the current moment is greater than or equal to zero, add the pressure difference at the current moment to the cumulative sum of the positive pressure difference at the previous moment to obtain the cumulative sum of the positive pressure difference at the current moment and the cumulative sum of the effective pressing pressure difference, and clear the cumulative sum of the negative pressure difference;

[0020] If the current pressure difference is less than zero, add the absolute value of the current pressure difference to the cumulative negative pressure difference of the previous moment to obtain the current negative pressure difference cumulative sum, and clear the current positive pressure difference cumulative sum and the effective pressing pressure difference cumulative sum.

[0021] Further, for a key that is effective for negative pressing, the above step 5) is specifically as follows:

[0022] If the current pressure difference is greater than or equal to zero, the current pressure difference is added to the cumulative sum of the positive pressure difference at the previous moment to obtain the current cumulative sum of the positive pressure difference, and the negative pressure difference cumulative sum and the effective pressing pressure difference cumulative sum are cleared;

[0023] If the current pressure difference is less than zero, add the absolute value of the current pressure difference to the cumulative sum of the negative pressure differences at the previous moment to obtain the current cumulative sum of the negative pressure differences and the effective pressing pressure difference, and clear the current cumulative positive pressure difference.

[0024] Furthermore, the specific steps of the above step 7) to determine whether the key is released are as follows: the accumulated sum of the effective pressing pressure differences is compared with the key release threshold; if the accumulated sum of the effective pressing pressure differences is less than or equal to the key release threshold, the key status is updated to released; if the accumulated sum of the effective pressing pressure differences is greater than the key release threshold, the key status remains triggered.

[0025] Furthermore, the release threshold of the above-mentioned key is coefficient*(maximum pressure value+minimum pressure value).

[0026] Furthermore, the above coefficient is 0.5.

[0027] Furthermore, the total reset threshold is twice the key trigger threshold.

[0028] Furthermore, the clearing threshold is 0.5 times the key triggering threshold.

[0029] The present invention further proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.

[0030] The method for preventing reverse mis-touch of a key of the present invention effectively reduces the problem of malfunction and data drift caused by key logic errors caused by reverse pressing or pressing away from the key center.

[0031] It should be understood that all combinations of the aforementioned concepts and the additional concepts described in more detail below can be considered as part of the inventive subject matter of the present disclosure as long as such concepts are not mutually inconsistent. In addition, all combinations of the claimed subject matter are considered as part of the inventive subject matter of the present disclosure.

[0032] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in various figures may be represented by the same reference numeral. For clarity, not every component is labeled in every figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings, in which:

[0034] Figure 1 It is a schematic diagram of possible mis-touch due to key creep effect in the prior art;

[0035] Figure 2 The present invention is a flowchart of a method for preventing reverse accidental key touches according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.

[0037] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.

[0038] Figure 2 1 is a flow chart of a method for preventing a key from being accidentally touched in reverse according to an embodiment of the present invention. The method for preventing a key from being accidentally touched in reverse according to the present invention specifically comprises the following steps:

[0039] First, initialize, initialize, reset the maximum pressure value, minimum pressure value, total pressure difference, positive pressure difference accumulation, negative pressure difference accumulation, and effective pressing pressure difference accumulation. Then, within the set time period, sample the pressure data of the key sensing module at a predetermined frequency, and calculate the pressure difference value at the current moment. The pressure difference value is the difference between the pressure value at the current moment and the pressure value at the previous moment, that is, ΔF t =F t -F t-1, ΔF t When it is greater than or equal to 0, it is defined as a positive pressure difference, and the maximum pressure value is updated to the current pressure value, and the minimum pressure value remains unchanged; ΔF t When it is less than 0, it is defined as a negative pressure difference. The minimum pressure value is updated to the pressure value at the current moment, and the maximum pressure value remains unchanged. All pressure difference values ​​before the current moment (including the current moment) are accumulated to obtain the total pressure difference and Sum 总。

[0040] In this embodiment, the key is a key that is effective when pressed in the forward direction, and the above step 5) is specifically as follows:

[0041] If the pressure difference at the current moment is greater than or equal to zero, the pressure difference at the current moment is added to the cumulative sum of the positive pressure difference at the previous moment to obtain the cumulative sum of the positive pressure difference at the current moment and the cumulative sum of the effective pressing pressure difference, and the cumulative sum of the negative pressure difference is cleared;

[0042] If the current pressure difference is less than zero, add the absolute value of the current pressure difference to the cumulative negative pressure difference of the previous moment to obtain the current negative pressure difference cumulative sum, and clear the current positive pressure difference cumulative sum and the effective pressing pressure difference cumulative sum.

[0043] Then, read the current state of the button to determine whether the current state of the button is the trigger state:

[0044] If the current button is in the triggered state, the subsequent process of determining whether the button is released will be entered.

[0045] If the button is in the non-trigger state, the total pressure difference and Sum 总 Compare with the total reset threshold Y. If the total pressure difference and Sum 总 If the value is greater than or equal to the total reset threshold Y, then the key is determined whether to trigger based on the accumulated effective pressing pressure difference. If the accumulated effective pressing pressure difference is greater than or equal to the key triggering threshold Key_Th, then the state of the current key is updated to the triggered state, otherwise the state of the current key remains in the non-triggered state.

[0046] If the total pressure difference and Sum 总If it is less than the total reset threshold Y, the accumulated sum of the effective pressing pressure difference is cleared, that is, the accumulated sum of the effective pressing pressure difference will be reset to zero. Next, the accumulated sum of the positive pressure difference and the accumulated sum of the negative pressure difference are respectively compared with the reset threshold X. If both the accumulated sum of the positive pressure difference and the accumulated sum of the negative pressure difference are less than or equal to the set reset threshold X, the total pressure difference sum Sum 总 is reset to zero, this process ends, and return to step 2). Otherwise, if either the accumulated sum of the positive pressure difference or the accumulated sum of the negative pressure difference is greater than the reset threshold X, it directly ends and returns to step 2).

[0047] In this embodiment, the specific steps for determining whether the key is released are as follows: Compare the accumulated sum of the effective pressing pressure difference at the current moment with the key release threshold. If the pressure at the current moment is less than or equal to the key release threshold, the state of the key is updated to released. If the accumulated sum of the effective pressing pressure difference at the current moment is greater than the key release threshold, the state of the key remains triggered.

[0048] In this embodiment, the key release threshold is coefficient * (maximum pressure value + minimum pressure value), and the above coefficient is 0.5.

[0049] In other embodiments, if the key is a key with negative pressing being effective, the above step 5) is specifically as follows:

[0050] If the pressure difference at the current moment is greater than or equal to zero, it is a positive pressing. Add the pressure difference at the current moment to the accumulated sum of the positive pressure difference at the previous moment to obtain the accumulated sum of the positive pressure difference at the current moment, and reset the accumulated sum of the negative pressure difference and the accumulated sum of the effective pressing pressure difference to zero;

[0051] If the pressure difference at the current moment is less than zero, it is a negative pressing. Add the absolute value of the pressure difference at the current moment to the accumulated sum of the negative pressure difference at the previous moment to obtain the accumulated sum of the negative pressure difference and the accumulated sum of the effective pressing pressure difference at the current moment, and reset the accumulated sum of the positive pressure difference at the current moment to zero.

[0052] The remaining steps are similar to those described above and will not be elaborated here.

[0053] In summary, in order to solve the problem of reverse accidental touch of the key, the present invention uses the total pressure difference sum and the threshold Y as the judgment points. When the total pressure difference sum Sum 总 < Y, it is defaulted to the reverse pressing state or the state of no key being pressed, and the key - related data is always reset to prevent the key value from exceeding the key trigger threshold Key_Th and causing misoperation. When the total pressure difference sum Sum 总 > Y, the reset of the key value is stopped, and the key value is normally recorded. When the key value > Key_Th, the positive key is normally pressed and effective. Y is set according to the actual situation. In this embodiment, Y is twice that of Key_Th.

[0054] When no key is pressed, the theoretical total pressure difference and Sum 总 The long-term accumulation of positive and negative pressure differences will tend to 0, but in fact there will be an accumulation error, resulting in Sum 总 can be positive or negative. 总 When it is a negative value and is relatively large, it will affect the sensitivity of the key. Therefore, the Sum is determined by the cumulative sum of the positive pressure difference and the cumulative sum of the negative pressure difference. 总 When the accumulated sum of the positive pressure difference and the accumulated sum of the negative pressure difference are both less than the clearing threshold value X, the current state is considered to be "no key pressed state", and the Sum 总 Clear to 0. X is a clearing threshold, which is set according to actual conditions. In this embodiment, the clearing threshold X is 0.5 times the key triggering threshold.

[0055] When the noise is loud and the instantaneous pressure difference reaches Key_Th, it is easy to cause malfunction. If the total pressure difference is less than Key_Th at this time, it can be known that it is caused by noise rather than normal pressing. In this way, it can be judged that the key is malfunctioning and not responding.

[0056] The present invention reflects the pressure change process of positive or negative pressing by setting four values: total pressure difference, positive pressure difference accumulation, negative pressure difference accumulation, and effective pressing pressure difference accumulation. Through the change characteristics of these four values, effective positive pressing or effective reverse pressing can be identified, the creep effect of key material can be eliminated, and the malfunction of keys and abnormal data drift can be solved.

[0057] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.

Claims

1. A method for preventing a button from being accidentally touched in reverse direction, applicable to a button of an electronic device, characterized in that: The following steps are involved: 1) Initialization: reset the maximum pressure value, minimum pressure value, total pressure difference, cumulative positive pressure difference, cumulative negative pressure difference, and cumulative effective pressing pressure difference to zero; 2) within a preset period, sampling the pressure data of the key sensing module at a predetermined frequency; 3) Calculate the pressure difference at the current moment. The pressure difference is the difference between the pressure value at the current moment and the pressure value at the previous moment, that is, ΔF t =F t -F t-1 , ΔF t When it is greater than or equal to 0, it is defined as a positive pressure difference, and the maximum pressure value is updated to the current pressure value, and the minimum pressure value remains unchanged; ΔF t When it is less than 0, it is defined as a negative pressure difference, and the minimum pressure value is updated to the current pressure value, while the maximum pressure value remains unchanged; 4) Add up all the pressure differences at the current moment and before to get the total pressure difference; 5) Calculate the cumulative sum of positive pressure differences, the cumulative sum of negative pressure differences, and the cumulative sum of effective pressing pressure differences according to the pressure difference value at the current moment; 6) Read the current button status, If the key is in the trigger state, execute step 7) to determine whether the key is released according to the cumulative sum of the effective pressing pressure difference, and return to step b); If the button is in the untriggered state, execute step 8) to determine whether to enter the button triggering process according to the total pressure difference: If the total pressure difference is greater than or equal to the total reset threshold, execute step 9) compare the cumulative sum of the effective pressing pressure difference with the key trigger threshold, and if the cumulative sum of the effective pressing pressure difference is greater than or equal to the key trigger threshold, determine that the key is triggered; If the total pressure difference sum is less than the total reset threshold, perform the following steps: 9) Accumulate the effective pressing pressure difference and clear it to zero; 10) If the cumulative sum of the positive pressure difference and the cumulative sum of the negative pressure difference are both less than the set clearing threshold, the total pressure difference sum is cleared to zero and the process ends; otherwise, if the cumulative sum of the positive pressure difference or the cumulative sum of the negative pressure difference is greater than the set clearing threshold, the process ends directly.

2. The method for preventing reverse accidental key touch according to claim 1, characterized in that: in, The above step 5) is specifically as follows: If the pressure difference at the current moment is greater than or equal to zero, the pressure difference at the current moment is added to the cumulative sum of the positive pressure difference at the previous moment to obtain the cumulative sum of the positive pressure difference at the current moment and the cumulative sum of the effective pressing pressure difference, and the cumulative sum of the negative pressure difference is cleared; If the current pressure difference is less than zero, add the absolute value of the current pressure difference to the cumulative negative pressure difference of the previous moment to obtain the current negative pressure difference cumulative sum, and clear the current positive pressure difference cumulative sum and the effective pressing pressure difference cumulative sum.

3. The method for preventing reverse accidental key touch according to claim 1, characterized in that: in, The above step 5) is specifically as follows: If the current pressure difference is greater than or equal to zero, the current pressure difference is added to the cumulative sum of the positive pressure difference at the previous moment to obtain the current cumulative sum of the positive pressure difference, and the negative pressure difference cumulative sum and the effective pressing pressure difference cumulative sum are cleared; If the current pressure difference is less than zero, add the absolute value of the current pressure difference to the cumulative sum of the negative pressure differences at the previous moment to obtain the current cumulative sum of the negative pressure differences and the effective pressing pressure difference, and clear the current cumulative positive pressure difference.

4. The method for preventing reverse accidental key touch according to claim 1, characterized in that: in, The above step 7) determines whether the key is released as follows: the cumulative sum of the effective pressing pressure differences is compared with the key release threshold. If the cumulative sum of the effective pressing pressure differences is less than or equal to the key release threshold, the key state is updated to released; if the cumulative sum of the effective pressing pressure differences is greater than the key release threshold, the key state remains triggered.

5. The method for preventing reverse accidental key touch according to claim 4, characterized in that: The release threshold of the above-mentioned key is coefficient*(maximum pressure value+minimum pressure value).

6. The method for preventing reverse accidental key touch according to claim 5, characterized in that: The above coefficient is 0.

5.

7. The method for preventing reverse accidental key touch according to claim 1, characterized in that: The above total reset threshold is twice the key trigger threshold.

8. The method for preventing reverse accidental key touch according to claim 1, characterized in that: The above clearing threshold is 0.5 times of the key triggering threshold.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.