WO2016107460A1 - Method for electronic device to support various infrared remote controllers and system thereof - Google Patents

Method for electronic device to support various infrared remote controllers and system thereof Download PDF

Info

Publication number
WO2016107460A1
WO2016107460A1 PCT/CN2015/098253 CN2015098253W WO2016107460A1 WO 2016107460 A1 WO2016107460 A1 WO 2016107460A1 CN 2015098253 W CN2015098253 W CN 2015098253W WO 2016107460 A1 WO2016107460 A1 WO 2016107460A1
Authority
WO
WIPO (PCT)
Prior art keywords
infrared remote
key value
state process
remote controller
infrared
Prior art date
Application number
PCT/CN2015/098253
Other languages
French (fr)
Chinese (zh)
Inventor
张海鹏
Original Assignee
阿里巴巴集团控股有限公司
张海鹏
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 阿里巴巴集团控股有限公司, 张海鹏 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2016107460A1 publication Critical patent/WO2016107460A1/en

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/44Receiver circuitry for the reception of television signals according to analogue transmission standards

Definitions

  • the present invention relates to remote control technology, and more particularly to a method and system for supporting an electronic device to support a plurality of infrared remote controllers.
  • Network set-top boxes have entered a period of rapid development. Most of the network set-top boxes on the market use infrared remote controls for remote control. The emergence of the network set-top box infrared remote control has added a member to the family mid-infrared remote control family (TV infrared remote control, air-conditioning infrared remote control, DVD infrared remote control, etc.), which makes the infrared remote control in the home more confusing. When the network set-top box remote control fails, the existing infrared remote control in the home cannot be used, and only the infrared remote controller of a specific manufacturer can be purchased, thereby causing waste of resources.
  • the infrared remote control is mainly composed of an infrared light emitting diode, an infrared receiving diode and related working circuits.
  • the infrared light-emitting transistor is integrated on the remote control and emits infrared light after being electrically conductive.
  • the infrared receiving diode is integrated on the controlled appliance. When receiving the infrared light, it will cause a change in the current in the circuit to control the appliance.
  • the main control chip IC1 in the infrared light-emitting diode circuit controls the LED to emit information including Command (Address) and Address (Address) in the form of infrared light at a time.
  • the infrared receiving diode circuit only passively receives Command and Adrress information, and further processing of this information is handled by a program running in the main control chip IC2.
  • the Address information sent in IC1 is fixed, and the Address information processed in IC2 is also fixed, so that the infrared remote control can be matched. If IC2 only processes Command whose Address is 0XFF, then only IC1 that sends Address is 0XFF can match it, and IC1 that sends any other Address cannot control it.
  • the multi-function infrared remote control already available on the market can realize the purpose of controlling a plurality of home appliances by one remote controller.
  • the biggest difference between the multi-function infrared remote control and the ordinary remote control is that there are flash (flash) areas for storing different Address and corresponding Comannd on the remote end. Due to the limited storage area Flash, it is impossible to store all infrared addresses and their commands on the market. Therefore, the multi-function infrared remote controller also integrates the infrared receiving diode D1 to realize the "learning" function of the remote controller, as shown in Fig. 2.
  • the first use of the multi-function infrared remote control requires pairing.
  • the multi-function infrared remote control will have a search function. As long as the infrared light-emitting diode D2 of the infrared remote control is facing the controlled appliance, and then click the search function, the main control chip IC3 will read the Address and Command in the Flash, one by one.
  • the controlled appliance performs matching, and when the pairing is successful, the search can be stopped, and the multi-function remote controller is used to control the home appliance.
  • This learning function requires an infrared remote control that can control the controlled appliance, and then follow the “learning” instructions of the multi-function remote control. If you click the left button of the existing remote control A, press the left button of the multi-function remote control, so that the multi-function remote control records the left-key value of the remote control A. After learning all the keys of the remote control A, you can use the multi-function remote control instead of the remote control A.
  • the learning function of the multi-function infrared remote control depends on the remote control that can work normally. If the multi-function infrared remote controller does not pre-store the key value of the network set-top box remote controller, since the existing infrared remote controller is broken, the learning function of the multi-function remote controller cannot be turned on. Even if the user buys a multi-function infrared remote control, the user cannot control the network set-top box.
  • an embodiment of the present invention discloses a method for an electronic device to support multiple infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the method includes the following steps:
  • the kernel state process determines whether there is an identifier in the memory or uploads the identifier and the key value to the bus in the kernel state process and determines whether the identifier exists in the database in the user state process, and the memory and the database store a plurality of corresponding to each infrared remote controller.
  • the user state process converts the key value into a reference key value according to a pre-stored configuration, and performs a corresponding function according to the reference key value.
  • the embodiment of the present invention further discloses a method for an electronic device to support multiple infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the method includes the following steps:
  • the second infrared remote controller is used as the current infrared remote controller
  • the user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
  • the kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process, and if the same, performs the power-on operation of the electronic device.
  • the embodiment of the present invention further discloses a system for supporting an electronic device to support a plurality of infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the system includes:
  • a first receiving module configured to receive an infrared signal sent by the infrared remote controller in the kernel state process and read the identifier and the key value from the infrared signal;
  • the first judging module is configured to determine whether the identifier exists in the memory in the kernel state process or upload the identifier and the key value to the bus in the kernel state process and determine whether the identifier exists in the database in the user state process, and the memory and the database store multiple Corresponding to the identification of each infrared remote control;
  • the first execution module is configured to: when the first determining module confirms that the identifier exists, convert the key value into a reference key value according to the pre-stored configuration in the user state process, and execute the corresponding function according to the reference key value.
  • the embodiment of the present invention further discloses a system for supporting an electronic device to support a plurality of infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the system includes:
  • the switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
  • a storage module configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
  • a second receiving module configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started;
  • a second determining module configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process;
  • the second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
  • a plurality of identifiers corresponding to the respective infrared remote controllers are stored in the memory or the database, and the kernel state process or the user state process determines whether the identifier read from the infrared signal exists, and can support the existing ones.
  • the infrared remote controller does not require the operation of an additional hardware device, and when the identifier exists, the key value read from the infrared signal is uniformly converted into the reference key value according to the pre-stored configuration, and then the corresponding function is executed, and various functions are supported.
  • the infrared remote control is more stable and convenient to operate.
  • the power-on key value of the switched infrared remote controller is stored in the memory running in the kernel state process, and when the user state process is not started, the infrared remote controller is used to perform the power-on operation in the kernel state process. It can support all kinds of infrared remote controllers that are available, and does not require the operation of additional hardware devices.
  • the identifier and the key value are uploaded to the bus, and the validity of the identifier is judged in the user state process, and the infrared remote controller supporting different identifiers does not affect the running speed of the entire system.
  • FIG. 1 is a schematic structural view of a conventional infrared remote control circuit
  • FIG. 2 is a schematic circuit diagram of a conventional multi-function infrared remote controller
  • FIG. 3 is a schematic flow chart of a method for supporting multiple infrared remote controllers in an electronic device according to a first embodiment of the present invention
  • FIG. 4 is a diagram showing an electronic device supporting a plurality of infrared remote controllers in the third and fourth embodiments of the present invention; Schematic diagram of the method;
  • FIG. 5 is a schematic flow chart of a method for supporting a plurality of infrared remote controllers in an electronic device according to a fifth embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a processing flow of a conventional infrared interrupt
  • FIG. 7 is a schematic diagram of a processing flow of an infrared interrupt in an embodiment of the present invention.
  • FIG. 8 is a schematic flow chart of learning an infrared remote controller according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a system for supporting multiple infrared remote controllers in an electronic device according to a seventh embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a system for supporting a plurality of infrared remote controllers in an electronic device according to the ninth and tenth embodiments of the present invention.
  • FIG. 11 is a schematic structural diagram of a system in which an electronic device supports a plurality of infrared remote controllers according to an eleventh embodiment of the present invention.
  • a first embodiment of the invention relates to a method of an electronic device supporting a plurality of infrared remote controls.
  • 3 is a flow chart showing a method of supporting a plurality of infrared remote controllers for the electronic device.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel mode.
  • the kernel state is the most basic services (such as memory management, file system, processor scheduling, etc.) and drivers, and the user mode is normal. s application.
  • the method includes the following steps:
  • the kernel state process receives the infrared signal transmitted by the infrared remote controller and reads the identification and the key value from the infrared signal.
  • identification is information that distinguishes different manufacturers, different products, or different appearances.
  • the kernel state process determines whether the identifier exists in the memory or uploads the identifier and the key value to the bus in the kernel state process and determines whether the identifier exists in the user state process database, and the foregoing memory and the database are A plurality of identifiers corresponding to the respective infrared remote controllers are stored. If the identifier exists, the process proceeds to step 303, otherwise the process ends.
  • step 303 the user state process converts the key value into a reference key value according to a pre-stored configuration, and performs a corresponding function according to the reference key value.
  • a plurality of identifiers corresponding to the infrared remote controllers are stored in the memory or the database, and the kernel state process or the user state process determines whether the identifier read from the infrared signal exists, and can support the existing one.
  • Various infrared remote controllers do not require the operation of additional hardware devices, and when the identifier exists, the key values read from the infrared signals are uniformly converted into the reference key values according to the pre-stored configuration, and then the corresponding functions are executed, and the support is performed.
  • the infrared remote control is more stable and convenient to operate.
  • a second embodiment of the present invention is directed to a method of an electronic device supporting a plurality of infrared remote controls.
  • the second embodiment is improved on the basis of the first embodiment, and the main improvement is that the key value of the infrared remote controller is learned when the identification does not exist.
  • step 302 the following steps are also included:
  • the corresponding function is selected for the key value of the infrared remote controller to form a configuration.
  • each infrared corresponding to each key value of the infrared remote controller is received in a predetermined order
  • the signal is selected to select the corresponding function of the key value of the infrared remote controller to form a configuration.
  • buttons can be used for learning, or all buttons can be learned together.
  • a third embodiment of the invention relates to a method of an electronic device supporting a plurality of infrared remote controls.
  • 4 is a schematic flow chart of a method in which the electronic device supports a plurality of infrared remote controllers.
  • the third embodiment is improved on the basis of the first embodiment and the second embodiment, and the main improvement is that after the user state process is started, the power-on key value of the switched infrared remote controller is stored in the kernel state.
  • the process runs in the memory, and when the user state process is not started, the infrared remote controller is used to perform a boot operation in the kernel state process, which can support various existing infrared remote controllers, and does not require the operation of additional hardware devices. Specifically:
  • the method further includes the following steps:
  • step 401 after the user state process is started, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller.
  • the user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process.
  • the kernel state process receives the second infrared signal sent by the second infrared remote controller and reads the second key value from the second infrared signal.
  • the kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process. If the same, the process proceeds to step 405, otherwise the process ends.
  • step 405 a power-on operation of the electronic device is performed.
  • the power-on key value corresponding to one or more infrared remote controllers can be stored therein.
  • the kernel state process runs in the memory to perform boot operations in the kernel state process.
  • a fourth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers.
  • 4 is a schematic flow chart of a method in which the electronic device supports a plurality of infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the kernel state is the most basic services (such as memory management, file system, processor scheduling, etc.) and drivers, and the user mode is a normal application.
  • the method includes the following steps:
  • step 401 after the user state process is started, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller.
  • the user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process.
  • the kernel state process receives the second infrared signal sent by the second infrared remote controller and reads the second key value from the second infrared signal.
  • the kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process. If the same, the process proceeds to step 405, otherwise the process ends.
  • step 405 a power-on operation of the electronic device is performed.
  • the power-on key value corresponding to one or more infrared remote controllers can be stored in the memory running in the kernel state process to perform the power-on operation in the kernel state process.
  • the power-on key value of the switched infrared remote controller is stored in a memory running in the kernel state process, and when the user state process is not started, the infrared remote control is used.
  • the boot process is performed in the kernel state process, and can support various existing infrared remotes. Controller and does not require the operation of additional hardware devices.
  • a fifth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers.
  • FIG. 5 is a schematic flow chart of a method for supporting a plurality of infrared remote controllers of the electronic device.
  • the fifth embodiment is improved on the basis of the fourth embodiment.
  • the main improvement is that the kernel state process uploads the identifier and the key value to the bus, and judges the validity of the identifier in the user state process. Supporting differently-identified infrared remote controls does not affect the speed of the entire system. Specifically:
  • the method further includes the following steps:
  • the kernel state process receives the infrared signal sent by the infrared remote controller and reads the identification and the key value from the infrared signal.
  • identification is information that distinguishes different manufacturers, different products, or different appearances.
  • the kernel state process uploads the identification and key values to the bus.
  • the user state process reads the identification and the key value from the bus.
  • step 504 it is determined whether the identifier exists in the database. If yes, the process proceeds to step 505, otherwise the process ends.
  • step 505 the configuration corresponding to the identifier is acquired and the corresponding function of the key value is executed according to the configuration.
  • step 505 the following sub-steps are included in step 505:
  • the function is performed based on the reference key value.
  • the key functions can be directly executed without converting the key values.
  • a sixth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers.
  • the sixth embodiment is improved on the basis of the fifth embodiment, and the main improvement is that the key value of the infrared remote controller is learned when there is no identifier corresponding to the infrared remote controller in the database.
  • step 504 the following steps are also included:
  • the corresponding function is selected for the key value of the infrared remote controller to form a configuration.
  • each infrared signal corresponding to each key value of the infrared remote controller is received in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
  • buttons can be used for learning, or all buttons can be learned together.
  • the operating system in the network set-top box generally uses the Linux kernel to support the underlying device.
  • the infrared remote control driver of the network set-top box is also supported by the Linux kernel.
  • the processing flow of the Linux kernel to the infrared interrupt is shown in Figure 6.
  • Linux systems are divided into kernel mode and user mode for security and efficiency reasons.
  • the infrared driver works in the kernel mode. When a button is pressed, an infrared interrupt is generated. In the interrupt handler, the address (address, equivalent to the identifier) is judged to be valid. If the address is valid, the Command representing the key value will be transferred to the device bus. If the address is invalid, it will be ignored and no processing will be done.
  • the button If the button is active, it is necessary to read Commnad from the device bus and parse it at the user mode.
  • the existing operating system handles the infrared remote control, and the kernel mode is used directly.
  • the process of the Linux infrared kernel state shown in Figure 6 creates two threads in the user state: Command reads the thread InputReader and the Command dispatch thread InputDispatcher.
  • the InputReader is responsible for reading the Command data on the device bus and parsing it to the InputDispatcher, and then the InputDispatcher notifies the corresponding application to perform the operation.
  • Linux only handles drivers in the kernel mode, and infrared drivers are provided by hardware vendors. Different hardware vendors use different Addresses to distinguish them. Therefore, to use a manufacturer's infrared device, you need to load the device manufacturer's driver. In the driver of the equipment manufacturer, the address generated by the infrared interrupt is judged. If it is valid, the Command is uploaded to the bus, otherwise the infrared interrupt is directly ignored. Therefore, the supported infrared remote controls are very limited.
  • the processing flow of the operating system to the infrared remote controller is as shown in FIG. Compared with Figure 6, the Linux kernel state no longer determines whether Address is valid or not, and directly uploads the data obtained by the infrared interrupt to the device bus.
  • the Linux kernel state it is determined whether the Address is in the database. If it exists, the correct mapping ⁇ Address2, Command2> corresponding to ⁇ Address, Command> is read, and then Command2 is parsed and the operation is performed. If the Address is not in the database, the infrared learning function of the network set-top box is turned on, and the remote controller key value of the Address is learned and saved.
  • the reason why the address is valid in the user mode is because the kernel mode supports the normal operation of the entire system. If the work is too heavy, it will seriously affect the running speed of the entire system. And because the entire system is built on the Linux kernel, the Linux kernel does not allow this time-consuming operation to be done by the kernel state.
  • the left key of the infrared remote control A is 0x01
  • the key of the left key of the infrared remote control B is 0x02.
  • the key values are different. Therefore, it is necessary to convert the key values of different infrared remote controllers to the bus for conversion, and the work is performed in the database.
  • the contents of the database are shown in Table 1. In a preferred example, as long as the left button is converted to 0x1A. Of course, other in the present invention In the embodiment, the key value may not be converted.
  • the operating system will start two threads in user mode to handle the infrared remote control: read the data thread InputReader and distribute the Command thread InputDispatcher.
  • the InputReader thread reads the Address and Command on the bus. Then look up the Address in the database. If it can be found, it will notify the InputDispatcher to distribute the event after parsing the Command. Otherwise, the user will be prompted to start the button learning function of the remote controller.
  • the remote control learning function of the network set-top box does not need to rely on other infrared remote controllers, and only the remote controller to be learned needs to follow the prompts.
  • the network set top box learns the following keys in order: confirmation key, left key, right key, up key, down key, return key, sound plus key, sound minus key, mute key, HOME key, and shutdown key 11. If there is no relevant button on the remote control being learned, just wait 10 seconds to skip the learning function of this button.
  • the keys can also be learned in other sequences.
  • 10 network set-top boxes using 10 different infrared remote controllers can be upgraded to the same system version, and each infrared remote controller can be used normally, with strong compatibility and convenient use.
  • the method embodiments of the present invention can all be implemented in software, hardware, firmware, and the like. Regardless of whether the invention is implemented in software, hardware, or firmware, the instruction code can be stored in any class.
  • Type of computer accessible memory eg, permanent or modifiable, volatile or non-volatile, solid or non-solid, fixed or replaceable media, etc.
  • the memory may be, for example, Programmable Array Logic ("PAL"), Random Access Memory (RAM), or Programmable Read Only Memory (PROM). "), Read-Only Memory (“ROM”), Electrically Erasable Programmable ROM (“EEPROM”), Disk, CD, Digital Versatile Disc , referred to as "DVD”) and so on.
  • PAL Programmable Array Logic
  • RAM Random Access Memory
  • PROM Programmable Read Only Memory
  • ROM Read-Only Memory
  • EEPROM Electrically Erasable Programmable ROM
  • Disk CD
  • DVD Digital Versatile Disc
  • a seventh embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers.
  • 9 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. As shown in Figure 9, the system includes:
  • the first receiving module is configured to receive, in the kernel state process, an infrared signal sent by the infrared remote controller and read the identifier and the key value from the infrared signal.
  • the first judging module is configured to determine whether the identifier exists in the memory in the kernel state process or upload the identifier and the key value to the bus in the kernel state process and determine whether the identifier exists in the user state process database, and the memory and the database are stored a plurality of identifiers corresponding to each of the infrared remote controls;
  • the first execution module is configured to: if the first determining module confirms that the identifier exists, convert the key value into a reference key value according to a pre-stored configuration in the user state process, and execute the corresponding function according to the reference key value.
  • a plurality of identifiers corresponding to the respective infrared remote controllers are stored in the memory or the database, and the first determining module determines whether the identifier read from the infrared signal exists in the kernel state process or the user state process, Support various existing infrared remote controllers, do not need the operation of additional hardware devices, and when the identifier exists, the first execution module uniformly converts the key values read from the infrared signals into the reference key values according to the pre-stored configuration. Then perform the corresponding functions, which is more stable and convenient when supporting the operation of multiple infrared remote controllers.
  • the first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the first embodiment.
  • the related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
  • An eighth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers.
  • the eighth embodiment is improved on the basis of the seventh embodiment, and the main improvement is that the key value of the infrared remote controller is learned when the identification does not exist.
  • the system further includes a configuration module, configured to: if the first determining module confirms that the identifier does not exist, select a corresponding function for the key value of the infrared remote controller to form a configuration.
  • the configuration module is configured to receive each infrared signal corresponding to each key value of the infrared remote controller in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
  • buttons can be used for learning, or all buttons can be learned together.
  • the second embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the second embodiment.
  • the related technical details mentioned in the second embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the second embodiment.
  • a ninth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers.
  • FIG. 10 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
  • the ninth embodiment is improved on the basis of the seventh embodiment and the eighth embodiment, and the main improvement is that after the user state process is started, the power-on key value of the switched infrared remote controller is stored in the kernel state.
  • the process runs in the memory, and when the user state process is not started, the infrared remote controller is used to perform a boot operation in the kernel state process, which can support various existing infrared remote controllers, and does not require the operation of additional hardware devices. Specifically:
  • the system further includes:
  • the switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
  • a storage module configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
  • a second receiving module configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started;
  • a second determining module configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process;
  • the second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
  • the power-on key value corresponding to one or more infrared remote controllers can be stored in a memory running in the kernel state process to perform a power-on operation in the kernel state process.
  • the third embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the third embodiment.
  • the related technical details mentioned in the third embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the third embodiment.
  • FIG. 10 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
  • the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state.
  • the system includes:
  • the switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote control.
  • a storage module configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller, in a memory running in the kernel state process.
  • the second receiving module is configured to receive, in the kernel state process, the second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started.
  • the second determining module is configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process. as well as
  • the second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
  • the power-on key value corresponding to one or more infrared remote controllers can be stored in a memory running in the kernel state process to perform a power-on operation in the kernel state process.
  • the storage module stores the power-on key value of the infrared remote controller switched by the switching module in a memory running in the kernel state process, and when the user state process is not started,
  • the second execution module performs a boot operation in the kernel state process, can support various existing infrared remote controllers, and does not require the operation of additional hardware devices.
  • the fourth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the fourth embodiment.
  • the related technical details mentioned in the fourth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the fourth embodiment.
  • An eleventh embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers.
  • 11 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
  • the eleventh embodiment is improved on the basis of the tenth embodiment, and the main improvement is that the kernel state process uploads the identifier and the key value to the bus, and the user state process has the identifier Efficacy is judged, and the infrared remote controller supporting different logos does not affect the running speed of the entire system. Specifically:
  • the system further includes:
  • the first receiving module is configured to receive an infrared signal sent by the infrared remote controller and read the identifier and the key value from the infrared signal in the kernel state process after the user state process is started.
  • the uploading module is configured to upload the identifier and the key value read by the first receiving module to the bus in the kernel state process.
  • the reading module is configured to read the identifier and key value uploaded by the uploading module from the bus in the user state process.
  • the first determining module is configured to determine, in the user state process, whether the identifier read by the reading module exists in the database. as well as
  • the first execution module is configured to: if the first determining module confirms that the identifier exists in the database, acquire a configuration corresponding to the identifier and perform a corresponding function of the key according to the configuration.
  • the first execution module includes:
  • the submodule is obtained to obtain a configuration corresponding to the identifier.
  • Execution submodule for performing the corresponding function based on the reference key value.
  • the key values of different infrared remote controllers uploaded to the bus are uniformly converted into reference key values, and then the corresponding functions are executed, which is more stable and convenient when supporting a plurality of infrared remote controllers.
  • the fifth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the fifth embodiment.
  • the related technical details mentioned in the fifth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the fifth embodiment.
  • a twelfth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers.
  • the twelfth embodiment is improved on the basis of the eleventh embodiment, and the main improvement is that the key value of the infrared remote controller is learned when there is no identifier corresponding to the infrared remote controller in the database. Specifically:
  • the system further includes a configuration module, configured to: if the first determining module confirms that the identifier does not exist in the database, select a corresponding function for the key value of the infrared remote controller to form a configuration.
  • the configuration module is configured to receive each infrared signal corresponding to each key value of the infrared remote controller in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
  • buttons can be used for learning, or all buttons can be learned together.
  • the sixth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the sixth embodiment.
  • the related technical details mentioned in the sixth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the sixth embodiment.
  • each module mentioned in each device implementation manner of the present invention is a logic module.
  • a logic module may be a physical module, a part of a physical module, or multiple physical entities.
  • the combined implementation of modules, the physical implementation of these logic modules themselves is not the most important, the combination of the functions implemented by these logic modules is the key to solving the technical problems raised by the present invention.
  • the above-mentioned various device embodiments of the present invention do not introduce a module that is not closely related to solving the technical problem proposed by the present invention, which does not indicate that the above device implementation does not have other Module.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)

Abstract

A method for an electronic device to support various infrared remote controllers and a system thereof, which relate to remote control technology. Identifiers corresponding to various infrared remote controllers are stored in a memory or a database; in a kernel state process or a user state process, it is judged whether an identifier read from an infrared signal exists, and various existing infrared remote controllers can be supported without an operation of an additional hardware device; and when the identifier exists, key values read from the infrared signal are uniformly converted into reference key values according to a pre-stored configuration, and then a corresponding function is executed, so that it is more stable and convenient when the operations of various infrared remote controllers are supported.

Description

电子设备支持多种红外遥控器的方法及其系统Method and system for supporting multiple infrared remote controllers for electronic equipment 技术领域Technical field
本发明涉及遥控技术,特别涉及电子设备支持多种红外遥控器的方法及其系统。The present invention relates to remote control technology, and more particularly to a method and system for supporting an electronic device to support a plurality of infrared remote controllers.
背景技术Background technique
网络机顶盒已经进入快速发展时期,市场上大部分网络机顶盒使用的是红外遥控器来远程控制。网络机顶盒红外遥控器的出现给家庭中红外遥控家族(电视机红外遥控器、空调红外遥控器、DVD红外遥控器等等)又添加了一员,这使得家中的红外遥控器变得更加混乱。当网络机顶盒遥控器出现故障时,家中已有的红外遥控器无法使用,只能买特定厂商的红外遥控器,从而造成资源的浪费。Network set-top boxes have entered a period of rapid development. Most of the network set-top boxes on the market use infrared remote controls for remote control. The emergence of the network set-top box infrared remote control has added a member to the family mid-infrared remote control family (TV infrared remote control, air-conditioning infrared remote control, DVD infrared remote control, etc.), which makes the infrared remote control in the home more confusing. When the network set-top box remote control fails, the existing infrared remote control in the home cannot be used, and only the infrared remote controller of a specific manufacturer can be purchased, thereby causing waste of resources.
如图1所示,红外遥控主要由红外发光二极管、红外接收二极管及相关工作电路组成。红外发光晶体管集成在遥控器上,导电后会发出红外光。红外接收二极管集成在受控电器上,当接收到红外光时,会引起电路中电流的变化,从而控制电器。As shown in Figure 1, the infrared remote control is mainly composed of an infrared light emitting diode, an infrared receiving diode and related working circuits. The infrared light-emitting transistor is integrated on the remote control and emits infrared light after being electrically conductive. The infrared receiving diode is integrated on the controlled appliance. When receiving the infrared light, it will cause a change in the current in the circuit to control the appliance.
红外发光二极管电路中的主控芯片IC1,会控制发光二极管一次将包含Command(键值)与Address(地址)的信息以红外光的形式发射出去。红外接收二极管电路只是被动的接收Command与Adrress信息,这些信息的进一步处理是由运行在主控芯片IC2中的程序处理的。一般情况下,IC1中发出的Address信息是固定的,而IC2中处理的Address信息也是固定的,这样便可以实现红外遥控的匹配。如IC2只处理Address是0XFF的Command,那么只有发出Address是0XFF的IC1才能与之进行匹配,发出其他任何Address的IC1都无法对其进行控制。 The main control chip IC1 in the infrared light-emitting diode circuit controls the LED to emit information including Command (Address) and Address (Address) in the form of infrared light at a time. The infrared receiving diode circuit only passively receives Command and Adrress information, and further processing of this information is handled by a program running in the main control chip IC2. In general, the Address information sent in IC1 is fixed, and the Address information processed in IC2 is also fixed, so that the infrared remote control can be matched. If IC2 only processes Command whose Address is 0XFF, then only IC1 that sends Address is 0XFF can match it, and IC1 that sends any other Address cannot control it.
市场上已有的多功能红外遥控器可以实现一个遥控器控制多个家电的目的。多功能红外遥控器与普通遥控器的最大区别是在遥控端有存储不同Address和对应Comannd的Flash(闪存)区域。由于存储区域Flash有限,不可能存储市面上的所有红外Address及其Command,因此多功能红外遥控器还会集成红外接收二极管D1来实现遥控器的“学习”功能,如图2所示。The multi-function infrared remote control already available on the market can realize the purpose of controlling a plurality of home appliances by one remote controller. The biggest difference between the multi-function infrared remote control and the ordinary remote control is that there are flash (flash) areas for storing different Address and corresponding Comannd on the remote end. Due to the limited storage area Flash, it is impossible to store all infrared addresses and their commands on the market. Therefore, the multi-function infrared remote controller also integrates the infrared receiving diode D1 to realize the "learning" function of the remote controller, as shown in Fig. 2.
多功能红外遥控器的第一次使用,需要进行配对。多功能红外遥控器上会存在搜索功能,只要红外遥控器的红外发光二极管D2对着被控电器,然后按一下搜索功能,主控芯片IC3就会读取Flash中的Address和Command,一一与受控电器进行匹配,当配对成功后便可以停止搜索,进而使用该多功能遥控器来控制家电。当搜索完整个Flash都没有找到配对的Address和Command时,就需要使用红外遥控器的学习功能。该学习功能需要一个能够控制受控电器的红外遥控器,然后按照多功能遥控器的“学习”说明进行学习。如按一下已有遥控器A的左键,再按一下多功能遥控器的左键,这样多功能遥控器就记录了遥控器A的左键值。等学习完遥控器A的所有键值,就可以使用多功能遥控器来替代遥控器A。The first use of the multi-function infrared remote control requires pairing. The multi-function infrared remote control will have a search function. As long as the infrared light-emitting diode D2 of the infrared remote control is facing the controlled appliance, and then click the search function, the main control chip IC3 will read the Address and Command in the Flash, one by one. The controlled appliance performs matching, and when the pairing is successful, the search can be stopped, and the multi-function remote controller is used to control the home appliance. When searching for the entire Flash and not finding the paired Address and Command, you need to use the infrared remote control learning function. This learning function requires an infrared remote control that can control the controlled appliance, and then follow the “learning” instructions of the multi-function remote control. If you click the left button of the existing remote control A, press the left button of the multi-function remote control, so that the multi-function remote control records the left-key value of the remote control A. After learning all the keys of the remote control A, you can use the multi-function remote control instead of the remote control A.
但是本发明的发明人发现,现有的红外遥控器存在以下缺点:However, the inventors of the present invention have found that the existing infrared remote controller has the following disadvantages:
(1)当网络机顶盒遥控器坏掉时,若使用多功能遥控器来替换,则需要额外的开销。(1) When the network set-top box remote controller is broken, if a multi-function remote controller is used for replacement, additional overhead is required.
(2)多功能红外遥控器的学习功能依赖能够正常工作的遥控器。若多功能红外遥控器没有预存网络机顶盒遥控器的键值,由于已有的红外遥控器已坏,因此无法开启多功能遥控器的学习功能。用户即使买了多功能红外遥控器,也无法控制网络机顶盒。 (2) The learning function of the multi-function infrared remote control depends on the remote control that can work normally. If the multi-function infrared remote controller does not pre-store the key value of the network set-top box remote controller, since the existing infrared remote controller is broken, the learning function of the multi-function remote controller cannot be turned on. Even if the user buys a multi-function infrared remote control, the user cannot control the network set-top box.
发明内容Summary of the invention
本发明的目的在于提供一种电子设备支持多种红外遥控器的方法及其系统,可以同时支持已有的各种红外遥控器,并且不需要额外的硬件设备的操作。It is an object of the present invention to provide a method and system for supporting a plurality of infrared remote controllers for an electronic device, which can simultaneously support various existing infrared remote controllers, and does not require the operation of additional hardware devices.
为解决上述技术问题,本发明的实施方式公开了一种电子设备支持多种红外遥控器的方法,电子设备包括操作系统,该操作系统分为用户态和内核态,方法包括以下步骤:To solve the above technical problem, an embodiment of the present invention discloses a method for an electronic device to support multiple infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. The method includes the following steps:
在内核态进程接收红外遥控器发送的红外信号并从红外信号读取标识和键值;Receiving, in the kernel state process, an infrared signal sent by the infrared remote controller and reading the identification and the key value from the infrared signal;
在内核态进程判断存储器中是否存在标识或在内核态进程将标识和键值上传到总线并在用户态进程判断数据库中是否存在标识,存储器和数据库中存储有多个相应于各红外遥控器的标识;The kernel state process determines whether there is an identifier in the memory or uploads the identifier and the key value to the bus in the kernel state process and determines whether the identifier exists in the database in the user state process, and the memory and the database store a plurality of corresponding to each infrared remote controller. Identification
若标识存在,在用户态进程根据预先存储的配置将键值转换为基准键值,并根据基准键值来执行相应功能。If the identifier exists, the user state process converts the key value into a reference key value according to a pre-stored configuration, and performs a corresponding function according to the reference key value.
本发明的实施方式还公开了一种电子设备支持多种红外遥控器的方法,电子设备包括操作系统,该操作系统分为用户态和内核态,方法包括以下步骤:The embodiment of the present invention further discloses a method for an electronic device to support multiple infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. The method includes the following steps:
在用户态进程启动后:After the user state process starts:
在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外遥控器;After the user state process receives the signal for switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller;
在用户态进程将与第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;The user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
在用户态进程未启动时:When the user state process is not started:
在内核态进程接收第二红外遥控器发送的第二红外信号并从第二红外 信号读取第二键值;Receiving, in the kernel state process, the second infrared signal sent by the second infrared remote controller and from the second infrared The signal reads the second key value;
在内核态进程判断第二键值与在内核态进程运行的存储器中存储的开机键值是否相同,若相同,则执行电子设备的开机操作。The kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process, and if the same, performs the power-on operation of the electronic device.
本发明的实施方式还公开了一种电子设备支持多种红外遥控器的系统,电子设备包括操作系统,该操作系统分为用户态和内核态,系统包括:The embodiment of the present invention further discloses a system for supporting an electronic device to support a plurality of infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. The system includes:
第一接收模块,用于在内核态进程接收红外遥控器发送的红外信号并从红外信号读取标识和键值;a first receiving module, configured to receive an infrared signal sent by the infrared remote controller in the kernel state process and read the identifier and the key value from the infrared signal;
第一判断模块,用于在内核态进程判断存储器中是否存在标识或在内核态进程将标识和键值上传到总线并在用户态进程判断数据库中是否存在标识,存储器和数据库中存储有多个相应于各红外遥控器的标识;以及The first judging module is configured to determine whether the identifier exists in the memory in the kernel state process or upload the identifier and the key value to the bus in the kernel state process and determine whether the identifier exists in the database in the user state process, and the memory and the database store multiple Corresponding to the identification of each infrared remote control;
第一执行模块,用于若第一判断模块确认标识存在,在用户态进程根据预先存储的配置将键值转换为基准键值,并根据基准键值来执行相应功能。The first execution module is configured to: when the first determining module confirms that the identifier exists, convert the key value into a reference key value according to the pre-stored configuration in the user state process, and execute the corresponding function according to the reference key value.
本发明的实施方式还公开了一种电子设备支持多种红外遥控器的系统,电子设备包括操作系统,该操作系统分为用户态和内核态,系统包括:The embodiment of the present invention further discloses a system for supporting an electronic device to support a plurality of infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. The system includes:
切换模块,用于在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外遥控器;The switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
存储模块,用于在用户态进程将与第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;a storage module, configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
第二接收模块,用于在用户态进程未启动时,在内核态进程接收第二红外遥控器发送的第二红外信号并从第二红外信号读取第二键值;a second receiving module, configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started;
第二判断模块,用于在用户态进程未启动时,在内核态进程判断第二接收模块读取的第二键值与在内核态进程运行的存储器中存储的开机键值是否相同;以及 a second determining module, configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process;
第二执行模块,用于若第二判断模块确认第二键值与开机键值相同,则执行电子设备的开机操作。The second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
本发明实施方式与现有技术相比,主要区别及其效果在于:Compared with the prior art, the main differences and effects of the embodiments of the present invention are as follows:
在本发明的方法中,在存储器或数据库中存储有多个相应于各红外遥控器的标识,在内核态进程或用户态进程判断从红外信号读取的标识是否存在,可以支持已有的各种红外遥控器,不需要额外硬件设备的操作,并且当该标识存在时,根据预先存储的配置将从红外信号读取的键值统一转换成基准键值后再执行相应功能,在支持多种红外遥控器的操作时更稳定、更方便。In the method of the present invention, a plurality of identifiers corresponding to the respective infrared remote controllers are stored in the memory or the database, and the kernel state process or the user state process determines whether the identifier read from the infrared signal exists, and can support the existing ones. The infrared remote controller does not require the operation of an additional hardware device, and when the identifier exists, the key value read from the infrared signal is uniformly converted into the reference key value according to the pre-stored configuration, and then the corresponding function is executed, and various functions are supported. The infrared remote control is more stable and convenient to operate.
在用户态进程启动时,将所切换的红外遥控器的开机键值存储于在内核态进程运行的存储器中,并在用户态进程未启动时,使用该红外遥控器在内核态进程执行开机操作,可以支持已有的各种红外遥控器,并且不需要额外硬件设备的操作。When the user state process starts, the power-on key value of the switched infrared remote controller is stored in the memory running in the kernel state process, and when the user state process is not started, the infrared remote controller is used to perform the power-on operation in the kernel state process. It can support all kinds of infrared remote controllers that are available, and does not require the operation of additional hardware devices.
进一步地,在内核态进程将标识和键值上传到总线,并在用户态进程对该标识的有效性进行判断,在支持不同标识的红外遥控器的同时,不会影响整个系统的运行速度。Further, in the kernel state process, the identifier and the key value are uploaded to the bus, and the validity of the identifier is judged in the user state process, and the infrared remote controller supporting different identifiers does not affect the running speed of the entire system.
进一步地,只需要按照顺序为各按键键值选择功能即可,不需要额外的硬件设备。Further, it is only necessary to select functions for each key value in order, and no additional hardware equipment is needed.
附图说明DRAWINGS
图1是现有的红外遥控电路的结构示意图;1 is a schematic structural view of a conventional infrared remote control circuit;
图2是现有的多功能红外遥控器的电路结构示意图;2 is a schematic circuit diagram of a conventional multi-function infrared remote controller;
图3是本发明第一实施方式中一种电子设备支持多种红外遥控器的方法的流程示意图;3 is a schematic flow chart of a method for supporting multiple infrared remote controllers in an electronic device according to a first embodiment of the present invention;
图4是本发明第三和第四实施方式中一种电子设备支持多种红外遥控器 的方法的流程示意图;4 is a diagram showing an electronic device supporting a plurality of infrared remote controllers in the third and fourth embodiments of the present invention; Schematic diagram of the method;
图5是本发明第五实施方式中一种电子设备支持多种红外遥控器的方法的流程示意图;5 is a schematic flow chart of a method for supporting a plurality of infrared remote controllers in an electronic device according to a fifth embodiment of the present invention;
图6是现有的红外中断的处理流程示意图;6 is a schematic diagram of a processing flow of a conventional infrared interrupt;
图7是本发明一实施例中红外中断的处理流程示意图。FIG. 7 is a schematic diagram of a processing flow of an infrared interrupt in an embodiment of the present invention.
图8是本发明一实施例中学习红外遥控器的流程示意图;8 is a schematic flow chart of learning an infrared remote controller according to an embodiment of the present invention;
图9是本发明第七实施方式中一种电子设备支持多种红外遥控器的系统的结构示意图;9 is a schematic structural diagram of a system for supporting multiple infrared remote controllers in an electronic device according to a seventh embodiment of the present invention;
图10本发明第九和第十实施方式中一种电子设备支持多种红外遥控器的系统的结构示意图;FIG. 10 is a schematic structural diagram of a system for supporting a plurality of infrared remote controllers in an electronic device according to the ninth and tenth embodiments of the present invention; FIG.
图11是本发明第十一实施方式中一种电子设备支持多种红外遥控器的系统的结构示意图。11 is a schematic structural diagram of a system in which an electronic device supports a plurality of infrared remote controllers according to an eleventh embodiment of the present invention.
具体实施方式detailed description
在以下的叙述中,为了使读者更好地理解本申请而提出了许多技术细节。但是,本领域的普通技术人员可以理解,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请各权利要求所要求保护的技术方案。In the following description, numerous technical details are set forth in order to provide the reader with a better understanding of the present application. However, those skilled in the art can understand that the technical solutions claimed in the claims of the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明的实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
本发明第一实施方式涉及一种电子设备支持多种红外遥控器的方法。图3是该电子设备支持多种红外遥控器的方法的流程示意图。该电子设备包括操作系统,该操作系统分为用户态和内核态。可以理解,内核态为最基本的服务(例如内存管理、文件系统、处理器调度等)以及驱动,用户态为普通 的应用程序。A first embodiment of the invention relates to a method of an electronic device supporting a plurality of infrared remote controls. 3 is a flow chart showing a method of supporting a plurality of infrared remote controllers for the electronic device. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel mode. It can be understood that the kernel state is the most basic services (such as memory management, file system, processor scheduling, etc.) and drivers, and the user mode is normal. s application.
如图3所示,该方法包括以下步骤:As shown in FIG. 3, the method includes the following steps:
在步骤301中,在内核态进程接收红外遥控器发送的红外信号并从该红外信号读取标识和键值。此外,可以理解,上述标识为区分不同厂商、不同产品或是不同外观的信息。In step 301, the kernel state process receives the infrared signal transmitted by the infrared remote controller and reads the identification and the key value from the infrared signal. In addition, it can be understood that the above identification is information that distinguishes different manufacturers, different products, or different appearances.
此后进入步骤302,在内核态进程判断存储器中是否存在该标识或在内核态进程将该标识和该键值上传到总线并在用户态进程判断数据库中是否存在该标识,上述存储器和上述数据库中存储有多个相应于各红外遥控器的标识。若该标识存在,则进入步骤303,否则结束本流程。Thereafter, proceeding to step 302, the kernel state process determines whether the identifier exists in the memory or uploads the identifier and the key value to the bus in the kernel state process and determines whether the identifier exists in the user state process database, and the foregoing memory and the database are A plurality of identifiers corresponding to the respective infrared remote controllers are stored. If the identifier exists, the process proceeds to step 303, otherwise the process ends.
在步骤303中,在用户态进程根据预先存储的配置将该键值转换为基准键值,并根据该基准键值来执行相应功能。In step 303, the user state process converts the key value into a reference key value according to a pre-stored configuration, and performs a corresponding function according to the reference key value.
此后结束本流程After this process ends
在本实施方式的方法中,在存储器或数据库中存储有多个相应于各红外遥控器的标识,在内核态进程或用户态进程判断从红外信号读取的标识是否存在,可以支持已有的各种红外遥控器,不需要额外硬件设备的操作,并且当该标识存在时,根据预先存储的配置将从红外信号读取的键值统一转换成基准键值后再执行相应功能,在支持多种红外遥控器的操作时更稳定、更方便。In the method of the embodiment, a plurality of identifiers corresponding to the infrared remote controllers are stored in the memory or the database, and the kernel state process or the user state process determines whether the identifier read from the infrared signal exists, and can support the existing one. Various infrared remote controllers do not require the operation of additional hardware devices, and when the identifier exists, the key values read from the infrared signals are uniformly converted into the reference key values according to the pre-stored configuration, and then the corresponding functions are executed, and the support is performed. The infrared remote control is more stable and convenient to operate.
本发明第二实施方式涉及一种电子设备支持多种红外遥控器的方法。第二实施方式在第一实施方式的基础上进行了改进,主要改进之处在于:在标识不存在时,对红外遥控器的键值进行学习。具体地说:A second embodiment of the present invention is directed to a method of an electronic device supporting a plurality of infrared remote controls. The second embodiment is improved on the basis of the first embodiment, and the main improvement is that the key value of the infrared remote controller is learned when the identification does not exist. Specifically:
在步骤302后还包括以下步骤:After step 302, the following steps are also included:
若该标识不存在,为该红外遥控器的按键键值选择相应功能,形成配置。If the identifier does not exist, the corresponding function is selected for the key value of the infrared remote controller to form a configuration.
优选地,按照预定顺序接收相应于该红外遥控器的各按键键值的各红外 信号,以为该红外遥控器的按键键值选择相应功能,形成配置。Preferably, each infrared corresponding to each key value of the infrared remote controller is received in a predetermined order The signal is selected to select the corresponding function of the key value of the infrared remote controller to form a configuration.
此外,可以理解,可以一个按键一个按键进行学习,也可以所有按键一起进行学习。In addition, it can be understood that one button can be used for learning, or all buttons can be learned together.
本发明第三实施方式涉及一种电子设备支持多种红外遥控器的方法。图4是该电子设备支持多种红外遥控器的方法的流程示意图。A third embodiment of the invention relates to a method of an electronic device supporting a plurality of infrared remote controls. 4 is a schematic flow chart of a method in which the electronic device supports a plurality of infrared remote controllers.
第三实施方式在第一实施方式和第二实施方式的基础上进行了改进,主要改进之处在于:在用户态进程启动后,将所切换的红外遥控器的开机键值存储于在内核态进程运行的存储器中,并在用户态进程未启动时,使用该红外遥控器在内核态进程执行开机操作,可以支持已有的各种红外遥控器,并且不需要额外硬件设备的操作。具体地说:The third embodiment is improved on the basis of the first embodiment and the second embodiment, and the main improvement is that after the user state process is started, the power-on key value of the switched infrared remote controller is stored in the kernel state. The process runs in the memory, and when the user state process is not started, the infrared remote controller is used to perform a boot operation in the kernel state process, which can support various existing infrared remote controllers, and does not require the operation of additional hardware devices. Specifically:
如图4所示,该方法还包括以下步骤:As shown in FIG. 4, the method further includes the following steps:
在步骤401中,在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外遥控器。In step 401, after the user state process is started, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller.
此后进入步骤402,在用户态进程将与第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中。Thereafter, proceeding to step 402, the user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process.
此后进入步骤403,在用户态进程未启动时,在内核态进程接收第二红外遥控器发送的第二红外信号并从该第二红外信号读取第二键值。Thereafter, proceeding to step 403, when the user state process is not started, the kernel state process receives the second infrared signal sent by the second infrared remote controller and reads the second key value from the second infrared signal.
此后进入步骤404,在内核态进程判断第二键值与在内核态进程运行的存储器中存储的开机键值是否相同,若相同,则进入步骤405,否则结束本流程。Thereafter, proceeding to step 404, the kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process. If the same, the process proceeds to step 405, otherwise the process ends.
在步骤405中,执行电子设备的开机操作。In step 405, a power-on operation of the electronic device is performed.
此后结束本流程。This process ends thereafter.
可以理解,可以将与一个或多个红外遥控器对应的开机键值存储于在内 核态进程运行的存储器中,以在内核态进程执行开机操作。It can be understood that the power-on key value corresponding to one or more infrared remote controllers can be stored therein. The kernel state process runs in the memory to perform boot operations in the kernel state process.
本发明第四实施方式涉及一种电子设备支持多种红外遥控器的方法。图4是该电子设备支持多种红外遥控器的方法的流程示意图。该电子设备包括操作系统,该操作系统分为用户态和内核态。可以理解,内核态为最基本的服务(例如内存管理、文件系统、处理器调度等)以及驱动,用户态为普通的应用程序。A fourth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers. 4 is a schematic flow chart of a method in which the electronic device supports a plurality of infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. It can be understood that the kernel state is the most basic services (such as memory management, file system, processor scheduling, etc.) and drivers, and the user mode is a normal application.
如图4所示,该方法包括以下步骤:As shown in FIG. 4, the method includes the following steps:
在步骤401中,在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外遥控器。In step 401, after the user state process is started, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller.
此后进入步骤402,在用户态进程将与第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中。Thereafter, proceeding to step 402, the user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process.
此后进入步骤403,在用户态进程未启动时,在内核态进程接收第二红外遥控器发送的第二红外信号并从第二红外信号读取第二键值。Thereafter, proceeding to step 403, when the user state process is not started, the kernel state process receives the second infrared signal sent by the second infrared remote controller and reads the second key value from the second infrared signal.
此后进入步骤404,在内核态进程判断第二键值与在内核态进程运行的存储器中存储的开机键值是否相同,若相同,则进入步骤405,否则结束本流程。Thereafter, proceeding to step 404, the kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process. If the same, the process proceeds to step 405, otherwise the process ends.
在步骤405中,执行电子设备的开机操作。In step 405, a power-on operation of the electronic device is performed.
此后结束本流程。This process ends thereafter.
可以理解,可以将与一个或多个红外遥控器对应的开机键值存储于在内核态进程运行的存储器中,以在内核态进程执行开机操作。It can be understood that the power-on key value corresponding to one or more infrared remote controllers can be stored in the memory running in the kernel state process to perform the power-on operation in the kernel state process.
在本实施方式的方法中,在用户态进程启动后,将所切换的红外遥控器的开机键值存储于在内核态进程运行的存储器中,并在用户态进程未启动时,使用该红外遥控器在内核态进程执行开机操作,可以支持已有的各种红外遥 控器,并且不需要额外硬件设备的操作。In the method of the embodiment, after the user state process is started, the power-on key value of the switched infrared remote controller is stored in a memory running in the kernel state process, and when the user state process is not started, the infrared remote control is used. The boot process is performed in the kernel state process, and can support various existing infrared remotes. Controller and does not require the operation of additional hardware devices.
本发明第五实施方式涉及一种电子设备支持多种红外遥控器的方法。图5是该电子设备支持多种红外遥控器的方法的流程示意图。A fifth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers. FIG. 5 is a schematic flow chart of a method for supporting a plurality of infrared remote controllers of the electronic device.
第五实施方式在第四实施方式的基础上进行了改进,主要改进之处在于:在内核态进程将标识和键值上传到总线,并在用户态进程对该标识的有效性进行判断,在支持不同标识的红外遥控器的同时,不会影响整个系统的运行速度。具体地说:The fifth embodiment is improved on the basis of the fourth embodiment. The main improvement is that the kernel state process uploads the identifier and the key value to the bus, and judges the validity of the identifier in the user state process. Supporting differently-identified infrared remote controls does not affect the speed of the entire system. Specifically:
如图5所示,该方法还包括以下步骤:As shown in FIG. 5, the method further includes the following steps:
在步骤501中,在用户态进程启动后,在内核态进程接收红外遥控器发送的红外信号并从该红外信号读取标识和键值。此外,可以理解,上述标识为区分不同厂商、不同产品或是不同外观的信息。In step 501, after the user state process is started, the kernel state process receives the infrared signal sent by the infrared remote controller and reads the identification and the key value from the infrared signal. In addition, it can be understood that the above identification is information that distinguishes different manufacturers, different products, or different appearances.
此后进入步骤502,在内核态进程将标识和键值上传到总线。Thereafter, proceeding to step 502, the kernel state process uploads the identification and key values to the bus.
此后进入步骤503,在用户态进程从总线读取标识和键值。Thereafter, proceeding to step 503, the user state process reads the identification and the key value from the bus.
此后进入步骤504,判断数据库中是否存在该标识,若存在,则进入步骤505,否则结束本流程。Thereafter, proceeding to step 504, it is determined whether the identifier exists in the database. If yes, the process proceeds to step 505, otherwise the process ends.
在步骤505中,获取与该标识对应的配置并根据该配置来执行该键值的相应功能。In step 505, the configuration corresponding to the identifier is acquired and the corresponding function of the key value is executed according to the configuration.
此后结束本流程。This process ends thereafter.
优选地,步骤505中包括以下子步骤:Preferably, the following sub-steps are included in step 505:
获取与该标识对应的配置;Obtain a configuration corresponding to the identifier;
根据该配置将该键值转换为基准键值;以及Converting the key value to a baseline key value according to the configuration;
根据基准键值来执行相应功能。The function is performed based on the reference key value.
将上传到总线上的不同红外遥控器的键值统一转换成基准键值后再执 行相应功能,在支持多种红外遥控器的操作时更稳定、更方便。Convert the key values of different infrared remote controllers uploaded to the bus into the reference key value and then execute The corresponding functions are more stable and convenient when supporting multiple infrared remote control operations.
此外,可以理解,也可以不对键值进行转换,直接执行相应功能。In addition, it can be understood that the key functions can be directly executed without converting the key values.
本发明第六实施方式涉及一种电子设备支持多种红外遥控器的方法。第六实施方式在第五实施方式的基础上进行了改进,主要改进之处在于:在数据库不存在与红外遥控器对应的标识时,对该红外遥控器的键值进行学习。具体地说:A sixth embodiment of the present invention relates to a method of an electronic device supporting a plurality of infrared remote controllers. The sixth embodiment is improved on the basis of the fifth embodiment, and the main improvement is that the key value of the infrared remote controller is learned when there is no identifier corresponding to the infrared remote controller in the database. Specifically:
在步骤504后还包括以下步骤:After step 504, the following steps are also included:
若数据库不存在该标识,则为该红外遥控器的按键键值选择相应功能,形成配置。If the identifier does not exist in the database, the corresponding function is selected for the key value of the infrared remote controller to form a configuration.
优选地,按照预定顺序接收相应于该红外遥控器的各按键键值的各红外信号,以为该红外遥控器的按键键值选择相应功能,形成配置。Preferably, each infrared signal corresponding to each key value of the infrared remote controller is received in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
此外,可以理解,可以一个按键一个按键进行学习,也可以所有按键一起进行学习。In addition, it can be understood that one button can be used for learning, or all buttons can be learned together.
以下将以网络机顶盒和Linux系统为例对第一实施方式至第六实施方式中的方法进行进一步的详细描述。The methods in the first to sixth embodiments will be further described in detail below by taking a network set top box and a Linux system as an example.
网络机顶盒中的操作系统一般使用Linux内核来进行底层设备的支持,网络机顶盒的红外遥控驱动也是由Linux内核来支持的。通常,Linux内核对红外中断的处理流程如图6所示。Linux系统出于安全和效率上的考虑分为内核态和用户态。红外驱动工作在内核态,当有按键按下时,会产生红外中断,在中断处理程序中会进行Address(地址,相当于标识)是否有效的判断。若地址有效,就会将代表键值的Command传送到设备总线上,若地址无效就直接忽略,不做任何处理。The operating system in the network set-top box generally uses the Linux kernel to support the underlying device. The infrared remote control driver of the network set-top box is also supported by the Linux kernel. Usually, the processing flow of the Linux kernel to the infrared interrupt is shown in Figure 6. Linux systems are divided into kernel mode and user mode for security and efficiency reasons. The infrared driver works in the kernel mode. When a button is pressed, an infrared interrupt is generated. In the interrupt handler, the address (address, equivalent to the identifier) is judged to be valid. If the address is valid, the Command representing the key value will be transferred to the device bus. If the address is invalid, it will be ignored and no processing will be done.
若要按键起作用,则需要在用户态进程定时从设备总线上读取Commnad并解析。现有的操作系统对红外遥控的处理上,内核态直接使用 图6所示的Linux红外内核态的处理过程,在用户态会创建两个线程:Command读取线程InputReader和Command分发线程InputDispatcher。InputReader负责读取设备总线上的Command数据解析后传给InputDispatcher,再由InputDispatcher通知对应的应用程序执行操作。If the button is active, it is necessary to read Commnad from the device bus and parse it at the user mode. The existing operating system handles the infrared remote control, and the kernel mode is used directly. The process of the Linux infrared kernel state shown in Figure 6 creates two threads in the user state: Command reads the thread InputReader and the Command dispatch thread InputDispatcher. The InputReader is responsible for reading the Command data on the device bus and parsing it to the InputDispatcher, and then the InputDispatcher notifies the corresponding application to perform the operation.
由上可以看到,Linux只在内核态处理驱动,红外驱动是由硬件厂商来提供的。不同的硬件厂商使用不同的Address来进行区分,因此要使用某一厂商的红外设备,则需要加载该设备厂商的驱动。在设备厂商的驱动中,会对红外中断产生的Address进行判断,若有效则会将Command上传总线,否则直接忽略这次红外中断。因此,所支持的红外遥控器非常有限。As can be seen from the above, Linux only handles drivers in the kernel mode, and infrared drivers are provided by hardware vendors. Different hardware vendors use different Addresses to distinguish them. Therefore, to use a manufacturer's infrared device, you need to load the device manufacturer's driver. In the driver of the equipment manufacturer, the address generated by the infrared interrupt is judged. If it is valid, the Command is uploaded to the bus, otherwise the infrared interrupt is directly ignored. Therefore, the supported infrared remote controls are very limited.
为了同时支持各种红外遥控器,在本发明的一个优选例中,操作系统对红外遥控器的处理流程如图7所示。与图6相比,Linux内核态对Address是否有效不再进行判定,直接将红外中断得到的数据上传到设备总线。在用户态再对Address是否在数据库中进行判定,若存在则读取该<Address,Command>对应的正确映射<Address2,Command2>,然后解析Command2并执行操作。若该Address不在数据库中,则开启该网络机顶盒的红外学习功能,学习该Address的遥控器键值并保存。In order to support various infrared remote controllers at the same time, in a preferred embodiment of the present invention, the processing flow of the operating system to the infrared remote controller is as shown in FIG. Compared with Figure 6, the Linux kernel state no longer determines whether Address is valid or not, and directly uploads the data obtained by the infrared interrupt to the device bus. In the user mode, it is determined whether the Address is in the database. If it exists, the correct mapping <Address2, Command2> corresponding to <Address, Command> is read, and then Command2 is parsed and the operation is performed. If the Address is not in the database, the infrared learning function of the network set-top box is turned on, and the remote controller key value of the Address is learned and saved.
之所以在用户态进行地址是否有效的判断,是因为内核态支持整个系统的正常运转,若从事的工作过于繁重,会严重影响整个系统的运行速度。并且由于整个系统是基于Linux内核构建的,Linux内核不允许这种耗时的操作由内核态来做。The reason why the address is valid in the user mode is because the kernel mode supports the normal operation of the entire system. If the work is too heavy, it will seriously affect the running speed of the entire system. And because the entire system is built on the Linux kernel, the Linux kernel does not allow this time-consuming operation to be done by the kernel state.
如表1所示,不同的红外遥控器关于相同的操作会有不同的键值,如红外遥控器A左键的键值是0x01,而红外遥控器B左键的键值是0x02。虽然都是左键,但是键值是不一样的。因此需要将不同红外遥控器上传到总线的键值进行一个转换,该工作是在数据库中进行。数据库中的内容如表1所示,在一个优选的例子中,只要是左键都会转换为0x1A。当然,在本发明的其他 实施例中,也可以不对键值进行转换。As shown in Table 1, different infrared remote controllers have different key values for the same operation. For example, the left key of the infrared remote control A is 0x01, and the key of the left key of the infrared remote control B is 0x02. Although they are all left keys, the key values are different. Therefore, it is necessary to convert the key values of different infrared remote controllers to the bus for conversion, and the work is performed in the database. The contents of the database are shown in Table 1. In a preferred example, as long as the left button is converted to 0x1A. Of course, other in the present invention In the embodiment, the key value may not be converted.
表1数据库存储内容Table 1 database storage content
AddressAddress CommandCommand Command2Command2
AA 0x010x01 0x1A0x1A
BB 0x020x02 0x1A0x1A
操作系统会在用户态启动两个线程来负责红外遥控的处理:读取数据线程InputReader和分发Command线程InputDispatcher。InputReader线程会读取总线上的Address和Command。然后在数据库中对Address进行查找,若能找到则对Command解析后通知InputDispatcher进行事件的分发,否则提示用户开始进行遥控器的按键学习功能。The operating system will start two threads in user mode to handle the infrared remote control: read the data thread InputReader and distribute the Command thread InputDispatcher. The InputReader thread reads the Address and Command on the bus. Then look up the Address in the database. If it can be found, it will notify the InputDispatcher to distribute the event after parsing the Command. Otherwise, the user will be prompted to start the button learning function of the remote controller.
如图8所示,网络机顶盒的遥控器学习功能不需要依赖其他红外遥控器,只需要被学习的遥控器按照提示进行操作就行。优选地,网络机顶盒会按照顺序对以下按键进行学习:确认键、左键、右键、上键、下键、返回键、声音加键、声音减键、静音键、HOME键以及关机键11。若被学习的遥控器上不存在相关按键,只需要等待10秒钟便可以跳过此键的学习功能。当然,在本发明的其他实施例中,也可以按照其他顺序对按键进行学习。As shown in Figure 8, the remote control learning function of the network set-top box does not need to rely on other infrared remote controllers, and only the remote controller to be learned needs to follow the prompts. Preferably, the network set top box learns the following keys in order: confirmation key, left key, right key, up key, down key, return key, sound plus key, sound minus key, mute key, HOME key, and shutdown key 11. If there is no relevant button on the remote control being learned, just wait 10 seconds to skip the learning function of this button. Of course, in other embodiments of the invention, the keys can also be learned in other sequences.
这样,可以将使用10种不同的红外遥控器的10个网络机顶盒升级为同一个系统版本,并且保证各红外遥控器均可以正常使用,兼容性强并且使用方便。In this way, 10 network set-top boxes using 10 different infrared remote controllers can be upgraded to the same system version, and each infrared remote controller can be used normally, with strong compatibility and convenient use.
可以理解,以上仅为一优选例,可以根据需要删除或增加相应步骤。并且上述方法还可以应用于除网络机顶盒和Linux系统外的其他电子设备和操作系统中,例如智能电视和windows系统等等。It can be understood that the above is only a preferred example, and the corresponding steps can be deleted or added as needed. And the above method can also be applied to other electronic devices and operating systems other than network set-top boxes and Linux systems, such as smart TVs and windows systems.
本发明的各方法实施方式均可以以软件、硬件、固件等方式实现。不管本发明是以软件、硬件、还是固件方式实现,指令代码都可以存储在任何类 型的计算机可访问的存储器中(例如永久的或者可修改的,易失性的或者非易失性的,固态的或者非固态的,固定的或者可更换的介质等等)。同样,存储器可以例如是可编程阵列逻辑(Programmable Array Logic,简称“PAL”)、随机存取存储器(Random Access Memory,简称“RAM”)、可编程只读存储器(Programmable Read Only Memory,简称“PROM”)、只读存储器(Read-Only Memory,简称“ROM”)、电可擦除可编程只读存储器(Electrically Erasable Programmable ROM,简称“EEPROM”)、磁盘、光盘、数字通用光盘(Digital Versatile Disc,简称“DVD”)等等。The method embodiments of the present invention can all be implemented in software, hardware, firmware, and the like. Regardless of whether the invention is implemented in software, hardware, or firmware, the instruction code can be stored in any class. Type of computer accessible memory (eg, permanent or modifiable, volatile or non-volatile, solid or non-solid, fixed or replaceable media, etc.). Similarly, the memory may be, for example, Programmable Array Logic ("PAL"), Random Access Memory (RAM), or Programmable Read Only Memory (PROM). "), Read-Only Memory ("ROM"), Electrically Erasable Programmable ROM ("EEPROM"), Disk, CD, Digital Versatile Disc , referred to as "DVD") and so on.
本发明第七实施方式涉及一种电子设备支持多种红外遥控器的系统。图9是该电子设备支持多种红外遥控器的系统的结构示意图。该电子设备包括操作系统,该操作系统分为用户态和内核态。如图9所示,该系统包括:A seventh embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. 9 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. As shown in Figure 9, the system includes:
第一接收模块,用于在内核态进程接收红外遥控器发送的红外信号并从该红外信号读取标识和键值。The first receiving module is configured to receive, in the kernel state process, an infrared signal sent by the infrared remote controller and read the identifier and the key value from the infrared signal.
第一判断模块,用于在内核态进程判断存储器中是否存在该标识或在内核态进程将标识和键值上传到总线并在用户态进程判断数据库中是否存在该标识,存储器和数据库中存储有多个相应于各红外遥控器的标识;以及The first judging module is configured to determine whether the identifier exists in the memory in the kernel state process or upload the identifier and the key value to the bus in the kernel state process and determine whether the identifier exists in the user state process database, and the memory and the database are stored a plurality of identifiers corresponding to each of the infrared remote controls;
第一执行模块,用于若第一判断模块确认该标识存在,在用户态进程根据预先存储的配置将该键值转换为基准键值,并根据基准键值来执行相应功能。The first execution module is configured to: if the first determining module confirms that the identifier exists, convert the key value into a reference key value according to a pre-stored configuration in the user state process, and execute the corresponding function according to the reference key value.
在本实施方式的系统中,在存储器或数据库中存储有多个相应于各红外遥控器的标识,第一判断模块在内核态进程或用户态进程判断从红外信号读取的标识是否存在,可以支持已有的各种红外遥控器,不需要额外硬件设备的操作,并且当该标识存在时,第一执行模块根据预先存储的配置将从红外信号读取的键值统一转换成基准键值后再执行相应功能,在支持多种红外遥控器的操作时更稳定、更方便。 In the system of the present embodiment, a plurality of identifiers corresponding to the respective infrared remote controllers are stored in the memory or the database, and the first determining module determines whether the identifier read from the infrared signal exists in the kernel state process or the user state process, Support various existing infrared remote controllers, do not need the operation of additional hardware devices, and when the identifier exists, the first execution module uniformly converts the key values read from the infrared signals into the reference key values according to the pre-stored configuration. Then perform the corresponding functions, which is more stable and convenient when supporting the operation of multiple infrared remote controllers.
第一实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第一实施方式中。The first embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the first embodiment.
本发明第八实施方式涉及一种电子设备支持多种红外遥控器的系统。第八实施方式在第七实施方式的基础上进行了改进,主要改进之处在于:在标识不存在时,对红外遥控器的键值进行学习。具体地说:An eighth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. The eighth embodiment is improved on the basis of the seventh embodiment, and the main improvement is that the key value of the infrared remote controller is learned when the identification does not exist. Specifically:
上述系统还包括配置模块,用于若第一判断模块确认该标识不存在,为该红外遥控器的按键键值选择相应功能,形成配置。The system further includes a configuration module, configured to: if the first determining module confirms that the identifier does not exist, select a corresponding function for the key value of the infrared remote controller to form a configuration.
优选地,上述配置模块用于按照预定顺序接收相应于该红外遥控器的各按键键值的各红外信号,以为该红外遥控器的按键键值选择相应功能,形成配置。Preferably, the configuration module is configured to receive each infrared signal corresponding to each key value of the infrared remote controller in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
此外,可以理解,可以一个按键一个按键进行学习,也可以所有按键一起进行学习。In addition, it can be understood that one button can be used for learning, or all buttons can be learned together.
第二实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第二实施方式互相配合实施。第二实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第二实施方式中。The second embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the second embodiment.
本发明第九实施方式涉及一种电子设备支持多种红外遥控器的系统。图10是该电子设备支持多种红外遥控器的系统的结构示意图。A ninth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. FIG. 10 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
第九实施方式在第七实施方式和第八实施方式的基础上进行了改进,主要改进之处在于:在用户态进程启动后,将所切换的红外遥控器的开机键值存储于在内核态进程运行的存储器中,并在用户态进程未启动时,使用该红外遥控器在内核态进程执行开机操作,可以支持已有的各种红外遥控器,并且不需要额外硬件设备的操作。具体地说: The ninth embodiment is improved on the basis of the seventh embodiment and the eighth embodiment, and the main improvement is that after the user state process is started, the power-on key value of the switched infrared remote controller is stored in the kernel state. The process runs in the memory, and when the user state process is not started, the infrared remote controller is used to perform a boot operation in the kernel state process, which can support various existing infrared remote controllers, and does not require the operation of additional hardware devices. Specifically:
如图10所示,该系统还包括:As shown in FIG. 10, the system further includes:
切换模块,用于在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外遥控器;The switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
存储模块,用于在用户态进程将与第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;a storage module, configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
第二接收模块,用于在用户态进程未启动时,在内核态进程接收第二红外遥控器发送的第二红外信号并从该第二红外信号读取第二键值;a second receiving module, configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started;
第二判断模块,用于在用户态进程未启动时,在内核态进程判断该第二接收模块读取的第二键值与在内核态进程运行的存储器中存储的开机键值是否相同;以及a second determining module, configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process;
第二执行模块,用于若第二判断模块确认第二键值与开机键值相同,则执行电子设备的开机操作。The second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
此外,可以理解,可以将与一个或多个红外遥控器对应的开机键值存储于在内核态进程运行的存储器中,以在内核态进程执行开机操作。In addition, it can be understood that the power-on key value corresponding to one or more infrared remote controllers can be stored in a memory running in the kernel state process to perform a power-on operation in the kernel state process.
第三实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第三实施方式互相配合实施。第三实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第三实施方式中。The third embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the third embodiment. The related technical details mentioned in the third embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the third embodiment.
本发明第十实施方式涉及一种电子设备支持多种红外遥控器的系统。图10是该电子设备支持多种红外遥控器的系统的结构示意图。该电子设备包括操作系统,该操作系统分为用户态和内核态。如图10所示,该系统包括:A tenth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. FIG. 10 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers. The electronic device includes an operating system, and the operating system is divided into a user state and a kernel state. As shown in Figure 10, the system includes:
切换模块,用于在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将第二红外遥控器作为当前的红外 遥控器。The switching module is configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote control.
存储模块,用于在用户态进程将与上述第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中。And a storage module, configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller, in a memory running in the kernel state process.
第二接收模块,用于在用户态进程未启动时,在内核态进程接收第二红外遥控器发送的第二红外信号并从第二红外信号读取第二键值。The second receiving module is configured to receive, in the kernel state process, the second infrared signal sent by the second infrared remote controller and read the second key value from the second infrared signal when the user state process is not started.
第二判断模块,用于在用户态进程未启动时,在内核态进程判断第二接收模块读取的第二键值与在内核态进程运行的存储器中存储的开机键值是否相同。以及The second determining module is configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process. as well as
第二执行模块,用于若第二判断模块确认第二键值与开机键值相同,则执行电子设备的开机操作。The second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
此外,可以理解,可以将与一个或多个红外遥控器对应的开机键值存储于在内核态进程运行的存储器中,以在内核态进程执行开机操作。In addition, it can be understood that the power-on key value corresponding to one or more infrared remote controllers can be stored in a memory running in the kernel state process to perform a power-on operation in the kernel state process.
在本实施方式的系统中,在用户态进程启动后,存储模块将切换模块所切换的红外遥控器的开机键值存储于在内核态进程运行的存储器中,并在用户态进程未启动时,第二执行模块在内核态进程执行开机操作,可以支持已有的各种红外遥控器,并且不需要额外硬件设备的操作。In the system of the present embodiment, after the user state process is started, the storage module stores the power-on key value of the infrared remote controller switched by the switching module in a memory running in the kernel state process, and when the user state process is not started, The second execution module performs a boot operation in the kernel state process, can support various existing infrared remote controllers, and does not require the operation of additional hardware devices.
第四实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第四实施方式互相配合实施。第四实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第四实施方式中。The fourth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the fourth embodiment. The related technical details mentioned in the fourth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the fourth embodiment.
本发明第十一实施方式涉及一种电子设备支持多种红外遥控器的系统。图11是该电子设备支持多种红外遥控器的系统的结构示意图。An eleventh embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. 11 is a schematic structural diagram of a system in which the electronic device supports a plurality of infrared remote controllers.
第十一实施方式在第十实施方式的基础上进行了改进,主要改进之处在于:在内核态进程将标识和键值上传到总线,并在用户态进程对该标识的有 效性进行判断,在支持不同标识的红外遥控器的同时,不会影响整个系统的运行速度。具体地说:The eleventh embodiment is improved on the basis of the tenth embodiment, and the main improvement is that the kernel state process uploads the identifier and the key value to the bus, and the user state process has the identifier Efficacy is judged, and the infrared remote controller supporting different logos does not affect the running speed of the entire system. Specifically:
如图11所示,该系统还包括:As shown in FIG. 11, the system further includes:
第一接收模块,用于在用户态进程启动后,在内核态进程接收红外遥控器发送的红外信号并从该红外信号读取标识和键值。The first receiving module is configured to receive an infrared signal sent by the infrared remote controller and read the identifier and the key value from the infrared signal in the kernel state process after the user state process is started.
上传模块,用于在内核态进程将第一接收模块读取的标识和键值上传到总线。The uploading module is configured to upload the identifier and the key value read by the first receiving module to the bus in the kernel state process.
读取模块,用于在用户态进程从总线读取上传模块上传的标识和键值。The reading module is configured to read the identifier and key value uploaded by the uploading module from the bus in the user state process.
第一判断模块,用于在用户态进程判断数据库中是否存在上述读取模块读取的标识。以及The first determining module is configured to determine, in the user state process, whether the identifier read by the reading module exists in the database. as well as
第一执行模块,用于若第一判断模块确认数据库中存在该标识,则获取与该标识对应的配置并根据该配置来执行该键值的相应功能。The first execution module is configured to: if the first determining module confirms that the identifier exists in the database, acquire a configuration corresponding to the identifier and perform a corresponding function of the key according to the configuration.
优选地,上述第一执行模块包括:Preferably, the first execution module includes:
获取子模块,用于获取与该标识对应的配置。The submodule is obtained to obtain a configuration corresponding to the identifier.
转换子模块,用于根据该配置将该键值转换为基准键值。以及A conversion submodule for converting the key value to a reference key value according to the configuration. as well as
执行子模块,用于根据基准键值来执行相应功能。Execution submodule for performing the corresponding function based on the reference key value.
将上传到总线上的不同红外遥控器的键值统一转换成基准键值后再执行相应功能,支持多种红外遥控器的操作时更稳定、更方便。The key values of different infrared remote controllers uploaded to the bus are uniformly converted into reference key values, and then the corresponding functions are executed, which is more stable and convenient when supporting a plurality of infrared remote controllers.
此外,可以理解,也可以不对上述键值进行转换,直接执行相应功能。In addition, it can be understood that the above-mentioned key values can be converted without directly performing the corresponding functions.
第五实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第五实施方式互相配合实施。第五实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第五实施方式中。 The fifth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the fifth embodiment. The related technical details mentioned in the fifth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the fifth embodiment.
本发明第十二实施方式涉及一种电子设备支持多种红外遥控器的系统。第十二实施方式在第十一实施方式的基础上进行了改进,主要改进之处在于:在数据库不存在与红外遥控器对应的标识时,对该红外遥控器的键值进行学习。具体地说:A twelfth embodiment of the present invention relates to a system in which an electronic device supports a plurality of infrared remote controllers. The twelfth embodiment is improved on the basis of the eleventh embodiment, and the main improvement is that the key value of the infrared remote controller is learned when there is no identifier corresponding to the infrared remote controller in the database. Specifically:
上述系统还包括配置模块,用于若第一判断模块确认该数据库不存在该标识,则为该红外遥控器的按键键值选择相应功能,形成配置。The system further includes a configuration module, configured to: if the first determining module confirms that the identifier does not exist in the database, select a corresponding function for the key value of the infrared remote controller to form a configuration.
优选地,上述配置模块用于按照预定顺序接收相应于该红外遥控器的各按键键值的各红外信号,以为该红外遥控器的按键键值选择相应功能,形成配置。Preferably, the configuration module is configured to receive each infrared signal corresponding to each key value of the infrared remote controller in a predetermined order to select a corresponding function for the key value of the infrared remote controller to form a configuration.
此外,可以理解,可以一个按键一个按键进行学习,也可以所有按键一起进行学习。In addition, it can be understood that one button can be used for learning, or all buttons can be learned together.
第六实施方式是与本实施方式相对应的方法实施方式,本实施方式可与第六实施方式互相配合实施。第六实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第六实施方式中。The sixth embodiment is a method embodiment corresponding to the present embodiment, and the present embodiment can be implemented in cooperation with the sixth embodiment. The related technical details mentioned in the sixth embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related art details mentioned in the present embodiment can also be applied to the sixth embodiment.
需要说明的是,本发明各设备实施方式中提到的各模块都是逻辑模块,在物理上,一个逻辑模块可以是一个物理模块,也可以是一个物理模块的一部分,还可以以多个物理模块的组合实现,这些逻辑模块本身的物理实现方式并不是最重要的,这些逻辑模块所实现的功能的组合才是解决本发明所提出的技术问题的关键。此外,为了突出本发明的创新部分,本发明上述各设备实施方式并没有将与解决本发明所提出的技术问题关系不太密切的模块引入,这并不表明上述设备实施方式并不存在其它的模块。It should be noted that each module mentioned in each device implementation manner of the present invention is a logic module. Physically, a logic module may be a physical module, a part of a physical module, or multiple physical entities. The combined implementation of modules, the physical implementation of these logic modules themselves is not the most important, the combination of the functions implemented by these logic modules is the key to solving the technical problems raised by the present invention. In addition, in order to highlight the innovative part of the present invention, the above-mentioned various device embodiments of the present invention do not introduce a module that is not closely related to solving the technical problem proposed by the present invention, which does not indicate that the above device implementation does not have other Module.
需要说明的是,在本专利的权利要求和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺 序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the claims and the specification of the present patent, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, without necessarily requiring or Implying any such actual relationship or shun between these entities or operations sequence. Furthermore, the term "comprises" or "comprises" or "comprises" or any other variations thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a plurality of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, item, or device. An element that is defined by the phrase "comprising a" does not exclude the presence of the same element in the process, method, item, or device that comprises the element.
虽然通过参照本发明的某些优选实施方式,已经对本发明进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。 Although the invention has been illustrated and described with reference to the preferred embodiments of the present invention, it will be understood The spirit and scope of the invention.

Claims (18)

  1. 一种电子设备支持多种红外遥控器的方法,其特征在于,所述电子设备包括操作系统,该操作系统分为用户态和内核态,所述方法包括以下步骤:A method for an electronic device to support a plurality of infrared remote controllers, wherein the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state, and the method includes the following steps:
    在内核态进程接收红外遥控器发送的红外信号并从所述红外信号读取标识和键值;Receiving, in the kernel state process, an infrared signal sent by the infrared remote controller and reading the identification and the key value from the infrared signal;
    在内核态进程判断存储器中是否存在所述标识,或在内核态进程将所述标识和所述键值上传到总线并在用户态进程判断数据库中是否存在所述标识,所述存储器和所述数据库中存储有多个相应于各红外遥控器的标识;Determining whether the identifier exists in the memory in the kernel state process, or in the kernel state process uploading the identifier and the key value to the bus and determining whether the identifier exists in the user state process database, the memory and the The database stores a plurality of identifiers corresponding to the respective infrared remote controllers;
    若所述标识存在,在用户态进程根据预先存储的配置将所述键值转换为基准键值,并根据所述基准键值来执行相应功能。If the identifier exists, the user state process converts the key value into a reference key value according to a pre-stored configuration, and performs a corresponding function according to the reference key value.
  2. 根据权利要求1所述的电子设备支持多种红外遥控器的方法,其特征在于,所述“在内核态进程判断存储器中是否存在所述标识,或在内核态进程将所述标识和所述键值上传到总线并在用户态进程判断数据库中是否存在所述标识”的步骤后还包括以下步骤:The method of claim 1, wherein the electronic device determines whether the identifier is present in the memory, or the kernel state process identifies the identifier and the The step of uploading the key value to the bus and determining whether the identifier exists in the database in the user state process includes the following steps:
    若所述标识不存在,为所述红外遥控器的按键键值选择相应功能,形成配置。If the identifier does not exist, a corresponding function is selected for the key value of the infrared remote controller to form a configuration.
  3. 根据权利要求2所述的电子设备支持多种红外遥控器的方法,其特征在于,所述“为所述红外遥控器的按键键值选择相应功能”的步骤中,按照预定顺序接收相应于所述红外遥控器的各按键键值的各红外信号,以为所述红外遥控器的按键键值选择相应功能,形成配置。The method for supporting a plurality of infrared remote controllers according to claim 2, wherein in the step of "selecting a corresponding function for a key value of the infrared remote controller", the corresponding order is received in a predetermined order Each infrared signal of each key value of the infrared remote controller is used to select a corresponding function of the key value of the infrared remote controller to form a configuration.
  4. 根据权利要求1至3中任一项所述的电子设备支持多种红外遥控器的方法,其特征在于,所述方法还包括以下步骤:The method for supporting an electronic remote controller according to any one of claims 1 to 3, wherein the method further comprises the following steps:
    在用户态进程启动后: After the user state process starts:
    在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将所述第二红外遥控器作为当前的红外遥控器;After the user state process receives the signal for switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller;
    在用户态进程将与所述第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;The user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
    在用户态进程未启动时:When the user state process is not started:
    在内核态进程接收所述第二红外遥控器发送的第二红外信号并从所述第二红外信号读取第二键值;Receiving, by the kernel state process, the second infrared signal sent by the second infrared remote controller and reading the second key value from the second infrared signal;
    在内核态进程判断所述第二键值与在内核态进程运行的存储器中存储的开机键值是否相同,若相同,则执行所述电子设备的开机操作。The kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process, and if the same, performs the power-on operation of the electronic device.
  5. 一种电子设备支持多种红外遥控器的方法,其特征在于,所述电子设备包括操作系统,该操作系统分为用户态和内核态,所述方法包括以下步骤:A method for an electronic device to support a plurality of infrared remote controllers, wherein the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state, and the method includes the following steps:
    在用户态进程启动后:After the user state process starts:
    在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将所述第二红外遥控器作为当前的红外遥控器;After the user state process receives the signal for switching from the first infrared remote controller to the second infrared remote controller, the second infrared remote controller is used as the current infrared remote controller;
    在用户态进程将与所述第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;The user state process stores the power-on key value corresponding to the second infrared remote controller in a memory running in the kernel state process;
    在用户态进程未启动时:When the user state process is not started:
    在内核态进程接收所述第二红外遥控器发送的第二红外信号并从所述第二红外信号读取第二键值;Receiving, by the kernel state process, the second infrared signal sent by the second infrared remote controller and reading the second key value from the second infrared signal;
    在内核态进程判断所述第二键值与在内核态进程运行的存储器中存储的开机键值是否相同,若相同,则执行所述电子设备的开机操作。The kernel state process determines whether the second key value is the same as the power-on key value stored in the memory running in the kernel state process, and if the same, performs the power-on operation of the electronic device.
  6. 根据权利要求5所述的电子设备支持多种红外遥控器的方法,其特 征在于,该方法还包括以下步骤:The method for supporting a plurality of infrared remote controllers for an electronic device according to claim 5 The method further includes the following steps:
    在用户态进程启动后:After the user state process starts:
    在内核态进程接收红外遥控器发送的红外信号并从所述红外信号读取标识和键值;Receiving, in the kernel state process, an infrared signal sent by the infrared remote controller and reading the identification and the key value from the infrared signal;
    在内核态进程将所述标识和所述键值上传到总线;Uploading the identifier and the key value to the bus in a kernel mode process;
    在用户态进程从所述总线读取所述标识和所述键值,并判断数据库中是否存在所述标识,若存在,则获取与所述标识对应的配置并根据该配置来执行所述键值的相应功能。Reading, by the user state process, the identifier and the key value from the bus, and determining whether the identifier exists in the database, and if yes, acquiring a configuration corresponding to the identifier and executing the key according to the configuration The corresponding function of the value.
  7. 根据权利要求6所述的电子设备支持多种红外遥控器的方法,其特征在于,所述“获取与所述标识对应的配置并根据该配置来执行所述键值的相应功能”的步骤中包括以下子步骤:The method of claim 6, wherein the electronic device supports a plurality of infrared remote controllers, wherein the step of "acquiring a configuration corresponding to the identifier and performing a corresponding function of the key value according to the configuration" Includes the following substeps:
    获取与所述标识对应的配置;Obtaining a configuration corresponding to the identifier;
    根据该配置将所述键值转换为基准键值;Converting the key value to a reference key value according to the configuration;
    根据所述基准键值来执行相应功能。The corresponding function is performed according to the reference key value.
  8. 根据权利要求6所述的电子设备支持多种红外遥控器的方法,其特征在于,所述“判断数据库中是否存在所述标识”的步骤后还包括以下步骤:The method for supporting a plurality of infrared remote controllers according to claim 6, wherein the step of "determining whether the identifier exists in the database" further comprises the following steps:
    若所述数据库不存在所述标识,为所述红外遥控器的按键键值选择相应功能,形成配置。If the identifier does not exist in the database, a corresponding function is selected for the key value of the infrared remote controller to form a configuration.
  9. 根据权利要求8所述的电子设备支持多种红外遥控器的方法,其特征在于,所述“为所述红外遥控制器的按键键值选择相应功能”的步骤中,按照预定顺序接收相应于所述红外遥控器的各按键键值的各红外信号,以为所述红外遥控器的按键键值选择相应功能,形成配置。The method for supporting a plurality of infrared remote controllers according to claim 8, wherein in the step of "selecting a corresponding function for a key value of the infrared remote controller", receiving in a predetermined order corresponds to Each infrared signal of each key value of the infrared remote controller is configured to select a corresponding function for the key value of the infrared remote controller to form a configuration.
  10. 一种电子设备支持多种红外遥控器的系统,其特征在于,所述电子设 备包括操作系统,该操作系统分为用户态和内核态,所述系统包括:A system for supporting a plurality of infrared remote controllers in an electronic device, characterized in that the electronic device The operating system is divided into a user mode and a kernel mode, and the system includes:
    第一接收模块,用于在内核态进程接收红外遥控器发送的红外信号并从所述红外信号读取标识和键值;a first receiving module, configured to receive, by the kernel state process, an infrared signal sent by the infrared remote controller and read the identifier and the key value from the infrared signal;
    第一判断模块,用于在内核态进程判断存储器中是否存在所述标识或在内核态进程将所述标识和所述键值上传到总线并在用户态进程判断数据库中是否存在所述标识,所述存储器和所述数据库中存储有多个相应于各红外遥控器的标识;以及a first determining module, configured to determine whether the identifier exists in the memory in the kernel state process or upload the identifier and the key value to the bus in a kernel state process and determine whether the identifier exists in the user state process database, Storing the plurality of identifiers corresponding to the respective infrared remote controllers in the memory and the database;
    第一执行模块,用于若所述第一判断模块确认所述标识存在,在用户态进程根据预先存储的配置将所述键值转换为基准键值,并根据所述基准键值来执行相应功能。a first execution module, configured to: if the first determining module confirms that the identifier exists, convert the key value into a reference key value according to a pre-stored configuration in a user state process, and perform corresponding according to the reference key value Features.
  11. 根据权利要求10所述的电子设备支持多种红外遥控器的系统,其特征在于,所述系统还包括配置模块,用于若所述第一判断模块确认所述标识不存在,为所述红外遥控器的按键键值选择相应功能,形成配置。The system of claim 10, wherein the system further comprises a configuration module, configured to: if the first determining module confirms that the identifier does not exist, the infrared The key value of the remote control selects the corresponding function to form a configuration.
  12. 根据权利要求11所述的电子设备支持多种红外遥控器的系统,其特征在于,所述配置模块用于按照预定顺序接收相应于所述红外遥控器的各按键键值的各红外信号,以为所述红外遥控器的按键键值选择相应功能,形成配置。The system of claim 11, wherein the configuration module is configured to receive, in a predetermined order, respective infrared signals corresponding to respective key values of the infrared remote controller, The key value of the infrared remote controller selects a corresponding function to form a configuration.
  13. 根据权利要求10至12中任一项所述的电子设备支持多种红外遥控器的系统,其特征在于,所述系统还包括:A system for supporting an electronic remote controller according to any one of claims 10 to 12, wherein the system further comprises:
    切换模块,用于在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将所述第二红外遥控器作为当前的红外遥控器;a switching module, configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
    存储模块,用于在用户态进程将与所述第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中; a storage module, configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in a kernel state process;
    第二接收模块,用于在用户态进程未启动时,在内核态进程接收所述第二红外遥控器发送的第二红外信号并从所述第二红外信号读取第二键值;a second receiving module, configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read a second key value from the second infrared signal when the user state process is not started;
    第二判断模块,用于在用户态进程未启动时,在内核态进程判断所述第二接收模块读取的第二键值与在内核态进程运行的存储器中存储的开机键值是否相同;以及a second determining module, configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process; as well as
    第二执行模块,用于若所述第二判断模块确认所述第二键值与所述开机键值相同,则执行所述电子设备的开机操作。The second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
  14. 一种电子设备支持多种红外遥控器的系统,其特征在于,所述电子设备包括操作系统,该操作系统分为用户态和内核态,所述系统包括:A system for supporting a plurality of infrared remote controllers, wherein the electronic device includes an operating system, and the operating system is divided into a user state and a kernel state, and the system includes:
    切换模块,用于在用户态进程启动后,在用户态进程接收到从第一红外遥控器切换到第二红外遥控器的信号后,将所述第二红外遥控器作为当前的红外遥控器;a switching module, configured to: after the user state process starts, after the user state process receives the signal of switching from the first infrared remote controller to the second infrared remote controller, using the second infrared remote controller as the current infrared remote controller;
    存储模块,用于在用户态进程将与所述第二红外遥控器对应的开机键值存储于在内核态进程运行的存储器中;a storage module, configured to store, in the user state process, a power-on key value corresponding to the second infrared remote controller in a memory running in a kernel state process;
    第二接收模块,用于在用户态进程未启动时,在内核态进程接收所述第二红外遥控器发送的第二红外信号并从所述第二红外信号读取第二键值;a second receiving module, configured to receive, by the kernel state process, a second infrared signal sent by the second infrared remote controller and read a second key value from the second infrared signal when the user state process is not started;
    第二判断模块,用于在用户态进程未启动时,在内核态进程判断所述第二接收模块读取的第二键值与在内核态进程运行的存储器中存储的开机键值是否相同;以及a second determining module, configured to: when the user state process is not started, determine, in the kernel state process, whether the second key value read by the second receiving module is the same as the power key value stored in the memory running in the kernel state process; as well as
    第二执行模块,用于若所述第二判断模块确认所述第二键值与所述开机键值相同,则执行所述电子设备的开机操作。The second execution module is configured to perform a power-on operation of the electronic device if the second determining module confirms that the second key value is the same as the power-on key value.
  15. 根据权利要求14所述的电子设备支持多种红外遥控器的系统,其特征在于,所述系统还包括:The system of claim 14 wherein the electronic device supports a plurality of infrared remote controllers, wherein the system further comprises:
    第一接收模块,用于在用户态进程启动后,在内核态进程接收红外遥控 器发送的红外信号并从所述红外信号读取标识和键值;a first receiving module, configured to receive an infrared remote control in a kernel state process after the user state process is started An infrared signal transmitted by the device and reading the identification and the key value from the infrared signal;
    上传模块,用于在内核态进程将所述第一接收模块读取的所述标识和所述键值上传到总线;An uploading module, configured to upload, by the kernel state process, the identifier and the key value read by the first receiving module to a bus;
    读取模块,用于在用户态进程从所述总线读取所述上传模块上传的所述标识和所述键值;a reading module, configured to read, by the user state process, the identifier and the key value uploaded by the uploading module from the bus;
    第一判断模块,用于在用户态进程判断数据库中是否存在所述读取模块读取的所述标识;以及a first determining module, configured to determine, in the user state process, whether the identifier read by the reading module exists in a database;
    第一执行模块,用于若所述第一判断模块确认所述数据库中存在所述标识,则获取与所述标识对应的配置并根据该配置来执行所述键值的相应功能。And a first execution module, configured to: if the first determining module confirms that the identifier exists in the database, acquire a configuration corresponding to the identifier, and perform a corresponding function of the key according to the configuration.
  16. 根据权利要求15所述的电子设备支持多种红外遥控器的系统,其特征在于,所述第一执行模块包括:The system of claim 15 wherein the electronic device supports a plurality of infrared remote controllers, wherein the first execution module comprises:
    获取子模块,用于获取与所述标识对应的配置;Obtaining a submodule, configured to obtain a configuration corresponding to the identifier;
    转换子模块,用于根据该配置将所述键值转换为基准键值;以及a conversion submodule for converting the key value to a reference key value according to the configuration;
    执行子模块,用于根据所述基准键值来执行相应功能。An execution submodule is configured to perform a corresponding function according to the reference key value.
  17. 根据权利要求15所述的电子设备支持多种红外遥控器的系统,其特征在于,所述系统还包括配置模块,用于若所述第一判断模块确认所述数据库不存在所述标识,为所述红外遥控器的按键键值选择相应功能,形成配置。The system of claim 15, wherein the system further comprises a configuration module, configured to: if the first determining module confirms that the identifier does not exist in the database, The key value of the infrared remote controller selects a corresponding function to form a configuration.
  18. 根据权利要求17所述的电子设备支持多种红外遥控器的系统,其特征在于,所述配置模块用于按照预定顺序接收相应于所述红外遥控器的各按键键值的各红外信号,以为所述红外遥控器的按键键值选择相应功能,形成配置。 The system of claim 17, wherein the configuration module is configured to receive respective infrared signals corresponding to respective key values of the infrared remote controller in a predetermined order, The key value of the infrared remote controller selects a corresponding function to form a configuration.
PCT/CN2015/098253 2014-12-30 2015-12-22 Method for electronic device to support various infrared remote controllers and system thereof WO2016107460A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410857401.9 2014-12-30
CN201410857401.9A CN105809946A (en) 2014-12-30 2014-12-30 Method and system for supporting multiple infrared remote controllers by electronic equipment

Publications (1)

Publication Number Publication Date
WO2016107460A1 true WO2016107460A1 (en) 2016-07-07

Family

ID=56284238

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/098253 WO2016107460A1 (en) 2014-12-30 2015-12-22 Method for electronic device to support various infrared remote controllers and system thereof

Country Status (2)

Country Link
CN (1) CN105809946A (en)
WO (1) WO2016107460A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114078314A (en) * 2020-08-17 2022-02-22 深圳绿米联创科技有限公司 Infrared code matching method, device and system, electronic equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534924A (en) * 2016-12-19 2017-03-22 深圳创维数字技术有限公司 Method and device for adapting to multiple remote controllers
CN106781425A (en) * 2017-01-18 2017-05-31 福建省光速达物联网科技股份有限公司 A kind of method of IR remote controller Signal Compression storage
CN108763128A (en) * 2018-06-15 2018-11-06 深圳市沃特沃德股份有限公司 Handle method, relay device and the onboard system of peripheral hardware signal
CN108924615A (en) * 2018-07-20 2018-11-30 深圳创维-Rgb电子有限公司 A kind of method responding different ultra-red orders, storage medium and smart television
CN109597335B (en) * 2018-12-07 2020-07-14 童庆丽 Intelligent control system and intelligent controller
CN111402570B (en) * 2020-02-11 2021-08-17 广州创知科技有限公司 Infrared remote control signal receiving method, receiving system, receiving device and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000197164A (en) * 1998-12-28 2000-07-14 Nec Corp Remote control system using remote control unit
US20030177489A1 (en) * 2002-03-18 2003-09-18 Nippon Telegraph And Telephone Corp. Control apparatus of audio-visual display apparatus and the control method
CN101149871A (en) * 2006-09-18 2008-03-26 深圳Tcl新技术有限公司 Remote controller utilization and control method and its system
CN101155278A (en) * 2006-09-30 2008-04-02 深圳Tcl新技术有限公司 Electrical equipment with multi-remote controller control function and implementing method thereof
CN101202813A (en) * 2006-12-11 2008-06-18 康佳集团股份有限公司 Method and apparatus of TV set multimode remote control
EP2204785A1 (en) * 2008-12-31 2010-07-07 Tse Hsing Chen Two-way remote control unit
CN102256075A (en) * 2011-07-12 2011-11-23 冠捷显示科技(厦门)有限公司 Television capable of learning and recognizing remote controllers and control method
CN103475817A (en) * 2013-09-03 2013-12-25 深圳一电科技有限公司 Matching method for remote control devices and shooting device
CN103563392A (en) * 2011-05-26 2014-02-05 Lg电子株式会社 Display device and method for remotely controlling display device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102033578A (en) * 2010-10-18 2011-04-27 深圳市顶星数码网络技术有限公司 Integrated machine system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000197164A (en) * 1998-12-28 2000-07-14 Nec Corp Remote control system using remote control unit
US20030177489A1 (en) * 2002-03-18 2003-09-18 Nippon Telegraph And Telephone Corp. Control apparatus of audio-visual display apparatus and the control method
CN101149871A (en) * 2006-09-18 2008-03-26 深圳Tcl新技术有限公司 Remote controller utilization and control method and its system
CN101155278A (en) * 2006-09-30 2008-04-02 深圳Tcl新技术有限公司 Electrical equipment with multi-remote controller control function and implementing method thereof
CN101202813A (en) * 2006-12-11 2008-06-18 康佳集团股份有限公司 Method and apparatus of TV set multimode remote control
EP2204785A1 (en) * 2008-12-31 2010-07-07 Tse Hsing Chen Two-way remote control unit
CN103563392A (en) * 2011-05-26 2014-02-05 Lg电子株式会社 Display device and method for remotely controlling display device
CN102256075A (en) * 2011-07-12 2011-11-23 冠捷显示科技(厦门)有限公司 Television capable of learning and recognizing remote controllers and control method
CN103475817A (en) * 2013-09-03 2013-12-25 深圳一电科技有限公司 Matching method for remote control devices and shooting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114078314A (en) * 2020-08-17 2022-02-22 深圳绿米联创科技有限公司 Infrared code matching method, device and system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN105809946A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
WO2016107460A1 (en) Method for electronic device to support various infrared remote controllers and system thereof
KR102088526B1 (en) Method and its apparatus for controlling the smart home system
US9437104B2 (en) System and method for configuring the remote control functionality of a portable device
CN105913847B (en) Voice control system, user end equipment, server and central control unit
US9208679B2 (en) System and method for configuring the remote control functionality of a portable device
US10431074B2 (en) System and method for configuring the remote control functionality of a portable device
US8601571B2 (en) Multi-user computer system and remote control method thereof
EP3896689A1 (en) Voice control method, cloud server and terminal device
US11050828B2 (en) Electronic device, server and method of controlling the same
WO2018113497A1 (en) Method and device adaptive to multiple remote controls
EP3896688A1 (en) Voice control method, cloud server and terminal device
CN111123875A (en) Intelligent household control method and system and intelligent tea table
US11435104B2 (en) Home appliance and control method for controlling same
US11537092B2 (en) Appliances and control method thereof
CN104301766A (en) Remote control matching system and method based on smart television
CN109257652B (en) Configuration information switching method and device, electronic device, system and storage medium
CN108937806B (en) Dispenser control method, dishwasher, and computer-readable storage medium
CN110703614B (en) Voice control method and device, semantic network construction method and device
JP6084539B2 (en) Server, information terminal, information providing method, program, and control system
CN111833860A (en) Binding method and device of intelligent equipment, electronic equipment and storage medium
CN109272740B (en) Infrared remote control decoding processing method and device and computer readable storage medium
CN109996100B (en) Control method of intelligent remote controller, storage medium and remote controller
KR101892363B1 (en) Remote control command automatic learning apparatus and method
CN113676382A (en) IOT voice command control method, system and computer readable storage medium
KR102138908B1 (en) Method and its apparatus for controlling the smart home system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15875138

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15875138

Country of ref document: EP

Kind code of ref document: A1