CN107976624B - Key state detection method and device - Google Patents

Key state detection method and device Download PDF

Info

Publication number
CN107976624B
CN107976624B CN201610948506.4A CN201610948506A CN107976624B CN 107976624 B CN107976624 B CN 107976624B CN 201610948506 A CN201610948506 A CN 201610948506A CN 107976624 B CN107976624 B CN 107976624B
Authority
CN
China
Prior art keywords
key
state
electrical equipment
register
determining
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
CN201610948506.4A
Other languages
Chinese (zh)
Other versions
CN107976624A (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.)
Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd
Original Assignee
Foshan Shunde Midea Electrical Heating Appliances Manufacturing 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 Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd filed Critical Foshan Shunde Midea Electrical Heating Appliances Manufacturing Co Ltd
Priority to CN201610948506.4A priority Critical patent/CN107976624B/en
Publication of CN107976624A publication Critical patent/CN107976624A/en
Application granted granted Critical
Publication of CN107976624B publication Critical patent/CN107976624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/327Testing of circuit interrupters, switches or circuit-breakers
    • G01R31/3277Testing of circuit interrupters, switches or circuit-breakers of low voltage devices, e.g. domestic or industrial devices, such as motor protections, relays, rotation switches

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)
  • Push-Button Switches (AREA)

Abstract

The invention discloses a method for detecting a key state, which comprises the steps of reading a register for storing key values of keys in electric equipment after the electric equipment is powered on; determining the state of the key of the electrical equipment according to the number of bits of 1 in the register; and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment. The invention also discloses a device for detecting the key state. According to the method and the device for detecting the key state, disclosed by the invention, the key state of the electrical equipment is automatically detected, and the detected key state is displayed on the display interface of the electrical equipment, so that a user can determine the key state of the electrical equipment, and the purpose of improving the satisfaction degree of the user is realized.

Description

Key state detection method and device
Technical Field
The invention relates to the technical field of electrical equipment, in particular to a method and a device for detecting a key state.
Background
Due to the fact that the working environment of part of electrical equipment is rich in oil smoke and easy to be stained with water, the service life of the key of the electrical equipment is often greatly shortened, and therefore the electrical equipment is likely to be short-circuited, the key is triggered for a long time, and the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond. And the user can not determine the state of the key of the electrical equipment, so that the user satisfaction is low.
Disclosure of Invention
The invention mainly aims to provide a method and a device for detecting a key state, and aims to solve the problems that when an electrical device cannot be started or the key of the electrical device cannot normally respond, a user cannot determine the key state of the electrical device, and the user using satisfaction is low.
In order to achieve the above object, the present invention provides a method for detecting a key state, the method comprising:
reading a register for storing key values of keys in the electrical equipment after the electrical equipment is powered on;
determining the state of the key of the electrical equipment according to the number of bits of 1 in the register;
and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment.
Preferably, the determining the state of the key of the electrical equipment according to the number of bits of 1 in the register includes:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
Preferably, after displaying the state of the key of the electrical device on the display interface of the electrical device, the method further includes:
and controlling the state of the electrical equipment according to the state of the key of the electrical equipment, wherein the state of the electrical equipment comprises a startup state and a non-startup state.
Preferably, the controlling the state of the electrical device according to the state of the electrical device key includes:
and if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
Preferably, the controlling the state of the electrical device according to the state of the electrical device key includes:
and if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
In addition, to achieve the above object, the present invention further provides a key state detection device, including:
the key value acquisition module is used for reading a register used for storing key value of a key in the electrical equipment after the electrical equipment is powered on;
the determining module is used for determining the state of the key of the electrical equipment according to the number of bits of the 1 in the register;
and the display module is used for displaying the state of the key of the electrical equipment on a display interface of the electrical equipment.
Preferably, the determining module is configured to:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
Preferably, the apparatus further comprises:
and the control module is used for controlling the state of the electrical equipment according to the state of the key of the electrical equipment, and the state of the electrical equipment comprises a startup-enabled state and a startup-disabled state.
Preferably, the control module is configured to:
and if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
Preferably, the control module is further configured to:
and if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
The invention provides a method and a device for detecting key state, which comprises the following steps of reading a register for storing key values of keys in electrical equipment after the electrical equipment is powered on; determining the state of the key of the electrical equipment according to the number of bits of 1 in the register; and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment. The invention determines the state of the key of the electrical equipment according to the number of the bits 1 in the register by reading the register for storing the key value of the key in the electrical equipment, and displays the determined key state on the display interface of the electrical equipment, so that a user can determine the state of the key of the electrical equipment when using the electrical equipment, the technical problem that the user cannot determine the state of the key of the electrical equipment when the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond is solved, and the purpose of improving the use satisfaction of the user is realized.
Drawings
FIG. 1 is a schematic flow chart illustrating a method for detecting a key state according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for detecting a key status according to a second embodiment of the present invention;
FIG. 3 is a functional block diagram of a device for detecting a key status according to a first embodiment of the present invention;
fig. 4 is a functional block diagram of a device for detecting a key status according to a second embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for detecting a key state according to a first embodiment of the present invention. In this embodiment, the method for detecting the key state includes:
and step S10, after the electric equipment is powered on, reading a register for storing key values of the keys in the electric equipment.
In this embodiment, after the electrical equipment is powered on, the host (main control chip) of the electrical equipment automatically sends a request message for reading key values of the keys to the slave (integrated display chip), the slave returns to the register for storing the key values of the keys of the electrical equipment after receiving the request message, and the host of the electrical equipment reads state values of each bit in the register.
The electrical equipment can be household electrical equipment with a plurality of functional switch keys or other electrical equipment, for example, the electrical equipment can be an induction cooker, an electric cooker and the like.
And step S20, determining the state of the key of the electrical equipment according to the number of the bits of 1 in the register.
In this embodiment, each key of the electrical apparatus corresponds to a bit in the register, and each key of the electrical apparatus has two states, namely, an on state and an off state, and if the key is in the on state, the state of the key corresponding to the bit in the register is set to 1, and if the key is in the off state, the state of the key corresponding to the bit in the register is set to 0. Therefore, the number of the keys in the electrical equipment in the on state can be determined according to the number of the bits of 1 in the register, and the state of the keys of the electrical equipment is further determined.
And step S30, displaying the state of the electric equipment key on the display interface of the electric equipment.
In this embodiment, after the state of the key of the electrical equipment is determined, the state of the key of the electrical equipment is fed back to a user through a display interface of the electrical equipment.
In this embodiment, the state of the key can be represented by using a set state code because a display interface of a part of the electrical equipment is formed by a nixie tube.
In the method for detecting a key state in the above embodiment, after an electrical device is powered on, a register for storing a key value of a key in the electrical device is read; determining the state of the key of the electrical equipment according to the number of bits of 1 in the register; and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment. The invention determines the state of the key of the electrical equipment according to the number of the bits 1 in the register by reading the register for storing the key value of the key in the electrical equipment, and displays the determined key state on the display interface of the electrical equipment, so that a user can determine the state of the key of the electrical equipment when using the electrical equipment, the technical problem that the user cannot determine the state of the key of the electrical equipment when the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond is solved, and the purpose of improving the use satisfaction of the user is realized.
Further, based on the embodiment described in fig. 1, in this embodiment, the determining the state of the electrical device key according to the number of bits of 1 in the register in step S20 includes:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
In this embodiment, if the number of bits of the register set 1 is zero, that is, the states of all bits in the register are set 0, it may be determined that there is no key in the key of the electrical equipment that is in the on state, that is, it is determined that the key of the electrical equipment is in the normal state. If the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, and if the key corresponding to the bit of the 1 in the register is the switch key, determining that the switch key is in an on state, namely determining that the electrical equipment key is in an independent long-on state of the switch key; if the key corresponding to the bit 1 in the register is not a switch key, it can be determined that other keys except the switch key are in the on state, that is, it can be determined that the electrical equipment key is in the non-switch key single long on state. If the number of the bits of 1 in the register is two or more, it can be determined that two or more keys of the electrical equipment are in an on state, that is, it can be determined that the keys of the electrical equipment are in a multi-key long on state.
In addition, since the display interface of some electrical devices is composed of nixie tubes, in this embodiment, the set status codes can be sent to indicate the key status, for example: sending 'E10' to the display interface of the electrical equipment to show that the key of the electrical equipment is in a single long-on state of the switch key; sending 'E20' to the display interface of the electrical equipment to show that the key of the electrical equipment is in a non-switch key single long-on state; and sending the 'E30' to the display interface of the electrical equipment to indicate that the key of the electrical equipment is in a multi-key long-on state.
In this embodiment, the state of the key of the electrical equipment is determined according to the number of bits of 1 in the register, so that when a user uses the electrical equipment, the state of the key of the electrical equipment can be determined, the technical problem that when the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond is solved, the state of the key of the electrical equipment cannot be determined by the user, and the purpose of improving the use satisfaction of the user is further achieved.
Further, referring to fig. 2, fig. 2 is a schematic flowchart of a second embodiment of the method for detecting a key state according to the present invention, based on the foregoing embodiment, in this embodiment, the method for detecting a key state further includes:
and step S40, controlling the state of the electrical equipment according to the state of the electrical equipment key, wherein the state of the electrical equipment comprises a startup enabled state and a startup disabled state.
In this embodiment, after the state of the key of the electrical equipment is determined, the state of the key of the electrical equipment is displayed on a display interface of the electrical equipment, and the state of the electrical equipment is controlled according to the state of the key of the electrical equipment. The state of the electrical equipment comprises a startup-enabled state and a startup-disabled state.
If the key of the electrical equipment is determined to be in a normal state, no operation is performed, and the user can use the electrical equipment normally.
And if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
If the key of the electrical equipment is in the state that the switch key is singly long-opened, the electrical equipment can be automatically started after the power is switched on, and the electrical equipment cannot be shut down under the condition that the power is not switched off, so that certain potential safety hazards are generated. In addition, if the keys of the electrical equipment are in a multi-key long-on state, the electrical equipment may not be capable of executing the functions corresponding to two or more keys at the same time, so that the starting may have a certain potential safety hazard. Therefore, if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the long-on state of the multiple keys, the electrical equipment is controlled to be in the non-power-on state.
And if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
If the key of the electrical equipment is determined to be in the single long-on state of the non-switch key, the function of the non-switch key corresponding to the bit 1 in the register is shielded, that is, the key is in the invalid state, and the electrical equipment cannot execute the corresponding function of the key. In this case, the electrical equipment can be normally powered on, and other keys except the shielded non-switch key can be normally used. In addition, for safety, after the device is turned on, an alarm prompt may be given in a preset manner, for example, the key indicator may flash for a certain number of times and stop flashing, or the buzzer may sound for a certain number of times and stop sounding.
Further, in order to better understand the method for detecting the key states provided by the present invention, in the present embodiment, an electromagnetic oven is adopted as the electrical equipment, and the electromagnetic oven includes an "on/off" key and a plurality of keys such as "pan", "hot pot", "water boiling", "soup making", "cooking", "timing", "plus", "minus", and the like. After a user switches on the induction cooker, starting an induction cooker key state detection program, automatically reading a register containing all key values of the induction cooker, determining the state of the electric appliance equipment key according to the number of bits 1 in the register, and displaying the state of the induction cooker key on a display interface of the induction cooker.
If no bit with the state value of 1 exists in the register of the induction cooker, namely the number of the bits with the 1 in the register is zero, the induction cooker key is determined to be in a normal state. If the number of the 1 bit in the induction cooker register is one, judging whether a key corresponding to the 1 bit in the register is a switch key or not, if so, determining that the induction cooker key is in the single long-open state of the switch key, otherwise, determining that the induction cooker key is in the single long-open state of the non-switch key. And if the number of the bits of the 1 in the induction cooker register is two or more, determining that the induction cooker key is in a multi-key long-on state.
If the induction cooker key is determined to be in the normal state, no prompt is given, and the user can use the induction cooker normally.
And if the induction cooker key is determined to be in the switch key single long-on state, sending 'E10' to the display interface of the induction cooker to indicate that the induction cooker key is in the switch key single long-on state, and setting the induction cooker to be in the non-power-on state.
And if the induction cooker key is determined to be in the single long-open state of the non-switch key, sending 'E20' to the display interface of the induction cooker to indicate that the induction cooker key is in the single long-open state of the non-switch key, and shielding the function of the non-switch key corresponding to the bit 1 in the register. For example, when the 'hot pot' key is in a long-open state, the function of the 'hot pot' key of the induction cooker is shielded. Under the condition, the induction cooker can be normally started, and other keys except the hot pot key can be normally used. In addition, for safety, after the device is started, the hot pot key indicator lamp can be made to flash for 5 to 10 times, or the buzzer is made to sound for 5 to 10 times, so that the user is reminded that the hot pot key cannot be used normally.
If the induction cooker key is determined to be in the multi-key long-open state, the display interface for sending the E30 to the induction cooker indicates that the induction cooker key is in the multi-key long-open state, and the induction cooker is set to be in the non-power-on state.
In the method for detecting the key state in this embodiment, when it is determined that the key of the electrical equipment is in the single long-on state of the switch key or the long-on state of multiple keys, the electrical equipment is controlled to be in the non-power-on state; and when the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register. When the user uses the electrical equipment, the safety accidents possibly caused by the short circuit of the key circuit can be effectively avoided, and the purpose of improving the use satisfaction of the user is further realized.
Referring to fig. 3, fig. 3 is a functional module diagram of the detection apparatus for detecting a key status according to the first embodiment of the present invention. In this embodiment, the device 300 for detecting the key status includes:
the obtaining module 310 is configured to read a register for storing a key value of a key in an electrical device after the electrical device is powered on.
In this embodiment, after the electrical equipment is powered on, the host (main control chip) of the electrical equipment automatically sends a request message for reading key values of the keys to the slave (integrated display chip), the slave returns to the register for storing the key values of the keys of the electrical equipment after receiving the request message, and the host of the electrical equipment reads state values of each bit in the register.
The electrical equipment can be household electrical equipment with a plurality of functional switch keys or other electrical equipment, for example, the electrical equipment can be an induction cooker, an electric cooker and the like.
The determining module 320 is configured to determine the state of the key of the electrical device according to the number of bits of the 1 in the register.
In this embodiment, each key of the electrical apparatus corresponds to a bit in the register, and each key of the electrical apparatus has two states, namely, an on state and an off state, and if the key is in the on state, the state of the key corresponding to the bit in the register is set to 1, and if the key is in the off state, the state of the key corresponding to the bit in the register is set to 0. Therefore, the number of the keys in the electrical equipment in the on state can be determined according to the number of the bits of 1 in the register, and the state of the keys of the electrical equipment is further determined.
The display module 330 is configured to display the state of the key of the electrical apparatus on a display interface of the electrical apparatus.
In this embodiment, after the state of the key of the electrical equipment is determined, the state of the key of the electrical equipment is fed back to a user through a display interface of the electrical equipment.
In this embodiment, the state of the key can be represented by using a set state code because a display interface of a part of the electrical equipment is formed by a nixie tube.
The detection device for key states in the above embodiment reads a register for storing key values in an electrical apparatus after the electrical apparatus is powered on; determining the state of the key of the electrical equipment according to the number of bits of 1 in the register; and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment. The invention determines the state of the key of the electrical equipment according to the number of the bits 1 in the register by reading the register for storing the key value of the key in the electrical equipment, and displays the determined key state on the display interface of the electrical equipment, so that a user can determine the state of the key of the electrical equipment when using the electrical equipment, the technical problem that the user cannot determine the state of the key of the electrical equipment when the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond is solved, and the purpose of improving the use satisfaction of the user is realized.
Further, based on the embodiment shown in fig. 3, in this embodiment, the determining module 320 is further configured to:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
In this embodiment, if the number of bits of the register set 1 is zero, that is, the states of all bits in the register are set 0, it may be determined that there is no key in the key of the electrical equipment that is in the on state, that is, it is determined that the key of the electrical equipment is in the normal state. If the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, and if the key corresponding to the bit of the 1 in the register is the switch key, determining that the switch key is in an on state, namely determining that the electrical equipment key is in an independent long-on state of the switch key; if the key corresponding to the bit 1 in the register is not a switch key, it can be determined that other keys except the switch key are in the on state, that is, it can be determined that the electrical equipment key is in the non-switch key single long on state. If the number of the bits of 1 in the register is two or more, it can be determined that two or more keys of the electrical equipment are in an on state, that is, it can be determined that the keys of the electrical equipment are in a multi-key long on state.
In addition, since the display interface of some electrical devices is composed of nixie tubes, in this embodiment, the set status codes can be sent to indicate the key status, for example: sending 'E10' to the display interface of the electrical equipment to show that the key of the electrical equipment is in a single long-on state of the switch key; sending 'E20' to the display interface of the electrical equipment to show that the key of the electrical equipment is in a non-switch key single long-on state; and sending the 'E30' to the display interface of the electrical equipment to indicate that the key of the electrical equipment is in a multi-key long-on state.
In this embodiment, the state of the key of the electrical equipment is determined according to the number of bits of 1 in the register, so that when a user uses the electrical equipment, the state of the key of the electrical equipment can be determined, the technical problem that when the electrical equipment cannot be started or the key of the electrical equipment cannot normally respond is solved, the state of the key of the electrical equipment cannot be determined by the user, and the purpose of improving the use satisfaction of the user is further achieved.
Further, referring to fig. 4, fig. 4 is a functional module schematic diagram of a second embodiment of the detection apparatus for detecting a key state according to the present invention, based on the foregoing embodiment, in this embodiment, the detection apparatus for detecting a key state further includes:
the control module 340 is configured to control the state of the electrical device according to the state of the electrical device key, where the state of the electrical device includes a bootable state and a bootable state.
In this embodiment, after the state of the key of the electrical equipment is determined, the state of the key of the electrical equipment is displayed on a display interface of the electrical equipment, and the state of the electrical equipment is controlled according to the state of the key of the electrical equipment. The state of the electrical equipment comprises a startup-enabled state and a startup-disabled state.
If the key of the electrical equipment is determined to be in a normal state, no operation is performed, and the user can use the electrical equipment normally.
And if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
If the key of the electrical equipment is in the state that the switch key is singly long-opened, the electrical equipment can be automatically started after the power is switched on, and the electrical equipment cannot be shut down under the condition that the power is not switched off, so that certain potential safety hazards are generated. In addition, if the keys of the electrical equipment are in a multi-key long-on state, the electrical equipment may not be capable of executing the functions corresponding to two or more keys at the same time, so that the starting may have a certain potential safety hazard. Therefore, if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the long-on state of the multiple keys, the electrical equipment is controlled to be in the non-power-on state.
And if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
If the key of the electrical equipment is determined to be in the single long-on state of the non-switch key, the function of the non-switch key corresponding to the bit 1 in the register is shielded, that is, the key is in the invalid state, and the electrical equipment cannot execute the corresponding function of the key. In this case, the electrical equipment can be normally powered on, and other keys except the shielded non-switch key can be normally used. In addition, for safety, after the device is turned on, an alarm prompt may be given in a preset manner, for example, the key indicator may flash for a certain number of times and stop flashing, or the buzzer may sound for a certain number of times and stop sounding.
Further, in order to better understand the detection device for the key states provided by the present invention, the present embodiment adopts an electromagnetic oven as the electrical equipment, and the electromagnetic oven includes an "on/off" key and a plurality of keys such as "pan", "hot pot", "water boiling", "soup making", "cooking", "timing", "plus", "minus", and the like. After a user switches on the induction cooker, starting an induction cooker key state detection program, automatically reading a register containing all key values of the induction cooker, determining the state of the electric appliance equipment key according to the number of bits 1 in the register, and displaying the state of the induction cooker key on a display interface of the induction cooker.
If no bit with the state value of 1 exists in the register of the induction cooker, namely the number of the bits with the 1 in the register is zero, the induction cooker key is determined to be in a normal state. If the number of the 1 bit in the induction cooker register is one, judging whether a key corresponding to the 1 bit in the register is a switch key or not, if so, determining that the induction cooker key is in the single long-open state of the switch key, otherwise, determining that the induction cooker key is in the single long-open state of the non-switch key. And if the number of the bits of the 1 in the induction cooker register is two or more, determining that the induction cooker key is in a multi-key long-on state.
If the induction cooker key is determined to be in the normal state, no prompt is given, and the user can use the induction cooker normally.
And if the induction cooker key is determined to be in the switch key single long-on state, sending 'E10' to the display interface of the induction cooker to indicate that the induction cooker key is in the switch key single long-on state, and setting the induction cooker to be in the non-power-on state.
And if the induction cooker key is determined to be in the single long-open state of the non-switch key, sending 'E20' to the display interface of the induction cooker to indicate that the induction cooker key is in the single long-open state of the non-switch key, and shielding the function of the non-switch key corresponding to the bit 1 in the register. For example, when the 'hot pot' key is in a long-open state, the function of the 'hot pot' key of the induction cooker is shielded. Under the condition, the induction cooker can be normally started, and other keys except the hot pot key can be normally used. In addition, for safety, after the device is started, the hot pot key indicator lamp can be made to flash for 5 to 10 times, or the buzzer is made to sound for 5 to 10 times, so that the user is reminded that the hot pot key cannot be used normally.
If the induction cooker key is determined to be in the multi-key long-open state, the display interface for sending the E30 to the induction cooker indicates that the induction cooker key is in the multi-key long-open state, and the induction cooker is set to be in the non-power-on state.
In the detection apparatus for key states in this embodiment, when it is determined that the key of the electrical equipment is in the single long-on state of the switch key or the long-on state of multiple keys, the electrical equipment is controlled to be in the non-power-on state; and when the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register. When the user uses the electrical equipment, the safety accidents possibly caused by the short circuit of the key circuit can be effectively avoided, and the purpose of improving the use satisfaction of the user is further realized.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on this understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a terminal device to execute the methods according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (14)

1. A method for detecting a key state is characterized in that the method for detecting the key state comprises the following steps:
reading a register for storing key values of keys in the electrical equipment after the electrical equipment is powered on;
determining the state of the key of the electrical equipment according to the number of bits of 1 in the register;
and displaying the state of the key of the electrical equipment on a display interface of the electrical equipment.
2. The method of claim 1, wherein determining the status of the electrical device key according to the number of bits with 1 in the register comprises:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
3. The method according to claim 1, further comprising, after displaying the status of the appliance keys on the display interface of the appliance:
and controlling the state of the electrical equipment according to the state of the key of the electrical equipment, wherein the state of the electrical equipment comprises a startup state and a non-startup state.
4. The method of claim 3, wherein the controlling the state of the appliance according to the state of the appliance key comprises:
and if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
5. The method of claim 3, wherein the controlling the state of the appliance according to the state of the appliance key comprises:
and if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
6. The method according to claim 5, wherein if it is determined that the electrical device key is in the non-switch key single long-on state, after the step of controlling the electrical device key to be in the on-state and shielding the function of the non-switch key corresponding to the bit of the 1 in the register, the method further comprises:
and after the electrical equipment is started, giving an alarm prompt to the key in a preset mode.
7. The method of claim 1, wherein the electrical device is an induction cooker or an electric cooker.
8. A device for detecting a key state, the device comprising:
the key value acquisition module is used for reading a register used for storing key value of a key in the electrical equipment after the electrical equipment is powered on;
the determining module is used for determining the state of the key of the electrical equipment according to the number of bits of the 1 in the register;
and the display module is used for displaying the state of the key of the electrical equipment on a display interface of the electrical equipment.
9. The apparatus of claim 8, wherein the determining module is configured to:
if the number of the bits of 1 in the register is zero, determining that the key of the electrical equipment is in a normal state;
if the number of the bits of the 1 in the register is one, judging whether a key corresponding to the bit of the 1 in the register is a switch key or not, if so, determining that the electrical equipment key is in a single long-open state of the switch key, otherwise, determining that the electrical equipment key is in a non-single long-open state of the switch key;
and if the number of the bits of 1 in the register is two or more, determining that the key of the electrical equipment is in a multi-key long-on state.
10. The apparatus of claim 8, further comprising:
and the control module is used for controlling the state of the electrical equipment according to the state of the key of the electrical equipment, and the state of the electrical equipment comprises a startup-enabled state and a startup-disabled state.
11. The apparatus of claim 10, wherein the control module is configured to:
and if the key of the electrical equipment is determined to be in the single long-on state of the switch key or the multi-key long-on state, controlling the electrical equipment to be in the non-power-on state.
12. The apparatus of claim 10, wherein the control module is further configured to:
and if the key of the electrical equipment is determined to be in the single long-open state of the non-switch key, controlling the electrical equipment to be in the open state, and shielding the function of the non-switch key corresponding to the position 1 in the register.
13. The apparatus of claim 12, wherein the control module is further configured to:
and after the electrical equipment is started, giving an alarm prompt to the key in a preset mode.
14. The apparatus of claim 8, wherein the electrical device is an induction cooker or an electric cooker.
CN201610948506.4A 2016-10-24 2016-10-24 Key state detection method and device Active CN107976624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610948506.4A CN107976624B (en) 2016-10-24 2016-10-24 Key state detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610948506.4A CN107976624B (en) 2016-10-24 2016-10-24 Key state detection method and device

Publications (2)

Publication Number Publication Date
CN107976624A CN107976624A (en) 2018-05-01
CN107976624B true CN107976624B (en) 2020-10-09

Family

ID=62004168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610948506.4A Active CN107976624B (en) 2016-10-24 2016-10-24 Key state detection method and device

Country Status (1)

Country Link
CN (1) CN107976624B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207722A (en) * 2006-12-19 2008-06-25 深圳Tcl新技术有限公司 Method and system for self-defining remote controller key function
CN101335957A (en) * 2008-07-25 2008-12-31 深圳华为通信技术有限公司 Quick key setting method, functional implementation method of communication terminal and communication terminal
CN201203651Y (en) * 2007-12-21 2009-03-04 虹光精密工业(苏州)有限公司 Circuit for detecting key-press status
CN101661418A (en) * 2008-08-26 2010-03-03 比亚迪股份有限公司 Keyboard testing system
CN101840268A (en) * 2010-04-23 2010-09-22 中国电子科技集团公司第五十四研究所 Method for fast scanning and positioning of matrix keyboard
CN102520345A (en) * 2011-12-06 2012-06-27 惠州Tcl移动通信有限公司 Method for recording button usage times and apparatus thereof
CN105022579A (en) * 2014-04-30 2015-11-04 中国海洋大学 Image processing-based implement method and device of virtual keyboard
CN105634503A (en) * 2015-12-28 2016-06-01 北京锦鸿希电信息技术股份有限公司 Method and device for detecting keyboard key values

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201876868U (en) * 2010-10-08 2011-06-22 东莞宝元数控科技有限公司 Self-detection system for keying function of keyboard
CN105100342A (en) * 2015-05-18 2015-11-25 努比亚技术有限公司 Touch side key realization method and mobile terminal
CN105141774B (en) * 2015-09-10 2018-06-29 广东欧珀移动通信有限公司 It is a kind of to solve method and the mobile terminal that side switch corrosion cannot be started up

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207722A (en) * 2006-12-19 2008-06-25 深圳Tcl新技术有限公司 Method and system for self-defining remote controller key function
CN201203651Y (en) * 2007-12-21 2009-03-04 虹光精密工业(苏州)有限公司 Circuit for detecting key-press status
CN101335957A (en) * 2008-07-25 2008-12-31 深圳华为通信技术有限公司 Quick key setting method, functional implementation method of communication terminal and communication terminal
CN101661418A (en) * 2008-08-26 2010-03-03 比亚迪股份有限公司 Keyboard testing system
CN101840268A (en) * 2010-04-23 2010-09-22 中国电子科技集团公司第五十四研究所 Method for fast scanning and positioning of matrix keyboard
CN102520345A (en) * 2011-12-06 2012-06-27 惠州Tcl移动通信有限公司 Method for recording button usage times and apparatus thereof
CN105022579A (en) * 2014-04-30 2015-11-04 中国海洋大学 Image processing-based implement method and device of virtual keyboard
CN105634503A (en) * 2015-12-28 2016-06-01 北京锦鸿希电信息技术股份有限公司 Method and device for detecting keyboard key values

Also Published As

Publication number Publication date
CN107976624A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
AU2012238905B2 (en) An induction cooking hob with a pot detection device and a method for operating an induction cooking hob
CN107340723B (en) Mode switching method and device of intelligent electrical appliance
US10187933B2 (en) Microwave oven and control method thereof
JP2007075481A (en) Cooker
EP2506674A1 (en) An induction cooking hob with a pot detection device
CN108415301B (en) Cooking parameter changing method and device
CN107198433A (en) A kind of method of displaying function menu, device and electric cooking pot
CN105266606A (en) An electric cooker and a control method and a control device thereof
EP2683215A1 (en) A method for controlling an induction cooking hob with a pot detection system and a control unit for controlling an induction cooking hob with a pot detection system
CN105559508A (en) Control method and system for cooking utensil
CN107976624B (en) Key state detection method and device
CN109358530B (en) Control device and household appliance
CN111766835A (en) Cooking method, apparatus and storage medium
CN205568652U (en) Electric cooking ware
KR102087706B1 (en) Cooker for providing unlock method
CN108418846B (en) Reservation processing method and device
CN110848759B (en) Control method and device for preventing dry heating of heating equipment, heating equipment and storage medium
US11732899B2 (en) Electric range and controlling method of the electric range
CN103324186A (en) Automatic test system and control method for remote controller
CN108983643B (en) Starting control device and method of food processor and food processor
KR100963400B1 (en) Cooker and method for controlling the same
AU2016307032B2 (en) User interface for a cooking hob
JP2014190648A (en) Heating cooker
CN110638335A (en) Cooking equipment safety control method and device, storage medium and cooking equipment
JP6173201B2 (en) Cooking device

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