EP-4742209-A1 - INFRARED REMOTE CONTROL METHOD, ELECTRONIC DEVICE, COMPUTER STORAGE MEDIUM AND PROGRAM PRODUCT
Abstract
This application provides an infrared remote control method, an electronic device, a computer storage medium, and a program product. The electronic device may include a TOF module. The TOF module includes a TOF sensor, a driver chip, and a light source configured to transmit an infrared optical signal. The infrared remote control method includes: at a first moment, controlling the light source to transmit a first infrared optical signal to a user, controlling the TOF sensor to collect image data, and performing facial recognition based on the image data; and at a second moment, in response to a tap instruction or a voice instruction of the user, controlling the light source to transmit a second infrared optical signal to a controlled electronic device, or sending a control signal to the driver chip, to enable the driver chip to control the light source to transmit the second infrared optical signal to the controlled electronic device. According to the infrared remote control method in this application, operational convenience of the electronic device in controlling the controlled electronic device is improved, and 360-degree omnidirectional remote control can be performed on the controlled electronic device.
Inventors
- MENG, Yuhuang
- YE, Hengzhi
- WU, Runhao
- FENG, XIAOGANG
Assignees
- Honor Device Co., Ltd.
Dates
- Publication Date
- 20260513
- Application Date
- 20241114
Claims (13)
- An infrared remote control method, applied to an electronic device, wherein the electronic device comprises a TOF module; the TOF module comprises a TOF sensor, a driver chip, and a light source configured to transmit an infrared optical signal, wherein the driver chip is electrically connected to two ends of the light source; and the infrared remote control method comprises: at a first moment, controlling the light source to transmit a first infrared optical signal to a user, controlling the TOF sensor to collect image data, and performing facial recognition based on the image data; and at a second moment, in response to a tap instruction or a voice instruction of the user, controlling the light source to transmit a second infrared optical signal to a controlled electronic device, or sending a control signal to the driver chip, to enable the driver chip to control the light source to transmit the second infrared optical signal to the controlled electronic device, wherein the first moment is before the second moment.
- The infrared remote control method according to claim 1, wherein the electronic device further comprises a processing chip, the processing chip comprises a GPIO port, the driver chip comprises a signal processing circuit, and the GPIO port of the processing chip is electrically connected to the signal processing circuit; the processing chip is configured to: at the second moment, in response to the tap instruction or the voice instruction of the user, send a GPIO signal to the signal processing circuit through the GPIO port; and the signal processing circuit is configured to convert the GPIO signal into a drive signal, wherein the drive signal is used to drive the light source to transmit the second infrared optical signal to the controlled electronic device.
- The infrared remote control method according to claim 1, wherein the TOF sensor is configured to: at the first moment, send a control signal to the driver chip; and the driver chip is configured to convert the control signal into a second drive signal, wherein the second drive signal is used to drive the light source to transmit the first infrared optical signal to the user.
- The infrared remote control method according to claim 1, wherein the electronic device further comprises a processing chip and a first component, the first component is connected between a second end of the light source and a grounding end, the processing chip is connected to a first end of the light source, and the processing chip is further connected to the first component; and the first component is configured to connect or disconnect an electrical connection between the processing chip and the light source.
- The infrared remote control method according to claim 4, wherein the processing chip is configured to: at the second moment, in response to successful facial recognition of the user, and the tap instruction or the voice instruction, control the first component to be in an on state in a first time period, and control the first component to be in an off state in a second time period, wherein the first time period and the second time period are one switching cycle.
- The infrared remote control method according to claim 5, wherein the processing chip is configured to supply power to the light source when the first component is in an on state.
- The infrared remote control method according to claim 1, wherein the electronic device further comprises a processing chip; and the electronic device further comprises an interface converter, the TOF sensor is connected to a first input end of the interface converter through a first bus and a second bus, the processing chip is connected to a second input end of the interface converter through a third bus and a fourth bus, and an output end of the interface converter is connected to the driver chip through a fifth bus and a sixth bus.
- The infrared remote control method according to claim 7, wherein the interface converter is configured to: connect the TOF sensor and the driver chip, or connect the processing chip and the driver chip.
- The infrared remote control method according to claim 8, wherein the processing chip is further configured to: in response to the tap instruction or the voice instruction of the user, output a first switching signal to the interface converter, to enable the interface converter to connect the processing chip and the driver chip.
- The infrared remote control method according to claim 8, wherein the processing chip is further configured to: in response to a camera instruction of the user, output a second switching signal to the interface converter, to enable the interface converter to connect the TOF sensor and the driver chip.
- An electronic device, comprising: a TOF module, and a processing chip, wherein the processing chip is configured to perform the infrared remote control method according to any one of claims 1 to 10.
- A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program runs on an electronic device, the electronic device is enabled to implement the infrared remote control method according to any one of claims 1 to 10.
- A computer program product, wherein when the computer program product runs on an electronic device, the electronic device is enabled to implement the infrared remote control method according to any one of claims 1 to 10.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority to Chinese Patent Application No. 202311635842.X, filed with the China National Intellectual Property Administration on December 1, 2023 and entitled "INFRARED REMOTE CONTROL METHOD AND TERMINAL DEVICE", which is incorporated herein by reference in its entirety. TECHNICAL FIELD This application pertains to the terminal field, and in particular, to an infrared remote control method, an electronic device, a computer storage medium, and a computer program product. BACKGROUND With continuous development of the internet of things, terminal devices such as smartphones become a most important mobile control manner in smart home control systems. For example, a user can implement remote control functions of a plurality of home appliances, such as a light, an air conditioner, and a television, through remote control applications on a mobile phone. To implement an infrared remote control function of a terminal device in a conventional technology, an additional circuit module needs to be added to the terminal device, increasing costs and design complexity of the terminal device. In addition, an existing terminal device has a small remote control emission angle. During use of remote control, an infrared emitting end of the terminal device needs to align with a controlled device; otherwise, signals transmitted by the terminal device cannot be transmitted to the controlled device. Consequently, the existing terminal device is still inconvenient in signal transmission control, affecting user experience. SUMMARY Embodiments of this application disclose an infrared remote control method, an electronic device, a computer storage medium, and a program product. According to this application, an infrared remote control function is implemented on an electronic device based on a TOF module, so that design complexity of the electronic device can be reduced. According to this application, 360-degree omnidirectional remote control can be performed on a controlled electronic device. The TOF module is widely used in various electronic devices, to detect a distance of a target object. In some scenarios, a terminal device may use the TOF module to perform 3D imaging and face unlock. The TOF module includes an emitting end (for example, an infrared light source), a receiving end, and a chip. A light source of the TOF module may be configured to emit infrared light, and may include an infrared light-emitting diode. The infrared light-emitting diode is configured to emit infrared light. The receiving end may receive infrared light that is emitted by the infrared light-emitting diode and that is reflected back after being projected onto an object. The chip may control emission of the infrared light, and calculate a time difference between emission and reception of the light, to obtain a distance of the to-be-shot object through calculation. Therefore, the infrared light-emitting diode in the TOF module can function as an infrared light emitter in this application, to implement the infrared remote control function of the electronic device. Based on this, according to a first aspect, this application provides an infrared remote control method, applied to an electronic device. The electronic device may include a TOF module and a processing chip. The TOF module includes a TOF sensor, a driver chip, and a light source configured to transmit an infrared optical signal, where the driver chip is electrically connected to two ends of the light source. The infrared remote control method includes: at a first moment, controlling the light source to transmit a first infrared optical signal to a user, controlling the TOF sensor to collect image data, and performing facial recognition based on the image data; and at a second moment, in response to a tap instruction or a voice instruction of the user, controlling the light source to transmit a second infrared optical signal to a controlled electronic device, or sending a control signal to the driver chip, to enable the driver chip to control the light source to transmit the second infrared optical signal to the controlled electronic device. The first moment is before the second moment. It may be understood that before the user performs infrared remote control on the controlled electronic device by using the electronic device, that is, at the first moment, the light source may be controlled to emit infrared light (namely, the first infrared optical signal) to the user to perform facial recognition. If the user succeeds in facial recognition, that is, unlocks an infrared remote control function of the electronic device, at the second moment, in response to the tap instruction or the voice instruction of the user, the light source may be controlled to emit infrared light (namely, the second infrared optical signal) to the controlled electronic device at a predetermined frequency. This can implement the infrared remote control function on