Infrared remote control method, light sensing module, electronic equipment and storage medium

By learning infrared code stream data through a light-sensing module and driving infrared lights to emit light, the problem of increased costs and limited application scenarios caused by the lack of infrared remote control functionality in mobile phones is solved, enabling infrared remote control of different devices.

CN120932435AActive Publication Date: 2025-11-11WUHAN JUXIN MICROELECTRONICS CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510960576.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-11-11
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

Mobile phones do not have infrared remote control functionality. Adding an infrared remote control module increases costs and makes it difficult to implement infrared remote control functionality for different devices, thus limiting application scenarios.

Method used

The infrared light emitted by other terminals is detected by the light sensor module, the infrared code stream data is learned, and the output voltage or current of the drive port is controlled to drive the infrared lamp to emit infrared light, thereby realizing infrared remote control.

Benefits of technology

It eliminates the need for an additional infrared remote control module, reducing costs, and enables infrared remote control functionality for different devices, thus solving the problem of limited application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120932435A_ABST
    Figure CN120932435A_ABST
Patent Text Reader

Abstract

The invention provides an infrared remote control method, a light sensing module, electronic equipment and a storage medium. The infrared remote control method comprises the following steps: detecting infrared light emitted by other terminals and obtaining infrared code stream data; and controlling the voltage or current output by the driving port according to the infrared code stream data so as to drive the infrared lamp to emit infrared light. The remote control instruction of any terminal can be learned by utilizing the light sensing module, and the infrared lamp can be driven to perform infrared remote control through the light sensing module, so that an infrared remote control module does not need to be added to the electronic equipment, and the cost of the electronic equipment is reduced; and meanwhile, an infrared remote control function can be realized aiming at different equipment, so that the problem that an infrared remote control application scene is limited is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of remote control technology, specifically to an infrared remote control method, a light sensing module, an electronic device, and a storage medium. Background Technology

[0002] Currently, infrared remote control is a technology that achieves wireless control through infrared light waves. Its core principle is that the transmitter sends a modulated infrared signal, and the receiver receives and decodes the signal, ultimately realizing the infrared remote control process of the corresponding device. Due to its significant advantages such as strong anti-interference ability and low power consumption, infrared remote control is widely used in home appliances, industrial control and other fields.

[0003] In related technologies, mobile phones typically do not have infrared remote control functionality. If infrared remote control functionality is required, on the one hand, an additional infrared remote control module is needed to send infrared light, and on the other hand, a corresponding control program (infrared control command) must be set for each individual device. This leads to high costs for mobile phones and makes it difficult to implement infrared remote control functionality for different devices, thus limiting application scenarios. Summary of the Invention

[0004] This application provides an infrared remote control method, a light sensing module, an electronic device, and a storage medium, aiming to solve the above-mentioned technical problems.

[0005] In a first aspect, this application provides an infrared remote control method. The infrared remote control method is applied to a light-sensing module, which has a drive port for driving infrared lamps. The infrared remote control method includes:

[0006] Detect infrared light emitted by other terminals and obtain infrared code stream data;

[0007] The voltage or current output from the driver port is controlled based on the infrared code stream data to drive the infrared lamp to emit infrared light.

[0008] In some embodiments, the light-sensing module includes an optoelectronic device for detecting infrared light, and the step of detecting infrared light emitted by other terminals and obtaining infrared code stream data includes:

[0009] The electrical signal output by the optoelectronic device is continuously sampled to obtain the initial code stream data, wherein the sampling frequency of the electrical signal is greater than or equal to the carrier frequency of the infrared light.

[0010] Extract multiple consecutive bits of data from the initial bitstream data, and determine the infrared bitstream data based on the extracted multiple consecutive bits of data.

[0011] In some embodiments, the step of extracting multiple consecutive bits of data from the initial bitstream data includes:

[0012] Based on the initial bitstream data and the first preset interception rule, determine the data start position and the data end position;

[0013] Multiple consecutive bits of data are extracted from the initial bitstream data based on the start and end positions of the data.

[0014] In some embodiments, the step of extracting multiple consecutive bits of data from the initial bitstream data to obtain infrared bitstream data includes:

[0015] Based on the initial bitstream data and the second preset truncation rule, determine the starting position and length of the data;

[0016] Multiple consecutive bits of data are extracted from the initial bitstream data based on the starting position and length of the data.

[0017] In some embodiments, the step of extracting multiple consecutive bits of data from the initial bitstream data to obtain infrared bitstream data includes:

[0018] Based on the initial bitstream data and the third preset truncation rule, determine the data termination position and data length;

[0019] Multiple consecutive bits of data are extracted from the initial bitstream data based on the data termination position and data length.

[0020] In some embodiments, the step of determining infrared code stream data based on the captured multi-bit continuous data includes:

[0021] Multiple data segments are determined based on the extracted continuous data bits, and each data segment includes N continuous data bits.

[0022] Based on multiple sets of data segments, determine the corresponding infrared data for each set of data segments, and combine the infrared data corresponding to each set of data segments to obtain infrared code stream data;

[0023] Where N is equal to the ratio between the sampling frequency of the electrical signal and the carrier frequency of the infrared light.

[0024] In some embodiments, the step of determining one bit of infrared data corresponding to each set of data segments based on multiple sets of data segments includes:

[0025] When the number of first target data contained in a data segment is greater than or equal to a first preset value, the first target data is determined to be one-bit infrared data corresponding to the data segment;

[0026] When the number of second target data contained in a data segment is greater than or equal to the first preset value, the second target data is determined to be one-bit infrared data corresponding to the data segment.

[0027] Secondly, this application provides a light sensing module, which has a drive port for driving infrared lamps, and has an infrared remote control learning mode and an infrared remote control transmission mode. The light sensing module includes:

[0028] Optoelectronic devices are configured to receive infrared light in infrared remote control learning mode.

[0029] The signal processing circuit is configured to process the electrical signals output by the optoelectronic device in the infrared remote control learning mode in order to detect the infrared light emitted by other terminals and obtain infrared code stream data.

[0030] The driving circuit is configured to control the voltage or current output of the driving port according to the infrared code stream data in the infrared remote control transmission mode, so as to drive the infrared lamp to emit infrared light.

[0031] In some embodiments, the light sensing module also has an ambient light detection working mode;

[0032] The optoelectronic device is also configured to receive ambient light in ambient light detection mode;

[0033] The signal processing circuit is also configured to process the electrical signal output by the optoelectronic device in the ambient light detection mode to detect the ambient light intensity.

[0034] In some embodiments, the light sensing module also has a flicker light detection working mode;

[0035] The optoelectronic device is also configured to receive scintillation light in scintillation detection mode;

[0036] The signal processing circuit is also configured to process the electrical signal output by the optoelectronic device in the flicker detection mode to detect the flicker frequency of the flicker light source.

[0037] In some embodiments, the light sensing module also has a proximity light detection working mode;

[0038] The optoelectronic device is also configured to receive proximity light rays in proximity light detection mode;

[0039] The signal processing circuit is also configured to process the electrical signal output by the optoelectronic device in the proximity light detection mode to determine whether the terminal is approaching / moving away from the target object.

[0040] In some embodiments, the light-sensing module further includes a light-emitting device;

[0041] The light-emitting device is configured to emit a detection light beam toward the target object in a proximity light detection mode, so that the target object reflects the proximity light beam.

[0042] The driving circuit is also configured to control the voltage or current output of the driving port in the proximity light detection operating mode to drive the light-emitting device to emit detection light.

[0043] Thirdly, this application provides an electronic device, comprising:

[0044] The light sensor module and the infrared lamp are included. The light sensor module has a driver port, and the infrared lamp is electrically connected to the driver port.

[0045] The processor and memory, the memory storing a computer program, when executed by the processor, control the light-sensing module to perform the steps of the infrared remote control method as described in the first aspect.

[0046] Fourthly, this application provides a storage medium storing a plurality of instructions adapted for loading by a processor to perform the steps in the infrared remote control method as described in the first aspect.

[0047] This application uses a photosensitive module to detect infrared light emitted by other terminals, thereby learning the infrared code stream data of those terminals. When infrared remote control is needed, the voltage or current output of the drive port is controlled based on the learned infrared code stream data, thus driving the infrared lamp to emit infrared light. In other words, this infrared remote control method utilizes a photosensitive module to learn remote control commands from any terminal and can drive an infrared lamp for infrared remote control. This not only eliminates the need to add an infrared remote control module to electronic devices, thus reducing costs, but also allows for infrared remote control functionality for different devices, solving the problem of limited application scenarios for infrared remote control. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 A schematic diagram of an electronic device according to an embodiment of this application is shown;

[0050] Figure 2 A flowchart of an infrared remote control method according to an embodiment of this application is shown;

[0051] Figure 3 This illustration shows a schematic diagram of learning infrared code stream data in an embodiment of this application;

[0052] Figure 4 This illustration shows a schematic diagram of determining infrared code stream data in an embodiment of this application;

[0053] Figure 5 This illustration shows a schematic diagram of a light-sensing module in an embodiment of this application;

[0054] Figure 6 Another schematic diagram of the light-sensing module in an embodiment of this application is shown.

[0055] Among them, 101 is an infrared lamp, 102 is a light sensor module, 103 is a processor, and 104 is a memory;

[0056] 1021 Optoelectronic device, 1022 Signal processing circuit, 1023 Driver circuit, 1024 Digital circuit, 1025 Light-emitting device, Driver port LDR. Detailed Implementation

[0057] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] In the description of this invention, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0059] Currently, mobile phones typically do not have infrared remote control functionality. To add infrared remote control functionality, one needs to add an infrared remote control module to send infrared light, and another needs to set up a corresponding control program (infrared control command) for each individual device.

[0060] For example, if you need to remotely control a TV with infrared, you need to add an infrared remote control module to your mobile phone and set the infrared remote control commands to control the TV; similarly, if you need to remotely control an air conditioner with infrared, you need to add an infrared remote control module to your mobile phone and set the infrared remote control commands to control the air conditioner.

[0061] It can be seen that adding an infrared remote control module has led to a significant increase in the cost of mobile phones. Furthermore, when using infrared remote control for different devices (such as air conditioners and televisions), additional software programs need to be downloaded to obtain the corresponding infrared remote control commands for the devices. This also results in the difficulty of implementing infrared remote control functions for different devices, thus limiting the application scenarios.

[0062] Therefore, this application provides an infrared remote control method, a light sensing module, an electronic device, and a storage medium, which are described in detail below.

[0063] First, before introducing the infrared remote control method in the embodiments of this application, we will first introduce the application scenarios of the infrared remote control method of this application. (See also...) Figure 1 , Figure 1 A schematic diagram of an electronic device according to an embodiment of this application is shown, wherein the electronic device includes an infrared lamp 101, a light sensing module 102, a processor 103, and a memory 104.

[0064] Specifically, the infrared lamp 101 can emit infrared light to remotely control corresponding devices. For example, the infrared light emitted by the infrared lamp 101 can remotely control electric vehicles, drones, power tools, robots, home appliances, electric toys, etc. Among them, electric vehicles can be, but are not limited to, battery electric vehicles (BEV), hybrid electric vehicles (HEV), plug-in hybrid electric vehicles (PHEV), range-extended electric vehicles (REEV), or fuel cell electric vehicles (FCEV); home appliances can include, but are not limited to, air conditioners, televisions, robot vacuums, floor scrubbers, window cleaners, etc.

[0065] For example, the infrared lamp 101 may be, but is not limited to, a through-hole infrared LED or a surface-mount infrared LED that emits infrared light.

[0066] The light sensor module 102 has a drive port (drive pin), and the infrared lamp 101 is electrically connected to the drive port so that the light sensor module 102 can control the infrared lamp 101 to emit infrared light through the drive port. In some embodiments of this application, the light sensor module 102 may refer to a circuit module in an electronic device that detects ambient light. The light sensor module 102 in the electronic device adjusts the screen brightness by detecting the intensity of ambient light to provide users with a comfortable visual experience and extend the service life of the device.

[0067] In some embodiments of this application, the light sensing module 102 may refer to a circuit module in an electronic device that detects flickering light sources (such as AC fluorescent lamps, computer screens, etc.). The light sensing module 102 in the electronic device detects the flickering frequency of the flickering light source, and can then guide the camera module to set a reasonable exposure time based on the flickering frequency of the flickering light source, so as to avoid the shooting process being affected by the flickering light source.

[0068] In some embodiments of this application, the light sensing module 102 may refer to a circuit module in an electronic device that detects proximity light. The light sensing module 102 in the electronic device can emit detection light towards a target object. The detection light is reflected by the target object as proximity light. The light sensing module 102 detects the proximity light to determine whether the electronic device is approaching / moving away from the target object, thereby controlling the display or turning off of the screen. For example, when a user is answering a phone call, if the light sensing module 102 determines that the electronic device is close to the user's head, the screen can be turned off to avoid the phenomenon of the screen being accidentally touched by a part of the body (such as the ear) and ending the call or launching other software programs.

[0069] It should be noted that in some possible embodiments, the light sensor module 102 can be disposed on the side of the electronic device away from the screen. For example, in embodiments where the light sensor module 102 refers to a circuit module in the electronic device that detects ambient light and / or flickering light sources, the light sensor module 102 can be disposed on the back of the electronic device and near the camera to accurately detect the intensity of ambient light and / or the flickering frequency of the flickering light source. In some possible embodiments, the light sensor module 102 can be disposed on one side of the screen of the electronic device. For example, in embodiments where the light sensor module 102 refers to a circuit module in the electronic device that detects proximity light, the light sensor module 102 can be disposed near the camera on the front of the electronic device (or inside the screen) to accurately detect whether the screen of the electronic device is close to / away from the target object, thereby controlling the screen to light up or turn off.

[0070] It is understood that the function of the light sensing module 102 in the above embodiments is singular. In some possible embodiments, the light sensing module 102 may also have the functions of detecting ambient light, detecting flickering light sources, or detecting two or more of the proximity light. For example, the light sensing module 102 may be equipped with two photodiodes, one of which is used to detect the intensity of ambient light and the other is used to detect the flickering frequency of the flickering light source.

[0071] The processor 103 is the control center of the electronic device. It connects various parts of the electronic device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 104, and calling data stored in the memory 104, it performs various functions of the electronic device and processes data, thereby monitoring the system as a whole.

[0072] For example, processor 103 can send an infrared remote control learning command to the light sensor module 102, causing the light sensor module 102 to enter an infrared remote control learning mode, so that the light sensor module 102 can learn the infrared code stream data of other terminals. As another example, processor 103 can send an infrared remote control transmission command to the light sensor module 102, causing the light sensor module 102 to enter an infrared remote control transmission mode, so as to drive the infrared lamp 101 to emit infrared light through the drive port of the light sensor module 102. Furthermore, processor 103 can send flicker light detection commands, ambient light detection commands, and proximity light detection commands to the light sensor module 102, so that the light sensor module 102 is in a flicker light detection working mode, an ambient light detection working mode, and a proximity light detection working mode, respectively, to detect the ambient light intensity, the flicker frequency of the flickering light source, and whether the screen of the electronic device is near / away from the target object.

[0073] For example, processor 103 may include one or more processing cores; processor 103 may be a central processing unit (CPU), or other general-purpose processor 103, digital signal processor 103 (DSP), application specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc.

[0074] The memory 104 can be used to store software programs and modules. The processor 103 executes various functional applications and data processing by running the software programs and modules stored in the memory 104. The memory 104 mainly includes a program storage area and a data storage area. The program storage area can store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area can store data created based on the use of the optical sensing module, etc. In addition, the memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor 103 with access to the memory 104.

[0075] The infrared remote control method in the embodiments of this application will be described below. Please refer to the following: Figure 2 , Figure 2 This paper illustrates a flowchart of an infrared remote control method according to an embodiment of the present application. The infrared remote control method is applied to the photosensitive module described in any of the above embodiments, wherein the infrared remote control method includes:

[0076] Step S201: Detect infrared light emitted by other terminals and obtain infrared code stream data;

[0077] Specifically, the light sensor module 102 can respond to an infrared remote control learning command, detect infrared light emitted by other terminals, and obtain infrared code stream data. The infrared remote control learning command can be issued by a processor in an electronic device. Generally, when the light sensor module receives the infrared remote control learning command, some or all of the light sensing functions of the light sensor module will stop working. For example, in an embodiment where the light sensor module refers to a circuit module in an electronic device that detects ambient light, the photodiode in the light sensor module that detects the intensity of ambient light will stop detecting ambient light and will instead be used to detect infrared light emitted by other terminals.

[0078] For example, in an embodiment of a light-sensing module that refers to a circuit module in an electronic device that detects flickering light sources, the photodiode in the light-sensing module that detects flickering light sources will stop detecting them and will instead be used to detect infrared light emitted by other terminals. As another example, in an embodiment of a light-sensing module that refers to a circuit module in an electronic device that detects proximity light, the photodiode in the light-sensing module that detects proximity light will stop detecting it and will instead be used to detect infrared light emitted by other terminals.

[0079] It is understood that other terminals usually refer to the remote control of the infrared remote control terminal. For example, other terminals can refer to the remote control of home appliances (such as air conditioners, televisions, robot vacuums, etc.) or the remote control of electric toys. This application does not make any specific restrictions.

[0080] It should be noted that, since the light sensor module has detection circuits corresponding to ambient light detection, flicker light source detection, or proximity light detection, the detection circuit of the light sensor module can be reused to detect infrared light emitted by other terminals, thereby obtaining and saving the infrared code stream data of other terminals. This means that the infrared code stream data for controlling the infrared light is not obtained by downloading or installing software programs through the electronic terminal. Therefore, the infrared remote control method of this application can be applied to infrared remote control of different terminals.

[0081] For example, the detection circuit of the light sensing module may include a photodiode and a signal processing circuit. The photodiode can convert infrared light emitted by other terminals into electrical signals, and the signal processing circuit can perform signal processing processes such as amplifying the electrical signals output by the photodiode and converting them into digital signals.

[0082] Step S202: Control the voltage or current output of the drive port according to the infrared code stream data to drive the infrared lamp to emit infrared light.

[0083] Specifically, the light sensor module 102 can respond to the infrared remote control transmission command and control the voltage or current output of the drive port according to the infrared code stream data to drive the infrared lamp to emit infrared light. The infrared remote control transmission command can be issued by the processor in the electronic device. Generally, when the light sensor module receives the infrared remote control transmission command, the light sensor module will read the infrared code stream data saved in step S201 (e.g., the external code stream data saved in the first-in-first-out memory). Then, the light sensor module controls the voltage or current output of the drive port according to the infrared code stream data, thereby driving the infrared lamp to emit infrared light towards the remote control object (e.g., a television, an air conditioner, etc.), and finally realize the remote control process of the remote control object.

[0084] For example, assuming the infrared stream data stored in the light sensor module includes infrared stream data A corresponding to a remote-controlled TV and infrared stream data B corresponding to a remote-controlled air conditioner, if the infrared remote control transmission command issued by the processor in the electronic device is a TV remote control command, the light sensor module will control the voltage or current output of the drive port according to infrared stream data A, thereby driving the infrared lamp to emit infrared light towards the TV; if the infrared remote control transmission command issued by the processor in the electronic device is an air conditioner remote control command, the light sensor module will control the voltage or current output of the drive port according to infrared stream data B, thereby driving the infrared lamp to emit infrared light towards the air conditioner, and so on, which will not be elaborated further here.

[0085] In some embodiments of this application, the photosensing module may include a constant voltage driving circuit connected to a driving port. Infrared data stream data can control the operation of the constant voltage driving circuit, causing a change in the voltage output of the driving port to drive the infrared lamp to emit infrared light. Exemplarily, the constant voltage driving circuit may include a voltage source and a switching transistor. Infrared data stream data can control the switching transistor to turn on and off, thereby changing the voltage output of the driving port.

[0086] In some embodiments of this application, the photosensing module may include a constant current driving circuit connected to a driving port. Infrared code stream data can control the operation of the constant current driving circuit, causing changes in the current output by the driving port to drive the infrared lamp to emit infrared light. For example, the constant current driving circuit may include a current source and a switching transistor. The infrared code stream data can control the switching transistor to turn on and off, thereby changing the current output by the driving port.

[0087] In this embodiment, the infrared light emitted by other terminals is detected by a photosensitive module, thereby learning the infrared code stream data of those terminals. When infrared remote control is needed, the voltage or current output of the drive port is controlled based on the learned infrared code stream data to drive the infrared lamp to emit infrared light. In other words, the infrared remote control method of this application can learn the remote control commands of any terminal using a photosensitive module, and can drive the infrared lamp for infrared remote control. This not only eliminates the need to add an infrared remote control module to the electronic device, thus reducing the cost of the electronic device, but also enables infrared remote control functionality for different devices, thereby solving the problem of limited application scenarios for infrared remote control.

[0088] In some embodiments of this application, see Figure 3 , Figure 3 The illustration shows a schematic diagram of learning infrared code stream data in an embodiment of this application, wherein the light sensing module includes an optoelectronic device for detecting infrared light, and the steps of detecting infrared light emitted by other terminals and obtaining infrared code stream data include:

[0089] Step S301: Continuously detect the electrical signal output by the optoelectronic device to obtain the initial bit stream data;

[0090] Specifically, after the photosensitive module receives the infrared remote control learning command, its photoelectric device enters infrared detection mode. The photoelectric device continuously converts the received infrared light into electrical signals. Therefore, sampling the electrical signal output by the photoelectric device yields the initial bitstream data for that period. For example, taking a photodiode as the photoelectric device, after receiving infrared light, the photoelectric device generates a photocurrent. The signal processing circuit of the photosensitive module converts this photocurrent into an amplified voltage signal. By sampling the amplified voltage signal and performing analog-to-digital conversion using an analog-to-digital converter, the initial bitstream data can be obtained.

[0091] It should be noted that in the above embodiments, the sampling frequency of the electrical signal is greater than or equal to the carrier frequency of the infrared light. That is, the sampling frequency of the analog-to-digital converter is greater than or equal to the carrier frequency of the infrared light. For example, if the carrier frequency of the infrared light is 39kHz, the sampling frequency of the analog-to-digital converter can be 147kHz, which means that the sampling frequency of the analog-to-digital converter can be three times the carrier frequency of the infrared light, thereby ensuring that the complete carrier information corresponding to the infrared light can be sampled.

[0092] For example, assuming the carrier data contained in the infrared light emitted by other terminals is "11001001", and the sampling frequency of the analog-to-digital converter can be three times the carrier frequency of the infrared light, after the signal processing circuit of the photosensitive module processes the electrical signal output by the optoelectronic device, the initial code stream data that may be obtained is "000...111 111 000 000 111 000000 111...000", where "000..." and "...000" are invalid data, and "111 111 000 000 111 000 000111" are valid data.

[0093] Step S302: Extract multiple consecutive bits of data from the initial code stream data, and determine the infrared code stream data based on the extracted multiple consecutive bits of data.

[0094] After obtaining the initial bitstream data, multiple consecutive bits of data can be extracted from the initial bitstream data, and the infrared bitstream data can be determined based on the extracted multiple consecutive bits of data. In some embodiments of this application, the extracted multiple consecutive bits of data can be directly used as the infrared bitstream data. For example, in the embodiment of the initial bitstream data "000...111 111 000 000111 000 000 111...000", since "000..." and "...000" are invalid data, and "111 111000 000 111 000 000 111" is valid data, multiple consecutive bits of data "111 111 000 000 111 000000 111" can be extracted, and "111111 000 000 111 000 000 111" can be directly used as the infrared bitstream data.

[0095] In some embodiments of this application, the step of extracting multiple consecutive data bits from the initial bitstream data includes: determining the data start position and the data end position according to the initial bitstream data and a first preset extraction rule; and extracting multiple consecutive data bits from the initial bitstream data according to the data start position and the data end position.

[0096] It should be noted that the first preset interception rule refers to the rule for intercepting the initial bitstream data. Based on the initial bitstream data and the first preset interception rule, the start position and end position of the intercepted data can be determined, so as to intercept multiple consecutive bits of data in the initial bitstream data according to the start position and end position of the data.

[0097] For example, taking the initial bitstream data obtained from measuring the electrical signal output by an optoelectronic device as “000...111111 000 000 111 000 000 111...000”, the first preset truncation rule is that the position with the first digit “1” is the data start position, and the position with the last digit “1” is the data end position. Therefore, “111 111 000 000 111000 000 111...000” can be truncated as a multi-bit continuous data sequence “111 111 000 000 111000 000 111” from “000...111 111 000 000 111000 000 111”.

[0098] In some embodiments of this application, the step of extracting multiple consecutive bits of data from the initial bitstream data to obtain infrared bitstream data includes: determining the data start position and data length according to the initial bitstream data and a second preset extraction rule; and extracting multiple consecutive bits of data from the initial bitstream data according to the data start position and data length.

[0099] It should be noted that the second preset interception rule refers to the rule for intercepting the initial bitstream data. Based on the initial bitstream data and the second preset interception rule, the starting position and length of the intercepted data can be determined so that multiple consecutive bits of data in the initial bitstream data can be intercepted according to the starting position and length of the data.

[0100] For example, taking the initial bitstream data obtained from measuring the electrical signal output by an optoelectronic device as “000...111111 000 000 111 000 000 111...000” as an example, the second preset truncation rule is that the position with the first digit “1” is the starting position of the data, and the data length is 24. Therefore, “111 111 000 000 111 000 000111...000” can be truncated from “000...111 111 000 000 111 000 000 111” as a multi-bit continuous data.

[0101] In some embodiments of this application, the step of extracting multiple consecutive bits of data from the initial bitstream data to obtain infrared bitstream data includes: determining the data termination position and data length based on the initial bitstream data and a third preset extraction rule; and extracting multiple consecutive bits of data from the initial bitstream data based on the data termination position and data length.

[0102] It should be noted that the third preset interception rule refers to the rule for intercepting the initial bitstream data. Based on the initial bitstream data and the third preset interception rule, the data termination position and data length of the intercepted data can be determined, so as to intercept multiple consecutive data bits in the initial bitstream data according to the data termination position and data length.

[0103] For example, taking the initial bitstream data obtained from measuring the electrical signal output by an optoelectronic device as “000...111111 000 000 111 000 000 111...000” as an example, the third preset truncation rule is that the position where the last bit is “1” is the data termination position, and the data length is 24. Therefore, “111 111 000 000 111 000 000111...000” can be truncated from “000...111 111 000 000 111 000 000 111” as a multi-bit continuous data.

[0104] In some embodiments of this application, see Figure 4 , Figure 4 This illustration shows a schematic diagram of determining infrared code stream data in an embodiment of this application, wherein the step of determining the infrared code stream data based on the extracted multiple consecutive bits of data includes:

[0105] Step S401: Determine multiple data segments based on the extracted multi-digit continuous data, with each data segment including N digits of continuous data;

[0106] It should be noted that N is equal to the ratio between the sampling frequency of the electrical signal and the carrier frequency of the infrared light. In other words, the number of bits of data contained in each data segment is related to the ratio between the sampling frequency of the electrical signal and the carrier frequency of the infrared light.

[0107] For example, if the ratio between the sampling frequency and the carrier frequency of the infrared light is equal to 3, and the extracted continuous data is “111 111 000 000 111 000 000 111”, then “111 111000 000 111 000000 111” can be divided into a total of 8 data segments: “111”, “111”, “000”, “000”, “111”, “000”, “000”, and “111”.

[0108] Step S402: Determine one infrared data point corresponding to each data segment based on multiple data segments, and combine the infrared data corresponding to each data segment to obtain infrared code stream data.

[0109] After obtaining multiple sets of data segments, the corresponding infrared data for each set of data segments can be determined. For example, the above eight data segments "111", "111", "000", "000", "111", "000", "000", and "111" correspond to the infrared data "1", "1", "0", "0", "1", "0", and "1" respectively. Combining the infrared data corresponding to each set of data segments, the infrared code stream data "11001001" can be obtained. As mentioned above, this infrared code stream data "11001001" is consistent with the data "11001001" contained in the infrared light emitted by other terminals, thus completing the infrared remote control learning process for other terminals.

[0110] In some embodiments of this application, the step of determining one infrared data corresponding to each set of data segments based on multiple sets of data segments includes: when the number of first target data (e.g., data "1") contained in a data segment is greater than or equal to a first preset value, the first target data can be determined as one infrared data corresponding to the data segment; when the number of second target data (e.g., data "0") contained in a data segment is greater than or equal to the first preset value, the second target data is determined as one infrared data corresponding to the data segment.

[0111] It should be noted that due to factors such as measurement errors of the analog-to-digital converter, signal delay, or signal interference, the initial bitstream data obtained by measuring the electrical signal output by the optoelectronic device may actually contain measurement errors. For example, the initial bitstream data may be "000...111 110 000 000 111 100 000 111...000", meaning that the second data segment may be "110" and the sixth data segment may be "100". If a data segment consisting entirely of "0"s is identified as infrared data "0" and a data segment consisting entirely of "1"s is identified as infrared data "1", then in this case, it may be impossible to determine the infrared data.

[0112] In the above embodiments, when the number of first target data (e.g., data "1") contained in the data segment is greater than or equal to the first preset value (e.g., 2), the first target data can be determined to be one-bit infrared data corresponding to the data segment; and when the number of second target data (e.g., data "0") contained in the data segment is greater than or equal to the first preset value, the second target data can be determined to be one-bit infrared data corresponding to the data segment.

[0113] For example, in the embodiment where the initial bitstream data might be “000...111 110 000 000 111 100000111...000”, that is, the second data segment is “110”, and the number of “1” data is greater than or equal to 2, then the infrared data corresponding to the second data segment can be determined to be “1”; similarly, that is, the sixth data segment is “100”, and the number of “0” data is greater than or equal to 2, then the infrared data corresponding to the sixth data segment can be determined to be “0”, thus ultimately ensuring the effective conversion of each infrared data.

[0114] It is understood that the above description of determining infrared code stream data is only an exemplary embodiment. Those skilled in the art can make equivalent modifications and designs under the guidance of this application. For example, for the embodiment of the intercepted data "111 110 000000 111 100 000 111", data repair can be performed directly, so that the repaired "111 111000 000 111 000 000 111" can be used as infrared code stream data.

[0115] Furthermore, to better implement the infrared remote control method in the embodiments of this application, this application also provides a light-sensing module based on the infrared remote control method, see reference. Figure 5 , Figure 5 A schematic diagram of a light-sensing module in an embodiment of this application is shown, wherein the light-sensing module has a drive port LDR for driving infrared lamps, and the light-sensing module includes an optoelectronic device 1021, a signal processing circuit 1022, and a drive circuit 1023.

[0116] Specifically, the photosensitive module has an infrared remote control learning mode and an infrared remote control sending mode. When the processor sends an infrared remote control learning command to the photosensitive module, the photosensitive module can enter the infrared remote control learning mode so that the photosensitive module can learn the infrared code stream data of other terminals. When the processor sends an infrared remote control sending command to the photosensitive module, the photosensitive module can enter the infrared remote control sending mode so as to drive the infrared lamp to emit infrared light through the LDR drive port of the photosensitive module.

[0117] The optoelectronic device 1021 is configured to receive infrared light in infrared remote control learning mode so as to continuously convert the received infrared light into electrical signals, so that the signal processing circuit 1022 detects the electrical signals and obtains infrared code stream data.

[0118] In some embodiments of this application, for example, in embodiments where the light-sensing module refers to a circuit module in an electronic device that detects ambient light, the optoelectronic device 1021 can refer to a photodiode that detects the intensity of ambient light. In some embodiments of this application, for example, in embodiments where the light-sensing module refers to a circuit module in an electronic device that detects flickering light sources (e.g., AC fluorescent lamps, computer screens, etc.), the optoelectronic device 1021 can refer to a photodiode that detects flickering light sources. In some embodiments of this application, for example, in embodiments where the light-sensing module refers to a circuit module in an electronic device that detects proximity light, the optoelectronic device 1021 can refer to a photodiode that detects the light rays of proximity light.

[0119] It is understood that optoelectronic device 1021 may also refer to at least two of the following: a photodiode for detecting the intensity of ambient light, a photodiode for detecting a flickering light source, or a photodiode for detecting proximity light.

[0120] The signal processing circuit 1022 is configured to process the electrical signal output by the photodiode 1021 in infrared remote control learning mode to detect infrared light emitted by other terminals and obtain infrared code stream data. Exemplarily, the signal processing circuit 1022 includes a current integrator, a signal amplifier, an analog-to-digital converter, etc. The current integrator can convert the electrical signal output by the photodiode into a voltage signal, the signal amplifier amplifies the voltage signal to reduce the signal-to-noise ratio, and the analog-to-digital converter can convert the amplified voltage signal into a digital signal. After the conversion, the infrared code stream data is obtained.

[0121] The driving circuit 1023 is configured to control the voltage or current output of the driving port LDR according to the infrared code stream data in infrared remote control transmission mode, so as to drive the infrared lamp to emit infrared light. In some embodiments of this application, the driving circuit 1023 may include a constant voltage driving circuit 1023 connected to the driving port LDR. The infrared code stream data can control the operation of the constant voltage driving circuit 1023, causing the voltage output of the driving port LDR to change, thereby driving the infrared lamp to emit infrared light. Exemplarily, the constant voltage driving circuit 1023 may include a voltage source and a switching transistor. The infrared code stream data can control the switching transistor to turn on and off, thereby changing the voltage output of the driving port LDR.

[0122] In some embodiments of this application, the driving circuit 1023 may include a constant current driving circuit 1023 connected to the driving port LDR. The infrared code stream data can control the operation of the constant current driving circuit 1023, causing the current output by the driving port LDR to change, thereby driving the infrared lamp to emit infrared light. For example, the constant current driving circuit 1023 may include a current source and a switching transistor. The infrared code stream data can control the switching transistor to turn on and off, thereby changing the current output by the driving port LDR.

[0123] It is understandable that the light sensor module generally also includes a digital circuit 1024, which is connected to a general purpose input / output port (GPIO). The digital circuit 1024 can receive commands (such as infrared remote control learning commands or infrared remote control sending commands) through the GPIO, so as to control the signal processing circuit and the drive circuit 1023 to work. Alternatively, the digital circuit 1024 may also include a first-in-first-out (FIFO) memory to store the infrared code stream data.

[0124] In this embodiment, the infrared light emitted by other terminals is detected by a photosensitive module, thereby learning the infrared code stream data of those terminals. When infrared remote control is needed, the voltage or current output of the LDR (Light Receiver) driver port is controlled based on the learned infrared code stream data to drive the infrared lamp to emit infrared light. In other words, the infrared remote control method of this application can learn the remote control commands of any terminal using a photosensitive module, and can drive the infrared lamp for infrared remote control. This not only eliminates the need to add an infrared remote control module to the electronic device, thus reducing the cost of the electronic device, but also enables infrared remote control functionality for different devices, thereby solving the problem of limited application scenarios for infrared remote control.

[0125] In some embodiments of this application, for example, for an embodiment where the light sensing module refers to a circuit module in an electronic device that detects ambient light, the light sensing module also has an ambient light detection working mode. When the processor sends an ambient light detection command to the light sensing module, the light sensing module can enter the ambient light detection working mode. The photoelectric device 1021 is also configured to receive ambient light in the ambient light detection working mode, and the signal processing circuit is also configured to process the electrical signal output by the photoelectric device 1021 in the ambient light detection working mode, so that the light sensing module detects the intensity of ambient light, and the electronic device can adjust the brightness of the screen according to the intensity of ambient light.

[0126] In some embodiments of this application, for example, the light sensing module refers to an embodiment of a circuit module in an electronic device that detects flickering light sources (such as AC fluorescent lamps, computer screens, etc.). The light sensing module also has a flickering light detection working mode. When the processor sends a flickering light detection command to the light sensing module, the light sensing module can enter the flickering light detection working mode. The photoelectric device 1021 is also configured to receive flickering light in the flickering light detection working mode. The signal processing circuit is also configured to process the electrical signal output by the photoelectric device 1021 in the flickering light detection working mode, so that the light sensing module detects the flickering frequency of the flickering light source. This allows the electronic device to guide the camera module to set a reasonable exposure time based on the flickering frequency of the flickering light source, thereby avoiding the influence of the flickering light source on the photography process.

[0127] In some embodiments of this application, for example, for an embodiment where the light sensing module refers to a circuit module in an electronic device that detects proximity light, the light sensing module also has a proximity light detection working mode. When the processor sends a proximity light detection command to the light sensing module, the light sensing module can enter the proximity light detection working mode. The photoelectric device 1021 is also configured to receive proximity light rays in the proximity light detection working mode, and the signal processing circuit is also configured to process the electrical signals output by the photoelectric device 1021 in the proximity light detection working mode, so that the light sensing module detects the proximity light rays to determine whether the electronic device is approaching / moving away from the target object, thereby controlling the display or turning off of the screen.

[0128] In some embodiments of this application, for example, for the embodiment where the light sensing module refers to a circuit module in an electronic device that detects proximity light, the light sensing module further includes a light-emitting device 1025, which is configured to emit detection light towards a target object in a proximity light detection working mode so that the target object reflects the proximity light; the driving circuit 1023 is also configured to control the voltage or current output of the driving port LDR in the proximity light detection working mode to drive the light-emitting device 1025 to emit detection light.

[0129] For example, see Figure 6 , Figure 6 Another schematic diagram of the photosensitive module in this application embodiment is shown, wherein when switch S1 is closed, the driving circuit 1023 controls the voltage or current output of the driving port LDR, so that the light-emitting device 1025 emits detection light towards the target object to realize the proximity light detection function; and when switch S2 is closed, the driving circuit 1023 controls the voltage or current output of the driving port LDR, so that the infrared lamp emits infrared light to realize the proximity infrared remote control function.

[0130] As can be seen, when the light sensing module is a circuit module in an electronic device that detects proximity light, the light-emitting device 1025 (e.g., a light-emitting diode) that emits detection light towards the target object (e.g., a human head) can share the same driving circuit 1023 with the infrared lamp. This means that it is not necessary to set separate driving circuits 1023 for the light-emitting device 1025 and the infrared lamp. Not only can the proximity light detection function be realized through the driving circuit 1023, but the infrared remote control function can also be realized through the driving circuit 1023, which is conducive to further reducing the circuit area and cost of the light sensing module.

[0131] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0132] Therefore, embodiments of the present invention provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, etc. A computer program is stored thereon, which is loaded by a processor to execute the steps in any of the infrared remote control methods provided in the embodiments of the present invention. For example, the computer program loaded by the processor can control the light-sensing module to perform the following steps:

[0133] In response to infrared remote control learning commands, it detects infrared light emitted by other terminals and obtains infrared code stream data;

[0134] In response to an infrared remote control transmission command, the voltage or current output of the drive port LDR is controlled according to the infrared code stream data to drive the infrared lamp to emit infrared light.

[0135] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0136] The basic concepts have been described above. Obviously, for those skilled in the art, the detailed disclosure above is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the exemplary embodiments of this application.

[0137] Furthermore, this application uses specific terms to describe embodiments of the application. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different locations in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.

[0138] The above provides a detailed description of an infrared remote control method, a light-sensing module, an electronic device, and a storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An infrared remote control method, characterized in that, The infrared remote control method is applied to a light-sensing module, which has a drive port for driving infrared lamps. The infrared remote control method includes: Detect infrared light emitted by other terminals and obtain infrared code stream data; The voltage or current output from the drive port is controlled according to the infrared code stream data to drive the infrared lamp to emit infrared light.

2. The infrared remote control method as described in claim 1, characterized in that, The light-sensing module includes an optoelectronic device for detecting the infrared light, and the step of detecting the infrared light emitted by other terminals and obtaining infrared code stream data includes: The electrical signal output by the optoelectronic device is continuously sampled to obtain initial code stream data, wherein the sampling frequency of the electrical signal is greater than or equal to the carrier frequency of the infrared light; Extract multiple consecutive bits of data from the initial code stream data, and determine the infrared code stream data based on the extracted multiple consecutive bits of data.

3. The infrared remote control method as described in claim 2, characterized in that, The step of extracting multiple consecutive bits of data from the initial bitstream data includes: Based on the initial bitstream data and the first preset interception rule, determine the data start position and the data end position; Multiple consecutive data bits are extracted from the initial bitstream data based on the data start position and the data end position.

4. The infrared remote control method as described in claim 2, characterized in that, The step of extracting multiple consecutive bits of data from the initial bitstream data to obtain the infrared bitstream data includes: Based on the initial bitstream data and the second preset truncation rule, determine the data start position and data length; Multiple consecutive bits of data are extracted from the initial bitstream data based on the data start position and the data length.

5. The infrared remote control method as described in claim 2, characterized in that, The step of extracting multiple consecutive bits of data from the initial bitstream data to obtain the infrared bitstream data includes: Based on the initial bitstream data and the third preset truncation rule, determine the data termination position and data length; Multiple consecutive data bits are extracted from the initial bitstream data based on the data termination position and the data length.

6. The infrared remote control method as described in claim 2, characterized in that, The step of determining the infrared code stream data based on the extracted multi-bit continuous data includes: Multiple data segments are determined based on the extracted multi-bit continuous data, and each data segment includes N bits of continuous data; Based on the multiple sets of data segments, determine the infrared data corresponding to each set of data segments, and combine the infrared data corresponding to each set of data segments to obtain the infrared code stream data; Wherein, N is equal to the ratio between the sampling frequency of the electrical signal and the carrier frequency of the infrared light.

7. The infrared remote control method as described in claim 6, characterized in that, The step of determining the one-bit infrared data corresponding to each of the multiple sets of data segments includes: When the number of first target data contained in the data segment is greater than or equal to a first preset value, the first target data is determined to be one-bit infrared data corresponding to the data segment. When the number of second target data contained in the data segment is greater than or equal to the first preset value, the second target data is determined to be one-bit infrared data corresponding to the data segment.

8. A light-sensing module, characterized in that, The light sensing module has a drive port for driving infrared lights, and it also has an infrared remote control learning mode and an infrared remote control transmission mode. The light sensing module includes: Optoelectronic device, the optoelectronic device being configured to receive infrared light in the infrared remote control learning mode; A signal processing circuit is configured to process the electrical signal output by the optoelectronic device in the infrared remote control learning mode to detect infrared light emitted by other terminals and obtain infrared code stream data. A driving circuit is configured to control the voltage or current output by the driving port according to the infrared code stream data in the infrared remote control transmission mode, so as to drive the infrared lamp to emit infrared light.

9. The light-sensing module as described in claim 8, characterized in that, The light sensing module also has an ambient light detection working mode; The optoelectronic device is also configured to receive ambient light in the ambient light detection mode. The signal processing circuit is also configured to process the electrical signal output by the optoelectronic device in the ambient light detection mode to detect the ambient light intensity.

10. The light-sensing module as described in claim 8, characterized in that, The light sensing module also has a flicker light detection working mode; The optoelectronic device is also configured to receive scintillation light in the scintillation detection working mode; The signal processing circuit is also configured to process the electrical signal output by the photoelectric device in the flicker detection mode to detect the flicker frequency of the flicker light source.

11. The light-sensing module as described in claim 8, characterized in that, The light sensing module also has a proximity light detection working mode; The optoelectronic device is also configured to receive proximity light rays in the proximity light detection operating mode; The signal processing circuit is also configured to process the electrical signal output by the photoelectric device in the proximity light detection mode to determine whether the terminal is approaching / moving away from the target object.

12. The light-sensing module as described in claim 11, characterized in that, The light-sensing module also includes a light-emitting device; The light-emitting device is configured to emit a detection light beam toward the target object in the proximity light detection mode, so that the target object reflects the proximity light beam. The driving circuit is also configured to control the voltage or current output by the driving port in the proximity light detection operating mode to drive the light-emitting device to emit the detection light.

13. An electronic device, characterized in that, include: A light sensor module and an infrared lamp, wherein the light sensor module has a drive port and the infrared lamp is electrically connected to the drive port; The processor and memory, wherein the memory stores a computer program that, when executed by the processor, controls the light-sensing module to perform the steps of the infrared remote control method as described in any one of claims 1 to 8.

14. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the steps of the infrared remote control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for transmitting data by using DSM-CC protocol

    CN101924930A

  • Method for implementing learning type mobile phone remote controller and learning type mobile phone remote controller

    CN102025854A

  • Method for digitizing infrared signal

    CN104240491A

  • Infrared data transmission method, device and system and related equipment

    CN113299056A

  • Infrared data communication device, and infrared data communication method

    JP2013121145A