Television control method and device, electronic equipment and storage medium

By connecting to the TV via an adapter and transmitting target key-value messages using broadcast messages and the Bluetooth GATT protocol, the problem of high barriers to entry and poor adaptability in TV control methods is solved, achieving highly adaptable control that is ready to use immediately and improving the user experience.

CN121888018APending Publication Date: 2026-04-17CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
Filing Date
2024-10-17
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing TV control methods have high barriers to entry and poor adaptability, resulting in a poor user experience.

Method used

The phone connects to the TV via an adapter, automatically connecting to the adapter using broadcast messages. It also transmits target key-value messages via the Bluetooth GATT protocol, which the adapter converts into HID control commands and sends to the TV, simplifying user operation.

Benefits of technology

It lowers the barrier to entry for users, enabling immediate use, improving compatibility and user experience, and avoiding the Bluetooth pairing connection failures found in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121888018A_ABST
    Figure CN121888018A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wireless control, and provides a television control method and device, electronic equipment and a storage medium. The method comprises the following steps: sending a broadcast message to a mobile phone to connect the mobile phone with an adapter; after the target key of the mobile phone is operated, receiving a target key value message sent by the mobile phone; and sending the target control instruction to the television. According to the mode, the adapter is connected with the television, the mobile phone is connected with the adapter through the broadcast message, and after the target key of the mobile phone is operated, the adapter can receive the target key value message sent by the mobile phone and send the target control instruction to the television, so that the television is controlled, the use threshold of a user can be reduced, and the user experience is improved. And the method and the device have high adaptability and are favorable for improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless control technology, and in particular to a television control method, device, electronic device and storage medium. Background Technology

[0002] In some related technologies, there are generally three methods to control a TV via a mobile phone: infrared control, WiFi (wireless network) control, and Bluetooth control.

[0003] The infrared control solution requires users to install a relevant application on their mobile phones, select the matching infrared code library according to the TV model, and then control the TV via infrared codes.

[0004] The WiFi control solution requires users to install relevant applications on both their TV and mobile phone, and then bind their mobile phone and TV application accounts by scanning a QR code or logging in with their mobile phone number. This allows the mobile phone to send control commands to the cloud via the wireless network, and the cloud to send control commands to the TV, thereby enabling control of the TV.

[0005] The Bluetooth control solution requires users to install a relevant application on their mobile phones, set the phones as HID (Human Interface Device) slave devices, and pair the TV with the mobile phones via Bluetooth. This allows the mobile phones to send control commands to the TV via Bluetooth, thereby controlling the TV.

[0006] However, some mobile phones do not support infrared control. To achieve infrared control, an external infrared transmitter is required. WiFi control requires high network performance. Bluetooth control requires the TV and mobile phone to be paired via Bluetooth. Due to the design of the TV's Bluetooth chip, pairing the TV and mobile phone via Bluetooth can easily lead to connection failures between the TV and the remote control.

[0007] Therefore, the three existing TV control methods have high barriers to entry and poor compatibility, resulting in a poor user experience. Summary of the Invention

[0008] This application provides a television control method, device, electronic device, and storage medium to solve the technical problems of existing television control methods having high usage thresholds, poor adaptability, and resulting in poor user experience.

[0009] In a first aspect, embodiments of this application provide a television control method applied to an adapter connected to a television. The method includes: sending a broadcast message to a mobile phone to connect the mobile phone to the adapter; receiving a target key value message sent by the mobile phone after a target key on the mobile phone is operated; and sending a target control command to the television.

[0010] In one embodiment, the broadcast message includes a reconnection broadcast message; sending a broadcast message to the mobile phone to enable the mobile phone to connect with the adapter includes: after power-on, determining whether there is pairing information for the mobile phone; if there is pairing information for the mobile phone, generating a reconnection broadcast message; and sending a reconnection broadcast message to the mobile phone so that the mobile phone connects with the adapter after receiving the reconnection broadcast message.

[0011] In one embodiment, the broadcast message includes a pairing broadcast message; sending the broadcast message to the mobile phone to enable the mobile phone to connect to the adapter includes: after powering on, determining whether there is pairing information for the mobile phone; if there is no pairing information for the mobile phone, generating a pairing broadcast message; the pairing broadcast message carries the Bluetooth address of the paired device; sending the pairing broadcast message to the mobile phone so that after receiving the pairing broadcast message, the mobile phone connects to the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message.

[0012] In one embodiment, the target key value message carries the target HID key value of the target button, and the target control instruction is an instruction using the HID protocol; sending the target control instruction to the television includes: parsing the target key value message carrying the target HID key value to generate a target control instruction using the HID protocol; and sending the target control instruction to the television.

[0013] Secondly, embodiments of this application provide a television control method applied to a mobile phone. The method includes: receiving a broadcast message from an adapter; connecting to the adapter based on the broadcast message; generating a target key value message after a target key on the mobile phone is operated; the target key value message carrying the target HID key value of the target key; and sending the target key value message to the adapter, so that after receiving the target key value message, the adapter sends a target control command to the television.

[0014] In one embodiment, after a target key on the mobile phone is operated, generating a target key value message includes: after the target key on the mobile phone is operated, determining the target HID key value of the target key based on the mapping relationship between the target key, all HID key values ​​of the TV, and all keys on the mobile phone and all HID key values ​​of the TV; and generating a target key value message based on the target HID key value.

[0015] In one embodiment, after connecting to the adapter based on the broadcast message, the method further includes: reporting the information of the television to the cloud, so that the cloud can obtain all the HID key values ​​of the television based on the information of the television; and receiving all the HID key values ​​of the television sent by the cloud.

[0016] Thirdly, the first sending module is used to send broadcast messages to the mobile phone to connect the mobile phone to the adapter; the receiving module is used to receive the target key value message sent by the mobile phone after the target key is operated; the second sending module is used to send target control commands to the television.

[0017] Fourthly, 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. When the processor executes the computer program, it implements any of the television control methods described above.

[0018] Fifthly, embodiments of this application provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the television control methods described above.

[0019] The television control method, device, electronic device, and storage medium provided in this application embodiment connect the adapter to the television and connect the mobile phone to the adapter via broadcast messages. After the target key on the mobile phone is operated, the adapter can receive the target key value message sent by the mobile phone and send the target control command to the television to achieve control of the television. This can reduce the user's usage threshold, achieve instant use, and has high adaptability, which is conducive to improving the user experience. Attached Figure Description

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

[0021] Figure 1 This is one of the flowcharts illustrating the television control method provided in the embodiments of this application.

[0022] Figure 2 This is a connection diagram of the hardware devices provided in the embodiments of this application.

[0023] Figure 3 This is a schematic diagram of the automatic pairing process provided in the embodiments of this application.

[0024] Figure 4 This is the second flowchart of the television control method provided in the embodiments of this application.

[0025] Figure 5 This is the message format of the broadcast message provided in the embodiments of this application.

[0026] Figure 6This is the third flowchart illustrating the television control method provided in the embodiments of this application.

[0027] Figure 7 This is the fourth flowchart of the television control method provided in the embodiments of this application.

[0028] Figure 8 This is a schematic diagram of the structure of the television control device provided in the embodiments of this application.

[0029] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

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

[0031] Please see Figure 1 and Figure 2 , Figure 1 This is one of the flowcharts illustrating the television control method provided in this application. Figure 2 This is a connection diagram of the hardware devices provided in an embodiment of this application. In this embodiment, the television control method is applied to an adapter, which is connected to the television. The television control method includes steps S110 to S130, each step as follows: S110: Sends a broadcast message to the mobile phone to connect the mobile phone to the adapter.

[0032] like Figure 2 As shown, most existing televisions are typically smart TVs. Smart TVs have a framework layer (i.e., application framework layer) and usually have at least one USB port for connecting other devices. Therefore, the TV can be connected to an adapter via its USB port.

[0033] Specifically, the adapter is a Bluetooth adapter, also known as a USB dongle (full name: USB Bluetooth Dongle); the adapter can be directly plugged into the USB port of the TV to connect the adapter to the TV.

[0034] Optionally, the adapter can connect to the mobile phone via Bluetooth, using the Bluetooth GATT (Generic Attribute Profile) protocol for communication.

[0035] Specifically, the Bluetooth adapter supports custom services, which can be used to connect and communicate with a mobile app (i.e., application) via Bluetooth, thereby avoiding compatibility issues that may arise from the phone emulating other special devices. After receiving a custom message from the phone, the custom service inside the Bluetooth adapter can convert the custom message into a control command using the standard HID protocol and send the control command to the TV.

[0036] The TV supports receiving control commands or input signals from the Bluetooth adapter via USB interface and endpoint read / write technology, and interacts with the Bluetooth adapter through the built-in AI (artificial intelligence) assistant to provide personalized recommendation functions.

[0037] The phone has a built-in low-power Bluetooth module for communicating with the Bluetooth adapter. At the same time, the phone needs to install an application to enable automatic pairing and connection with the Bluetooth adapter. After the phone and the Bluetooth adapter establish a Bluetooth connection, the phone can send control commands to the Bluetooth adapter.

[0038] It should be noted that this embodiment involves two application software programs: a mobile app and a TV app. The mobile app supports GATT universal technology and communicates with the Bluetooth adapter via the Bluetooth GATT protocol, avoiding compatibility issues that may arise from the phone emulating other special devices. Simultaneously, the mobile app can obtain the HID key value list of the corresponding TV based on information such as the TV brand or model and save it locally. Users can operate corresponding buttons in the mobile app. After a button is operated, a Bluetooth GATT message is sent to the Bluetooth adapter, carrying the HID key value of the operated button. Upon receiving the Bluetooth GATT message, the Bluetooth adapter can parse it using its key value parsing module to generate corresponding control commands and forward them to the TV, thereby enabling the mobile phone to control the TV.

[0039] Specifically, after the adapter is plugged into the TV's USB port to connect the adapter to the TV, the adapter can send broadcast messages to the mobile phone, enabling the mobile phone to establish a Bluetooth connection with the adapter based on the broadcast messages.

[0040] S120: After the target key on the phone is pressed, receive the target key value message sent by the phone.

[0041] Specifically, after the phone and adapter are connected via Bluetooth, the user can operate the target button via touch screen on the mobile app.

[0042] For example, after the mobile phone and the adapter are connected via Bluetooth, the TV can have all the input characters of the keyboard. Users can click the target key on the keyboard through the touch screen, without having to select the input character multiple times using the directional keys on the remote control.

[0043] Furthermore, after the target button is pressed, the phone will directly generate a target key value message corresponding to the target button. The target key value message carries the target HID key value of the target button and sends the generated target key value message to the adapter.

[0044] Furthermore, the adapter can receive target key-value messages sent by the mobile phone.

[0045] Furthermore, after receiving the target key-value message sent by the mobile phone, the adapter can parse the target key-value message and generate target control commands.

[0046] S130: Sends target control commands to the television.

[0047] The target control command carries the target HID key value of the target button, and the target HID key value is used to control the television.

[0048] The television control method, device, electronic device, and storage medium provided in this application embodiment connect the adapter to the television and connect the mobile phone to the adapter via broadcast messages. After the target key on the mobile phone is operated, the adapter can receive the target key value message sent by the mobile phone and send the target control command to the television to achieve control of the television. This can reduce the user's usage threshold, achieve instant use, and has high adaptability, which is conducive to improving the user experience.

[0049] In some embodiments, the broadcast message includes a backlink broadcast message.

[0050] Sending a broadcast message to the mobile phone to enable the mobile phone to connect with the adapter includes: after powering on, determining whether there is pairing information for the mobile phone; if there is pairing information for the mobile phone, generating a reconnection broadcast message; and sending the reconnection broadcast message to the mobile phone so that the mobile phone connects with the adapter after receiving the reconnection broadcast message.

[0051] Understandably, in order to achieve instant-on functionality, the adapter needs to remain connected to the TV. When the TV is turned on, the adapter can automatically power on along with the TV and automatically pair with the mobile phone.

[0052] Correspondingly, after the user opens the mobile app, the app will automatically search for the target Bluetooth name of the adapter and automatically pair and connect.

[0053] Please see Figure 3 and Figure 4 , Figure 3 This is a schematic diagram of the automatic pairing process provided in an embodiment of this application. Figure 4 This is the second flowchart of the television control method provided in the embodiments of this application.

[0054] Specifically, such as Figure 3 As shown, after the adapter is powered on, the adapter can first determine whether the phone's pairing information is stored inside.

[0055] If pairing information for the mobile phone exists, a reconnection broadcast message is generated based on the pairing information. The reconnection broadcast message is sent to the mobile phone for a preset duration to allow sufficient connection time for the mobile phone, so that the mobile phone can connect to the adapter based on the reconnection broadcast message after receiving it.

[0056] Optionally, the preset duration is at least 5 seconds to 30 seconds.

[0057] Preferably, the preset duration is 20 seconds.

[0058] Specifically, after the adapter sends a reconnection broadcast message to the mobile phone and continues for a preset duration, it needs to determine whether the mobile phone has reconnected to the adapter based on the reconnection broadcast message.

[0059] If the phone has successfully reconnected to the adapter based on the reconnection broadcast message, then the connection is considered successful.

[0060] If the phone fails to reconnect to the adapter based on the reconnect broadcast message, the connection is considered to have failed. In this case, the adapter can generate a pairing broadcast message and send it out continuously until the user opens the mobile app. The mobile app will then automatically search for the adapter's target Bluetooth name, receive the pairing broadcast messages sent by the adapter, and connect to the adapter based on the pairing broadcast messages.

[0061] Specifically, such as Figure 4 As shown, both the reconnect broadcast message and the pairing broadcast message can be transmitted via the Bluetooth GATT protocol.

[0062] Preferably, the adapter can send broadcast messages for Bluetooth 4.0 or later, including reconnect broadcast messages and pairing broadcast messages.

[0063] Please see Figure 5 , Figure 5 This is the message format of the broadcast message provided in the embodiments of this application.

[0064] like Figure 5 As shown, the broadcast message contains a custom data area. The 37 bytes of the custom data area support custom services for the broadcast, allowing both return broadcast messages and pairing broadcast messages to coexist in the broadcast.

[0065] The custom data area contains information such as the Bluetooth name, the UUID (Universally Unique Identifier) ​​of the custom service, the Bluetooth address of the paired device (i.e., the Bluetooth address of the device that has been paired with the adapter), and connection parameters.

[0066] The first data block (block 1) of the custom data area is 4 bytes and is used to store the Bluetooth name.

[0067] The second data block (block 2) of the custom data area is 2 bytes and is used to store the UUID of the custom service.

[0068] The third data block of the custom data area (i.e., block 3) is 2 bytes or 6 bytes, used to store the Bluetooth address of the previously paired device. 2 bytes means that there is no pairing information, while 6 bytes means that there is pairing information and the Bluetooth address of the paired device is stored.

[0069] The fourth data block in the custom data area (block 4) is either 5 bytes or 0 bytes, used to store the connection parameters of the previously paired device; 2 bytes means no connection parameters are present.

[0070] The fifth data block (block 5) of the custom data area is 5 bytes and is used to store the connection parameters of the current adapter.

[0071] If the target Bluetooth name found by the phone matches the Bluetooth name in this custom broadcast message, it means that the phone has found the adapter. The phone can parse the broadcast message. If the Bluetooth address of the last paired device stored in the broadcast message is not empty, and the Bluetooth address of the last paired device stored in the broadcast message is the same as the current phone's Bluetooth address, and the current phone also saves the pairing information of both parties, then the phone can directly reconnect to the adapter, reducing the time for re-pairing Bluetooth. Otherwise, the phone will re-pair and connect to the adapter via Bluetooth, thereby improving the accuracy and timeliness of reconnection and pairing.

[0072] In some embodiments, broadcast messages include paired broadcast messages.

[0073] Sending a broadcast message to the mobile phone to enable the connection between the mobile phone and the adapter includes: after powering on, determining whether there is pairing information for the mobile phone; if there is no pairing information for the mobile phone, generating a pairing broadcast message; the pairing broadcast message carries the Bluetooth address of the paired device; sending the pairing broadcast message to the mobile phone, so that after receiving the pairing broadcast message, the mobile phone connects to the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message.

[0074] Specifically, such as Figure 3 As shown, after the adapter is powered on, the adapter can first determine whether the phone's pairing information is stored inside.

[0075] If no pairing information is available for the phone, a pairing broadcast message is generated. The pairing broadcast message is sent to the phone in a loop. The pairing broadcast message carries the Bluetooth address of the device that has been paired with the adapter, so that after the phone receives the pairing broadcast message, it can connect to the adapter based on the Bluetooth address of the device that has been paired with the adapter carried in the pairing broadcast message.

[0076] Specifically, if the target Bluetooth name found by the phone matches the Bluetooth name in this custom pairing broadcast message, it means that the phone has found the adapter. At this time, the phone can parse the pairing broadcast message and determine whether the Bluetooth address of the previously paired device stored in the pairing broadcast message is consistent with the current Bluetooth address of the phone.

[0077] If the Bluetooth address of the previously paired device stored in the pairing broadcast message is not empty, and the Bluetooth address of the previously paired device stored in the pairing broadcast message is consistent with the Bluetooth address of the current mobile phone, and the current mobile phone also saves the pairing information of both parties, then the mobile phone can directly reconnect to the adapter, reducing the time for re-pairing via Bluetooth; otherwise, the mobile phone will re-pair with the adapter via Bluetooth, thereby improving the accuracy and timeliness of reconnection and pairing.

[0078] Further, determine whether the phone has successfully reconnected directly to the adapter.

[0079] If the phone and adapter successfully reconnect directly, then the connection is considered successful.

[0080] If the phone fails to reconnect directly to the adapter, it can pair with the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message until the connection is successful.

[0081] Once the phone and adapter are successfully connected, the mobile app will look up the adapter's GATT service feature value. After finding the custom service feature value, the mobile app will start the adapter's custom service. Subsequent user key-value messages can be transmitted based on the custom service, that is, through the Bluetooth GATT protocol.

[0082] The TV control method provided in this application embodiment allows the adapter to be paired with a mobile phone and allows for custom broadcast data format. Unlike existing adapter usage methods, this application uses the adapter to send pairing broadcast messages and reconnection broadcast messages, which avoids the poor adaptation problem caused by sending Bluetooth broadcast messages through the mobile phone in existing solutions. Furthermore, sending pairing broadcast messages through the adapter allows for customization of the broadcast format. The Bluetooth address of the paired device is stored in the custom pairing broadcast message. When the mobile phone resolves that the Bluetooth address of the paired device on the adapter is consistent with its own address, it can initiate a direct connection, reducing the time spent on re-pairing.

[0083] In some embodiments, the target key value message carries the target HID key value of the target key, and the target control instruction is an instruction using the HID protocol.

[0084] Sending target control commands to the television includes: parsing a target key value message carrying a target HID key value to generate target control commands using the HID protocol; and sending the target control commands to the television.

[0085] Specifically, such as Figure 4 As shown, after the mobile phone and the adapter are connected via Bluetooth, the user can operate the target button on the mobile APP via touch screen.

[0086] Furthermore, after the target button is pressed, the phone will directly generate a target key value message corresponding to the target button. The target key value message carries the target HID key value corresponding to the target button. The phone can send the generated target key value message to the adapter via the Bluetooth GATT protocol.

[0087] Furthermore, the adapter can receive target key value messages sent by the mobile phone, parse the target key value messages carrying target HID key values, and generate target control instructions using the HID protocol. The target control instructions carry the target HID key value corresponding to the target button.

[0088] Furthermore, the adapter can send target control commands to the television.

[0089] Optionally, the target key-value message transmitted via the Bluetooth GATT protocol can be obtained by capturing packets via Bluetooth at the adapter end, and the target HID key-value in the target control command forwarded by the adapter to the TV can be obtained by the command adb shellgetevent -l.

[0090] The TV control method provided in this application sends a custom target key value message transmitted using the Bluetooth GATT protocol to the adapter via a mobile APP, thereby realizing the transmission of the target HID key value. On the adapter side, the target key value message can be converted into a target control command using the HID protocol. The target control command carries the target HID key value corresponding to the target button, thus realizing the conversion of the target key value.

[0091] This application also provides a television set control method. Please refer to [link / reference]. Figure 6 , Figure 6 This is the third flowchart illustrating the television control method provided in this application embodiment. In this application embodiment, the television control method is applied to a mobile phone, and the television control method includes steps S610 to S640, each step being as follows: S610: Receives broadcast messages from the adapter.

[0092] Specifically, the adapter is a Bluetooth adapter, also known as a USB dongle (full name: USB Bluetooth Dongle); the adapter can be directly plugged into the USB port of the TV to connect the adapter to the TV.

[0093] Optionally, the adapter can connect to the mobile phone via Bluetooth, using the Bluetooth GATT (Generic Attribute Profile) protocol for communication.

[0094] Specifically, the Bluetooth adapter supports custom services, which can be used to connect and communicate with a mobile app (i.e., application) via Bluetooth, thereby avoiding compatibility issues that may arise from the phone emulating other special devices. After receiving a custom message from the phone, the custom service inside the Bluetooth adapter can convert the custom message into a control command using the standard HID protocol and send the control command to the TV.

[0095] The TV supports receiving control commands or input signals from the Bluetooth adapter via USB interface and endpoint read / write technology, and interacts with the Bluetooth adapter through the built-in AI (artificial intelligence) assistant to provide personalized recommendation functions.

[0096] The phone has a built-in low-power Bluetooth module for communicating with the Bluetooth adapter. At the same time, the phone needs to install an application to enable automatic pairing and connection with the Bluetooth adapter. After the phone and the Bluetooth adapter establish a Bluetooth connection, the phone can send control commands to the Bluetooth adapter.

[0097] It should be noted that this embodiment involves two application software programs: a mobile app and a TV app. The mobile app supports GATT universal technology and communicates with the Bluetooth adapter via the Bluetooth GATT protocol, avoiding compatibility issues that may arise from the phone emulating other special devices. Simultaneously, the mobile app can obtain the HID key value list of the corresponding TV based on information such as the TV brand or model and save it locally. Users can operate corresponding buttons in the mobile app. After a button is operated, a Bluetooth GATT message is sent to the Bluetooth adapter, carrying the HID key value of the operated button. Upon receiving the Bluetooth GATT message, the Bluetooth adapter can parse it using its key value parsing module to generate corresponding control commands and forward them to the TV, thereby enabling the mobile phone to control the TV.

[0098] Specifically, after the adapter is plugged into the TV's USB port to connect the adapter to the TV, the adapter can send broadcast messages to the mobile phone, enabling the mobile phone to establish a Bluetooth connection with the adapter based on the broadcast messages.

[0099] Furthermore, the mobile phone can receive broadcast messages from the adapter.

[0100] S620: Connects to the adapter based on broadcast messages.

[0101] Specifically, such as Figure 3 As shown, after the adapter is powered on, the adapter can first determine whether the phone's pairing information is stored inside.

[0102] If pairing information for the mobile phone exists, the adapter can generate a reconnection broadcast message based on the pairing information; send the reconnection broadcast message to the mobile phone and continue for a preset duration to allow the mobile phone enough connection time so that the mobile phone can connect to the adapter based on the reconnection broadcast message after receiving it.

[0103] Optionally, the preset duration is at least 5 seconds to 30 seconds.

[0104] Preferably, the preset duration is 20 seconds.

[0105] Specifically, after the adapter sends a reconnection broadcast message to the mobile phone and continues for a preset duration, it needs to determine whether the mobile phone has reconnected to the adapter based on the reconnection broadcast message.

[0106] If the phone has successfully reconnected to the adapter based on the reconnection broadcast message, then the connection is considered successful.

[0107] If the phone fails to reconnect to the adapter based on the reconnect broadcast message, the connection is considered to have failed. In this case, the adapter can generate a pairing broadcast message and send it out in a loop until the user opens the mobile app. The mobile app will then automatically search for the adapter's target Bluetooth name, receive the pairing broadcast messages sent by the adapter, and connect to the adapter based on the pairing broadcast messages.

[0108] Specifically, such as Figure 3 As shown, after the adapter is powered on, the adapter can first determine whether it has stored the pairing information of the mobile phone. If the adapter does not have the pairing information of the mobile phone, it generates a pairing broadcast message and sends the pairing broadcast message to the mobile phone in a loop. The pairing broadcast message carries the Bluetooth address of the device that the adapter has paired with, so that after the mobile phone receives the pairing broadcast message, it can connect to the adapter based on the Bluetooth address of the device that has been paired with the adapter carried in the pairing broadcast message.

[0109] Specifically, if the target Bluetooth name found by the phone matches the Bluetooth name in this custom pairing broadcast message, it means that the phone has found the adapter. At this time, the phone can parse the pairing broadcast message and determine whether the Bluetooth address of the previously paired device stored in the pairing broadcast message is consistent with the current Bluetooth address of the phone.

[0110] If the Bluetooth address of the previously paired device stored in the pairing broadcast message is not empty, and the Bluetooth address of the previously paired device stored in the pairing broadcast message is consistent with the Bluetooth address of the current mobile phone, and the current mobile phone also saves the pairing information of both parties, then the mobile phone can directly reconnect to the adapter, reducing the time for re-pairing via Bluetooth; otherwise, the mobile phone will re-pair with the adapter via Bluetooth, thereby improving the accuracy and timeliness of reconnection and pairing.

[0111] Further, determine whether the phone has successfully reconnected directly to the adapter.

[0112] If the phone and adapter successfully reconnect directly, then the connection is considered successful.

[0113] If the phone fails to reconnect directly to the adapter, it can pair with the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message until the connection is successful.

[0114] S630: After the target key on the phone is pressed, a target key value message is generated.

[0115] The target key-value message carries the target HID key-value of the target key.

[0116] Specifically, after the phone and adapter are connected via Bluetooth, the user can operate the target button via touch screen on the mobile app.

[0117] For example, after the mobile phone and the adapter are connected via Bluetooth, the TV can have all the input characters of the keyboard. Users can click the target key on the keyboard through the touch screen, without having to select the input character multiple times using the directional keys on the remote control.

[0118] Furthermore, after the target button is pressed, the phone will directly generate a target key value message corresponding to the target button, which carries the target HID key value of the target button.

[0119] S640: Sends a target key value message to the adapter, so that after receiving the target key value message, the adapter sends a target control command to the TV.

[0120] The target control command carries the target HID key value of the target button, and the target HID key value is used to control the television.

[0121] The television control method, device, electronic device, and storage medium provided in this application embodiment connect the adapter to the television and connect the mobile phone to the adapter via broadcast messages. After the target key on the mobile phone is operated, the adapter can receive the target key value message sent by the mobile phone and send the target control command to the television to achieve control of the television. This can reduce the user's usage threshold, achieve instant use, and has high adaptability, which is conducive to improving the user experience.

[0122] In some embodiments, after a target key on the mobile phone is operated, generating a target key value message includes: after the target key on the mobile phone is operated, determining the target HID key value of the target key based on the mapping relationship between the target key, all HID key values ​​of the TV, all keys on the mobile phone and all HID key values ​​of the TV; and generating a target key value message based on the target HID key value.

[0123] In some embodiments, after connecting to the adapter based on broadcast messages, the method further includes: reporting information about the television to the cloud, so that the cloud can obtain all HID key values ​​of the television based on the information about the television; and receiving all HID key values ​​of the television sent by the cloud.

[0124] Understandably, different TVs may have different HID key values. Therefore, a set of HID key values ​​applicable to different brands and models of TVs using the current adapter can be maintained in the cloud.

[0125] Users can report TV information to the cloud via a mobile app. This information includes, but is not limited to, the TV's model and brand. The cloud can then retrieve all HID key values ​​of the current TV based on this information and send them to the mobile app.

[0126] Furthermore, the mobile app can receive all HID key values ​​of the TV sent from the cloud and save them to a local database.

[0127] In this embodiment, users can dynamically send the corresponding HID key value to the TV by selecting the TV brand and model, which enables dynamic adaptation to the TV and improves the universality and stability of button control.

[0128] Once the phone and adapter are successfully connected, the mobile app will look up the adapter's GATT service feature value. After finding the custom service feature value, the mobile app will start the adapter's custom service. Subsequent user key-value messages can be transmitted based on the custom service, that is, through the Bluetooth GATT protocol.

[0129] Furthermore, users can operate the target button via touch screen on the mobile app; after the target button is operated, the mobile phone will directly generate the target key value message corresponding to the target button, which carries the target HID key value of the target button.

[0130] This application also provides a specific example of a television set control method. Please refer to [link / reference]. Figure 7 , Figure 7 This is the fourth flowchart of the television control method provided in the embodiments of this application.

[0131] like Figure 7 As shown, the adapter can be directly plugged into the USB port of the TV to connect the adapter to the TV; the adapter connects to the mobile phone via Bluetooth, using the Bluetooth GATT (Generic Attribute Profile) protocol for communication.

[0132] Once the phone and adapter are successfully connected, the user can obtain all the HID key values ​​of the current TV through the cloud.

[0133] Furthermore, users can operate the target button via touch screen on the mobile app; after the target button is operated, the mobile phone will directly generate the target key value message corresponding to the target button, which carries the target HID key value of the target button.

[0134] Assuming the target HID key value is 0x0e(07), i.e., the 6-byte HID key value 0x275C 0007 000e, the mobile APP can send the target key value message carrying the target HID key value to the adapter through the Bluetooth GATT protocol and the command function BluetoothGatt.write(byte[]). The Bluetooth module of the adapter can receive the target key value message and perform key value conversion on the target key value message, converting the HID key value 0x275C 0007 000e into channel 07 of HID, using 01 to represent the button being pressed and 02 to represent the button being released, generating a target control command carrying the target HID key value, and sending the target control command to the TV through the HID protocol.

[0135] The television control method provided in this application has at least the following advantages compared with existing solutions: (1) Improved convenience: The adapter automatically pairs with the mobile phone through the low-power Bluetooth module, eliminating the need for users to manually select or match the TV model, reducing the complexity of operation, enabling it to be used immediately and significantly improving the user experience.

[0136] (2) Lower latency: The adapter directly converts messages sent by the mobile phone into button signals for the TV and uses low-power Bluetooth communication, enabling low-latency command transmission. Compared to the cloud latency in WiFi control solutions, this solution provides faster control response.

[0137] (3) Better stability: The target key value is transmitted to the adapter via the Bluetooth GATT protocol, and then the adapter converts the corresponding GATT message into HID key value. This avoids the compatibility problem of multiple devices such as TV, mobile phone and adapter. Only the Bluetooth channel between the mobile phone and the adapter needs to be guaranteed.

[0138] (4) Better compatibility: By obtaining the HID key-value mapping table of the specified TV from the cloud and sending it through the GATT channel between the mobile phone and the adapter, the compatibility of different TVs can be improved, avoiding the problem of unresponsive key values.

[0139] (5) Optimize input and simplify operation: Utilize the touch screen function of the mobile phone to display all key values ​​according to the layout of the mobile phone's input keyboard. When the user clicks a key, the corresponding GATT message can be sent. The adapter then converts the corresponding GATT message into HID key value, which can avoid the user using the remote control's directional keys to select keys and simplifies the user operation.

[0140] This application also provides a television set control device. Please refer to... Figure 8 , Figure 8 This is a schematic diagram of the structure of a television control device provided in an embodiment of this application. In this embodiment, the television control device includes a first transmitting module 810, a receiving module 820, and a second transmitting module 830.

[0141] The first sending module 810 is used to send broadcast messages to the mobile phone, enabling the mobile phone to connect to the adapter.

[0142] The receiving module 820 is used to receive the target key value message sent by the mobile phone after the target key of the mobile phone is operated.

[0143] The second transmitting module 830 is used to send target control commands to the television.

[0144] In some embodiments, broadcast messages include follow-back broadcast messages.

[0145] The first sending module 810 is used to determine whether there is pairing information for the mobile phone after power-on; if there is pairing information for the mobile phone, it generates a reconnection broadcast message; and sends the reconnection broadcast message to the mobile phone so that the mobile phone connects to the adapter after receiving the reconnection broadcast message.

[0146] In some embodiments, broadcast messages include paired broadcast messages.

[0147] The first transmitting module 810 is used to determine whether there is pairing information for the mobile phone after power-on; if there is no pairing information for the mobile phone, it generates a pairing broadcast message; the pairing broadcast message carries the Bluetooth address of the paired device; and sends the pairing broadcast message to the mobile phone, so that after the mobile phone receives the pairing broadcast message, it connects to the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message.

[0148] In some embodiments, the target key value message carries the target HID key value of the target key, and the target control instruction is an instruction using the HID protocol.

[0149] The second sending module 830 is used to parse the target key value message carrying the target HID key value, generate a target control command using the HID protocol, and send the target control command to the television.

[0150] This application also provides an electronic device. Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 9 As shown, the electronic device may include a processor 910, a communications interface 920, a memory 930, and a communication bus 940. The processor 910, communications interface 920, and memory 930 communicate with each other via the communication bus 940. The processor 910 can call logic instructions from the memory 930 to execute television control methods.

[0151] Furthermore, the logical instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the television control methods provided by the methods described above.

[0153] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.

Claims

1. A television set control method, characterized in that, Applied to an adapter connected to a television, the method includes: Send a broadcast message to the mobile phone to connect the mobile phone to the adapter; After the target key on the mobile phone is pressed, the target key value message sent by the mobile phone is received. Send target control commands to the television set.

2. The television control method according to claim 1, characterized in that, The broadcast message includes a callback broadcast message; Sending a broadcast message to the mobile phone to connect the mobile phone to the adapter includes: After powering on, determine whether the phone has pairing information; If pairing information for the mobile phone exists, a reconnection broadcast message is generated; The reconnection broadcast message is sent to the mobile phone, so that the mobile phone connects to the adapter after receiving the reconnection broadcast message.

3. The television control method according to claim 1, characterized in that, The broadcast messages include paired broadcast messages; Sending a broadcast message to the mobile phone to connect the mobile phone to the adapter includes: After powering on, determine whether the phone has pairing information; If no pairing information is available for the mobile phone, a pairing broadcast message is generated; the pairing broadcast message carries the Bluetooth address of the paired device. The pairing broadcast message is sent to the mobile phone, so that after the mobile phone receives the pairing broadcast message, it connects to the adapter based on the Bluetooth address of the paired device carried in the pairing broadcast message.

4. The television control method according to claim 1, characterized in that, The target key value message carries the target HID key value of the target key, and the target control command is a command using the HID protocol; Sending the target control command to the television includes: The target key value message carrying the target HID key value is parsed to generate the target control command using the HID protocol; Send target control commands to the television set.

5. A television set control method, characterized in that, Applied to mobile phones, the method includes: Receive broadcast messages from the adapter; Connect to the adapter based on the broadcast message; After the target key on the mobile phone is pressed, a target key value message is generated; the target key value message carries the target HID key value of the target key. The target key value message is sent to the adapter, so that after receiving the target key value message, the adapter sends a target control command to the television.

6. The television control method according to claim 5, characterized in that, The step of generating a target key value message after the target key on the mobile phone is pressed includes: After the target key on the mobile phone is operated, the target HID key value of the target key is determined based on the mapping relationship between the target key, all HID key values ​​of the TV, and all keys on the mobile phone and all HID key values ​​of the TV. Based on the target HID key value, a target key value message is generated.

7. The television control method according to claim 6, characterized in that, After connecting to the adapter based on the broadcast message, the process further includes: The information of the television is reported to the cloud, so that the cloud can obtain all HID key values ​​of the television based on the information of the television; Receive all HID key values ​​of the television set sent by the cloud.

8. A television control device, characterized in that, include: The first sending module is used to send a broadcast message to the mobile phone, so that the mobile phone can connect to the adapter; The receiving module is used to receive the target key value message sent by the mobile phone after the target key of the mobile phone is operated; The second transmitting module is used to send target control commands to the television set.

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 television control method as described in any one of claims 1 to 4.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the television control method as described in any one of claims 1 to 4.