Key recognition method, device, equipment and electrical equipment

The press key recognition method addresses low accuracy and error-prone issues by analyzing voltage levels and durations to identify valid presses and prioritize key recognition, resulting in improved reliability and accuracy.

CN114337632BActive Publication Date: 2025-03-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111461375.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-03-18
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

Existing press key recognition technologies face challenges with low accuracy and frequent errors due to resource-intensive IO port usage and instability in key structures, leading to issues like oxidation, hand tremors, and circuit interference.

Method used

A press key recognition method that involves determining the press key state by analyzing the press key voltage levels, identifying valid presses based on pre-defined ranges and durations, and prioritizing key recognition to enhance accuracy.

Benefits of technology

The method improves press key recognition accuracy by filtering out interference and ensuring accurate identification of target keys, even in the presence of noise and instability, thereby enhancing overall system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114337632B_ABST
    Figure CN114337632B_ABST
Patent Text Reader

Abstract

The present invention relates to a key recognition method, device, equipment and electrical equipment, belonging to the technical field of key recognition. The key recognition method, device, equipment and electrical equipment obtain a pressing level and judge whether a key is pressed according to the pressing level; if a key is pressed, judge whether the key is lifted according to the pressing level; if the key is lifted, identify the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key; and identify the target key in the valid pressed keys according to the preset key recognition priority. The present application identifies the valid pressed keys and sets the key recognition priority, so as to accurately identify the target key in the valid pressed keys and improve the key recognition accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of key recognition, and in particular relates to a key recognition method, device, equipment and electrical equipment. Background Art

[0002] Control commands or parameter settings are often entered through buttons in devices, such as buttons for home appliances and buttons for factory operation equipment. In the related art, button recognition is usually performed through IO port acquisition mode or resistor voltage division recognition. Among them, the IO port acquisition mode determines whether a certain button is pressed by collecting the high and low levels when the button is pressed. The recognition accuracy is high and it is not easy to make mistakes, but it occupies more chip IO port resources. The method of identifying buttons through resistor voltage division combines buttons and resistors for voltage division. When different buttons are pressed, the signal line receives different voltages. The signal line is connected to the chip A / D conversion function pin for processing, so as to determine whether a certain button is pressed. Only one IO port of the chip is needed to realize the function judgment of multiple buttons. Although the latter solves the problem of IO port resource occupation of the former, it is easy to cause button recognition errors due to problems such as button oxidation, unstable button structure, hand shaking, circuit interference, etc.

[0003] Therefore, how to improve the accuracy of key recognition on the basis of solving the problem of more IO port resource occupation has become a technical problem to be solved urgently in the prior art. Summary of the invention

[0004] The present invention provides a key recognition method, device, equipment and electrical equipment to solve the technical problems of low key recognition accuracy and easy recognition errors in the prior art.

[0005] The technical solution provided by the present invention is as follows:

[0006] In one aspect, a key recognition method includes:

[0007] Acquire a pressing level, and determine whether a key is pressed according to the pressing level;

[0008] If the key is pressed, determining whether the key is released according to the pressing level;

[0009] If the key is pressed and released, the valid pressed keys within the continuous pressing duration are identified according to the preset pressing identification level range and pressing level of each key;

[0010] According to the preset key recognition priority, a target key is recognized among the valid pressed keys.

[0011] Optionally, judging whether a key is pressed according to the pressing level includes:

[0012] Determining whether the pressing level is within a key pressing level threshold range;

[0013] If the pressing level is within the key pressing level threshold range, it is determined that a key is pressed.

[0014] Optionally, the step of identifying the valid pressed keys within the continuous pressing duration according to the preset pressing recognition level range and the pressing level of each key includes:

[0015] During the continuous pressing time, identifying suspected pressed keys according to the pressing level and the preset pressing identification level range of each key, and obtaining the key pressing time of each suspected pressed key;

[0016] Determine whether the pressing time of each suspected pressed key is greater than a first effective pressing time threshold;

[0017] If the pressing time length of the suspected pressed key is greater than the first effective pressing time length threshold, the corresponding suspected pressed key is determined to be a valid pressed key.

[0018] Optionally, the preset key recognition priority includes: a priority based on level recognition; and the step of identifying a target key in the valid pressed keys according to the preset key recognition priority includes:

[0019] Determining the pressing level of each of the valid pressed keys;

[0020] According to the pressing level of each of the valid pressed keys and the priority level identified by the level, a target key is identified among the valid pressed keys.

[0021] Optionally, the preset key recognition priority includes: a priority for recognition based on the pressing duration; and the step of identifying a target key within the valid pressed keys according to the preset key recognition priority includes:

[0022] Determine the pressing time of each of the valid pressed keys;

[0023] According to the pressing duration of each of the valid pressed keys and the priority identified by the pressing duration, a target key is identified among the valid pressed keys.

[0024] Optionally, the buttons include: a first button, a second button, a third button, a fourth button and a fifth button; the preset press recognition level range corresponding to each of the buttons includes: [0V, 0.8V), [0.8V, 1.4V), [1.4V, 2V), [2V, 2.6V) and [2.6V, 3.2V).

[0025] Optionally, the button pressing level threshold range is [0V, 3.2V).

[0026] Optionally, the step of identifying the valid pressed keys within the continuous pressing duration according to the preset pressing recognition level range and the pressing level of each key includes:

[0027] Obtaining the continuous pressing duration, and determining whether the continuous pressing duration is greater than a second effective pressing duration threshold;

[0028] If the continuous pressing duration is greater than the second effective pressing duration threshold, the effective pressed keys within the continuous pressing duration are identified according to the preset pressing identification level range and pressing level of each key.

[0029] In yet another aspect, a key recognition device includes: an acquisition module, a judgment module, and a recognition module;

[0030] The acquisition module is used to acquire the pressing level;

[0031] The judging module is used to judge whether a key is pressed according to the pressing level; if the key is pressed, judge whether the key is released according to the pressing level;

[0032] The identification module is used to identify the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key when the key is pressed and released; and to identify the target key within the valid pressed keys according to the preset key recognition priority.

[0033] In yet another aspect, a key recognition device includes: a processor, and a memory connected to the processor;

[0034] The memory is used to store a computer program, and the computer program is at least used to execute any one of the key recognition methods described above;

[0035] The processor is used to call and execute the computer program in the memory.

[0036] On the other hand, an electrical device includes: a button and the button recognition device described above; the button recognition device is connected to the button.

[0037] Optionally, the electrical equipment includes: an air conditioning thermostat, a wired controller, an electric rice cooker, an electric fan or a refrigerator.

[0038] The beneficial effects of the present invention are:

[0039] The key recognition method, device, equipment and electrical equipment provided by the embodiments of the present invention obtain the pressing level and judge whether a key is pressed according to the pressing level; if a key is pressed, judge whether the key is lifted according to the pressing level; if the key is lifted, identify the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key; and identify the target key in the valid pressed keys according to the preset key recognition priority. The present application identifies the valid pressed keys and sets the key recognition priority, so as to accurately identify the target key in the valid pressed keys and improve the key recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of a key recognition method flow chart provided by an embodiment of the present invention;

[0042] Figure 2 A structural schematic diagram of a key recognition device provided by an embodiment of the present invention;

[0043] Figure 3 A structural schematic diagram of a key recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0045] The IO port acquisition mode determines whether a key is pressed by collecting the high and low levels when the key is pressed. It has high recognition accuracy and is not prone to errors, but it occupies more chip IO port resources. The method of identifying keys through resistor voltage division combines keys and resistors for voltage division. When different keys are pressed, the signal line receives different voltages. The signal line is connected to the chip A / D conversion function pin for processing, so as to determine whether a key is pressed. Only one IO port of the chip is needed to realize the function judgment of multiple keys. Although the latter solves the problem of IO port resource occupation of the former, key recognition errors are easily caused by key oxidation, unstable key structure, hand jitter, circuit interference and other problems.

[0046] Based on this, the embodiments of the present invention provide a key recognition method, device, equipment and electrical equipment.

[0047] Embodiment 1:

[0048] An embodiment of the present invention provides a key recognition method.

[0049] The key recognition method provided in the embodiment of the present invention can be applied to electrical equipment with keys, such as air-conditioning thermostats, wire controllers, rice cookers, electric fans or refrigerators, etc., which is not specifically limited in the embodiment of the present invention.

[0050] Figure 1 A schematic diagram of a key recognition method according to an embodiment of the present invention is provided. Figure 1 The method provided by the embodiment of the present invention may include the following steps:

[0051] S11. Obtain a pressing level, and determine whether a key is pressed according to the pressing level.

[0052] When key recognition is performed, it can be confirmed whether a user has performed a key operation and pressed the key.

[0053] In some embodiments, determining whether a key is pressed based on a pressing level includes: determining whether the pressing level is within a key pressing level threshold range; if the pressing level is within the key pressing level threshold range, determining that a key is pressed.

[0054] In some embodiments, the key pressing level threshold range may be [0V, 3.2V).

[0055] For example, the pressing level can be obtained in real time. When it is determined that the pressing level is within the key pressing level threshold range, such as [0V, 3.2V), it can be determined that a key is pressed. In this embodiment, the key pressing level threshold range is set to filter out other interference voltages during circuit operation. It is worth noting that in the embodiment of the present invention, [0V, 3.2V) is only an enumeration of the key pressing level threshold range and is not a limitation.

[0056] S12: If a key is pressed, determine whether the key is released based on the pressing level.

[0057] After confirming that the key is pressed, the pressing level of the key is continuously acquired, and when the pressing level is not within the key pressing level threshold range, it is determined that the key is pressed and released.

[0058] S13: If the key is pressed and released, the valid pressed keys within the continuous pressing time are identified according to the preset pressing identification level range and pressing level of each key.

[0059] In some embodiments, valid key presses within a continuous pressing duration are identified based on a preset pressing identification level range and a pressing level of each key, including: obtaining the continuous pressing duration, and determining whether the continuous pressing duration is greater than a second valid pressing duration threshold; if the continuous pressing duration is greater than the second valid pressing duration threshold, valid key presses within the continuous pressing duration are identified based on a preset pressing identification level range and a pressing level of each key.

[0060] In order to avoid the occurrence of pressing levels due to false touches, interference, etc., the duration of continuous pressing can be calculated, and whether the continuous pressing is effective can be determined by judging whether the duration of continuous pressing is greater than the second effective pressing duration threshold. The second effective pressing duration threshold can be set to 100ms, or can be set according to needs, which is not specifically limited in the embodiments of the present invention.

[0061] In some embodiments, the continuous press duration is the duration from when the button is pressed to when the button is released; the valid pressed keys within the continuous press duration are identified according to the preset press identification level range and the press level of each key, including: within the continuous press duration, the suspected pressed keys are identified according to the press level and the preset press identification level range of each key, and the key press duration of each suspected pressed key is obtained; it is determined whether the press duration of each suspected pressed key is greater than the first valid press duration threshold; if the press duration of the suspected pressed key is greater than the first valid press duration threshold, the corresponding suspected pressed key is determined to be a valid pressed key.

[0062] In this embodiment, the technical solution can be described by taking five buttons as an example. Among them, the five buttons can be respectively: a first button, a second button, a third button, a fourth button and a fifth button. The preset press recognition level range corresponding to the first button can be [0V, 0.8V), the preset press recognition level range corresponding to the second button can be [0.8V, 1.4V), the preset press recognition level range corresponding to the third button can be [1.4V, 2V), the preset press recognition level range corresponding to the fourth button can be [2V, 2.6V), and the preset press recognition level range corresponding to the fifth button can be [2.6V, 3.2V). It is worth noting that when the preset press recognition level range in the embodiment of the present invention is set, an aging test is performed to simulate the change of button impedance after N years, and the preset press recognition level range is appropriately increased to improve fault tolerance.

[0063] For example, when the press level is identified as 0.5V, 0.5V falls within the range of [0V, 0.8V), and it can be determined that the first button is suspected to be pressed; when the press level is identified as 1V, 1V falls within the range of [0.8V, 1.4V), and it can be determined that the second button is suspected to be pressed; when the press level is identified as 1.5V, 1.5V falls within the range of [1.4V, 2V), and it can be determined that the third button is suspected to be pressed; when the press level is identified as 2V, 2V falls within the range of [2V, 2.6V), and it can be determined that the fourth button is suspected to be pressed; when the press level is identified as 3V, 3V falls within the range of [2.6V, 3.2V), and it can be determined that the fifth button is suspected to be pressed.

[0064] During the continuous pressing time from pressing to lifting of a key, the collected pressing levels are likely to have different values, and the acquired pressing levels are matched to the preset pressing identification level range to obtain suspected pressed keys. For example, during the continuous pressing time, it may be recognized that the first key, the second key, and the third key are all pressed, and the first key, the second key, and the third key can all be determined as suspected pressed keys.

[0065] The key pressing duration of each suspected key is obtained, wherein the key pressing duration of a suspected key is determined as the cumulative duration of the suspected key pressing within the entire continuous pressing duration. For example, the continuous pressing duration may be 100ms, wherein the pressing duration of the first key may be 30ms, the pressing duration of the second key may be 20ms, and the pressing duration of the third key may be 50ms, which is not specifically limited in this embodiment. After determining the pressing duration of each suspected key pressing, determine whether the pressing duration of each suspected key pressing is greater than the first effective pressing duration threshold (e.g., 20ms). If the pressing duration of the suspected key pressing is greater than the first effective pressing duration threshold, the corresponding suspected key pressing may be determined to be a valid pressing key, thereby filtering out interference. It is worth noting that, in the embodiment of the present invention, 20ms is merely an enumeration of the first effective press duration threshold, and is not a limitation. In the specific working process, the first effective press duration threshold can be set according to needs. In order to ensure the sensitivity of recognition, it is not easy to set the first effective press duration threshold too large; in order to reduce circuit interference, it is not easy to set the first effective press duration threshold too small. In this embodiment, 20ms is preferred.

[0066] S14. Identify the target key among the valid pressed keys according to the preset key recognition priority.

[0067] In some embodiments, the preset key recognition priority includes: a priority for recognition based on electrical levels; based on the preset key recognition priority, identifying the target key within the valid pressed keys includes: determining the pressing level of each valid pressed key; based on the pressing level of each valid pressed key and the priority for recognition based on electrical levels, identifying the target key within the valid pressed keys.

[0068] For example, the priority of level recognition can be that low level has the highest priority, and the priority gradually decreases from low to high. After determining the effective pressed key, according to the pressing level of each effective pressed key, the low level is the highest priority, so as to determine the target key.

[0069] In some embodiments, the preset key recognition priority includes: the priority of recognition based on the pressing duration; according to the preset key recognition priority, the target key is identified within the valid pressed keys, including: determining the pressing duration of each valid pressed key; according to the pressing duration of each valid pressed key and the priority of recognition based on the pressing duration, the target key is identified within the valid pressed keys.

[0070] For example, the priority of recognition based on the pressing duration can be that the longest pressing duration has the highest priority, and the pressing durations have a gradually decreasing priority from high to low. After determining the valid pressed keys, the longest pressing duration is the highest priority according to the pressing duration of each valid pressed key, thereby determining the target key.

[0071] The key recognition method provided by the embodiment of the present invention obtains the pressing level and determines whether a key is pressed according to the pressing level; if a key is pressed, determines whether the key is lifted according to the pressing level; if the key is lifted, identifies the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key; identifies the target key in the valid pressed keys according to the preset key recognition priority. The present application identifies the valid pressed keys and sets the key recognition priority, so as to accurately identify the target key in the valid pressed keys and improve the key recognition accuracy.

[0072] Embodiment 2:

[0073] Based on a general inventive concept, an embodiment of the present invention further provides a key recognition device.

[0074] Figure 2 A structural diagram of a key recognition device provided by an embodiment of the present invention, see Figure 2 The device provided by the embodiment of the present invention may include the following structures: an acquisition module 21, a judgment module 22 and an identification module 23.

[0075] Wherein, the acquisition module 21 is used to acquire the pressing level;

[0076] The judging module 22 is used to judge whether a key is pressed according to the pressing level; if a key is pressed, judge whether the key is released according to the pressing level;

[0077] The identification module 23 is used to identify the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key when the key is pressed and released; and to identify the target key within the valid pressed keys according to the preset key recognition priority.

[0078] In some embodiments, the determination module 22 is used to determine whether the pressing level is within a key pressing level threshold range; if the pressing level is within the key pressing level threshold range, it is determined that a key is pressed.

[0079] In some embodiments, the identification module 23 is used to identify suspected pressed keys according to the pressing level and the preset pressing identification level range of each key within the continuous pressing duration, and obtain the key pressing duration of each suspected pressed key; determine whether the pressing duration of each suspected pressed key is greater than the first effective pressing duration threshold; if the pressing duration of the suspected pressed key is greater than the first effective pressing duration threshold, determine that the corresponding suspected pressed key is a valid pressed key.

[0080] In some embodiments, the identification module 23 is used to determine the pressing level of each valid pressed key; and identify the target key within the valid pressed keys according to the pressing level of each valid pressed key and the priority of identifying the level.

[0081] In some embodiments, the identification module 23 is used to determine the pressing time of each valid pressed key; and identify the target key within the valid pressed keys according to the pressing time of each valid pressed key and the priority of identification based on the pressing time.

[0082] In some embodiments, the identification module 23 is used to obtain the continuous pressing time and determine whether the continuous pressing time is greater than the second effective pressing time threshold; if the continuous pressing time is greater than the second effective pressing time threshold, the effective pressing keys within the continuous pressing time are identified according to the preset pressing identification level range and pressing level of each key.

[0083] In some embodiments, the buttons include: a first button, a second button, a third button, a fourth button and a fifth button; the preset press recognition level range corresponding to each button includes: [0V, 0.8V), [0.8V, 1.4V), [1.4V, 2V), [2V, 2.6V) and [2.6V, 3.2V).

[0084] In some embodiments, the key press level threshold range is [0V, 3.2V).

[0085] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0086] The key recognition device provided by the embodiment of the present invention obtains the pressing level and determines whether a key is pressed according to the pressing level; if a key is pressed, it determines whether the key is lifted according to the pressing level; if the key is lifted, it identifies the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key; and identifies the target key in the valid pressed keys according to the preset key recognition priority. The present application identifies the valid pressed keys and sets the key recognition priority, so as to accurately identify the target key in the valid pressed keys and improve the key recognition accuracy.

[0087] Embodiment three:

[0088] Based on a general inventive concept, an embodiment of the present invention further provides a key recognition device.

[0089] Figure 3 A structural diagram of a key recognition device provided by an embodiment of the present invention, see Figure 3A key recognition device provided by an embodiment of the present invention includes: a processor 31, and a memory 32 connected to the processor.

[0090] The memory 32 is used to store a computer program, and the computer program is at least used for the key recognition method recorded in any one of the above embodiments;

[0091] The processor 31 is used to call and execute the computer program in the memory.

[0092] Embodiment 4:

[0093] Based on a general inventive concept, an embodiment of the present invention further provides an electrical device.

[0094] An embodiment of the present invention provides an electrical device, which may include: a button and the button recognition device described in the above embodiment; the button recognition device is connected to the button.

[0095] In some embodiments, the electrical device may be: an air conditioner thermostat, a wire controller, an electric rice cooker, an electric fan or a refrigerator.

[0096] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0097] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0098] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0099] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0100] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0101] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0103] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0104] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0105] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A key recognition method, characterized in that: include: Acquire a pressing level, and determine whether a key is pressed according to the pressing level; If the key is pressed, determining whether the key is released according to the pressing level; If the key is pressed and released, the valid pressed keys within the continuous pressing duration are identified according to the preset pressing identification level range and pressing level of each key; The step of identifying the valid pressed keys within the continuous pressing duration according to the preset pressing recognition level range and the pressing level of each key comprises: During the continuous pressing time, identifying suspected pressed keys according to the pressing level and the preset pressing identification level range of each key, and obtaining the key pressing time of each suspected pressed key; Determine whether the pressing time of each suspected pressed key is greater than a first effective pressing time threshold; If the pressing time of the suspected pressed key is greater than the first effective pressing time threshold, determining the corresponding suspected pressed key as a valid pressed key; According to the preset key recognition priority, a target key is recognized among the valid pressed keys.

2. The method according to claim 1, characterized in that: The determining whether a key is pressed according to the pressing level includes: Determining whether the pressing level is within a key pressing level threshold range; If the pressing level is within the key pressing level threshold range, it is determined that a key is pressed.

3. The method according to claim 1, characterized in that The preset key recognition priority includes: a priority based on level recognition; the identifying a target key in the valid pressed keys according to the preset key recognition priority includes: Determining the pressing level of each of the valid pressed keys; According to the pressing level of each of the valid pressed keys and the priority level identified by the level, a target key is identified among the valid pressed keys.

4. The method according to claim 1, characterized in that: The preset key recognition priority includes: a priority for recognition based on the pressing duration; the identifying a target key in the valid pressed keys according to the preset key recognition priority includes: Determine the pressing time of each of the valid pressed keys; According to the pressing duration of each of the valid pressed keys and the priority identified by the pressing duration, a target key is identified among the valid pressed keys.

5. The method according to claim 1, characterized in that The buttons include: A first button, a second button, a third button, a fourth button and a fifth button; the preset press recognition level range corresponding to each of the buttons includes: [0V, 0.8V), [0.8V, 1.4V), [1.4V, 2V), [2V, 2.6V) and [2.6V, 3.2V).

6. The method according to claim 2, characterized in that The key pressing level threshold range is [0V, 3.2V).

7. The method according to any one of claims 1 to 6, characterized in that: The step of identifying the valid pressed keys within the continuous pressing duration according to the preset pressing recognition level range and the pressing level of each key comprises: Obtaining the continuous pressing duration, and determining whether the continuous pressing duration is greater than a second effective pressing duration threshold; If the continuous pressing duration is greater than the second effective pressing duration threshold, the effective pressed keys within the continuous pressing duration are identified according to the preset pressing identification level range and pressing level of each key.

8. A key recognition device, characterized in that: include: Acquisition module, judgment module and recognition module; The acquisition module is used to acquire the pressing level; The judging module is used to judge whether a key is pressed according to the pressing level; if the key is pressed, judge whether the key is released according to the pressing level; The identification module is used to identify the valid pressed keys within the continuous pressing time according to the preset pressing recognition level range and pressing level of each key when the key is pressed and released; and to identify the target key among the valid pressed keys according to the preset key recognition priority; The step of identifying the valid pressed keys within the continuous pressing duration according to the preset pressing recognition level range and the pressing level of each key comprises: During the continuous pressing time, identifying suspected pressed keys according to the pressing level and the preset pressing identification level range of each key, and obtaining the key pressing time of each suspected pressed key; Determine whether the pressing time of each suspected pressed key is greater than a first effective pressing time threshold; If the pressing time length of the suspected pressed key is greater than the first effective pressing time length threshold, the corresponding suspected pressed key is determined to be a valid pressed key.

9. A key recognition device, characterized in that: include: A processor, and a memory connected to the processor; The memory is used to store a computer program, and the computer program is used to at least execute the key recognition method according to any one of claims 1 to 7; The processor is used to call and execute the computer program in the memory.

10. An electrical device, characterized in that: include: A key and a key recognition device as claimed in claim 9; the key recognition device is connected to the key.

11. The electrical device according to claim 10, characterized in that: The electrical equipment includes: an air conditioner thermostat, a wire controller, an electric rice cooker, an electric fan or a refrigerator.

Citation Information

Patent Citations

  • Method for eliminating jittering of buttons, device and keyboard

    CN102508552A

  • Portability key circuit

    CN102868392A