Device control method, device, and remote controller

WO2026113862A9PCT designated stage Publication Date: 2026-08-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/132640
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-11-27
Filing Date
2025-11-05
Publication Date
2026-08-27

Smart Images

  • Figure CN2025132640_27082026_PF_FP_ABST
    Figure CN2025132640_27082026_PF_FP_ABST
Patent Text Reader

Abstract

A device control method, a device, and a remote controller, relating to the technical field of terminals. The problem that set-top box control cannot be achieved due to small RAM of an infrared component integrated in a remote controller can be solved. The method comprises: in response to a first operation for selecting a first channel, a remote controller sends a first control instruction to a television set; then, the remote controller receives a first infrared code from the television set, the first infrared code being obtained by compressing a second infrared code, the second infrared code being an infrared code used by a set-top box, and the second infrared code corresponding to the first control instruction; finally, the remote controller sends a first infrared control signal corresponding to the first infrared code to the set-top box, the first infrared control signal being used for controlling the set-top box to transmit video data of the first channel to the television set.
Need to check novelty before this filing date? Find Prior Art

Description

Equipment control methods, equipment and remote controls

[0001] This application claims priority to Chinese Patent Application No. 202411719007.9, filed on November 27, 2024, entitled "Equipment Control Method, Equipment and Remote Control", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to device control methods, devices and remote controllers. Background Technology

[0003] Currently, remote controls can be used to control devices. For example, with the increasing popularity of cable digital television, users typically equip their televisions with set-top boxes to receive and play television programs. When playing programs on the television through the set-top box, both the television remote and the set-top box remote need to be used to control the television and the remote, respectively. For instance, the television remote is used to turn on the television, and the set-top box remote is used to switch channels. To simplify this operation, an infrared device can be integrated into the television remote; however, the random access memory (RAM) of this infrared device may be too small to control the set-top box effectively. Summary of the Invention

[0004] This application provides a device control method, device, and remote controller, which can solve the problem that the RAM of the infrared device integrated in the remote controller is too small to realize set-top box control.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] In a first aspect, a device control method is provided, the method comprising: a remote controller sending a first control command to a television in response to a first operation for selecting a first channel; the remote controller receiving a first infrared code from the television, wherein the first infrared code is obtained by compression based on a second infrared code, the second infrared code being an infrared code used by a set-top box, and the second infrared code corresponding to the first control command; the remote controller sending a first infrared control signal corresponding to the first infrared code to the set-top box, the first infrared control signal being used to control the set-top box to transmit video data of the first channel to the television.

[0007] Based on the above technical solution, when the remote control receives an operation to select the first channel, it can send a corresponding control command to the television. Then, it can receive from the television a first infrared code compressed from the second infrared code corresponding to this control command. This second infrared code is the infrared code used by the set-top box, meaning the set-top box is controlled via infrared codes. The remote control can send a first infrared control signal to the set-top box based on the first infrared code to control the set-top box to transmit video data of the first channel to the television. Thus, even when the RAM of the infrared device in the remote control is small, it can still receive infrared codes from the television and control the set-top box to transmit video data to the television, thereby achieving control of the set-top box. This solves the problem that the limited RAM of the infrared device integrated in the remote control prevents it from controlling the set-top box.

[0008] In one possible design, after the remote controller sends a first infrared control signal corresponding to the first infrared code to the set-top box, the method further includes: the remote controller, in response to a second operation for selecting a second channel, sending a second control command to the television; the remote controller receiving a third infrared code from the television, wherein the third infrared code is obtained by compression based on a fourth infrared code, the fourth infrared code being the infrared code used by the set-top box, and the fourth infrared code corresponding to the second control command; the remote controller sending a second infrared control signal corresponding to the third infrared code to the set-top box, the second infrared control signal being used to control the set-top box to transmit video data of the second channel to the television.

[0009] Based on this design, the remote control sends a first infrared control signal to the set-top box to control the set-top box to transmit video data of the first channel to the television. When it receives an operation to select the second channel, it can still receive the corresponding compressed infrared code from the television. Based on this infrared code, it sends a second infrared control signal to the set-top box to control the set-top box to transmit video data of the second channel to the television. In this way, the set-top box can be controlled to switch channels.

[0010] In one possible design, the method further includes: the remote control, in response to a third operation, sending a third control command to the television, the third control command instructing the television to perform a target operation, which is unrelated to playing video data from the set-top box. Based on this design, after receiving the third operation, the remote control can also send a corresponding control command to the television to control it to perform an operation unrelated to playing video data from the set-top box, thus achieving control of the television. In this way, simultaneous control of the television and set-top box can be achieved with a single remote control, simplifying operation.

[0011] In one possible design, the first control command carries either the button representation information of the remote control or the representation information of the first channel. This way, the control command sent from the remote control to the television carries the button representation information or channel representation information, allowing the television to determine whether the first control command is for controlling the television or the set-top box. Furthermore, it can obtain the corresponding infrared code based on this information, thereby enabling playback of video data from the set-top box.

[0012] In one possible design, the second infrared code is determined based on the first control command and a preset mapping relationship. The preset mapping relationship includes at least one of the following: a correspondence between the button representation information and the infrared code on the remote control, and a correspondence between the channel representation information and the infrared code. Thus, based on the preset correspondence between button representation information and the infrared code, the correspondence between channel representation information and the infrared code, and the button representation information or channel representation information carried in the control command, the corresponding infrared code can be obtained, thereby enabling control of the set-top box.

[0013] In one possible design, the second infrared code includes at least one codeword. The first infrared code is generated by sequentially encoding each of the at least one codeword. When the frequency of a codeword appearing in the second infrared code is greater than or equal to a preset frequency threshold, the encoded codeword includes a first number of binary bits. When the frequency of a codeword appearing in the second infrared code is less than the preset frequency threshold, the encoded codeword includes a second number of binary bits, where the first number is less than the second number. The number of binary bits included in the encoded codeword is less than the number of binary bits included before encoding. Thus, when the frequency of a codeword appearing is greater than or equal to the preset frequency threshold, the compressed data size of that codeword is smaller than that of codewords appearing less frequently than the preset frequency threshold. In other words, codewords appearing more frequently than or equal to the preset frequency threshold have a smaller compressed data size, resulting in a smaller compressed infrared code and a better compression effect. Furthermore, different codewords with a frequency greater than or equal to a preset frequency threshold have the same amount of data after encoding. Compared to schemes where codewords with different frequencies of occurrence have different amounts of data after encoding, this makes the calculation simpler.

[0014] In one possible design, the first infrared code includes a first dictionary, a number of at least one codeword, and data encoded by the at least one codeword, wherein the first dictionary includes some or all of the different codewords in the first infrared code. Thus, the compressed infrared code, including the dictionary, the number of codewords, and the data encoded by the codewords, facilitates subsequent reconstruction of the compressed infrared code by the receiving end.

[0015] In one possible design, the second infrared code includes at least one codeword. The first infrared code is generated by sequentially encoding at least one target codeword. The target codeword is calculated based on a preset value and the corresponding codeword, with each target codeword corresponding to a different codeword, and the target codeword being smaller than its corresponding codeword. This approach first reduces the size of the codewords in the infrared code before encoding them. For codewords of similar size, the reduction operation yields the same codeword, i.e., the target codeword. This reduction operation further increases the frequency of the target codeword, allowing codewords of similar size to be encoded with the same value. This results in a smaller compressed infrared code and a better compression effect.

[0016] In one possible design, the frequency of the target codeword appearing among all target codewords is negatively correlated with the size of the encoded target codeword. Thus, the more frequently a target codeword appears, the smaller its encoded size, meaning the smaller the amount of data after encoding. This results in a smaller data size for the compressed infrared code and a better compression effect.

[0017] In one possible design, the encoded size of the target codeword is the value of its order in a second dictionary minus 1. The second dictionary includes all distinct target codewords, arranged in descending order of frequency among all target codewords. This sorting by frequency yields a sorted dictionary, and the target codeword is then directly represented by the difference between its order in the sorted dictionary and 1, simplifying the calculation.

[0018] In one possible design, the second dictionary also includes the frequency of each target codeword appearing in all the target codewords.

[0019] In one possible design, if the value of the target codeword appears consecutively n times, the values ​​from the nx-th target codeword to the nth target codeword are re-encoded to a value of nx, where x is a preset number of repetitions, and n and x are both positive integers. In this way, for target codewords that appear consecutively more than the preset number of repetitions, the number of repetitions of the target codeword is directly used to replace subsequent target codewords that exceed the preset number of repetitions. That is, the previously used target codeword values ​​are no longer used to represent the target codewords, resulting in a smaller data size and better compression effect for the compressed infrared code.

[0020] In one possible design, the first infrared code includes a second dictionary, the number of the at least one codeword, the data encoded by the at least one target codeword, and the preset value. Thus, the compressed infrared code includes the dictionary, the number of codewords, the encoded data, and the preset value, which can be used by the receiving end to reconstruct the infrared code based on the information received from the compression result.

[0021] In one possible design, before the remote controller sends the first infrared control signal corresponding to the first infrared code to the set-top box, the method further includes: the remote controller decompressing the first infrared code to obtain a second infrared code; and the remote controller generating the first infrared control signal based on the second infrared code. In this way, the remote controller decompresses the first infrared code before generating the infrared control signal, eliminating the need for the set-top box to perform the decompression operation. For the set-top box, no modifications are required, making implementation simple.

[0022] In a second aspect, a device control method is provided, the method comprising: a television receiving a first control instruction from a remote control, the first control instruction being used to instruct the playback of video data of a first channel; the television sending a first infrared code to the remote control, the first infrared code being obtained by compression based on a second infrared code, the second infrared code being an infrared code used by a set-top box, the second infrared code corresponding to the first control instruction; the television receiving video data of the first channel from the set-top box; and the television playing the video data of the first channel.

[0023] In one possible design, after the television plays video data from the first channel, the method further includes: the television receiving a second control command from the remote control, the second control command being used to instruct the playback of video data from the second channel; the television sending a third infrared code to the remote control, the third infrared code being compressed based on a fourth infrared code, the fourth infrared code being the infrared code used by the set-top box, the fourth infrared code corresponding to the second control command; the television receiving video data from the set-top box; and the television playing the video data from the second channel.

[0024] In one possible design, the method further includes: the television receiving a third control command from the remote control; and in response to the third control command, the television performing a target operation, the target operation being an operation unrelated to playing video data from the set-top box.

[0025] In one possible design, the first control command carries representation information of the buttons on the remote control, or representation information of the first channel; before the television sends the first infrared code to the remote control, the method further includes: the television obtaining the second infrared code based on the first control command and a preset mapping relationship, wherein the preset mapping relationship includes at least one of: a correspondence between the representation information of the buttons on the remote control and the infrared code, and a correspondence between the representation information of the channel and the infrared code.

[0026] In one possible design, the second infrared code includes at least one codeword. Before the television sends the first infrared code to the remote control, the method further includes: the television sequentially encoding each codeword in the at least one codeword to generate the first infrared code, wherein when the frequency of the codeword appearing in the second infrared code is greater than or equal to a preset frequency threshold, the number of binary bits included after encoding the codeword is a first number; when the frequency of the codeword appearing in the second infrared code is less than the preset frequency threshold, the number of binary bits included after encoding the codeword is a second number, and the first number is less than the second number; the number of binary bits included after encoding each codeword is less than the number of binary bits included before encoding.

[0027] In one possible design, the first infrared code includes a first dictionary, the number of the at least one codeword, and data encoded by the at least one codeword, wherein the first dictionary includes some or all of the different codewords in the first infrared code.

[0028] In one possible design, the second infrared code includes at least one codeword. Before the television sends the first infrared code to the remote control, the method further includes: the television sequentially encoding at least one target codeword to generate the first infrared codeword, wherein the target codeword is calculated based on a preset value and a codeword, the target codeword corresponds one-to-one with the codeword, and the target codeword is smaller than the corresponding codeword.

[0029] In one possible design, the frequency of the target codeword appearing in all target codewords is negatively correlated with the size of the encoded target codeword.

[0030] In one possible design, the size of the encoded target codeword is the value of the target codeword in the order of its arrangement in the second dictionary minus 1, wherein the second dictionary includes all different target codewords, and the target codewords are arranged in the second dictionary in descending order of their frequency of occurrence among all the target codewords.

[0031] In one possible design, if the value of the target codeword appears consecutively n times, the value from the nxth target codeword to the nth target codeword is re-encoded to a value of nx, where x is a preset number of repetitions and n and x are both positive integers.

[0032] In one possible design, the first infrared code includes the second dictionary, the number of the at least one codeword, the data encoded by the at least one target codeword, and the preset value.

[0033] Thirdly, a device control method is provided, the method comprising: a remote controller responding to an operation sending a first control command to a first device, the operation being an operation for controlling a second device; the remote controller receiving a first infrared code from the first device, wherein the first infrared code is obtained by compression based on a second infrared code, the second infrared code being an infrared code used by the second device, and the second infrared code corresponding to the first control command; and the remote controller sending a first infrared control signal corresponding to the first infrared code to the second device, the first infrared control signal being used to control the second device.

[0034] Fourthly, a device control method is provided, the method comprising: a first device receiving a first control command from a remote controller, the first control command being an instruction for controlling a second device; the first device sending a first infrared code to the remote controller; the first infrared code being obtained by compression based on a second infrared code, the second infrared code being an infrared code used by the second device, and the second infrared code corresponding to the first control command.

[0035] Fifthly, a remote control is provided that has the function of implementing the method described in the first or third aspect and any of the designs therein. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.

[0036] Sixthly, an apparatus is provided that has the function of implementing the method described in the second or fourth aspect and any of the designs therein. This function can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-described functions.

[0037] A seventh aspect provides a remote controller, comprising: one or more processors, a communication interface, and one or more memories, the communication interface for communicating with other devices, the one or more memories for storing one or more programs, and the one or more processors for running one or more programs stored in the one or more memories to cause the device to perform the method as described in the first or third aspect above and any of the designs therein.

[0038] Eighthly, a device is provided, comprising: one or more processors, a communication interface, a display screen, and one or more memories, the communication interface being used to communicate with other devices, the one or more memories being used to store one or more programs, and the one or more processors being used to run one or more programs stored in the one or more memories to cause the device to perform the method as described in the second or fourth aspect above and any of the designs therein.

[0039] For example, the communication interface described above can be a transceiver, an input / output interface, an interface circuit, an output circuit, an input circuit, a pin, or related circuits.

[0040] A ninth aspect provides a readable storage medium (also referred to as a computer-readable storage medium), the readable storage medium including a program or instructions that, when executed on a remote controller, cause the remote controller to perform the method as described in the first or third aspect and any one thereof. When the program or instructions are executed on a device, cause the device to perform the method as described in the second or fourth aspect and any one thereof.

[0041] A tenth aspect provides a program product (also referred to as a computer program product) that, when run on a remote control, enables the remote control to perform the method described in the first or third aspect and any of the designs described above. When run on a device, the program product enables the device to perform the method described in the second or fourth aspect and any of the designs described above.

[0042] Eleventhly, a chip system is provided, including at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor, and when the at least one processor executes instructions, the at least one processor performs the method as described in any one of the first to fourth aspects and any design thereof.

[0043] In a twelfth aspect, a communication system is provided, comprising a remote controller, a television set, and a set-top box. The remote controller is used to execute the remote controller method described in any of the preceding aspects, the television set is used to execute the television set method described in any of the preceding aspects, and the set-top box is used to execute the set-top box method described in any of the preceding aspects.

[0044] In a thirteenth aspect, a communication system is provided, comprising a remote controller, a first device, and a second device. The remote controller is used to execute the remote controller execution method described in any of the preceding aspects, and the first device is used to execute the first device execution method described in any of the preceding aspects. The second device is used to execute the second device execution method described in any of the preceding aspects.

[0045] The technical effects of the aforementioned aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description

[0046] Figure 1 is a schematic diagram of the architecture of a communication system provided in an embodiment of this application;

[0047] Figure 2 is a structural schematic diagram of a television set provided in an embodiment of this application;

[0048] Figure 3 is a schematic diagram of the software structure of a television set provided in an embodiment of this application;

[0049] Figure 4 is a schematic diagram of the working process of a television set provided in an embodiment of this application;

[0050] Figure 5 is a structural schematic diagram of a remote control provided in an embodiment of this application;

[0051] Figure 6 is a schematic diagram of the interface of a television set provided in an embodiment of this application;

[0052] Figure 7 is a schematic diagram of a channel switching scenario provided in an embodiment of this application;

[0053] Figure 8 is a schematic diagram of the interface of another television set provided in an embodiment of this application;

[0054] Figure 9 is a schematic flowchart of a device control method provided in an embodiment of this application;

[0055] Figure 10 is a schematic diagram of an infrared code compression scheme provided in an embodiment of this application;

[0056] Figures 11 to 18 are schematic diagrams of infrared code compression under different communication protocols provided in the embodiments of this application;

[0057] Figure 19 is a schematic diagram of another type of remote control provided in an embodiment of this application;

[0058] Figure 20 is a schematic diagram of the structure of a device provided in an embodiment of this application;

[0059] Figure 21 is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0060] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural.

[0061] In the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, a and b and c, where a, b, and c can be single or multiple.

[0062] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0063] Currently, televisions are generally controlled using Bluetooth remotes, meaning television remotes are typically Bluetooth remotes. Set-top boxes, on the other hand, are generally controlled using infrared remotes, meaning set-top box remotes are typically infrared remotes. Television remotes cannot directly control the set-top box to switch channels (or programs). It is understood that in this embodiment, different channels can play different programs (which can also be described as video), and the program refers to the video content that the set-top box receives, decodes, and transmits to the television in real time. In actual use cases where a television is equipped with a set-top box, the television and set-top box are typically controlled separately using a television remote and a set-top box remote, respectively, which is a very cumbersome operation.

[0064] One possible solution is to integrate an infrared device into the TV remote control. This device could be an infrared chip or other infrared apparatus capable of transmitting and receiving infrared signals. This would allow the TV remote control to send infrared signals to the set-top box. However, the random access memory (RAM) of the integrated infrared device in the TV remote control might be small, while the amount of infrared code data might be large. Therefore, the infrared device might not be able to receive this large amount of data. Furthermore, because the main chip of the TV remote control has a heavy workload, the communication delay between the main chip and the infrared device cannot be guaranteed, making it impossible to send these large amounts of infrared code data to the infrared device in multiple batches. Therefore, this solution cannot simultaneously control both the TV and the set-top box.

[0065] Based on this, this application provides a device control method. When a television receives a control command from a television remote control for a set-top box, it can compress the infrared code corresponding to the control command and send it to the television remote control. After receiving the infrared code, the television remote control can send the corresponding infrared control signal (or infrared waveform signal) to the set-top box, thereby controlling the set-top box. This solves the problem that television remote controls, due to limited RAM, cannot receive infrared codes from the television and thus cannot control the set-top box. A single television remote control can simultaneously control both the television and the set-top box, simplifying operation.

[0066] It is understood that in the embodiments of this application, the TV remote control that can control the TV and the set-top box at the same time can refer to an infrared control device that has the ability to control the TV and the set-top box at the same time. The TV remote control can also be simply referred to as a remote control or have other names. In the following embodiments, the TV remote control will be directly referred to as a remote control.

[0067] For example, Figure 1 shows a schematic diagram of the architecture of a communication system for a device control method provided in an embodiment of this application. As shown in Figure 1, the communication system 100 includes a television set 101, a remote control 102, and a set-top box 103.

[0068] Optionally, the television 101 and the remote control 102 can be connected via Bluetooth (BT) (e.g., classic Bluetooth or Bluetooth Low Energy (BLE)) or wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi)). The television 101 and the set-top box 103 can be connected via a high-definition multimedia interface (HDMI) cable or an audio and video (AV) cable. The remote control 102 and the set-top box 103 can be connected via infrared (IR) cable.

[0069] The television set 101 can be various devices with display functions, such as, but not limited to, televisions, smart screens, personal computers (PCs), artificial intelligence (AI) devices, projectors, etc. This embodiment uses a television set as an example. The television set 101 can receive programs from a set-top box and play those programs. In some embodiments, the television set 101 can also play on-demand video resources from the internet through installed video applications.

[0070] The remote control 102 may have one or more buttons, each with different functions. These include, but are not limited to, number keys, volume up / down buttons, up, down, left, right buttons, confirmation button, power button, back button, home button, and menu button. The remote control 102 can receive user input via these buttons to control the television 101 and set-top box 103. Optionally, the remote control 102 may be a remote control that comes with the television 101, or it may be a device with remote control functionality (such as, but not limited to, mobile phones, tablets, wearable devices, etc.). The device may display a remote control interface with one or more virtual buttons, and the device can also receive user input via these virtual buttons to control the television 101 and set-top box 103.

[0071] The set-top box 103 can connect to an external signal source and a television set 101, converting digital signals into television content and transmitting it to the television set 101. For example, the external signal source can include, but is not limited to, cable TV, satellite antenna, broadband network, and terrestrial broadcasting. Optionally, the set-top box 103 can be a digital television set-top box or a network television set-top box.

[0072] Optionally, in some embodiments, the communication system 100 shown in FIG1 may further include a server 104. The server 104 may store mapping relationships, which may include at least one of the following: a correspondence between remote control buttons and infrared codes, and a correspondence between channels and infrared codes. Optionally, since the infrared codes used by different set-top boxes in different regions and by different operators may differ, the infrared codes in the aforementioned mapping relationships may refer to the infrared codes used by the set-top box 103.

[0073] In some embodiments, the television set 101 can obtain the mapping relationship from the server 104 via wired or wireless communication. Alternatively, the mapping relationship can be directly stored in the television set 101. Exemplary wireless communication methods may include, but are not limited to, wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Zigbee, infrared (IR), cellular, etc. Optionally, the server 104 can be a cloud server or a network server, or other devices or network devices with storage capabilities. The server 104 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.

[0074] Optionally, the operating systems installed in the devices shown in Figure 1 include, but are not limited to, those shown in Figure 1. Alternatively, other operating systems may be installed. Of course, the devices shown in Figure 1 may not have an operating system installed.

[0075] For example, Figure 2 shows a schematic diagram of the structure of a television set 101 provided in an embodiment of this application. As shown in Figure 2, the television set 101 may include a processor 110, a memory 120, a power module 130, an antenna, a wireless communication module 140, a wired communication module 150, an audio module 160, a display screen 170, etc.

[0076] Processor 110 may include one or more processing units, such as application processors, modem processors, graphics processors, image signal processors, controllers, video codecs, digital signal processors, baseband processors, and / or neural network processors. These different processing units may be independent devices or integrated into one or more processors.

[0077] The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions. The processor 110 can also include a memory for storing instructions and data.

[0078] The memory 120 can be used to store program code, including instructions. The memory 120 may include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc. The data storage area may store data created during the use of the television 101, etc. Furthermore, the memory 120 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, general-purpose flash memory, etc. The processor 110 executes various functional applications and data processing of the television 101 by running instructions stored in the memory 120 and / or instructions stored in memory located within the processor.

[0079] In some embodiments of this application, the memory 120 may also be used to store at least one of the following: the correspondence between remote control buttons and infrared codes, and the correspondence between channels and infrared codes.

[0080] The power module 130 can be connected to a power supply to provide power to the processor 110, memory 120, display screen 170, wireless communication module 140, etc.

[0081] The wireless communication function of the television 101 can be achieved through an antenna, a wireless communication module 140, a processor, etc.

[0082] Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in the television set 101 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.

[0083] The wireless communication module 140 can provide wireless communication solutions for use on the television set 101, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Starlink, near field communication (NFC), infrared (IR) technology, and other wireless communication technologies.

[0084] In some embodiments, the antenna and the wireless communication module 140 are coupled, enabling the television 101 to communicate with networks and other devices (such as, but not limited to, the remote control 102) via wireless communication technology.

[0085] The wired communication module 150 can be used to implement the wired communication function of the television 101. For example, the wired communication module 150 may include, but is not limited to, an HDMI communication module 151, a universal serial bus (USB) communication module 152, etc. The HDMI communication module 151 can be used by the television 101 to communicate with the set-top box via the HDMI interface, such as receiving program data from the set-top box, etc. The USB communication module 152 can be used by the television 101 to communicate with other devices via the USB interface.

[0086] The TV 101 can realize audio functions through the audio module 160 and the application processor.

[0087] The audio module 160 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 160 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 160 may be located in the processor 110, or some functional modules of the audio module 160 may be located in the processor 110.

[0088] Display screen 170 is used to display images, videos, etc. Display screen 170 includes a display panel. In some embodiments, television set 101 may include one or N displays screens 170, where N is a positive integer greater than 1. In some embodiments of this application, display screen 170 can be used to display programs received from a set-top box. In other embodiments of this application, display screen 170 can also be used to display on-demand videos received from a network.

[0089] Figure 3 illustrates a schematic diagram of the software structure of a television set according to an embodiment of this application. The layered architecture can be divided into several layers, each with a clear role and division of labor, and the layers communicate with each other through software interfaces. As shown in Figure 3, the television set 101 may include an application layer, a system service layer, and a driver layer.

[0090] The application layer may include a series of application packages, such as a TV application. A TV application can refer to an application capable of enabling the viewing of video programs from a set-top box. In some embodiments, the TV application can obtain the infrared code corresponding to the button operated by the user on the remote control. In other embodiments, the TV application can also obtain the infrared code corresponding to the channel selected by the user. Optionally, the application layer may also include a video-on-demand application. This video-on-demand application enables the playback of on-demand videos from the internet on the television set 101.

[0091] The system service layer can include a series of system services, such as the TV service (TvService). The TV service can obtain the infrared code from the TV application in the application layer and send the infrared code to the remote control driver in the driver layer.

[0092] The driver layer can include remote control drivers, audio drivers, display drivers, etc. The remote control driver receives infrared codes from the TV service in the system service layer and sends the received infrared codes to the remote control. The audio driver can be used to drive the audio module to perform audio output. The display driver can be used to drive the display screen to perform display operations.

[0093] It is understood that the software structure of the television 101 shown in Figure 3 is merely illustrative. In practical applications, it may include more or fewer modules, and the layers to which each module belongs may also differ. Other ways of dividing the layers are also possible, and this application does not impose any restrictions on them.

[0094] The following example illustrates the workflow of television 101 using a scenario where a remote control is used to control a set-top box. For example, as shown in Figure 4, taking a user's button press on remote control 102 to control the set-top box to switch channels as an example, in response to the button press, remote control 102 generates a corresponding button event and sends it to the wireless communication module 140 of television 101. After receiving the button event from the remote control, the wireless communication module 140 sends the button event to the television application. In some embodiments, the button event may carry button representation information, and the television application can obtain the infrared code corresponding to the button based on the button representation information and the correspondence between the button and the infrared code. In other embodiments, the button event may carry channel representation information, and the television application can obtain the infrared code corresponding to the channel based on the channel representation information and the correspondence between the channel and the infrared code. The television application can first send the obtained infrared code to the processor 110 of television 101. The processor 110 performs a compression operation on the infrared code and sends the compressed infrared code to the television service. The television service then sends the compressed infrared code to the remote control driver. The remote control driver sends the compressed infrared code back to the remote control via the wireless communication module 140. The remote control then converts the received infrared code into an infrared control signal and sends it to the set-top box 103. The set-top box 103 can perform a channel switching operation based on the received infrared control signal and transmit the switched channel data to the HDMI communication module 151 of the television 101, thereby enabling control of the set-top box.

[0095] It is understood that, in the embodiments of this application, the correspondence between buttons and infrared codes can also refer to the correspondence between information used to represent buttons (such as various representational information including but not limited to button identifiers, button symbols, or button names) and infrared codes. The button events generated by the remote control can also carry the representational information of the button. Similarly, the correspondence between channels and infrared codes can refer to the correspondence between information used to represent channels (such as various representational information including but not limited to channel numbers, channel names, etc.) and infrared codes. The button events generated by the remote control can also carry the representational information of the channel.

[0096] For example, Figure 5 shows a schematic diagram of the structure of a remote control provided in an embodiment of this application. As shown in Figure 5, the remote control 102 may include a processor 510, a memory 520, an antenna, a wireless communication module 530, an infrared device 540, a power module 550, a button module 560, etc.

[0097] Processor 510 can be used to read and execute instructions. Optionally, processor 510 may also include one or more processing units, the details of which can be found in the description of processor 110 shown in FIG2. In some embodiments of this application, processor 510 can parse infrared codes received from television set 101, such as performing decompression operations.

[0098] The memory 520 can be used to store program code, which includes instructions. The processor 510 executes various functional applications and data processing of the remote controller 102 by running the instructions stored in the memory 520 and / or the instructions stored in the memory disposed in the processor. Optionally, the memory 520 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, etc.

[0099] The antenna is used to transmit and receive electromagnetic wave signals. The wireless communication module 530 can be used to provide wireless communication solutions for the remote control 102, including wireless local area networks (WLANs) (such as Wireless Fidelity (Wi-Fi) networks), Bluetooth (BT), and other wireless communication methods. In some embodiments of this application, the antenna and the wireless communication module 140 are coupled, enabling the remote control 102 to communicate with the television 101 via Bluetooth, wireless communication, WLAN, etc.

[0100] Infrared device 540 can be used to implement IR functionality. In some embodiments of this application, infrared device 540 can be used to enable communication between remote controller 102 and set-top box 103.

[0101] The power module 550 is used to supply power to one or more of the processor 510, memory 520, wireless communication module 530, and infrared device 540.

[0102] The button module 560 may include one or more buttons, each capable of performing different functions. For a description of these buttons, please refer to the description of the buttons on the remote control 102 described above. The remote control 102 can receive button inputs and generate key signal inputs related to user settings and function control of the remote control 102.

[0103] It is understood that the structures illustrated in Figures 2, 3, and 5 do not constitute a specific limitation on the television set 101 and the remote control 102. In other embodiments of this application, the television set 101 or the remote control 102 may include more or fewer components than illustrated. For example, the remote control 102 may also include an audio module that can receive voice commands input by the user. Alternatively, some components may be combined, some components may be separated, or different components may be arranged. The processing steps or functional characteristics of the illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0104] The technical solutions involved in the following embodiments can all be implemented in devices with the structures shown in Figures 2, 3, and 5, as well as in systems with the architecture shown in Figure 1.

[0105] The following is a description of a scene where a video is played on a television, with reference to the accompanying diagram.

[0106] In some scenarios, televisions can play programs from set-top boxes. For example, when a television is turned on, it can display a selection interface 600 as shown in Figure 6(1), allowing the user to select the signal input source for the television program they want to watch. This signal input source can include a network television input source, a set-top box program input source, etc. As shown in Figure 6(1), the selection interface 600 can include one or more controls (or buttons), such as input source control 601, television control 602, etc. Among them, input source control 601 and television control 602 are both set-top box program input sources. Users can watch programs from the set-top box through input source control 601 or television control 602.

[0107] Taking input source control 601 as an example, when the TV detects a user's click operation on input source control 601, in response to the operation, the TV can output a reminder message as shown in Figure 6(2) to remind the user to start receiving video data from the HDMI 1 interface. Then, as shown in Figure 6(3), the TV can display the program playback interface 620, which is an example of playing a program on channel 1 in Figure 6(3). Here, HDMI 1 is the HDMI interface of the TV connected to the HDMI cable of the set-top box. Optionally, a TV can have one or more HDMI interfaces, and the user can connect the HDMI interface of the TV to the HDMI cable of the set-top box according to actual needs. For example, when the HDMI interface of the HDMI cable connecting the TV to the set-top box is HDMI 3, the user can switch or set the HDMI interface corresponding to input source control 601, that is, switch the signal input source of the program. The above example is based on the HDMI interface corresponding to input source control 601 being HDMI 1.

[0108] It is understood that the interface shown in Figure 6(2) can be an optional interface. In other embodiments, the television can also directly jump to the program playback interface shown in Figure 6(3) after detecting a user's click operation on the input source control 601.

[0109] As shown in Figure 6(1), the selection interface 600 can also display a switching input source control 603, which allows the user to switch the signal input source of the program. If the TV detects a user's click on the switching input source control 603, in response to the operation, as shown in Figure 6(4), the TV can present one or more of its HDMI interfaces (such as HDMI 1, HDMI 2, HDMI 3, etc.) for the user to select. The user can select the corresponding HDMI interface, such as HDMI 3, according to the actual connection between the TV and the set-top box. Furthermore, when the TV detects a user's selection of HDMI 3, in response to the operation, the TV switches the HDMI interface corresponding to the input source control 601 to HDMI 3. Further, when the TV detects another user's click on the input source control 601, in response to the operation, the TV can start receiving data from the HDMI 3 interface. Of course, the signal input source can also be set or switched through other button operations, gesture operations, semantic operations, etc.

[0110] Optionally, in the scenario shown in Figure 6, before the TV starts receiving video data from the HDMI interface and playing programs from the set-top box, various control operations performed by the user on the TV, such as clicking the input source control 601 shown in Figure 6 (1) and selecting the HDMI interface shown in Figure 6 (4), and other operations not used for switching programs, can be achieved by pressing a button on the remote control. In other words, the user can control the TV using the remote control.

[0111] In some embodiments, when the television is playing a program such as shown in Figure 6 (3), the user can also switch channels to watch programs on different channels.

[0112] As one possible switching method, the user can directly press the up or down button on the remote control. In response to this operation, the TV can play the program of the previous or next channel of channel 1. As shown in Figure 7 (1), taking the user pressing the up button 701 on the remote control and the previous channel of channel 1 being channel 2 as an example, the TV can jump from the interface shown in Figure 6 (3) to the interface shown in Figure 7 (2) to play the program of channel 2.

[0113] As another possible switching method, users can access a channel list via buttons on the remote control. This channel list can include one or more channels supported by the set-top box, allowing direct channel switching. For example, as shown in Figure 7(3), if the button on the remote control used to access the channel list is the menu button 721 shown in Figure 7(3), pressing the menu button 721 will display a channel list 730 on the television, as shown in Figure 7(4). The channel list 730 displays one or more channels, such as legal channels, news channels, sports channels, local channels, and satellite channels. Users can select a channel using the up button 701, down button 722, and confirmation button 723, as shown in Figure 7(3). Furthermore, in response to the channel selected by the user through the channel list 730, the television can also jump to the playback interface of that channel (not shown in Figure 7).

[0114] As other possible switching methods, the remote control can also include number keys, such as but not limited to "1-9". Users can switch channels by pressing number keys. For example, pressing the number 1 key will switch the TV directly to the channel corresponding to number 1. Alternatively, the remote control can support voice commands. Users can input the voice command "switch to channel xx", and the TV will switch directly to the channel corresponding to that voice command. Alternatively, the remote control can bring up the TV's search bar, where users can enter channel keywords. The TV will then switch directly to the channel corresponding to the entered keyword.

[0115] It's understandable that the above are just a few examples of how to switch TV channels using a remote control. In practice, there may be more or fewer switching methods. It's also understandable that all channel switching operations performed by the user via the remote control can be considered as operations of the set-top box.

[0116] In other scenarios, televisions can also play on-demand videos from the internet. For example, various video applications for playing on-demand videos can be installed on the television, and users can watch on-demand videos through these video applications. For instance, an icon 604 of video application 1 can also be displayed in the selection interface 600 shown in Figure 6 (1). Users can perform operations such as clicking on the icon 604 of video application 1, and in response to this operation, as shown in Figure 8 (1), the television can present the running interface 800 of video application 1. One or more on-demand video resources (such as TV series, movies, variety shows, etc.) can be displayed in the running interface 800 of video application 1, and users can select on-demand videos to watch according to their actual needs. Taking on-demand video 1 as an example, if the television detects the user's operation of playing on-demand video 1, in response to this operation, as shown in Figure 8 (2), the television can display the episode selection interface 810 of on-demand video 1. Users can select any episode to watch through the episode selection interface 810. It is understandable that Figure 8(2) takes the on-demand video 1 as a TV series as an example. When the on-demand video is a short video or a movie, the TV can detect the user's operation of playing the on-demand video 1 and directly present the playback interface of the on-demand video 1.

[0117] In some embodiments, users can also switch between on-demand videos using buttons on the remote control to watch different on-demand videos. For example, users can search for or select the desired on-demand video in the operating interface 800 using buttons on the remote control. It can be understood that in this scenario, all operations performed by the user on the television using the remote control can be considered as controlling the television.

[0118] The above describes the scenario of a television playing video. The following describes the process of controlling a set-top box to switch channels. For example, Figure 9 shows a flowchart of a device control method provided in an embodiment of this application. As shown in Figure 9, the method includes the following steps:

[0119] S901, Remote control receiving operation.

[0120] In some embodiments, the operation can be a control operation of the set-top box, such as, but not limited to, controlling the set-top box to switch channels, turn on, turn off, increase volume, decrease volume, etc. For example, when the operation is for selecting a first channel, this operation can be the first operation. Optionally, the television may not be playing video data from the set-top box at this time. When the operation is for switching to a second channel, this operation can be the second operation. The first channel and the second channel are different.

[0121] In other embodiments, the operation can be an operation to control the television (which may be a third operation), such as, but not limited to, controlling the television to switch on-demand videos, turn it on, turn it off, increase the volume, decrease the volume, or switch the signal input source of the program.

[0122] For example, this operation can include, but is not limited to, operations on buttons on the remote control, voice commands, etc. When this operation is used to control the set-top box to switch channels, it can be any of the channel switching operations described above.

[0123] S902, In response to the operation, the remote control sends information 1 to the television. Correspondingly, the television can receive information 1 from the remote control.

[0124] Here, information 1 (or described as a control command) can be generated based on the operation in step S901. Optionally, the remote control can generate information 1 based on the operation in step S901 before sending information 1 to the television. Optionally, information 1 can also have other names, for example: when the operation is a button operation on the remote control, information 1 can also be called a button event. For example: the control command corresponding to the first operation can be called the first control command, the control command corresponding to the second operation can be called the second control command, and the control command corresponding to the third operation can be called the third control command.

[0125] Information 1 may carry representation information of the control command corresponding to the operation in step S901. Optionally, this representation information may be any information that can represent the control command and can be recognized by the television, such as command code, command name, button representation information, channel representation information, etc. For example: when the control command corresponding to the operation is to control the television to turn on, information 1 may carry representation information of controlling the television to turn on. Another example: when the control command corresponding to the operation is to control the television to switch to on-demand video, information 1 may carry representation information of on-demand video. Yet another example: when the control command corresponding to the operation is to control the set-top box to switch channels, information 1 may carry channel representation information. And yet another example: when the control command corresponding to the operation is to control the set-top box to turn off, information 1 may carry representation information of controlling the set-top box to turn off, etc. Combining the above different control commands, the first control command may carry representation information of the buttons on the remote control, or representation information of the first channel.

[0126] Optionally, the representation information of the control command used to control the set-top box can be different from the representation information of the control command used to control the television. For example, both turning off the television and turning off the set-top box can be achieved using the power off button on the remote control. When turning off the television, the operation in step S901 can be pressing the power off button on the remote control, and correspondingly, information 1 can carry representation information for pressing the power off button. Similarly, when turning off the set-top box, the operation in step S901 can be pressing and holding (e.g., for 3 seconds or other duration) the power off button on the remote control, and correspondingly, information 1 can carry representation information for holding the power off button. The representation information for pressing the power off button and the representation information for holding the power off button are different. This allows the television to easily identify the control command after receiving the representation information of the control command carried in information 1, and to determine whether the control command is executed by the television or the set-top box.

[0127] It is understandable that the above example demonstrates how different operations on the same button on the remote control can achieve the same type of control over both the TV and the remote (such as turning the TV off, on, increasing volume, decreasing volume, etc.). In other examples, the same or different operations on different buttons on the remote control can also achieve the same type of control over both the TV and the remote. In this example, the representation information of the control command for controlling the set-top box carried in information 1 can also be different from the representation information of the control command for controlling the TV.

[0128] Alternatively, the representation information of the control command used to control the set-top box can be the same as the representation information of the control command used to control the television. For example, when controlling the television to switch on-demand videos and controlling the set-top box to switch channels, both can be achieved using the up or down button on the remote control. The operation in step S901 can be pressing the up or down button on the remote control. Correspondingly, the representation information of the control command carried in information 1 can be the representation information of the up or down button. In this way, the representation information of the control command used to control the set-top box to switch channels is the same as the representation information of the control command used to control the television to switch on-demand videos. At this time, it can also be determined whether the control command is executed by the television or the set-top box based on the interface presented by the television when receiving information 1. For example, if the interface presented by the television is not the playback interface of a program from the set-top box, it can be determined that the control command is executed by the television. Conversely, if the interface presented by the television is the playback interface of a program from the set-top box, it can be determined that the control command is executed by the set-top box. Optionally, based on the interface displayed when the television receives information 1, it can be determined whether the control command is executed by the television or by the set-top box. This operation can be executed by the television or by other devices besides the television, such as a remote control or other devices.

[0129] In some embodiments, when the representation information of the control instruction carried in information 1 is used to control the television, that is, when it is a control instruction for controlling the television, that is, when the operation in step S901 is an operation for controlling the television, the television can execute step S903.

[0130] In other embodiments, when the representation information of the control command carried in information 1 is used to control the set-top box, that is, when it is a control command for controlling the set-top box, that is, when the operation in step S901 is an operation for controlling the set-top box, the television can execute steps S904 to S909.

[0131] Optionally, in the embodiment shown in Figure 9, the remote control and the television can be connected via Bluetooth or Wi-Fi, and various information can be sent and received based on this connection, such as information 1 mentioned in step S902, the compression result of the infrared code in step S906, etc., which will be described uniformly here.

[0132] S903, the control operation corresponding to TV response information 1.

[0133] Among these, the control operation (which can be described as the target operation) is an operation unrelated to playing video data from the set-top box. When the control operation corresponding to information 1 is different—that is, when the control command information carried in information 1 is used to control the television to perform different operations—the television's response operation can be different. For example: when the control operation corresponding to information 1 is to turn off the television, the television's response operation is to turn off the television. Another example: when the control operation corresponding to information 1 is to switch to the next on-demand video, the television's response operation is to play the next on-demand video. Yet another example: when the control operation corresponding to information 1 is to select the next control, the television's response operation is to select the next control, and so on.

[0134] S904, the television obtains the infrared code based on information 1.

[0135] In some embodiments, the television or other device may have a pre-set correspondence between control commands (which may be representation information of the control commands) and infrared codes. The television can obtain the infrared code corresponding to the control command based on the control command carried in information 1 and the correspondence between the control command and the infrared code.

[0136] It is understood that in this embodiment, the set-top box is controlled via infrared codes. That is, the set-top box can identify the infrared codes and respond to the corresponding control operations. Optionally, since different set-top boxes may use different infrared codes, the correspondence between the control commands and infrared codes may differ for different set-top boxes. Furthermore, the infrared codes corresponding to the same control command may also differ for different set-top boxes.

[0137] As a possible example, taking a server with a pre-set mapping between control commands and infrared codes as an example, the server can pre-set the mapping between control commands and infrared codes for different set-top boxes. After a set-top box is configured on the television, the television can retrieve the mapping between the control commands and infrared codes corresponding to that set-top box from the server and save it locally. Subsequently, when the television receives information 1, it can retrieve the infrared code corresponding to that control command based on the control command carried in information 1 and the locally stored mapping between control commands and infrared codes. Alternatively, the television can also, upon receiving information 1, retrieve the infrared code corresponding to the control command carried in information 1 from the server based on the configured set-top box and information 1.

[0138] Taking the scenario of remote control controlling the set-top box to switch channels as an example, the correspondence between the above control commands and infrared codes (the correspondence here can be described as a preset mapping relationship) can specifically include at least one of the correspondence between buttons (which can be the characterization information of buttons) and infrared codes, and the correspondence between channels (which can be the characterization information of channels) and infrared codes.

[0139] Accordingly, in this scenario, in some embodiments, information 1 may carry information representing the key press. For example, when a user controls the set-top box to switch channels by pressing a number key, up key, or down key on the remote control, that is, when the operation in step S901 is a channel switching operation by pressing a number key, up key, or down key on the remote control, information 1 may carry information representing the key press by the user.

[0140] In this scenario, in some other embodiments, information 1 may carry channel representation information. For example, when a user directly selects a channel in a channel list 730 such as shown in Figure 7 (4) using a remote control, or when a user directly inputs the name of a channel into the remote control via voice command, information 1 may carry representation information of the channel selected by the user.

[0141] In this embodiment, information 1 directly carries the representation information of the channel to be displayed (i.e., to be switched). In other implementations, the representation information of the channel to be displayed can also be determined by the television based on information 1. For example, the television or other device can store a channel list, which can include the representation information of at least one channel. The representation information of each channel can be arranged in the channel list according to a specified sequence number (e.g., from sequence number 1 to sequence number m, where m is the number of representation information of the channels included in the channel list, and m is an integer greater than or equal to 1). Furthermore, information 1 can carry the representation information of buttons. The television can determine the representation information of the channel to be displayed based on the channel list, the representation information of the currently displayed channel, and the representation information of the buttons carried in information 1. For example, assuming that the currently displayed channel on the television is channel number 1, and the representation information of the button carried in information 1 is the representation information of the down button, then the television can determine that the representation information of the channel to be displayed is channel number 2. Alternatively, when a user directly selects a channel in a channel list 730, such as shown in Figure 7 (4), using a remote control, the television can determine the representation information of the channel to be displayed by recognizing the content on the screen based on the key representation information carried in Information 1.

[0142] S905, the television performs compression operation on the infrared code.

[0143] Optionally, for the representation information of a button or a channel, the corresponding infrared code can be composed of a series of codewords (or sub-codes). Different infrared codes may include different codewords. Optionally, in this embodiment, each codeword in the infrared code can be stored in binary form, and each codeword can be composed of "0" and "1". In other words, the infrared code is stored in binary form. The television can sequentially encode and compress each codeword into the infrared code.

[0144] The larger the codeword, the more binary bits it contains, meaning the longer the codeword. For example, a codeword of 1680 can be represented as "11010010000" in binary. Conversely, the smaller the codeword, the fewer binary bits it contains, meaning the shorter the codeword. For example, a codeword of 16 can be represented as "10000" in binary.

[0145] Therefore, in some embodiments, the television may use shorter bits to represent a codeword, that is, use a smaller value to represent a codeword.

[0146] In this embodiment, as one possible implementation, the television can compress the codewords based on their frequency of occurrence. For codewords with high frequency of occurrence, a relatively short number of binary bits are used to represent them. This results in shorter compressed codewords, leading to less data in the compressed infrared code and better compression performance. For example, for codewords with a frequency greater than or equal to a preset threshold (or described as a preset frequency threshold), a first number of bits are used to represent the codeword, meaning the encoded code includes the first number of bits. For codewords with a frequency less than the preset threshold, a second number of bits are used to represent the codeword, meaning the encoded code includes the second number of bits. The first number is less than the second number. Optionally, the aforementioned bits can be binary bits. In other words, the preset threshold can be determined based on the frequency of occurrence of the codewords included in the infrared code. Furthermore, for codewords with higher frequency of occurrence, fewer bits are used to represent them.

[0147] For example, taking the infrared code 1000 (which can be considered as an example of a second infrared code) consisting of 9000 to 96190 as shown in Figure 10, this infrared code 1000 is based on the NEC uPD6121G communication protocol used by the set-top box. Optionally, when the set-top box uses different communication protocols, the corresponding infrared codes for the same button representation information or the same channel representation information may be different. Referring to the infrared code 1000 shown in Figure 10, the specific implementation of codeword compression based on the frequency of codeword occurrence will be introduced.

[0148] As shown in Figure 10, the infrared code 1000 includes multiple codewords, such as 560, 1680, 9000, 2250, 4500, 40180, and 96910. These codewords appear with varying frequencies. For example, in this infrared code, as shown in the statistical results of Figure 10, 560 appears 50 times, 1680 appears 16 times, 9000 appears twice, and 2250, 4500, 40180, and 96910 each appear once. Among these, 560 and 1680 appear more frequently, while 9000, 2250, 4500, 40180, and 96910 appear less frequently.

[0149] 560 and 1680 can be represented using relatively short binary bits, while 9000, 2250, 4500, 40180, and 96910 can be represented using relatively long binary bits. In other words, the number of bits used to represent 560 and 1680 can be less than the number of bits used to represent 9000, 2250, 4500, 40180, and 96910. Taking the representation of these codewords using two bits and four bits as examples, as shown in Figure 10, 560 and 1680 are represented using two bits, and are represented as "00" and "01" respectively. 9000, 2250, 4500, 40180, and 96910 are represented using four bits, and are represented as "1000", "1001", "1010", "1011", and "1100" respectively.

[0150] Furthermore, if two codewords represented by two bits appear consecutively in the infrared code, they can be combined into a four-bit representation. For example, in the codewords shown in Figure 10, 560 and 1680 are adjacent; the "00" representing 560 and the "01" representing 1680 can form the four-bit "0001". Similarly, in the codewords shown in Figure 10, 560 and 560 are adjacent; the "00" representing each 560 can form the four-bit "0000". Thus, directly combining two two-bit codewords into a four-bit representation ensures that the codeword can be represented using four bits and guarantees successful decompression and reconstruction of the infrared code when reading four bits at a time.

[0151] Optionally, if a codeword represented by two bits is followed by a codeword represented by four bits, then "11" is added after the two-bit codeword to make the two-bit codeword represented by two bits appear as a four-bit codeword. For example, in the codewords shown in Figure 10, there is a case where 560 represented by "00" is followed by 2250 represented by "1001". In this case, "11" can be added after 560 represented by "00", i.e., "0011" is used to represent 560. It can be understood that in this example, since the codewords represented by two bits only include 560 and 1680, there may be cases where "11" is added after 560 and 1680. The previous example has already introduced the result of adding "11" to 560. The result of adding "11" to 1680 represented by "01" is "0111", i.e., 0111 is used to represent 1680. In this way, by using "11" for padding, it can be ensured that the padded codeword can be represented by four bits, and it can also be ensured that the padded codeword is not repeated with the codewords directly represented by four bits (such as 9000, 2250, 4500, 40180, 96910, etc.), thus ensuring that subsequent decompression and restoration of infrared code can be successful.

[0152] Optionally, if a codeword still exists that is represented by two bits, it can be padded with "00" to make it a four-bit codeword. For example, based on the examples described above, there might be cases where "00" is padded to 560 and 1680. It should be noted that the padded result must not repeat the four-bit codewords described above, including but not limited to four-bit codes formed due to sequential adjacency, directly used four-bit codes, and four-bit codes padded with "11". Therefore, the result of padded "00" to 560 is "0000", and the result of padded "01" to 1680 is "0100". This ensures that the padded codeword can be represented by four bits and that the padded codeword does not repeat the representation of other codewords, guaranteeing successful decompression and restoration of the infrared code.

[0153] For example, in conjunction with the above scheme, Figure 10 shows the result of representing the codewords in the infrared code 1000 shown in Figure 10 with the corresponding number of bits. As shown in Figure 10, in the infrared code 1000, the codewords from the beginning "9000" to the end "96160" can be compressed into "138", "16", "0", and so on up to "60".

[0154] In some embodiments, to facilitate the receiving end's successful decompression of the compressed codewords and restoration of the infrared code after receiving them, the compressed infrared code result (i.e., the compressed infrared code) may also include a dictionary (which can describe a first dictionary), the number of codewords, etc. The dictionary may include all the different codewords in the infrared code. For example, referring to the example shown in Figure 10, the compressed infrared code result (which can serve as an example of the first infrared code) may be as shown in Figure 10, with a dictionary of [5680, 1680, 9000, 2500, 4500, 40180, 96190] and a codeword count of 72. This compressed result may include two arrays: a dictionary array and an array consisting of the number of codewords and the compressed codewords. Optionally, the number of codewords may be located at a specific position in the array consisting of the number of codewords and the compressed codewords, such as at the beginning (as used in Figures 10 to 18) or the end, to facilitate the receiving end's identification.

[0155] Optionally, the codewords in the dictionary can be sorted by frequency of occurrence in the infrared code from high to low, from low to high, or by other orders. Using the above scheme, the infrared code 1000 before compression, as shown in Figure 10, is 289 bytes, while the compressed result, as shown in Figure 10, is 37 bytes, achieving a compression rate of 12.8%, which significantly reduces the data size.

[0156] In some scenarios, the number of different codewords included in the infrared code may be large, and the difference between some codewords may be less than or equal to a preset difference. For example, the preset difference can be a relatively small value such as 10 or 20, and can be set based on empirical values. In this scenario, to further increase the compression ratio of the infrared code, in some implementations, codewords with differences less than or equal to the preset difference can be represented using the same binary bits. Optionally, a dictionary in the compression result can be determined based on these codewords with differences less than or equal to the preset difference. For example, the mode of these codewords (i.e., the codeword that appears most frequently in the infrared code) can be used as the codewords in the dictionary. In other words, for codewords with differences less than or equal to the preset difference, only the mode of these codewords is included in the dictionary; that is, the dictionary can include some different codewords from the infrared code. This makes the decompression result more accurate during subsequent decompression, improving the restoration accuracy of the infrared code.

[0157] It is understood that the above examples use two bits or four bits to represent codewords. In other embodiments, other numbers of bits (such as three bits, five bits, etc., less than the number of bits included in the original codeword) can also be used to represent codewords in order to compress infrared codes.

[0158] The above example uses infrared codes generated when the set-top box employs the NEC uPD6121G communication protocol. In other examples, the set-top box may use other communication protocols, such as TC9012, SAA3010RC-5, M50560, DVB-40BIT, DVB / Pan7051 / SAMSUNG, PHILIPS, HuiZhou, TOPWAY-HDDVB, etc. Figures 11 to 18 sequentially show examples of infrared code compression using these communication protocols. Taking Figure 11 as an example, the codewords in the infrared code using the TC9012 include 296 bytes of data such as 4511, 4507, 565, 566, 1696, 1695, 264, 567, 46157, 4512, and 96411. Based on the above scheme, one or more of the following are used to represent the codewords sequentially: "00", "01", "1000", "1001", "1010", "1011", "1100", "1101", "1110", and "1111". After performing a bitwise OR operation such as padding with "11" or "00", the compression result is shown in Figure 11. This compression result includes a dictionary [565, 1696, 4511, 46157, 96411], 74 codewords, and the compressed data. The compressed result is 32 bytes, achieving a compression rate of 10.8%. It is understandable that Figure 11 uses the same binary bits to represent codewords with a difference less than or equal to a preset difference, such as "565", "564", "566", and "567". Accordingly, 565 is used as an example of a codeword included in the dictionary of the compression result. For a description of Figures 12 to 18, please refer to the descriptions of Figures 10 and 11.

[0159] It is understandable that the number of different codewords included in the infrared code may vary in different communication protocols. However, one or more of two bits, four bits, etc., can still be used to represent the codewords, but the number of two bits or four bits used may differ from the example shown in Figure 10. Figure 10 includes seven different codewords, which are represented by two two-bits and five four-bits. In other protocols, if fewer than seven different codewords are included, fewer than seven bits (such as two two-bits and fewer than five four-bits, or fewer than or equal to two two-bits) can be used to represent these codewords. Conversely, if more than seven different codewords are included, two two-bits and more than five four-bits can be used to represent these codewords. Optionally, if all four bits are insufficient to represent all the codewords, more bits (such as including but not limited to six bits, eight bits, etc.) can be used to represent these codewords, and so on.

[0160] As another possible implementation, the television can first perform a specific operation on the codewords included in the infrared code, performing a first compression operation. For example, as a possible calculation method, the television can divide the codeword by a preset value and round the result down. For instance, the preset value could be 1000 or 38, both of which can be empirical values. Taking the infrared code 1000 shown in Figure 10 as an example again, 560 divided by "1000 / 38" and rounded down yields a value of 21. In this way, through the first compression operation, codewords of similar size contained in the infrared code can be represented by the same numerical value.

[0161] Next, the television can sequentially encode the data (which can be described as the target codeword) after the first compression operation to obtain the compressed infrared code. Optionally, the frequency of the data after the first compression operation appearing among all the data after the first compression operation can be negatively correlated with the size of the encoded data after the first compression operation. That is, the higher the frequency of the data after the first compression operation, the smaller the size after encoding.

[0162] In some implementations, the television can sort the data based on the frequency of occurrence after the first compression operation, resulting in a sorted dictionary (which can be described as a second dictionary). This sorted dictionary can include each compressed data item and its corresponding frequency. For example, the sorted dictionary can be represented as [(21, 50), (63, 16), (342, 2), (85, 1), (171, 1), (1526, 1), (3682, 1)], where 50 represents the frequency of occurrence of 21, 16 represents the frequency of occurrence of 63, and so on. In some embodiments, the data in this sorted dictionary can be sorted from highest to lowest frequency. For each data item after the first compression operation in the sorted dictionary, the data can be represented based on the size of its corresponding array index in the sorted dictionary. Optionally, generally, based on the patterns of codewords in infrared codes of different communication protocols, the number of different data items after the first compression operation will not exceed 16, therefore, hexadecimal can be used to represent these data.

[0163] For example, in this embodiment, "21" is the first position in the sorting dictionary, and its corresponding array index size is 0, so "21" can be represented by "00". "63" is the second position in the sorting dictionary, and its corresponding array index is 1, so "63" can be represented by "01". Similarly, "342" can be represented by "02", "85" by "03", "171" by "04", "1526" by "05", and "3685" by "06". In this embodiment, the range of array index size is greater than or equal to 0 and less than or equal to the number of data after the first compression operation included in the sorting dictionary minus 1. In the sorting dictionary, the array index size for each data after the first compression operation is the order of that data among all the data after the first compression operation included in the sorting dictionary minus 1.

[0164] In other embodiments, the data in the sorting dictionary can also be sorted in ascending order of frequency. For example, in this embodiment, the sorting dictionary can be represented as [(3682, 1), (1526, 1), (171, 1), (85, 1), (342, 2), (63, 16), (21, 50)]. In this embodiment, for each piece of data in the sorting dictionary after the first compression operation, the data can be represented by subtracting 1 from the number of compressed data items in the dictionary, and then subtracting the size of the array index corresponding to that data item in the sorting dictionary. For example, in this embodiment, the sorting dictionary includes 7 pieces of data after the first compression operation, and "21" is the last item in the sorting dictionary, corresponding to an array index size of 6. Therefore, "21" can also be represented as "00".

[0165] Thus, in the two embodiments described above, directly using two-bit hexadecimal to represent the data after the first compression operation facilitates the subsequent construction of four bits, enabling successful decompression and restoration of the infrared code each time four bits are read for decompression.

[0166] Furthermore, each pair of adjacent two bits can be combined to form a four-bit representation. For example, taking the infrared code 1000 shown in Figure 10 as an example, 9000 is represented by "02" and 4500 is represented by "04", thus forming a "0204" representation. Optionally, in some embodiments, when the number of consecutive occurrences of a certain two bits is greater than or equal to a preset number of occurrences (also known as a preset repetition count), another compression operation can be performed. That is, if the value after encoding the target codeword appears consecutively n times, the value after encoding the nx-th target codeword to the value after encoding the nth target codeword is re-encoded to a size of nx, where x is the preset repetition count, and n and x are both positive integers.

[0167] For example, the preset number threshold can be set based on empirical values, such as 3 or other values. Taking a preset number threshold of 3 as an example, the compression operation can include: adding "0xF" after the third occurrence of the two bits, and then adding an extra four bits after "0xF" to indicate the number of times the aforementioned repeated two bits continue to appear after 0xF, using this extra four bits to replace the subsequent repeated two bits. For example, referring to the infrared code 1000 example shown in Figure 10, after the first occurrence of 1680, 560 appears 9 times consecutively. 560 is represented by "00", meaning that "00" appears 9 times consecutively. Then, when "00" appears for the 3rd time, "0xF" can be added after it. Then, after "0xF", "00" continues to appear 6 times consecutively, and the four bits "0006" corresponding to the number of times "00" appears can be used to represent the subsequent 6 occurrences of "00". In this way, directly using the number of consecutive occurrences of two bits to represent these consecutive two bits can further improve the compression rate of the infrared code.

[0168] Similarly, to facilitate the receiving end's successful decompression of the codewords and restoration of the infrared code after receiving the compressed codewords, this implementation may include the empirical value (i.e., the preset value) used in the first compression operation, the sorting dictionary, the number of codewords included in the infrared code, the four-bit representation formed by each two adjacent bits, and the data after the conversion by the next compression operation.

[0169] It is understood that step S905 uses the example of a television performing a compression operation on the infrared code. In other embodiments, the compression operation can also be performed by other devices (such as a server with computing capabilities), and the other devices can then send the compressed infrared code to the television.

[0170] S906: The television sends the compressed infrared code result to the remote control. Correspondingly, the remote control receives the compressed infrared code result from the television.

[0171] For example, when the remote control sends a first control command to the television via step S902, the compressed result of the infrared code sent by the television to the remote control can be called the first infrared code. The original infrared code obtained by compression of the first infrared code can be called the second infrared code, which corresponds to the first control command. When the remote control sends a second control command to the television via step S902, the compressed result of the infrared code sent by the television to the remote control can be called the third infrared code. The original infrared code obtained by compression of the third infrared code can be called the fourth infrared code, which corresponds to the second control command.

[0172] S907: The remote control sends an infrared control signal to the set-top box. Correspondingly, the set-top box can receive the infrared control signal from the remote control.

[0173] Infrared control signals can be used to control the set-top box to transmit channel data (such as video data) to the television.

[0174] Optionally, the infrared control signal can be generated by the remote control based on infrared code modulation. For example, the infrared control signal can be a high- or low-level signal. For instance, the infrared control signal corresponding to the first infrared code can be called the first infrared control signal, which can be used to control the set-top box to transmit video data of a first channel to the television. The infrared control signal corresponding to the third infrared code can be called the second infrared control signal, which is used to control the set-top box to transmit video data of a second channel to the television.

[0175] In some embodiments, before executing step S907, the remote control can first perform a decompression operation, that is, restore the infrared code based on the compression result of the infrared code, and then modulate the restored infrared code to generate an infrared control signal. For example, taking the above-mentioned scheme of compressing codewords based on the frequency of codeword occurrence as an example, after receiving the compression result of the infrared code, the remote control can identify the dictionary, the number of codewords, and the data after infrared code compression from the compression result. Then, the remote control can parse the data after infrared code compression based on at least one of the dictionary, the number of codewords, etc., to restore the infrared code. As shown in the example in Figure 10, the remote control can read four bits at a time from the data after infrared code compression. For example, if the four bits read are "1000", the remote control determines based on a preset algorithm that "1000" corresponds to the 3rd bit in the dictionary, i.e., 9000, and can then restore the codeword 9000. The remote control can decompress the codewords in the remote control in the aforementioned manner to restore the infrared code.

[0176] For example, taking the compression scheme described above, which involves performing specific operations on the codewords included in the infrared code, as an example, after receiving the compression result of the infrared code, the remote control can identify the preset value, sorting dictionary, number of codewords, and compressed data from the compression result. Then, the remote control can parse the compressed data of the infrared code based on at least one of the preset value, number of codewords, and sorting dictionary to restore the infrared code. Using the example of this scheme described above, the remote control can also read four bits at a time from the compressed data of the infrared code. For example, assuming the four bits read are "0204", the remote control can determine that "02" corresponds to the 3rd bit in the sorting dictionary, i.e., 342. Next, the remote control can perform specific operations based on the preset value and 342 to decompress the codeword. For example, multiplying 342 by the preset value yields 9000, thus restoring the codeword 9000. Similarly, the remote control can also decompress the codewords in the remote control sequentially in the aforementioned manner to restore the infrared code.

[0177] It is understood that the above embodiments use a remote control to perform the decompression operation as an example. In other embodiments, the decompression operation can also be performed by other devices besides the remote control (such as a set-top box or other devices). That is, the remote control can directly modulate the compressed infrared code into the corresponding infrared control signal and send it to the set-top box. For the implementation of the set-top box performing the decompression operation, please refer to the relevant implementation when the remote control performs the operation.

[0178] In some embodiments, in conjunction with the scenario described above where the remote control controls the set-top box to switch channels, the method shown in Figure 9 may further include steps S908 to S909. Optionally, in scenarios where the remote control controls the set-top box to perform operations other than channel switching, such as controlling the set-top box to turn on, turn off, increase volume, or decrease volume, the set-top box can directly respond to the remote control's control, without needing to execute steps S908 to S909.

[0179] S908: The set-top box sends channel data to the television. Correspondingly, the television receives the channel data from the set-top box.

[0180] Optionally, the channel data can be the channel's video data, such as the data for the first channel mentioned above. It can also be the video data for the switched channel, such as the data for the second channel mentioned above. Optionally, before sending the channel data to the television, the set-top box can also obtain the channel data based on the received infrared control signal.

[0181] Optionally, the set-top box and the TV can transmit data for this channel via an HDMI cable.

[0182] S909, data for television broadcast channels.

[0183] Optionally, the television can switch from its original interface to the playback interface of this channel. For example, the television can switch from the playback interface of non-set-top box programs, such as those shown in Figure 7(2) and Figure 7(1), to the playback interface of this channel. It can also switch from the playback interface of other channels to the playback interface of this channel.

[0184] Based on the scheme shown in Figure 9, when the remote control receives an operation, it can send information 1 to the television. Information 1 carries the representation information of the control command corresponding to the operation. When the representation information of the control command carried in information 1 is used to control the television, the television can directly respond to information 1 and execute the corresponding response operation after receiving information 1. This enables control of the television via the remote control. When the representation information of the control command carried in information 1 is used to control the set-top box, the television can obtain the corresponding infrared code based on information 1, compress the infrared code, and then send it to the remote control. This ensures that even when the infrared device in the remote control has limited memory, it can still receive the infrared code. The remote control then generates the corresponding infrared control signal based on the infrared code and sends it to the set-top box to control it. Thus, a single remote control can simultaneously control both the television and the set-top box, simplifying the operation.

[0185] It is understood that the embodiments of this application use the example of a television set sending a compressed infrared code to a remote control, enabling the remote control to successfully receive the infrared code even with a small amount of RAM in its infrared device, and then generate an infrared control signal to control the set-top box. The technical solution provided in these embodiments can be applied to any scenario where the RAM of the remote control's infrared device is small due to cost constraints. It is also applicable to other devices that use infrared codes for control besides set-top boxes. For example, a first device can send a compressed infrared code to a remote control. Correspondingly, after receiving the compressed infrared code, the remote control can generate a corresponding infrared control signal and send it to a second device to control the second device. The first device can be any device capable of acquiring the infrared code used by the second device and having infrared code compression capabilities, such as a television set, mobile phone, or other devices. The first device can also use the infrared code compression scheme described above when compressing the infrared code of the second device. The second device can be any device that uses infrared codes for control, such as a set-top box, air conditioner, smart curtains, etc.

[0186] The above primarily describes the solutions provided in the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the above functions, the device / remote controller includes corresponding hardware structures and / or software modules for executing each function. By combining the units and algorithm steps of the various examples described in the embodiments disclosed in this application, the embodiments of this application can be implemented in hardware or a combination of hardware and software. Whether a function is executed by hardware or software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solutions in the embodiments of this application.

[0187] This application provides embodiments that can divide the device / remote control into functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional module. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0188] Figure 19 shows a schematic diagram of a remote control 1900 provided in an embodiment of this application. This remote control 1900 can be used to implement the methods described in the above method embodiments. For example, the remote control 1900 may specifically include a processing unit 1901 and a communication unit 1902.

[0189] The processing unit 1901 is used to support the remote controller 1900 in performing the processing operations of the remote controller as described in any one of Figures 1 to 18. The communication unit 1902 is used to support the remote controller 1900 in performing the communication operations of the remote controller as described in any one of Figures 1 to 18.

[0190] Optionally, the remote controller 1900 shown in FIG19 may further include a storage unit 1903, which stores programs or instructions. When the processing unit 1901 executes the program or instructions, the remote controller 1900 shown in FIG19 can perform the method described in the above method embodiment.

[0191] Figure 20 shows a schematic diagram of a device provided in an embodiment of this application. The device 2000 can be used to implement the methods described in the above method embodiments. For example, the device 2000 may specifically include: a processing unit 2001, a communication unit 2002, and a display unit 2003.

[0192] Processing unit 2001 is used to support device 2000 in performing the processing operations of the television set as described in any one of Figures 1 to 18. Communication unit 2002 is used to support device 2000 in performing the communication operations of the television set as described in any one of Figures 1 to 18. Display unit 2003 is used to support device 2000 in performing the display operations of the television set as described in any one of Figures 1 to 18.

[0193] Optionally, the device 2000 shown in FIG. 20 may further include a storage unit (not shown in FIG. 20) storing a program or instructions. When the processing unit 2001 executes the program or instructions, the device 2000 shown in FIG. 20 can perform the method of the television shown in the above-described method embodiment.

[0194] The technical effects of Figures 19 and 20 can be referred to the technical effects of the methods shown in the above-described method embodiments, and will not be repeated here. The processing unit shown in Figures 19 and 20 can be implemented by a processor or processor-related circuit components, and can be a processor or a processing module. The communication unit can be implemented by a transceiver or transceiver-related circuit components, and can be a transceiver or a transceiver module.

[0195] This application also provides a chip system, as shown in FIG21, which includes at least one processor 2101 and at least one interface circuit 2102. The processor 2101 and the interface circuit 2102 can be interconnected via lines. For example, the interface circuit 2102 can be used to receive signals from other devices. As another example, the interface circuit 2102 can be used to send signals to other devices (e.g., the processor 2101). Exemplarily, the interface circuit 2102 can read instructions stored in a memory and send the instructions to the processor 2101. When the instructions are executed by the processor 2101, the device or remote control can perform the various steps executed in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application.

[0196] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.

[0197] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application does not specifically limit the type of memory or the arrangement of the memory and processor.

[0198] For example, the chip system may be a field-programmable gate array, an application-specific integrated circuit (ASIC), a system-on-a-chip (SoC), a central processing unit (CPU), a network processor, a digital signal processing circuit, a microcontroller, a programmable controller, or other integrated chips.

[0199] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0200] This application also provides a readable storage medium (also referred to as a computer-readable storage medium) storing a program or instructions that, when executed on a device, cause the device to perform the methods described in the above-described method embodiments.

[0201] This application provides a program product (also referred to as a computer program product), which includes a program or instructions that, when run on a device or computer, cause the device or computer to perform the method described in the above-described method embodiments.

[0202] In addition, this application also provides an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store execution instructions, and when the apparatus is running, the processor may execute the execution instructions stored in the memory to cause the apparatus to perform the methods in the above-described method embodiments.

[0203] In this embodiment, the device, storage medium, program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0204] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0205] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A device control method, characterized in that, The method includes: The remote control, in response to a first operation for selecting the first channel, sends a first control command to the television. The remote control receives a first infrared code from the television, wherein the first infrared code is obtained by compression based on a second infrared code, the second infrared code is the infrared code used by the set-top box, and the second infrared code corresponds to the first control command; The remote control sends a first infrared control signal corresponding to the first infrared code to the set-top box. The first infrared control signal is used to control the set-top box to transmit video data of the first channel to the television.

2. The method according to claim 1, characterized in that, After the remote controller sends a first infrared control signal corresponding to the first infrared code to the set-top box, the method further includes: The remote control, in response to a second operation for selecting a second channel, sends a second control command to the television set; The remote control receives a third infrared code from the television set. The third infrared code is obtained by compression based on a fourth infrared code. The fourth infrared code is the infrared code used by the set-top box and corresponds to the second control command. The remote control sends a second infrared control signal corresponding to the third infrared code to the set-top box. The second infrared control signal is used to control the set-top box to transmit video data of the second channel to the television.

3. The method according to claim 1 or 2, characterized in that, The method further includes: The remote control responds to a third operation by sending a third control command to the television, the third control command being used to instruct the television to perform a target operation, the target operation being an operation unrelated to playing video data from the set-top box.

4. The method according to any one of claims 1-3, characterized in that, The first control command carries either the representation information of the buttons on the remote control or the representation information of the first channel.

5. The method according to claim 4, characterized in that, The second infrared code is determined based on the first control command and a preset mapping relationship. The preset mapping relationship includes at least one of the following: the correspondence between the characterization information of the buttons on the remote control and the infrared code, and the correspondence between the characterization information of the channel and the infrared code.

6. The method according to any one of claims 1-5, characterized in that, The second infrared code includes at least one codeword. The first infrared code is generated by sequentially encoding each of the at least one codeword. When the frequency of a codeword appearing in the second infrared code is greater than or equal to a preset frequency threshold, the number of binary bits included after encoding the codeword is a first number. When the frequency of a codeword appearing in the second infrared code is less than the preset frequency threshold, the number of binary bits included after encoding the codeword is a second number. The first number is less than the second number. The number of binary bits included after encoding each codeword is less than the number of binary bits included before encoding.

7. The method according to claim 6, characterized in that, The first infrared code includes a first dictionary, the number of the at least one codeword, and the data encoded by the at least one codeword, wherein the first dictionary includes some or all of the different codewords in the first infrared code.

8. The method according to any one of claims 1-5, characterized in that, The second infrared code includes at least one codeword. The first infrared code is generated by sequentially encoding at least one target codeword. The target codeword is calculated based on a preset value and a codeword. The target codeword corresponds one-to-one with the codeword. The target codeword is smaller than the corresponding codeword.

9. The method according to claim 8, characterized in that, The frequency of the target codeword appearing in all target codewords is negatively correlated with the size of the encoded target codeword.

10. The method according to claim 9, characterized in that, The size of the target codeword after encoding is the value of the target codeword in the order of its arrangement in the second dictionary minus 1. The second dictionary includes all different target codewords, and the target codewords are arranged in the second dictionary in descending order of their frequency of occurrence among all the target codewords.

11. The method according to claim 10, characterized in that, The second dictionary also includes the frequency of each target codeword in all the target codewords.

12. The method according to claim 10 or 11, characterized in that, If the value of the target codeword appears consecutively n times, the value from the nxth target codeword to the nth target codeword is re-encoded to a value of nx, where x is a preset number of repetitions and n and x are both positive integers.

13. The method according to any one of claims 10-12, characterized in that, The first infrared code includes the second dictionary, the number of the at least one codeword, the data encoded by the at least one target codeword, and the preset value.

14. The method according to any one of claims 1-13, characterized in that, Before the remote controller sends the first infrared control signal corresponding to the first infrared code to the set-top box, the method further includes: The remote control decompresses the first infrared code to obtain the second infrared code; The remote control generates the first infrared control signal based on the second infrared code.

15. A device control method, characterized in that, The method includes: The television receives a first control command from the remote control, the first control command being used to instruct the playback of video data for the first channel; The television sends a first infrared code to the remote control. The first infrared code is obtained by compressing a second infrared code. The second infrared code is the infrared code used by the set-top box. The second infrared code corresponds to the first control command. The television receives video data from the first channel from the set-top box; The television set plays video data from the first channel.

16. The method according to claim 15, characterized in that, After the television set plays the video data of the first channel, the method further includes: The television receives a second control command from the remote control, the second control command being used to instruct the playback of video data from a second channel; The television sends a third infrared code to the remote control. The third infrared code is obtained by compressing a fourth infrared code. The fourth infrared code is the infrared code used by the set-top box. The fourth infrared code corresponds to the second control command. The television receives video data from the second channel from the set-top box; The television set plays video data from the second channel.

17. The method according to claim 15 or 16, characterized in that, The method further includes: The television receives a third control command from the remote control; In response to the third control command, the television performs a target operation, which is an operation unrelated to playing video data from the set-top box.

18. The method according to any one of claims 15-17, characterized in that, The first control command carries representation information of the buttons on the remote control, or representation information of the first channel. Before the television sends the first infrared code to the remote control, the method further includes: The television obtains the second infrared code based on the first control command and a preset mapping relationship. The preset mapping relationship includes at least one of the following: the correspondence between the characterization information of the buttons on the remote control and the infrared code, and the correspondence between the characterization information of the channel and the infrared code.

19. The method according to any one of claims 15-18, characterized in that, The second infrared code includes at least one codeword. Before the television sends the first infrared code to the remote control, the method further includes: The television sequentially encodes each of the at least one codeword to generate the first infrared code. When the frequency of a codeword appearing in the second infrared code is greater than or equal to a preset frequency threshold, the encoded codeword includes a first number of binary bits. When the frequency of a codeword appearing in the second infrared code is less than the preset frequency threshold, the encoded codeword includes a second number of binary bits, where the first number is less than the second number. The number of binary bits included in the encoded codeword is less than the number of binary bits included before encoding.

20. The method according to claim 19, characterized in that, The first infrared code includes a first dictionary, the number of the at least one codeword, and the data encoded by the at least one codeword, wherein the first dictionary includes some or all of the different codewords in the first infrared code.

21. The method according to any one of claims 15-18, characterized in that, The second infrared code includes at least one codeword. Before the television sends the first infrared code to the remote control, the method further includes: The television sequentially encodes at least one target codeword to generate the first infrared code, wherein the target codeword is calculated based on a preset value and a codeword, and the target codeword corresponds one-to-one with the codeword, and the target codeword is smaller than the corresponding codeword.

22. The method according to claim 21, characterized in that, The frequency of the target codeword appearing in all target codewords is negatively correlated with the size of the encoded target codeword.

23. The method according to claim 22, characterized in that, The size of the target codeword after encoding is the value of the target codeword in the order of its arrangement in the second dictionary minus 1. The second dictionary includes all different target codewords, and the target codewords are arranged in the second dictionary in descending order of their frequency of occurrence among all the target codewords.

24. The method according to claim 22 or 23, characterized in that, If the value of the target codeword appears consecutively n times, the value from the nxth target codeword to the nth target codeword is re-encoded to a value of nx, where x is a preset number of repetitions and n and x are both positive integers.

25. The method according to any one of claims 23-24, characterized in that, The first infrared code includes the second dictionary, the number of the at least one codeword, the data encoded by the at least one target codeword, and the preset value.

26. A remote control, characterized in that, include: One or more processors, a communication interface, and one or more memories, wherein the communication interface is used to communicate with other devices, the one or more memories are used to store one or more programs, and the one or more processors are used to run one or more programs stored in the one or more memories to cause the device to perform the method as described in any one of claims 1-14.

27. A device, characterized in that, include: The device comprises one or more processors, a communication interface, a display screen, and one or more memories, wherein the communication interface is used to communicate with other devices, the one or more memories are used to store one or more programs, and the one or more processors are used to run one or more programs stored in the one or more memories to cause the device to perform the method as described in any one of claims 15-25.

28. A readable storage medium, characterized in that, The readable storage medium includes a program that, when run on a remote controller, causes the remote controller to perform the method as described in any one of claims 1-14, or when run on a device, causes the device to perform the method as described in any one of claims 15-25.