Pairing method of infrared code and electronic device
By generating a session ID and verifying it on the cloud platform, the problem of cumbersome and insecure pairing process of infrared remote controls is solved. This achieves security and accuracy of infrared code pairing, prevents mispairing between neighbors and crosstalk between devices, and ensures the clarity of the pairing target.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENYANG YUNZHI INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2025-07-11
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the pairing process for infrared remote controls is cumbersome and lacks security and accuracy. Especially in densely populated residential environments or homes with multiple devices, mispairing by neighbors or crosstalk between devices can easily occur, and voice commands are difficult to accurately specify the pairing target.
By generating a session ID and verifying it on the cloud platform, the security and accuracy of the infrared code pairing process between the remote control and the set-top box are ensured. This includes generating a session ID under a preset trigger event, storing it and sending it to the remote control, generating a pairing request after the remote control stores the ID, verifying and matching the infrared code on the cloud platform, and finally pairing the remote control and the TV.
It improves the security and accuracy of the infrared code pairing process, prevents mispairing between neighbors and crosstalk between devices, and ensures the clarity of the pairing target.
Smart Images

Figure CN120956950B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of smart home device technology, and in particular relates to an infrared code pairing method and electronic device. Background Technology
[0002] With the increasing prevalence of smart home devices, users often need to control multiple devices simultaneously, such as set-top boxes and televisions, using a remote control. In traditional solutions, the remote control and set-top box typically connect via wireless communication methods like Bluetooth or Wi-Fi, while controlling the television relies on infrared (IR) signals. Pairing traditional infrared remote controls with televisions and other devices usually requires manually consulting a code library and trying each code individually, a cumbersome process. Related technologies have proposed voice-based infrared pairing via set-top boxes and cloud platforms. Users state their television model, and the cloud matches the infrared code and sends it to complete the pairing. However, these technologies suffer from insufficient security and accuracy. In densely populated environments or multi-device households, issues such as neighbors mispairing their own televisions or crosstalk between devices can easily occur, leading to pairing errors. Furthermore, when users own multiple set-top boxes or televisions, simple voice commands are insufficient to accurately specify the pairing target. Summary of the Invention
[0003] To address at least one technical problem in the background art, embodiments of this application provide an infrared code pairing method and electronic device, which can improve the security and accuracy of the infrared code pairing process.
[0004] In a first aspect, embodiments of this application provide an infrared code pairing method applied to a set-top box, the method comprising:
[0005] Upon receiving a preset trigger event, a session ID is generated, stored, and sent to the remote controller, wherein the remote controller stores the session ID upon receiving it.
[0006] If the voice pairing information sent by the remote control is obtained and the session ID in the voice pairing information is consistent with the session ID stored in the set-top box, a pairing request is generated based on the voice pairing information and the device identifier of the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes TV information.
[0007] The pairing request is sent to the cloud platform. Upon receiving the pairing request, the cloud platform verifies the pairing request. If the pairing request is verified, it matches the infrared code based on the TV information. If the infrared code is matched, the infrared code and the session ID are sent to the set-top box.
[0008] If the infrared code and session ID sent by the cloud platform are obtained and the session ID is consistent with the session ID stored in the set-top box, the infrared code is sent to the remote control so that the remote control can pair with the TV based on the infrared code.
[0009] In some embodiments, when the infrared codes include multiple ones, the cloud platform further sends a test command to the set-top box, and sending the infrared codes to the remote control includes:
[0010] The current infrared code is sent to the remote control, wherein the remote control temporarily loads the current infrared code upon receiving it.
[0011] The method further includes: controlling the TV to display a guide test screen based on the test command, the guide test screen being used to guide the user to perform a control test using the remote control, and after the control test is completed, guiding the user to send feedback information using the remote control, the feedback information being used to indicate whether pairing was successful, and the feedback information carrying a session ID;
[0012] If the current infrared code pairing is successful based on the feedback information and the session ID in the feedback information matches the session ID stored in the set-top box, the unsent infrared code is discarded.
[0013] If, based on the feedback information, it is determined that the current infrared code pairing is unsuccessful and the session ID in the feedback information matches the session ID stored in the set-top box, the next infrared code is sent to the remote control, and the TV is controlled to display a guide test screen based on the test command.
[0014] In some embodiments, the preset triggering event includes one or more of the following events:
[0015] The system detects a first trigger operation by the user on a preset option in the interactive interface of the set-top box controlling the TV display;
[0016] A second trigger operation by the user on a preset button on the set-top box was detected;
[0017] A third trigger operation of a preset button on the remote control connected to the set-top box was detected.
[0018] In some embodiments, the method further includes:
[0019] If the remote control is successfully paired with the TV, clear the session ID; or, if the session ID exists for a valid duration, clear the session ID.
[0020] Secondly, embodiments of this application provide an infrared code pairing method applied to a cloud platform, including:
[0021] Upon receiving a pairing request from the set-top box, the pairing request is verified. The pairing request is generated by the set-top box based on the voice pairing information and the set-top box's device identifier, provided that the set-top box receives voice pairing information from the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes television information. The session ID stored in the set-top box is generated by the set-top box upon receiving a preset trigger event. The session ID stored in the remote control is the one sent by the set-top box to the remote control.
[0022] If the pairing request is verified, an infrared code is matched based on the TV information. If an infrared code is matched, the infrared code and the session ID are sent to the set-top box. If the set-top box receives the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, the set-top box sends the infrared code to the remote control so that the remote control can pair with the TV based on the infrared code.
[0023] In some embodiments, the method further includes:
[0024] The infrared code is obtained by configuring the infrared code library based on the television information;
[0025] If multiple infrared codes exist, a test command is sent to the set-top box, so that the set-top box controls the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform a control test using the remote control, and after the control test is completed, guide the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing was successful, and the feedback information carries a session ID.
[0026] In some embodiments, verifying the pairing request includes:
[0027] The device identifier is verified, and the validity period of the session ID is verified.
[0028] Specifically, if the device identifier verification is successful and the session ID timeliness verification is successful, the pairing request is determined to be successful.
[0029] Thirdly, embodiments of this application provide an infrared code pairing method applied to a remote control, the method comprising:
[0030] If the session ID sent by the set-top box is obtained, the session ID is stored.
[0031] Upon receiving voice information, voice pairing information is generated based on the voice information and the session ID, and the voice pairing information is sent to the set-top box. Specifically, when the set-top box receives the voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the set-top box's device identifier. The voice information includes television information. The set-top box sends the pairing request to the cloud platform. If the cloud platform accepts the pairing request, it verifies the pairing request. If the pairing request verification is successful, it matches an infrared code based on the television information. If an infrared code is matched, the cloud platform sends the infrared code and the session ID to the set-top box. When the set-top box receives the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, it sends the infrared code to the remote control.
[0032] Upon receiving the infrared code sent by the set-top box, pairing is performed with the television based on the infrared code.
[0033] In some embodiments, the method further includes:
[0034] If the remote control is successfully paired with the TV, clear the session ID; or, if the session ID exists for a valid duration, clear the session ID.
[0035] Fourthly, embodiments of this application provide an infrared code pairing device, applied to a set-top box, comprising:
[0036] The first processing module is used to generate a session ID, store the session ID, and send the session ID to the remote controller when a preset trigger event is obtained; wherein the remote controller stores the session ID when it obtains it.
[0037] The first generation module is used to generate a pairing request based on the voice pairing information and the device identifier of the set-top box when it receives voice pairing information sent by the remote control and the session ID in the voice pairing information is consistent with the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control, and the voice information includes TV information.
[0038] The first sending module is used to send the pairing request to the cloud platform. When the cloud platform receives the pairing request, it verifies the pairing request. If the pairing request is verified, it matches an infrared code based on the TV information. If an infrared code is matched, it sends the infrared code and the session ID to the set-top box.
[0039] The second sending module is used to send the infrared code to the remote control when it receives the infrared code and session ID sent by the cloud platform and the session ID is consistent with the session ID stored in the set-top box, so that the remote control can pair with the TV based on the infrared code.
[0040] Fifthly, embodiments of this application provide an infrared code pairing device applied to a cloud platform, comprising:
[0041] The verification module is used to verify the pairing request when a pairing request is received from the set-top box. The pairing request is generated by the set-top box based on the voice pairing information and the device identifier of the set-top box, provided that the session ID in the voice pairing information matches the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes television information. The session ID stored in the set-top box is generated when a preset trigger event is received. The session ID stored in the remote control is the one sent by the set-top box to the remote control.
[0042] The third sending module is used to match an infrared code based on the TV information when the pairing request is verified, and send the infrared code and the session ID to the set-top box when the infrared code is matched. The set-top box sends the infrared code to the remote control when it receives the infrared code and session ID sent by the cloud platform and the session ID is consistent with the session ID stored in the set-top box, so that the remote control can pair with the TV based on the infrared code.
[0043] Sixthly, embodiments of this application provide an infrared code pairing device for use with a remote control, comprising:
[0044] A storage module is used to store the session ID sent by the set-top box upon receiving the session ID.
[0045] The fourth sending module is used to generate voice pairing information based on the voice information and the session ID when voice information is obtained, and to send the voice pairing information to the set-top box. Specifically, when the set-top box obtains the voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the device identifier of the set-top box. The voice information includes television information. The set-top box sends the pairing request to the cloud platform. When the cloud platform accepts the pairing request, it verifies the pairing request. If the pairing request is verified, it matches an infrared code based on the television information. If an infrared code is matched, it sends the infrared code and the session ID to the set-top box. When the set-top box obtains the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, it sends the infrared code to the remote control.
[0046] The pairing module is used to pair with the television based on the infrared code sent by the set-top box.
[0047] In a seventh aspect, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any of the preceding claims.
[0048] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding claims.
[0049] Ninthly, embodiments of this application provide a computer program product that, when run on a terminal device, causes an electronic device to execute the method described in any of the above-described embodiments.
[0050] The beneficial effects of the embodiments in this application compared with the prior art are:
[0051] This application provides an infrared code pairing method. Upon receiving a preset trigger event, a session ID is generated, stored, and sent to a remote control. The remote control stores the session ID upon receiving it. Upon receiving voice pairing information from the remote control, and if the session ID in the voice pairing information matches the session ID stored by the set-top box, a pairing request is generated based on the voice pairing information and the device identifier of the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored by the remote control. The voice information includes television... The system retrieves TV information and sends the pairing request to the cloud platform. Upon receiving the pairing request, the cloud platform verifies it. If the verification is successful, it matches an infrared code based on the TV information. If a matching infrared code is found, the cloud platform sends the infrared code and the session ID to the set-top box. If the cloud platform sends the infrared code and the session ID matches the session ID stored in the set-top box, the cloud platform sends the infrared code to the remote control. This allows the remote control to pair with the TV based on the infrared code, improving the security and accuracy of the infrared code pairing process. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application;
[0054] Figure 2 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application;
[0055] Figure 3 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application;
[0056] Figure 4 A schematic diagram of a pairing system provided for the implementation of this application;
[0057] Figure 5 A schematic diagram illustrating the implementation process of an infrared code pairing method provided in an embodiment of this application;
[0058] Figure 6A schematic diagram of the structure of an infrared code pairing device provided in an embodiment of this application;
[0059] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0060] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0061] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0062] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0063] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once detected," or "in response to detection."
[0064] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0065] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0066] Based on the problems in related technologies, this application provides an infrared code pairing method that can be applied to electronic devices, such as set-top boxes, and the infrared code pairing method can be executed by the processor of the set-top box.
[0067] Figure 1 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application is shown below. Figure 1 As shown, the pairing methods for infrared codes include:
[0068] Step S101: When a preset trigger event is obtained, a session ID is generated, the session ID is stored, and the session ID is sent to the remote control. The remote control stores the session ID upon obtaining it.
[0069] In this embodiment, the preset trigger event is an event used to initiate the pairing process between the set-top box and the remote control. The preset trigger event can be a user pressing a specific button on the set-top box, selecting a specific pairing option on the TV screen, or a preset button on the remote control being pressed. The Session ID is a unique identifier. The Session ID ensures that all related communications and operations during the pairing process are associated with the same session, thereby guaranteeing the security and accuracy of the pairing process. The Session ID is generated by the set-top box when it detects the preset trigger event. The Session ID can be a combination of a random number, a timestamp, or other unique identifier. After generating the Session ID, the set-top box needs to store it in local storage for verification and comparison during subsequent pairing processes. The remote control is an electronic device used for remotely controlling devices, typically communicating with the controlled device via wireless signals (such as infrared, Bluetooth, etc.). Similarly, after receiving the Session ID, the remote control also needs to store it locally for use when sending voice pairing information.
[0070] In this embodiment, the set-top box needs to have the ability to detect preset trigger events. Upon detecting a preset trigger event, the set-top box needs to generate a unique session ID. The session ID can be a combination of a randomly generated string, a timestamp, and a random number, or a unique identifier generated by a certain encryption algorithm. The generated session ID needs to be stored in the set-top box's local storage. This can be the set-top box's memory, flash memory, or other persistent storage device. The set-top box needs to establish a communication connection with the remote control in order to send the session ID to the remote control. The set-top box and the remote control can establish a communication connection through wireless communication technologies such as Bluetooth, Wi-Fi, and infrared. After receiving the session ID, the remote control needs to store it in its local storage for use in subsequent pairing processes.
[0071] Step S102: If the voice pairing information sent by the remote control is obtained and the session ID in the voice pairing information is consistent with the session ID stored in the set-top box, a pairing request is generated based on the voice pairing information and the device identifier of the set-top box. The voice pairing information is generated by the remote control based on the voice information and the session ID stored in the remote control. The voice information includes TV information.
[0072] In this embodiment, the voice pairing information is data generated by the remote control and sent to the set-top box. This voice pairing information is crucial data in the pairing process between the set-top box and the remote control, carrying the user's input voice commands and session ID for verification and subsequent operations by the set-top box. The pairing request is an operation performed by the set-top box after verifying that the session ID in the voice pairing information matches its stored session ID. The set-top box combines the voice pairing information and its device identifier to generate a pairing request to be sent to the cloud platform. The voice information consists of voice commands input by the user via the remote control, typically containing information about the television the user wants to pair with (such as brand and model). The device identifier is the set-top box's unique identifier, used to identify the set-top box in the pairing request. The cloud platform is a centralized server system that manages and processes pairing requests. It receives pairing requests from the set-top box, verifies them, and returns the matching infrared code and session ID.
[0073] In this embodiment, after the user inputs voice information, the remote control combines the voice information with a stored session ID to generate voice pairing information, which is then sent to the set-top box via wireless communication. Upon receiving the voice pairing information, the set-top box first extracts the session ID. It then compares the extracted session ID with the session IDs stored locally on the set-top box. If the session IDs match, the voice pairing information is valid, and the pairing request can proceed. If the session IDs do not match, the voice pairing information is invalid, and the pairing request will be rejected. After successful session ID verification, the set-top box needs to generate a pairing request based on the voice pairing information and its own device identifier. The voice information (such as TV information) and session ID included in the voice pairing information, combined with the set-top box's device identifier (such as device serial number, MAC address, etc.), are used to generate the pairing request. The pairing request needs to contain sufficient information so that the cloud platform can verify the request's legitimacy and perform subsequent processing. The generated pairing request is sent to the cloud platform via the internet.
[0074] Step S103: The pairing request is sent to the cloud platform. Upon receiving the pairing request, the cloud platform verifies the pairing request. If the pairing request is verified, the cloud platform matches the infrared code based on the TV information. If the infrared code is matched, the cloud platform sends the infrared code and session ID to the set-top box.
[0075] In this embodiment, the infrared code is a specific signal code used to control a television set; different television models typically require different infrared codes. The infrared code is crucial for communication between the remote control and the television set, allowing the remote control to send control commands to the television.
[0076] In this embodiment, after generating a pairing request, the set-top box sends it to the cloud platform via the Internet. Upon receiving the pairing request, the cloud platform first verifies its legitimacy, including checking the request's format, completeness, and the validity of the set-top box's device identifier. The cloud platform can also verify the validity of the session ID to ensure the pairing request is associated with the correct session. If the pairing request verification passes, the cloud platform extracts the television information from the pairing request. The cloud platform searches its database for an infrared code that matches the television information. The database can be a database containing various television models and their corresponding infrared codes. If the cloud platform finds a matching infrared code, it combines the infrared code and the session ID into a response data packet and sends this response data packet back to the set-top box via the Internet.
[0077] Step S104: After obtaining the infrared code and session ID sent by the cloud platform and the session ID being consistent with the session ID stored in the set-top box, the infrared code is sent to the remote control so that the remote control can pair with the TV based on the infrared code.
[0078] In this embodiment, when the cloud platform sends the infrared code and session ID to the set-top box, the set-top box's communication module receives this data and passes it to the set-top box's processor for processing. The set-top box's processor extracts the session ID from the received data and compares it with the session ID stored locally on the set-top box. The comparison process can be implemented using a simple string comparison algorithm to ensure that the two session IDs are completely identical. If the session IDs match, it means that the received infrared code is valid data related to the current pairing session, and the pairing process can continue; if the session IDs do not match, the set-top box will discard this data and may report error information to the cloud platform. After the session ID verification is successful, the set-top box's processor extracts the infrared code from the received data. The processor performs format checks and necessary processing (such as encoding conversion, data encapsulation, etc.) on the infrared code to ensure that the infrared code can be sent to the remote control in the correct format via wireless communication. The set-top box sends the processed infrared code to the remote control via wireless communication. After receiving the infrared code sent by the set-top box, the remote control's communication module passes it to the remote control's processor. The processor verifies the received infrared code (e.g., checking data integrity and format correctness). If verification is successful, the infrared code is stored in the remote control's local storage device (e.g., flash memory, EEPROM). After storing the infrared code, the remote control attempts to pair it with the television. The remote control transmits the infrared code signal to the television through its infrared transmitter module, following a specific timing and encoding format. Upon receiving the infrared code signal, the television decodes and verifies it. If the received infrared code matches a preset or recognizable infrared code on the television, the television establishes a communication connection with the remote control, completing the pairing process. After successful pairing, the user can use the remote control to control the television by transmitting the corresponding infrared code.
[0079] The method provided in this application embodiment generates a session ID upon receiving a preset trigger event, stores the session ID, and sends the session ID to a remote control. The remote control stores the session ID upon receiving it. Upon receiving voice pairing information from the remote control and finding that the session ID in the voice pairing information matches the session ID stored in the set-top box, a pairing request is generated based on the voice pairing information and the set-top box's device identifier. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control, and includes television information. The pairing request is sent to a cloud platform. Upon receiving the pairing request, the cloud platform verifies it. If the pairing request verification is successful, an infrared code is matched based on the television information. If an infrared code is matched, the infrared code and session ID are sent to the set-top box. Finally, if the infrared code and session ID sent by the cloud platform match the session ID stored in the set-top box, the infrared code is sent to the remote control, enabling the remote control to pair with the television based on the infrared code. This improves the security and accuracy of the infrared code pairing process.
[0080] The method provided in this application, through a SessionID binding mechanism, ensures a closed loop in the voice information and infrared code transmission link, effectively preventing accidental triggering or malicious pairing by neighboring voice commands. Only remote controls that have legally activated the pairing mode and obtained a SessionID can complete pairing. The pairing request is bound to a specific set-top box-remote control pair, clearly identifying the target device and avoiding confusion in multi-device environments.
[0081] In some embodiments, since the voice information may only include the brand, and these brands may correspond to different infrared codes, multiple infrared codes may exist. To achieve pairing, in this embodiment, the cloud platform also sends a test command to the set-top box.
[0082] In this embodiment of the application, sending the infrared code to the remote control includes:
[0083] The current infrared code is sent to the remote control, which then temporarily loads the current infrared code upon receiving it.
[0084] In this embodiment, after receiving multiple infrared codes, the set-top box first sends the current infrared code to the remote control. Upon receiving the current infrared code, the remote control temporarily loads it into its memory for control testing.
[0085] In some embodiments, after step S104, the method further includes:
[0086] Step S105: Based on the test command, control the TV to display a guide test screen. The guide test screen is used to guide the user to perform control tests using the remote control. After the control test is completed, guide the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing was successful and carries the session ID.
[0087] In this embodiment, the test instruction is a set of specific commands or data sent by the cloud platform to the set-top box, instructing the set-top box on how to control the television for subsequent pairing test procedures. The guide test screen is a specific image or interface displayed on the television screen, guiding the user to perform control tests via the remote control. The guide test screen typically includes prompts, operation guides, etc., helping the user understand how to perform the control test and prompting the user on how to send feedback information after the test. The control test involves a series of operations performed by the user on the television via the remote control to verify whether the current infrared code can successfully control the television. The control test is a crucial step in the pairing process; through the user's actual operations, the compatibility between the current infrared code and the television can be determined. The feedback information is a set of data sent by the user to the set-top box via the remote control after completing the control test, indicating whether the current infrared code has been successfully paired. The feedback information includes the pairing result (success or failure) and the session ID. The set-top box uses this information to determine the next step, such as continuing to send the next infrared code or discarding any unsent infrared codes.
[0088] In this embodiment, after receiving the test command sent by the cloud platform, the set-top box first parses the command to extract the specific requirements for controlling the TV to display the guide test screen, such as the screen content and display time. Based on the parsed test command, the set-top box controls the TV to display the guide test screen via infrared code or other communication methods. The guide test screen may include text prompts, graphic indicators, etc., guiding the user to perform subsequent control tests. Following the prompts on the guide test screen, the user uses the remote control to perform a series of operations on the TV, such as turning the TV on and off, changing channels, and adjusting the volume. These operations are sent to the TV or set-top box via the remote control to verify the validity of the current infrared code. After completing the control test, the user uses the remote control to send feedback information based on the prompts on the guide test screen. The feedback information is typically generated through specific button combinations or menu options and includes the pairing result (success or failure) and the session ID.
[0089] Step S106: If the current infrared code pairing is successful based on the feedback information and the session ID in the feedback information is consistent with the session ID stored in the set-top box, discard the unsent infrared code.
[0090] In this embodiment, after receiving feedback information from the remote control, the set-top box extracts the pairing result and session ID. The set-top box first verifies the validity of the session ID to ensure the feedback information comes from the current pairing session. Then, it determines the next step based on the pairing result, such as continuing to send the next infrared code or discarding any unsent infrared codes. If pairing is successful, the set-top box can discard any unsent infrared codes and end the pairing process.
[0091] In step S107, if the current infrared code pairing is unsuccessful based on the feedback information and the session ID in the feedback information is consistent with the session ID stored in the set-top box, the next infrared code is sent to the remote control, and the TV is controlled to display the guide test screen based on the test command.
[0092] In this embodiment, if pairing fails, the set-top box will, according to the test command, continue sending the next infrared code to the remote control and control the TV to display the guide test screen again, guiding the user to perform a new round of control tests. This process will continue until a pairing successful infrared code is found or all infrared codes have been tried.
[0093] The method provided in this application, when multiple infrared codes are available, gradually finds the matching infrared code for the television through user feedback, ultimately achieving successful pairing between the remote control and the television. The interactive infrared code testing and confirmation process guides the user to quickly find the correct infrared code, even if the user's voice input is inaccurate or multiple candidates exist in the cloud matching, thus improving pairing success rate and user satisfaction.
[0094] In some embodiments, the preset trigger event includes one or more of the following events: detecting a first trigger operation by a user on a preset option displayed on the interactive interface of the set-top box controlling the TV; detecting a second trigger operation by a user on a preset button on the set-top box; and detecting a third trigger operation on a preset button on a remote control connected to the set-top box.
[0095] In this embodiment, the first trigger operation refers to the user's operation on the preset options in the interactive interface displayed on the TV set-top box. Through the preset options in the interactive interface, the user can intuitively initiate the pairing process. The preset buttons on the set-top box provide a quick way for users to start the pairing process, especially suitable for users unfamiliar with the interface or who wish to simplify the operation. The remote control, as the main device for interaction between the user and the set-top box and TV, provides a way for users to remotely initiate the pairing process through its preset buttons, increasing the convenience and flexibility of operation.
[0096] In some embodiments, after step S104, the method further includes:
[0097] Step S107: If the remote control and the TV are successfully paired, clear the session ID; or, if the session ID has existed for a certain period of time, clear the session ID.
[0098] In this embodiment, successful pairing of the remote control and the television means that the remote control has established a stable communication connection with the television through a specific infrared code or communication protocol, and the remote control can successfully control various functions of the television (such as powering on / off, changing channels, adjusting volume, etc.). The validity period refers to the time interval from the generation or allocation of the session ID until it is deemed invalid or needs to be cleared by the system. The validity period is used to limit the lifecycle of the session ID, prevent the session ID from being occupied or abused for a long time, and improve system security and resource utilization.
[0099] In this embodiment, after the remote control successfully pairs with the television, the remote control sends a pairing success notification to the set-top box. Upon receiving the notification, the set-top box queries the session ID associated with the current pairing session. The set-top box then clears the queried session ID from the storage device (such as memory, database, etc.) and releases the related resources. After clearing the session ID, the set-top box can consider the current pairing session to have ended, and the related resources and states can be reallocated or initialized.
[0100] In this embodiment, when a session ID is generated or allocated, its generation time or allocation time is recorded, and a validity period is set. The set-top box periodically checks the existence time of all session IDs to determine whether their validity period has been reached. For session IDs whose existence time has reached the validity period, the set-top box will delete them from the storage device. After deleting the session ID, the set-top box can release related resources and prevent session IDs from being occupied or abused for a long time.
[0101] The method provided in this application utilizes a session ID that plays a crucial role in the pairing process, as it links communication at each stage. Clearing the session ID prevents it from being maliciously acquired or misused, thereby protecting system security. Long-existing session IDs may become targets for attackers; timely clearing of session IDs reduces the system's attack surface and lowers the risk of attack. Session IDs typically need to be stored in the system's memory or database. Clearing unnecessary session IDs frees up these storage resources, improving system storage efficiency.
[0102] This application provides another method for pairing infrared codes. This method can be applied to electronic devices, which can be cloud platforms. The pairing method can be executed by a processor in the cloud platform.
[0103] Figure 2 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application is shown below. Figure 2 As shown, the pairing methods for infrared codes include:
[0104] Step S201: Upon receiving a pairing request from the set-top box, verify the pairing request. The pairing request is generated by the set-top box based on the voice pairing information and the set-top box's device identifier, provided that the set-top box receives voice pairing information from the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes TV information. The session ID stored in the set-top box is generated when the set-top box receives a preset trigger event. The session ID stored in the remote control is sent by the set-top box to the remote control.
[0105] In this embodiment, the remote control generates voice pairing information based on user-provided voice information and a session ID stored in the remote control. The voice information includes television information (such as television model and brand). The remote control sends the generated voice pairing information to the set-top box. After receiving the voice pairing information from the remote control, the set-top box checks if the session ID matches the session ID stored in the set-top box. If the session ID matches, the set-top box generates a pairing request based on the voice pairing information and its own device identifier, and sends the request to the cloud platform. Upon receiving the pairing request from the set-top box, the cloud platform first verifies the validity of the request. Verification includes checking whether the pairing request format is correct, whether the session ID is valid, and whether the device identifier is valid. The cloud platform may use encryption technology or other security mechanisms to ensure the authenticity and integrity of the pairing request.
[0106] In step S202, if the pairing request is verified, the infrared code is matched based on the TV information. If the infrared code is matched, the infrared code and session ID are sent to the set-top box. The set-top box sends the infrared code to the remote control after receiving the infrared code and session ID sent by the cloud platform and the session ID is consistent with the session ID stored in the set-top box, so that the remote control can pair with the TV based on the infrared code.
[0107] In this embodiment, after the pairing request is verified, the cloud platform extracts the TV information from the voice pairing information. The cloud platform searches its database for a matching infrared code based on the TV information (such as model and brand). If the cloud platform successfully matches the infrared code, it sends the infrared code and session ID to the set-top box. Upon receiving the infrared code and session ID from the cloud platform, the set-top box checks if the session ID matches the session ID stored locally. If the session ID matches, the set-top box sends the infrared code to the remote control. The remote control receives the infrared code from the set-top box and loads it into its memory. The remote control uses this infrared code to attempt pairing with the TV, i.e., controlling the TV by sending the infrared code. If the TV responds to the infrared code (e.g., successful power on / off, channel changing, etc.), the pairing is successful.
[0108] The method provided in this application verifies a pairing request when it is received from a set-top box. The pairing request is generated by the set-top box based on the voice pairing information and the set-top box's device identifier, provided that the session ID in the voice pairing information matches the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on the voice information and the session ID stored in the remote control. The voice information includes television information. The session ID stored in the set-top box is generated when a preset trigger event is received. The session ID stored in the remote control is sent by the set-top box to the remote control. If the pairing request verification is successful, an infrared code is matched based on the television information. If the infrared code is matched, the infrared code and session ID are sent to the set-top box. The set-top box, upon receiving the infrared code and session ID from the cloud platform and finding that the session ID matches the session ID stored in the set-top box, sends the infrared code to the remote control. This allows the remote control to pair with the television based on the infrared code, enabling a secure and efficient pairing process between the remote control and the television when the user initiates a pairing request via voice information. This process makes full use of session IDs to ensure the continuity and correctness of communication, while improving the accuracy and efficiency of pairing through the infrared code matching function of the cloud platform.
[0109] In some embodiments, while step S202 is being performed, the method further includes:
[0110] In step S203, if multiple infrared codes exist, a test command is sent to the set-top box so that the set-top box controls the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform control tests using the remote control, and after the control test is completed, it guides the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing was successful, and the feedback information carries a session ID.
[0111] In this embodiment, different brands or models of televisions may use different infrared codes for control in practical applications. Therefore, the cloud platform may store multiple infrared codes to support the pairing needs of various televisions. When the cloud platform receives a pairing request from a set-top box and determines that an infrared code needs to be sent, it checks its database to see if multiple infrared codes match the requested television information.
[0112] If multiple matching infrared codes are available, the cloud platform will select and send the appropriate code based on a certain priority or order (such as brand, model, user preference, etc.). The cloud platform generates a test command containing specific requirements for controlling the TV to display a guide test screen. The test command may include the content of the guide test screen, display time, user operation instructions, etc. The cloud platform sends the generated test command to the set-top box. The test command typically includes a session ID to identify the current pairing session, ensuring the set-top box can correctly process commands from the cloud platform.
[0113] In this embodiment, after receiving the test command sent by the cloud platform, the set-top box first parses the command to extract the specific requirements for controlling the television to display the guided test screen. Controlling the television to display the guided test screen: Based on the parsed test command, the set-top box controls the television to display the guided test screen via infrared code or other communication methods. The guided test screen may include text prompts, graphic indicators, etc., to guide the user through subsequent control tests.
[0114] In this embodiment, the user performs a series of operations on the television using the remote control, such as turning the television on and off, changing channels, and adjusting the volume, according to the prompts on the guided test screen. These operations are sent to the television or set-top box via the remote control to verify the validity of the current infrared code. The remote control sends the generated feedback information to the set-top box. After receiving the feedback information, the set-top box extracts the pairing result and session ID for subsequent processing. The set-top box first verifies whether the session ID in the feedback information matches the session ID of the current pairing session. If pairing is successful, the set-top box can discard the unsent infrared code and end the pairing process. If pairing fails, the set-top box will continue to send the next infrared code to the remote control according to the test instructions and control the television to display the guided test screen again, guiding the user to perform a new round of control tests.
[0115] The method provided in this application can safely and effectively complete the pairing process between a remote control and a television when multiple infrared codes are present. It fully utilizes session IDs to ensure the continuity and correctness of communication, and improves pairing accuracy and user experience through guided test screens and user feedback mechanisms.
[0116] In some embodiments, verifying a pairing request includes verifying a device identifier and verifying the validity of a session ID; wherein, if the device identifier is verified and the validity of the session ID is verified, the pairing request is determined to be verified.
[0117] In this embodiment, after receiving a pairing request from the set-top box, the cloud platform extracts the device identifier. The cloud platform checks if the device identifier's format meets expectations (e.g., length, character set). The cloud platform may verify whether the device identifier belongs to a registered or authorized set-top box by querying a database or whitelist. If the device identifier verification passes, the cloud platform continues with the session ID's validity period verification. If the device identifier verification fails, the cloud platform rejects the pairing request and may record the event for later analysis. The cloud platform extracts the session ID from the pairing request and queries its generation time. The generation time is usually recorded when the session ID is generated. The cloud platform calculates the time difference between the current time and the session ID's generation time to determine if it is within the valid duration. If the session ID's existence time is less than or equal to the valid duration, the cloud platform considers the session ID valid. If the session ID's existence time exceeds the valid duration, the cloud platform considers the session ID invalid and rejects the pairing request. The cloud platform combines the results of device identifier verification and session ID validity period verification. Only if both device identifier verification and session ID validity period verification pass will the cloud platform determine that the pairing request has passed verification. If the pairing request verification is successful, the cloud platform continues with the subsequent pairing process, such as matching the infrared code and sending it to the set-top box. If the pairing request verification fails, the cloud platform rejects the pairing request and may notify the set-top box or user of the reason for the pairing failure.
[0118] The method provided in this application, through dual verification of device identifier and session ID validity, ensures that pairing requests originate from legitimate devices and are processed within a valid timeframe. This verification mechanism enhances system security and reliability, preventing intrusion by unauthorized devices and abuse of session IDs.
[0119] This application provides another method for pairing infrared codes. This method is applied to an electronic device, which can be a remote control. The pairing method for infrared codes can be executed by the processor in the remote control.
[0120] Figure 3 A schematic diagram illustrating the implementation process of an infrared code pairing method provided for the purposes of this application is shown below. Figure 3 As shown, the pairing methods for infrared codes include:
[0121] Step S301: If the session ID sent by the set-top box is obtained, the session ID is stored. The session ID is generated by the set-top box when it obtains a preset trigger event.
[0122] In this embodiment of the application, when the set-top box detects a preset trigger event (such as a user pressing a specific button or selecting a specific option), it generates a unique session ID and sends the session ID to the remote control, thereby enabling the remote control to obtain the session ID.
[0123] In step S302, upon obtaining voice information, voice pairing information is generated based on the voice information and the session ID, and then sent to the set-top box. Specifically, if the set-top box receives the voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the set-top box's device identifier. The voice information includes television information. The set-top box sends the pairing request to the cloud platform. If the cloud platform accepts the pairing request, it verifies the request. If the pairing request verification is successful, it matches the infrared code based on the television information. If the infrared code is matched, it sends the infrared code and the session ID to the set-top box. If the set-top box receives the infrared code and the session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, it sends the infrared code to the remote control.
[0124] In this embodiment, the user inputs voice information via a remote control, which includes television information (such as television model and brand). The remote control generates voice pairing information based on the received voice information and a stored session ID. The voice pairing information can be a combination of voice information and a session ID, and may also include other identifiers to ensure communication integrity. The remote control sends the generated voice pairing information to the set-top box. After receiving the voice pairing information from the remote control, the set-top box extracts the session ID and voice information. The set-top box checks whether the session ID in the voice pairing information matches the locally stored session ID. If the session ID verification is successful, the set-top box generates a pairing request based on the voice pairing information and its own device identifier. The set-top box sends the generated pairing request to the cloud platform. After receiving the pairing request from the set-top box, the cloud platform extracts the device identifier and session ID. The cloud platform checks the legality of the device identifier, such as whether the format is correct and whether it belongs to a registered device. The cloud platform calculates the existence time of the session ID to determine whether it is within the valid duration range. Only when the device identifier verification is successful and the session ID validity verification is successful will the cloud platform determine that the pairing request has been verified. After the pairing request is verified, the cloud platform extracts the TV information from the voice pairing information. Based on the TV information, the cloud platform searches its database for a matching infrared code. If the cloud platform successfully matches the infrared code, it sends the infrared code and session ID to the set-top box. Upon receiving the infrared code and session ID from the cloud platform, the set-top box checks if the session ID matches the session ID stored locally. If the session IDs match, the set-top box sends the infrared code to the remote control.
[0125] Step S303: If the infrared code sent by the set-top box is obtained, pair the device with the TV based on the infrared code.
[0126] In this embodiment, after receiving the infrared code sent by the set-top box, the remote control loads it into its memory. The remote control then uses this infrared code to attempt pairing with the television, i.e., controlling the television by sending the infrared code. If the television responds to the infrared code (e.g., successfully turning it on / off, changing channels, etc.), the pairing is successful.
[0127] The method provided in this application embodiment stores the session ID sent by the set-top box when it receives the session ID, which is generated by the set-top box upon receiving a preset trigger event. When voice information is received, voice pairing information is generated based on the voice information and the session ID, and then sent to the set-top box. Specifically, when the set-top box receives voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored by the set-top box, it generates a pairing request based on the voice pairing information and the set-top box's device identifier. The voice information includes television information. The set-top box then sends the pairing request... The pairing request is sent to the cloud platform. Upon acceptance, the cloud platform verifies the request. If verification is successful, it matches the infrared code based on the TV's information. If a match is found, the cloud platform sends the infrared code and session ID to the set-top box. The set-top box, upon receiving the infrared code and session ID from the cloud platform and confirming that the session ID matches its stored information, sends the infrared code to the remote control. The remote control then pairs with the TV based on the infrared code sent by the set-top box. This process securely and efficiently completes the pairing process between the remote control and the TV when the user initiates a pairing request via voice. This process fully utilizes the session ID to ensure continuous and correct communication, while the cloud platform's infrared code matching function improves pairing accuracy and efficiency.
[0128] Based on the foregoing embodiments, this application provides an infrared code pairing method. This method is applied to a pairing system, which includes a set-top box, a remote control, and a cloud platform. Figure 4 This is a schematic diagram of the structure of a pairing system provided in an embodiment of this application, as shown below. Figure 4As shown, the remote control communicates with the set-top box, and the set-top box communicates with the cloud platform. The remote control includes a voice acquisition module, a communication module with the set-top box / dongle (such as Bluetooth, RF, Wi-Fi), an infrared transmitter module, buttons (including dedicated pairing buttons or combination buttons), and a memory (for temporarily storing SessionID and final infrared code). The set-top box includes a pairing management module (within the plug-in), a user interface module (within the plug-in), and a communication module. The pairing management module is responsible for generating and managing Session IDs, establishing a temporary binding with the remote control, handling the triggering and exiting of pairing modes, and communicating with the cloud platform (uploading voice data, SessionID, DeviceID, and receiving infrared codes). The user interface module (within the plug-in) is responsible for displaying pairing instructions, candidate code test prompts, and result feedback on the TV screen. The communication module communicates with the remote control / dongle and with the cloud platform. The cloud platform includes an authentication and session management module, a voice recognition module, an infrared code library and matching module, and a device management module. The authentication and session management module is used to verify the validity of the DeviceID and SessionID in the request. The speech recognition module converts speech data into text (such as TV brand and model number). The infrared code library and matching module matches infrared codes based on the TV brand and model, and supports candidate code recommendations. The device management module manages registered set-top box DeviceIDs.
[0129] Figure 5 This is a schematic diagram illustrating the implementation process of an infrared code pairing method provided in an embodiment of this application, as shown below. Figure 5 As shown, it includes:
[0130] In step S401, when the set-top box receives a preset trigger event, it generates a session ID, stores the session ID, and sends the session ID to the remote control.
[0131] In this embodiment of the application, the preset trigger event includes one or more of the following events: detecting a first trigger operation by the user on a preset option in the interactive interface of the set-top box controlling the TV display; detecting a second trigger operation by the user on a preset button on the set-top box; detecting a third trigger operation on a preset button on the remote control connected to the set-top box.
[0132] In step S402, the remote control stores the session ID after obtaining it.
[0133] In step S403, when the remote control obtains the voice information, it generates voice pairing information based on the voice information and the session ID, and sends the voice pairing information to the set-top box.
[0134] Step 404: When the set-top box receives the voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the device identifier of the set-top box.
[0135] In step S405, the set-top box sends a pairing request to the cloud platform.
[0136] In step S406, the cloud platform verifies the pairing request upon receiving it from the set-top box.
[0137] In step S407, if the pairing request is verified, the cloud platform matches the infrared code based on the TV information, and if the infrared code is matched, sends the infrared code and session ID to the set-top box.
[0138] In step S408, if the set-top box receives the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, it sends the infrared code to the remote control.
[0139] Step S409: The remote control is paired with the TV based on the infrared code.
[0140] In some embodiments, when multiple infrared codes exist, the method further includes the following steps concurrently with step S407:
[0141] In step S410, the cloud platform sends the test command to the set-top box.
[0142] In this embodiment of the application, after step S408, the method further includes:
[0143] In step S411, the set-top box controls the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform control tests through the remote control, and after the control test is completed, it guides the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing is successful, and the feedback information carries the session ID.
[0144] In step S412, if the set-top box determines that the current infrared code pairing is successful based on the feedback information and the session ID in the feedback information is consistent with the session ID stored in the set-top box, the set-top box discards the unsent infrared code.
[0145] In step S413, if the set-top box determines that the current infrared code pairing is unsuccessful based on the feedback information and the session ID in the feedback information is consistent with the session ID stored in the set-top box, it sends the next infrared code to the remote control and controls the TV to display the guide test screen based on the test command.
[0146] In some embodiments, after step S409, the method further includes:
[0147] Step S414: If the set-top box successfully pairs with the remote control and the TV, it clears the session ID; or, if the session ID exists for a certain period of time, it clears the session ID.
[0148] The method provided in this application, through a temporary Session ID binding mechanism, ensures a closed loop in the voice information and infrared code distribution chain, effectively preventing accidental triggering or malicious pairing by neighboring voice commands. Only remote controls that have legally activated the pairing mode and obtained a Session ID can complete pairing. The pairing request is bound to a specific set-top box-remote control pair, clearly identifying the target and avoiding confusion in multi-device environments. The interactive infrared code testing and confirmation process guides the user to quickly find the correct infrared code, even if the user's voice input model is inaccurate or multiple candidates exist in the cloud matching, improving pairing success rate and user satisfaction.
[0149] The pairing method using infrared codes provided in this application will be described in detail below with a specific example. The specific scenario is: User A wants to pair their set-top box 1 in their living room with a Sony TV A. The implementation process of the infrared code pairing method based on this example is as follows:
[0150] Step S1, activate pairing mode:
[0151] User A picks up the remote control R1, which is paired with set-top box 1, in the living room and presses the "Smart Pairing" button on it.
[0152] Step S2, Session Establishment:
[0153] Set-top box 1 receives the pairing start signal from R1 and enters the "infrared pairing preparation state". The pairing management module of set-top box 1 generates a unique Session ID (e.g., SESS_XYZ123) and sends SESS_XYZ123 to remote control R1 via Bluetooth. Remote control R1 stores SESS_XYZ123.
[0154] Set-top box 1 prompts on the TV screen: "Please state the brand and model of the TV you want to pair, such as 'Sony TV' or 'Sony KD-55X9000H'."
[0155] Step S3, Voice Command and Upload:
[0156] User A says "Sony TV" into remote control R1. Remote control R1 captures the voice and sends the voice data along with SESS_XYZ123 to set-top box 1. Set-top box 1's pairing management module packages the received voice data, SESS_XYZ123, and set-top box 1's own Device ID (e.g., STB_LIVINGROOM_001) and sends it to the cloud platform.
[0157] Step S4, Cloud Platform Processing and Verification:
[0158] Upon receiving the request, the cloud platform first verifies the validity of STB_LIVINGROOM_001, and then checks whether SESS_XYZ123 is a recently generated valid session for that Device ID. After successful verification, the voice recognition module identifies "Sony TV". The infrared code library and matching module search for the infrared code corresponding to "Sony TV". Assume three possible candidate codes are found: CODE_SONY_1, CODE_SONY_2, and CODE_SONY_3, along with their respective test commands (such as power on / off). The cloud platform then sends these three candidate codes, the test command list, and SESS_XYZ123 to set-top box 1 (STB_LIVINGROOM_001).
[0159] Step S5, Interactive Confirmation and Loading:
[0160] Set-top box 1 receives the data and verifies that SESS_XYZ123 matches the local record. Set-top box 1 sends CODE_SONY_1 to remote control R1 via Bluetooth for temporary loading. Set-top box 1 displays on the TV screen: "Scheme 1 loaded. Please press the [Power] button on the remote control to test if the TV responds. If it responds, press the [OK] button; if it does not respond, press the [Next Scheme] button." User A presses the power button on remote control R1 and finds that TV A responds. User A then presses the [OK] button on R1. Remote control R1 sends a "Confirmation Successful" signal (carrying SESS_XYZ123) to set-top box 1. Set-top box 1 confirms CODE_SONY_1 as the final infrared code, notifies remote control R1 to solidify the code, and notifies the cloud platform of successful pairing (optional, for statistics and optimization). Set-top box 1 clears the SESS_XYZ123 session record and exits pairing mode. The TV screen displays "Pairing successful!".
[0161] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0162] According to the foregoing embodiments, this application provides an infrared code pairing device. The various modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0163] This application provides an infrared code pairing device for use in set-top boxes. Figure 6 This is a schematic diagram of the structure of an infrared code pairing device provided in an embodiment of this application, as shown below. Figure 6 As shown, the infrared code pairing device 600 includes:
[0164] The first processing module 601 is used to generate a session ID, store the session ID, and send the session ID to the remote controller when a preset trigger event is obtained; wherein the remote controller stores the session ID when it obtains it.
[0165] The first generation module 602 is used to generate a pairing request based on the voice pairing information and the device identifier of the set-top box when it receives voice pairing information sent by the remote control and the session ID in the voice pairing information is consistent with the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control, and the voice information includes television information.
[0166] The first sending module 603 is used to send the pairing request to the cloud platform. When the cloud platform receives the pairing request, it verifies the pairing request. If the pairing request is verified, it matches the infrared code based on the TV information. If the infrared code is matched, it sends the infrared code and the session ID to the set-top box.
[0167] The second sending module 604 is used to send the infrared code to the remote control when it receives the infrared code and session ID sent by the cloud platform and the session ID is consistent with the session ID stored in the set-top box, so that the remote control can pair with the TV based on the infrared code.
[0168] In some embodiments, when the infrared codes include multiple ones, the cloud platform further sends a test command to the set-top box, and sending the infrared codes to the remote control includes:
[0169] The current infrared code is sent to the remote control, wherein the remote control temporarily loads the current infrared code upon receiving it.
[0170] The infrared code pairing device 600 also includes:
[0171] The display module is used to control the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform control tests through the remote control, and after the control test is completed, guide the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing is successful, and the feedback information carries a session ID.
[0172] The discard module is used to discard unsent infrared codes when it is determined based on the feedback information that the current infrared code pairing is successful and the session ID in the feedback information is consistent with the session ID stored in the set-top box.
[0173] The testing module is used to send the next infrared code to the remote control when it is determined based on the feedback information that the current infrared code pairing is unsuccessful and the session ID in the feedback information is consistent with the session ID stored in the set-top box, and to control the TV to display a guide test screen based on the test command.
[0174] In some embodiments, the preset triggering event includes one or more of the following events:
[0175] The system detects a first trigger operation by the user on a preset option in the interactive interface of the set-top box controlling the TV display;
[0176] A second trigger operation by the user on a preset button on the set-top box was detected;
[0177] A third trigger operation of a preset button on the remote control connected to the set-top box was detected.
[0178] In some embodiments, the infrared code pairing device 600 further includes:
[0179] The clearing module is used to clear the session ID when the remote control and the TV are successfully paired, or to clear the session ID when the session ID has existed for a valid duration.
[0180] This application embodiment further provides an infrared code pairing device, applied to a cloud platform, including:
[0181] The verification module is used to verify the pairing request when a pairing request is received from the set-top box. The pairing request is generated by the set-top box based on the voice pairing information and the device identifier of the set-top box, provided that the session ID in the voice pairing information matches the session ID stored in the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes television information. The session ID stored in the set-top box is generated when a preset trigger event is received. The session ID stored in the remote control is the one sent by the set-top box to the remote control.
[0182] The third sending module is used to match an infrared code based on the TV information when the pairing request is verified, and send the infrared code and the session ID to the set-top box when the infrared code is matched. The set-top box sends the infrared code to the remote control when it receives the infrared code and session ID sent by the cloud platform and the session ID is consistent with the session ID stored in the set-top box, so that the remote control can pair with the TV based on the infrared code.
[0183] In some embodiments, the infrared code pairing device further includes:
[0184] The fifth sending module is used to send a test command to the set-top box when multiple infrared codes exist, so that the set-top box controls the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform a control test using the remote control, and after the control test is completed, guide the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing was successful, and the feedback information carries a session ID.
[0185] In some embodiments, verifying the pairing request includes:
[0186] The device identifier is verified, and the validity period of the session ID is verified.
[0187] Specifically, if the device identifier verification is successful and the session ID timeliness verification is successful, the pairing request is determined to be successful.
[0188] This application embodiment further provides an infrared code pairing device, applied to a remote control, including:
[0189] A storage module is used to store the session ID sent by the set-top box upon receiving the session ID.
[0190] The fourth sending module is used to generate voice pairing information based on the voice information and the session ID when voice information is obtained, and to send the voice pairing information to the set-top box. Specifically, when the set-top box obtains the voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the device identifier of the set-top box. The voice information includes television information. The set-top box sends the pairing request to the cloud platform. When the cloud platform accepts the pairing request, it verifies the pairing request. If the pairing request is verified, it matches an infrared code based on the television information. If an infrared code is matched, it sends the infrared code and the session ID to the set-top box. When the set-top box obtains the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, it sends the infrared code to the remote control.
[0191] The pairing module is used to pair with the television based on the infrared code sent by the set-top box.
[0192] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0193] In addition, the infrared code pairing device shown above can be a software unit, a hardware unit, or a combination of software and hardware. It can also be integrated into electronic devices as an independent accessory, or exist as an independent terminal device.
[0194] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0195] Figure 7This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 3 in this embodiment may include: at least one processor 30 ( Figure 7 Only one processor 30, memory 31, and computer program 32 stored in memory 31 and executable on at least one processor 30 are shown. When the processor 30 executes the computer program 32, it implements the steps in any of the above method embodiments, or the processor 30 executes the computer program 32 to implement the functions of each module / unit in the above device or system embodiments.
[0196] For example, computer program 32 may be divided into one or more modules / units, one or more of which are stored in memory 31 and executed by processor 30 to complete this application. One or more modules / units may be a series of computer program 32 instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0197] This application also provides a computer-readable storage medium storing a computer program 32, which, when executed by a processor 30, implements the steps described in the above-described method embodiments.
[0198] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0199] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program 32 instructing related hardware. The computer program 32 can be stored in a computer-readable storage medium, and when executed by the processor 30, it can implement the steps of the various method embodiments described above. The computer program 32 includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code to a terminal, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0200] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0201] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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 beyond the scope of this application.
[0202] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0203] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0204] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for pairing infrared codes, characterized in that, Applied to a set-top box, the method includes: Upon receiving a preset trigger event, a session ID is generated, stored, and sent to the remote controller, wherein the remote controller stores the session ID upon receiving it. If the voice pairing information sent by the remote control is obtained and the session ID in the voice pairing information is consistent with the session ID stored in the set-top box, a pairing request is generated based on the voice pairing information and the device identifier of the set-top box. The voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control. The voice information includes TV information. The pairing request is sent to the cloud platform. Upon receiving the pairing request, the cloud platform verifies the pairing request, including verifying the device identifier and the validity period of the session ID. If both the device identifier and the validity period of the session ID are verified, the pairing request is deemed successful. If the pairing request is successfully verified, an infrared code is matched based on the TV information. If an infrared code is matched, the infrared code and the session ID are sent to the set-top box. If the infrared code and session ID sent by the cloud platform are obtained and the session ID is consistent with the session ID stored in the set-top box, the infrared code is sent to the remote control so that the remote control can pair with the TV based on the infrared code.
2. The method according to claim 1, characterized in that, When the infrared codes include multiple codes, the cloud platform also sends a test command to the set-top box. Sending the infrared codes to the remote control includes: The current infrared code is sent to the remote control, wherein the remote control temporarily loads the current infrared code upon receiving it. The method further includes: controlling the TV to display a guide test screen based on the test command, the guide test screen being used to guide the user to perform a control test using the remote control, and after the control test is completed, guiding the user to send feedback information using the remote control, the feedback information being used to indicate whether pairing was successful, and the feedback information carrying a session ID; If the current infrared code pairing is successful based on the feedback information and the session ID in the feedback information matches the session ID stored in the set-top box, the unsent infrared code is discarded. If, based on the feedback information, it is determined that the current infrared code pairing is unsuccessful and the session ID in the feedback information matches the session ID stored in the set-top box, the next infrared code is sent to the remote control, and the TV is controlled to display a guide test screen based on the test command.
3. The method according to claim 1, characterized in that, The preset triggering event includes one or more of the following events: The system detects a first trigger operation by the user on a preset option in the interactive interface of the set-top box controlling the TV display; A second trigger operation by the user on a preset button on the set-top box was detected; A third trigger operation of a preset button on the remote control connected to the set-top box was detected.
4. The method according to claim 1, characterized in that, The method further includes: If the remote control is successfully paired with the TV, clear the session ID; or, if the session ID exists for a valid duration, clear the session ID.
5. A method for pairing infrared codes, characterized in that, Applied to cloud platforms, including: The verification of the pairing request includes: verifying the device identifier and verifying the timeliness of the session ID; if the device identifier verification is successful and the timeliness verification of the session ID is successful, and the pairing request is verified as a pairing request sent by the set-top box, then the pairing request is verified; wherein the pairing request is generated by the set-top box based on the voice pairing information and the device identifier of the set-top box when it receives voice pairing information sent by the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box; the voice pairing information is generated by the remote control based on voice information and the session ID stored in the remote control; the voice information includes TV information; the session ID stored in the set-top box is generated by the set-top box when it receives a preset trigger event; and the session ID stored in the remote control is sent by the set-top box to the remote control. If the pairing request is verified, an infrared code is matched based on the TV information. If an infrared code is matched, the infrared code and the session ID are sent to the set-top box. If the set-top box receives the infrared code and session ID sent by the cloud platform and the session ID matches the session ID stored in the set-top box, the set-top box sends the infrared code to the remote control so that the remote control can pair with the TV based on the infrared code.
6. The method according to claim 5, characterized in that, The method further includes: If multiple infrared codes exist, a test command is sent to the set-top box, so that the set-top box controls the TV to display a guide test screen based on the test command. The guide test screen is used to guide the user to perform a control test using the remote control, and after the control test is completed, guide the user to send feedback information using the remote control. The feedback information is used to indicate whether the pairing was successful, and the feedback information carries a session ID.
7. A method for pairing infrared codes, characterized in that, Applied to a remote control, the method includes: Upon receiving the session ID sent by the set-top box, the session ID is stored. The session ID is generated by the set-top box upon receiving a preset trigger event. Upon receiving voice information, voice pairing information is generated based on the voice information and the session ID, and then sent to the set-top box. Specifically, if the set-top box receives voice pairing information from the remote control and the session ID in the voice pairing information matches the session ID stored in the set-top box, it generates a pairing request based on the voice pairing information and the set-top box's device identifier. The voice information includes television information. The set-top box sends the pairing request to the cloud platform. If the cloud platform accepts the pairing request, it verifies the pairing request. In the event of a successful pairing, the infrared code is matched based on the TV information. If a match is found, the infrared code and the session ID are sent to the set-top box. The set-top box, upon receiving the infrared code and session ID from the cloud platform and finding that the session ID matches the session ID stored in the set-top box, sends the infrared code to the remote control. The verification of the pairing request includes verifying the device identifier and the validity period of the session ID. If both the device identifier verification and the validity period verification of the session ID are successful, the pairing request is deemed to have passed verification. Upon receiving the infrared code sent by the set-top box, pairing is performed with the television based on the infrared code.
8. The method according to claim 7, characterized in that, The method further includes: If the remote control is successfully paired with the TV, clear the session ID; or, if the session ID exists for a valid duration, clear the session ID.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 4, or the method as described in any one of claims 5 to 6, or the method as described in any one of claims 7 to 8.