Bluetooth switching control method and device, Bluetooth device and storage medium
By obtaining master pairing information through pairing connection between the central control master device and the secondary master device, the problems of long time and data loss during Bluetooth switching control are solved, and efficient and low-latency Bluetooth device control is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN SKYWORTH RGB ELECTRONICS CO LTD
- Filing Date
- 2023-03-28
- Publication Date
- 2026-06-16
AI Technical Summary
Existing Bluetooth pairing methods take a long time when switching between slave devices to control multiple master devices for different operations, and are prone to data loss and control delays, which affect the user experience.
The system establishes a pairing connection between the central control master device and the secondary master device, obtains the master pairing information and sends it to the slave device. The target master device is directly connected and controlled through the broadcast information of the slave device, reducing the cumbersome operation of the switching process.
It achieves fast and stable Bluetooth switching control, reduces the risk of data loss, and improves control efficiency and reliability.
Smart Images

Figure CN116390071B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Bluetooth technology, and in particular to a Bluetooth switching control method, apparatus, Bluetooth device, and computer-readable storage medium. Background Technology
[0002] Existing Bluetooth pairing methods allow a slave device to control multiple identical master devices simultaneously, performing the same tasks. However, when a slave device needs to control multiple master devices for different operations, it must disconnect from one currently connected master device and then re-pair and reconnect with another master device to control the other master device. This entire switching process is not only time-consuming and cumbersome, but also prone to data loss and control delays, severely impacting the user experience. Summary of the Invention
[0003] The main objective of this invention is to provide a Bluetooth switching control method, apparatus, Bluetooth device, and computer-readable storage medium, aiming to solve the technical problems of long switching time, data loss, and control delay when a slave device switches to control multiple master devices to perform different operations.
[0004] To achieve the above objectives, the present invention provides a Bluetooth switching control method, wherein a master device that has been paired and connected with a slave device is used as a central control master device; the Bluetooth switching control method is applied to the central control master device;
[0005] The Bluetooth switching control method includes the following steps:
[0006] Each secondary master device is sequentially paired with another secondary master device to obtain master pairing information including each secondary master device and the central master device.
[0007] Establish a Bluetooth connection with the slave device and send the master pairing information to the slave device;
[0008] When a switching control command is received from the slave device, the Bluetooth connection with the slave device is disconnected, so that the slave device can perform control operations on the target master device in the secondary master device corresponding to the switching control command based on the master pairing information.
[0009] Optionally, the pairing connection method between the central control master device and the slave device includes:
[0010] Based on preset specific information, it performs targeted scanning of similar slave devices;
[0011] When a pairing broadcast is received from the slave device based on the preset specific information, a pairing connection is established with the slave device and the slave pairing information is obtained.
[0012] Optionally, before the step of sequentially establishing pairing connections with each secondary master device, the method further includes:
[0013] Determine whether the central control unit includes pairing information for all master devices within a preset scanning range;
[0014] If the central control main device does not include the pairing information of all the main devices, then pairing connections are established with each secondary main device in sequence.
[0015] Optionally, after the step of obtaining the master pairing information including each of the secondary master devices and the central control master device, the method further includes:
[0016] When a new slave device is detected, a pairing connection is established with the new slave device and the master pairing information is sent to the new slave device.
[0017] Optionally, after the step of obtaining the master pairing information including each of the secondary master devices and the central control master device, the method further includes:
[0018] When a new master device is detected, establish a pairing connection with the new master device;
[0019] Obtain the new master pairing information of the new master device, and send the new master pairing information to the slave device.
[0020] Optionally, after the step of sending the master pairing information to the slave device, the method further includes:
[0021] When a multi-machine control command is received from the slave device, multiple target master devices corresponding to the multi-machine control command are determined;
[0022] Establish Bluetooth connections with multiple target master devices, and synchronously send the multi-machine control commands to multiple target master devices so that the central control master device and multiple target master devices respond to the multi-machine control commands simultaneously.
[0023] Optionally, after the step of disconnecting the Bluetooth connection with the slave device upon receiving a switching control command from the slave device, so that the slave device can perform a control operation on the target master device in the secondary master device corresponding to the switching control command based on the master pairing information, the method further includes:
[0024] The target master device is treated as a master device that has been paired and connected with a slave device. The step of repeatedly executing the step of disconnecting the Bluetooth connection with the slave device when a switching control command is received from the slave device, so that the slave device can perform control operations on the target master device corresponding to the switching control command among the secondary master devices based on the master pairing information.
[0025] Furthermore, to achieve the above objectives, the present invention also provides a Bluetooth switching control device, the Bluetooth switching control device comprising:
[0026] The pairing connection module is used to establish pairing connections with each secondary master device in sequence, obtain master pairing information including each of the secondary master devices and the central control master device; establish a Bluetooth connection with the slave device, and send the master pairing information to the slave device;
[0027] The instruction control module is used to disconnect the Bluetooth connection with the slave device when it receives a switching control instruction sent by the slave device, so that the slave device can perform a control operation on the target master device in the secondary master device corresponding to the switching control instruction based on the master pairing information.
[0028] In addition, to achieve the above objectives, the present invention also provides a Bluetooth device, including a processor, a storage unit, and a Bluetooth switching control program stored on the storage unit and executable by the processor, wherein when the Bluetooth switching control program is executed by the processor, it implements the steps of the Bluetooth switching control method as described above.
[0029] The present invention also provides a computer-readable storage medium storing a Bluetooth switching control program, wherein when the Bluetooth switching control program is executed by a processor, it implements the steps of the Bluetooth switching control method described above.
[0030] The Bluetooth switching control method in this invention uses a master device that has been paired with a slave device as a central control master device. This central control master device obtains the master pairing information of each master device through pairing connections with secondary master devices, and then sends this master pairing information to the slave devices. In this way, the central control master device possesses the pairing information of both the slave and secondary master devices, the slave devices possess the pairing information of both the central control master device and each secondary master device, and each master device also possesses the central control master's pairing information. Therefore, when a slave device connects to a master device via Bluetooth, it can broadcast the pairing information of both the central control master device and the secondary master devices. Furthermore, the Bluetooth connection between the slave device and the target master device is based on the slave device broadcasting the central control master's pairing information and the target master device's pairing information. The target master device uses this information to determine whether the slave device is a paired slave device in the system. Because the target master device has been paired with the central control master device, the slave device can use the central control master device's pairing information to establish a connection with the target master device, enabling the target master device to perform control operations. Therefore, when a slave device needs to independently control a master device, it only needs to disconnect the original Bluetooth connection and connect to the master device to be controlled. Unlike existing technologies where the slave device needs to disconnect from the original master device and then pair with the master device to be controlled, the entire control switching process can be completed in a very short time. This results in very low latency and high control efficiency for the slave device's independent control of the master device. Furthermore, since the slave device switches control directly, the possibility of data loss is also very low, making independent control more stable and reliable. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of the hardware operating environment of the Bluetooth device involved in the embodiments of the present invention;
[0032] Figure 2 This is a flowchart illustrating the first embodiment of the Bluetooth switching control method of the present invention;
[0033] Figure 3 This refers to the power-on initialization broadcast process of the slave device involved in the Bluetooth switching control method of the present invention;
[0034] Figure 4 This is a flowchart illustrating the pairing request process between the slave device and the central control master device involved in the Bluetooth switching control method of the present invention.
[0035] Figure 5 This is a flowchart illustrating the pairing response between the slave device and the central control master device involved in the Bluetooth switching control method of the present invention.
[0036] Figure 6 This is a flowchart illustrating the pairing request process between the central control master device and the secondary master device involved in the Bluetooth switching control method of the present invention.
[0037] Figure 7 This is a flowchart illustrating the pairing response between the secondary master device and the central master device involved in the Bluetooth switching control method of the present invention.
[0038] Figure 8 This is a flowchart illustrating the slave device switching control process involved in the Bluetooth switching control method of the present invention.
[0039] Figure 9 This is a flowchart illustrating the determination process of whether a pairing request sent by the central control master device to the slave device contains third pairing information in the Bluetooth switching control method of the present invention.
[0040] Figure 10 This is a flowchart illustrating the disconnection process between the slave device and the central control master device involved in the Bluetooth switching control method of the present invention.
[0041] Figure 11 This is a schematic diagram of the frame structure of the Bluetooth switching control device of the present invention.
[0042] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0043] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] This invention provides a Bluetooth device, which can be a smart TV, smartphone, tablet computer, or other Bluetooth device.
[0045] like Figure 1 As shown, Figure 1 This is a schematic diagram of the hardware operating environment of the Bluetooth device involved in the embodiments of the present invention.
[0046] like Figure 1As shown, the Bluetooth device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a storage unit 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display or an input unit such as a control panel; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The storage unit 1005 may be a high-speed RAM storage unit or a stable storage unit (non-volatile memory), such as a disk storage unit. The storage unit 1005 may also optionally be a storage device independent of the aforementioned processor 1001. The storage unit 1005, as a computer storage medium, may include a Bluetooth switching control program.
[0047] Those skilled in the art will understand that Figure 1 The hardware structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0048] Continue to refer to Figure 1 , Figure 1 The storage unit 1005, which is a computer-readable storage medium, may include an operating system, a user interface module, a network communication module, and a Bluetooth switching control program.
[0049] exist Figure 1 In this module, the network communication module is mainly used to connect to the server and communicate with it for data; while the processor 1001 can call the Bluetooth switching control program stored in the storage unit 1005 and perform the following operations:
[0050] Each secondary master device is sequentially paired with another secondary master device to obtain master pairing information including each secondary master device and the central master device.
[0051] Establish a Bluetooth connection with the slave device and send the master pairing information to the slave device;
[0052] When a switching control command is received from the slave device, the Bluetooth connection with the slave device is disconnected, so that the slave device can perform control operations on the target master device in the secondary master device corresponding to the switching control command based on the master pairing information.
[0053] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0054] Based on preset specific information, it performs targeted scanning of similar slave devices;
[0055] When a pairing broadcast is received from the slave device based on the preset specific information, a pairing connection is established with the slave device and the slave pairing information is obtained.
[0056] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0057] Determine whether the central control unit includes pairing information for all master devices within a preset scanning range;
[0058] If the central control main device does not include the pairing information of all the main devices, then pairing connections are established with each secondary main device in sequence.
[0059] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0060] When a new slave device is detected, a pairing connection is established with the new slave device and the master pairing information is sent to the new slave device.
[0061] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0062] When a new master device is detected, establish a pairing connection with the new master device;
[0063] Obtain the new master pairing information of the new master device, and send the new master pairing information to the slave device.
[0064] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0065] When a multi-machine control command is received from the slave device, multiple target master devices corresponding to the multi-machine control command are determined;
[0066] Establish Bluetooth connections with multiple target master devices, and synchronously send the multi-machine control commands to multiple target master devices so that the central control master device and multiple target master devices respond to the multi-machine control commands simultaneously.
[0067] Furthermore, the processor 1001 can call the Bluetooth switching control program stored in the memory 1005 and also perform the following operations:
[0068] The target master device is treated as a master device that has been paired and connected with a slave device. The step of repeatedly executing the step of disconnecting the Bluetooth connection with the slave device when a switching control command is received from the slave device, so that the slave device can perform control operations on the target master device corresponding to the switching control command among the secondary master devices based on the master pairing information.
[0069] This invention provides a Bluetooth switching control method.
[0070] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a first embodiment of the Bluetooth switching control method of the present invention. In this first embodiment, the master device having slave pairing information is used as the central control master device, and the Bluetooth switching control method includes the following steps:
[0071] Step S10: Establish pairing connections with each secondary master device in sequence, and obtain master pairing information including each secondary master device and the central control master device;
[0072] A slave device and multiple master devices can form a control system. First, let's clarify the concepts and differences between slave and master devices: A slave device is a Bluetooth device that only sends Bluetooth pairing broadcasts without actively establishing a pairing connection, and has control functions over master devices, such as Bluetooth remote controls, Bluetooth headsets, and Bluetooth gamepads. A master device, in contrast to a slave device, can be controlled by slave devices and can also control slave devices. It can not only send Bluetooth pairing broadcasts but also actively establish pairing connections with other Bluetooth devices, such as smart TVs, smartphones, and personal computers.
[0073] In this embodiment, a master device that has been previously paired and connected with a slave device can be selected. Therefore, the master device saves the pairing information and can be directly connected in the future. Of course, the slave device also saves the pairing information of the master device.
[0074] A central control master device can be any master device within a certain space (within the Bluetooth transmission range) or within the same control system. The difference between a central control master device and a secondary master device is that a secondary master device has not been paired with any slave device. For example, if one Bluetooth remote control corresponds to three televisions, any one of these three televisions can act as a central control master device as long as it has been paired with the Bluetooth remote control. The main function of the central control master device is to transmit pairing information between the various master devices to the slave devices. This primarily includes pairing information between the secondary master devices and the central control master device, and the pairing information of the central control master device itself; both are collectively referred to as master pairing information.
[0075] The central control master device can sequentially pair and connect with each secondary master device (excluding the central control master device itself), or it can connect to each secondary master device simultaneously. With software support, simultaneous pairing between multiple devices can be achieved, significantly improving the pairing connection between master devices. During the pairing process, the central control master device can obtain the pairing information of the secondary master devices and store it in its memory. The secondary master devices, in turn, obtain the pairing information of the central control master device and store it in their respective memories.
[0076] In one embodiment, the pairing connection method between the central control master device and the slave device includes:
[0077] Step a: Based on preset specific information, perform a targeted scan of similar slave devices;
[0078] In this embodiment, the central control master device can initially be any master device within the same control system. The preset specific information includes directional scanning information, which can specifically be some device identification information, such as device category association identification information. For example, if the slave device is a Bluetooth remote control and the master device is a smart TV, the Bluetooth remote control and the smart TV are associated. Then, the smart TV can directionally scan the pairing broadcast sent by the Bluetooth remote control based on the device category association identification information between the two. Similarly, the Bluetooth remote control, as a slave device, only sends the pairing broadcast to the smart TV, which is the master device, based on the preset specific information. Other types of devices do not respond to the pairing broadcast.
[0079] Here, "slave devices of the same type" refers to slave devices of the same category included in the preset specific information, such as the Bluetooth remote control mentioned above. That is, only slave devices of the Bluetooth remote control category are scanned to reduce interference from other unrelated Bluetooth devices and improve pairing and connection efficiency.
[0080] Step b: When a pairing broadcast is received from the slave device based on the preset specific information, a pairing connection is established with the slave device and the slave pairing information is obtained.
[0081] During the directional scanning process, the master device obtains the pairing broadcast sent by the slave device based on the preset specific information, initiates a pairing connection request to the slave device, and automatically switches to the connected state upon successful pairing. At the same time, the master device obtains the pairing information of the connected slave device and sends its own pairing information to the slave device.
[0082] To further understand the pairing and connection process between the central control master device and the slave device of the present invention, please refer to... Figure 3 and Figure 4 as well as Figure 5 .
[0083] For ease of understanding and description, we will use three devices as an example. The primary device will be named the first device, the central control main device will be named the second device, and the secondary main device will be named the third device.
[0084] like Figure 3 As shown:
[0085] The first device powers on and loads the information stored in the flash memory (pre-defined specific information);
[0086] When the first device initializes and starts up, it only sends a pairing broadcast to the second device.
[0087] Schedule the broadcast process;
[0088] Initialize to the second device control mode;
[0089] Send a broadcast.
[0090] like Figure 4 As shown:
[0091] The second device performs a directional scan of the first device;
[0092] The second device establishes a connection with the first device;
[0093] The second device automatically switches to host mode;
[0094] The second device retrieves the pairing information of the third device from the memory;
[0095] The pairing request sent by the second device to the first device includes information about the second device and information about the third device (if the device has not been paired with the third device before, it does not include information about the third device).
[0096] The second device receives the pairing response;
[0097] The second device obtains the first device information from the pairing response;
[0098] The second device determines whether the first device information is present in the memory:
[0099] If so, the old first device information in the memory can be deleted and the new first device information can be saved;
[0100] If not, save the first device information;
[0101] The second device sends a pairing success message to the first device;
[0102] The first device stores the pairing information of the second device;
[0103] The first device and the second device establish a connection and communication.
[0104] like Figure 5 As shown:
[0105] The first device sends a directional broadcast to the second device;
[0106] The first device establishes a connection with the second device;
[0107] The first device automatically switches to slave mode;
[0108] The first device receives a pairing request from the second device;
[0109] The first device obtains the information of the second and third devices from the pairing request;
[0110] The first device sends a pairing response containing information about the first device.
[0111] The first device determines whether the memory contains information about the second device:
[0112] If so, delete the old second device information from the memory and save the new second device information;
[0113] If not, save the second device information;
[0114] Flag 1 for the first device to identify whether the third device's information exists:
[0115] If not, meaning the third device information does not exist, or the second device has not yet been paired with the third device, then the first device receives the pairing success information sent by the second device, saves the pairing information of the second device, and connects and communicates with the second device.
[0116] If so, the first device determines whether there is third device information in the memory:
[0117] If so, the first device deletes the old third device information from the memory and saves the new third device information;
[0118] If not, the first device saves the information of the third device, receives the pairing success information sent by the second device, saves the pairing information of the second device, and connects and communicates with the second device.
[0119] Referring to the pairing and connection process between the central control master device and the slave device as described above, to further understand the pairing and connection process between the central control master device and the secondary master device of this invention, please refer to... Figure 6 and Figure 7 .
[0120] like Figure 6 As shown:
[0121] The second device scans the third device in a specific orientation based on preset information;
[0122] The second device establishes a connection with the third device;
[0123] The second device automatically becomes connected.
[0124] The second device sends a pairing request, which includes information about the first and second devices;
[0125] The second device receives the pairing response;
[0126] The second device obtains information about the third device from the pairing response;
[0127] The second device overwrites and saves the (old) information from the third device;
[0128] The second device sends a pairing success message;
[0129] The third device stores the pairing information;
[0130] The second device received a reset disconnection from the third device;
[0131] The second device can then connect to the first device via directional scanning, and subsequently send the pairing information of the third device to the first device.
[0132] like Figure 7 As shown:
[0133] The third device changes to slave mode based on preset specific information and triggers a broadcast;
[0134] The third device establishes a connection with the second device;
[0135] The third device becomes connected;
[0136] The third device receives the pairing request from the second device;
[0137] The third device obtains information about the first and second devices sent by the second device.
[0138] The third device sends a pairing response;
[0139] The third device overwrites and stores the information of the first and second devices;
[0140] The third device receives the pairing success message sent by the second device;
[0141] The third device stores the pairing information;
[0142] The third device resets and restarts, disconnecting from the second device;
[0143] The third device automatically switches to host mode;
[0144] The third device performs directional scanning and connects to the first device.
[0145] Step S20: Establish a Bluetooth connection with the slave device and send the master pairing information to the slave device;
[0146] Since the central control master device has been paired with the slave device and has slave pairing information, and the slave device also has the pairing information of the central control master device, the two can directly establish a Bluetooth connection based on this, and send the master pairing information formed by the pairing of the secondary master device and the central control master device to the slave device.
[0147] As a result, the pairing information stored in the central control master device includes: the pairing information of the slave devices and the pairing information of each target master device; the pairing information stored in the slave devices includes: the pairing information of each master device, including the central control master device; and the pairing information stored in the secondary master devices includes: the pairing information of the central control master device.
[0148] Step S30: When a switching control command is received from the slave device, the Bluetooth connection with the slave device is disconnected, so that the slave device can perform a control operation on the target master device in the secondary master device corresponding to the switching control command based on the master pairing information.
[0149] During the Bluetooth connection between the slave device and the central control master device, the slave device can independently control the secondary master device by switching control modes with a single click. When the slave device switches control modes with a single click, it issues a switching control command, which includes the identifier of the master device to be controlled. When the central control master device receives the switching control command and verifies that the master device identifier does not belong to itself, it can actively disconnect the Bluetooth connection with the slave device. After disconnecting from the previous central control master device, the slave device can identify the target master device corresponding to the switching control command and broadcast it to establish a Bluetooth connection without needing to pair again. This enables efficient and low-latency independent control of each master device.
[0150] It should be noted that after receiving the switching control command, the directional connection and control between the slave device and the target master device is achieved by the slave device broadcasting pairing information containing the pairing information of the central control master device and the target master device. That is, the slave device broadcasts the master pairing information corresponding to the switching control command. The target master device then determines that the connection was initiated by the central control master device, and cleverly uses this master pairing information to determine that the slave device is already paired and ready to connect. In simple terms, because the target master device has been paired with the central control master device, the slave device uses the pairing information of both the central control master device and the target master device to establish a connection with the corresponding target master device, directly and efficiently enabling the target master device to perform control operations.
[0151] In one embodiment, after step S30, the method further includes:
[0152] Step c: Treat the target master device as a master device that has been paired and connected with the slave device, and repeatedly execute the step of disconnecting the Bluetooth connection with the slave device when a switching control command is received from the slave device, so that the slave device can perform control operations on the target master device corresponding to the switching control command among the secondary master devices based on the master pairing information.
[0153] In this embodiment, the criterion for determining which master device is the central control master device is which master device is currently connected to the slave device via Bluetooth. When the slave device initially switches control to the target master device from the central control master device, the target master device becomes the new central control master device based on the connection relationship between the target master device and the slave device. When the slave device switches control to the secondary master device based on the connection between the slave device and the new central control master device, the central control master device can disconnect from the slave device. Thus, the slave device can then connect to other master devices that are the target master devices and control them independently. In this way, regardless of which master device the slave device is connected to and controlling, it can easily and quickly switch to independent control of the secondary master device.
[0154] Based on the pairing and connection process between the devices described above, to better understand the switching control process from slave device to master device in this invention, please refer to... Figure 8 ,like Figure 8 As shown:
[0155] From the device's preset configuration, the second device control mode, and the third device control mode;
[0156] The device is initially set to the second control device mode by default.
[0157] The device initiates a directional broadcast to the second device to establish a connection and communication.
[0158] Upon receiving a switching control signal from the device, disconnect from the second device;
[0159] The device initiates a directional broadcast to a third device to establish a connection and communication.
[0160] Upon receiving a switching control signal from the device, disconnect the slave device from the third device;
[0161] Treating the third device as the second device, the process iteratively executes the steps of initiating a directional broadcast from the first device to the second device to establish a connection and communication, as well as subsequent steps.
[0162] The Bluetooth switching control method in this invention uses a master device that has been paired with a slave device as a central control master device. This central control master device obtains the master pairing information of each master device through pairing connections with secondary master devices, and then sends this master pairing information to the slave devices. In this way, the central control master device possesses the pairing information of both the slave and secondary master devices, the slave devices possess the pairing information of both the central control master device and each secondary master device, and each master device also possesses the central control master's pairing information. Therefore, when a slave device connects to a master device via Bluetooth, it can broadcast the pairing information of both the central control master device and the secondary master devices. Furthermore, the Bluetooth connection between the slave device and the target master device is based on the slave device broadcasting the central control master's pairing information and the target master device's pairing information. The target master device uses this information to determine whether the slave device is a paired slave device in the system. Because the target master device has been paired with the central control master device, the slave device can use the central control master device's pairing information to establish a connection with the target master device, enabling the target master device to perform control operations. Therefore, when a slave device needs to independently control a master device, it only needs to disconnect the original Bluetooth connection and connect to the master device to be controlled. Unlike existing technologies where the slave device needs to disconnect from the original master device and then pair with the master device to be controlled, the entire control switching process can be completed in a very short time. This results in very low latency and high control efficiency for the slave device's independent control of the master device. Furthermore, since the slave device switches control directly, the possibility of data loss is also very low, making independent control more stable and reliable.
[0163] In one embodiment, prior to step S10, the method further includes:
[0164] Step d: Determine whether the central control master device includes pairing information for all master devices within the preset scanning range;
[0165] Step e: If the central control master device does not include the pairing information of all the master devices, then pairing connections are established sequentially with each secondary master device.
[0166] The preset scanning range can refer to either the spatial range of the same control system or the Bluetooth scanning capability range centered on the central control master device. Each master device refers to a master device of the same category, such as smart TVs. The central control master device scans via Bluetooth to target all master devices within the preset scanning range, and the scanned master devices are then set as slave devices. Based on the scanned master devices, the central control master device determines whether it contains pairing information for all of them. If it does not contain pairing information or only contains pairing information for some master devices, it can sequentially establish pairing connections with each secondary master device to obtain their pairing information. Alternatively, if pairing information for missing master devices is needed, it can target and pair with the missing master devices to store the pairing information for all master devices in the central control master device. This ensures that the pairing information of each master device in the same control system can be transmitted to the slave devices. This eliminates the need for unpairing and re-pairing when slave devices control master devices, improving the efficiency and reliability of control switching.
[0167] Furthermore, regarding the pairing connection between the central control master device and slave devices, if the central control master device does not yet have pairing information for the secondary master devices, it can send a specific status identifier to the slave device to disconnect the central control master device from the slave device, and then establish pairing connections with each secondary master device separately. This can be referenced in [the relevant documentation / reference]. Figure 9 and Figure 10 .
[0168] like Figure 9 As shown:
[0169] The second device retrieves the pairing information of the third device from the memory;
[0170] In the absence of pairing with a third device, when a pairing request is sent to the first device, the status flag of the third device being paired is 0, which means that no third device information is included.
[0171] When paired with a third device, the status flag indicating that the third device's pairing information is present is 1 when a pairing request is sent to the first device, indicating that the third device's information is included.
[0172] like Figure 10 As shown:
[0173] For the first device:
[0174] The first device receives a disconnection trigger (status flag 0) from the paired third device and disconnects from the second device;
[0175] The first device automatically changes its status indicator;
[0176] The first device enters broadcast mode.
[0177] For the second device:
[0178] The second device receives a disconnection message from the first device, which requires pairing with the third device.
[0179] The second device automatically changes its status indicator;
[0180] The second device scans the third device in a directional manner based on preset feature information.
[0181] Based on the above embodiments, in one embodiment, after step S10, the method further includes:
[0182] Step f: When a new slave device is detected, establish a pairing connection with the new slave device and send the master pairing information to the new slave device.
[0183] It should be noted that for a control system, the replacement cycle of slave devices is much shorter than that of master devices. For example, the replacement cycle of a Bluetooth remote control is much shorter than that of a smart TV. Therefore, for the original control system, it is easy for slave devices to be replaced. Precisely because this situation occurs more frequently, the central control master device is needed to indirectly realize the pairing between slave devices and each master device. Thus, even if the slave device is replaced, it is not necessary to re-pair and reconnect the slave device with each master device one by one.
[0184] In this embodiment, when the central control master device scans a new slave device, it actively establishes a pairing connection with the slave device to obtain and save the new slave pairing information. For the previous slave pairing information, it can choose to overwrite or continue to save it.
[0185] Since the central control master device has already been paired and connected with other master devices, the saved master pairing information can be directly sent to the new slave device. Therefore, even if a new slave device is replaced, in order to realize the switching control of the new slave device over the various master devices, the new slave device only needs to complete a pairing connection with the original central control master device once, which greatly improves the switching control efficiency of the new slave device over the original master device.
[0186] Based on the above embodiments, in one embodiment, after step S10, the method further includes:
[0187] Step h: When a new master device is detected, establish a pairing connection with the new master device;
[0188] Step i: Obtain the new master pairing information of the new master device and send the new master pairing information to the slave device.
[0189] When a new master device appears in the original control system, the original central control master device can actively establish a pairing connection with the new master device. At the same time, it can obtain the new master pairing information of the new master device and send it to the slave device. Thus, not only does the central control master device realize the pairing connection of the new master device, but it also saves the pairing connection process between the slave device and the new master device. Even if a new master device is added, it can shorten the switching control process and time of the slave device to each master device.
[0190] Based on the above embodiments, in one embodiment, after step S20, the method further includes:
[0191] Step j: When a multi-machine control command is received from the slave device, determine the multiple target master devices corresponding to the multi-machine control command;
[0192] Step k: Establish Bluetooth connections with multiple target master devices, and synchronously send the multi-machine control command to multiple target master devices so that the central control master device and multiple target master devices respond to the multi-machine control command simultaneously.
[0193] When the central control master device receives a multi-machine control command sent by the slave device, it parses the multi-machine control command and determines the multiple target master devices that need to be controlled. The central control master device directly establishes a Bluetooth connection with these multiple target master devices and synchronously sends the multi-machine control command to these target master devices, so that multiple target master devices can respond quickly and simultaneously to the multi-machine control command sent by the slave device.
[0194] In existing technologies, slave devices can connect to and control multiple master devices simultaneously, but can only control each master device at a time. This approach fails to achieve individual control of the master devices or directional control of specific master devices. This embodiment of the present invention further enables directional control of multiple master devices, without controlling them or the master devices themselves, thus improving the flexibility and versatility of switching control.
[0195] Furthermore, it should be noted that if any central control master device (whether the initial central control master device or a new one) malfunctions, loses power, or is unable to connect to the slave device via Bluetooth, the Bluetooth connection will automatically disconnect. The slave device can then connect to any master device and use that connected master device as the central control master device, or it can temporarily not connect to any master device. In other words, through the various embodiments of the present invention, even if one or more master devices cannot connect to the slave device, the switching control operation for other normal master devices will not be affected because the slave device possesses the pairing information for all master devices, thus ensuring the reliability of the switching control operation.
[0196] In addition, refer to Figure 11 , Figure 11 This is a schematic diagram of the frame structure of the Bluetooth switching control device of the present invention. The present invention also proposes a Bluetooth switching control device, which includes:
[0197] The pairing connection module 10 is used to establish pairing connections with each secondary master device in sequence, obtain master pairing information including each of the secondary master devices and the central control master device; establish a Bluetooth connection with the slave device, and send the master pairing information to the slave device;
[0198] The instruction control module 20 is used to disconnect the Bluetooth connection with the slave device when it receives a switching control instruction sent by the slave device, so that the slave device can perform a control operation on the target master device in the secondary master device corresponding to the switching control instruction based on the master pairing information.
[0199] Optionally, the pairing connection module 10 is further configured to:
[0200] Based on preset specific information, it performs targeted scanning of similar slave devices;
[0201] When a pairing broadcast is received from the slave device based on the preset specific information, a pairing connection is established with the slave device and the slave pairing information is obtained.
[0202] Optionally, the pairing connection module 10 is further configured to:
[0203] Determine whether the central control unit includes pairing information for all master devices within a preset scanning range;
[0204] If the central control main device does not include the pairing information of all the main devices, then pairing connections are established with each secondary main device in sequence.
[0205] Optionally, the pairing connection module 10 is further configured to:
[0206] When a new slave device is detected, a pairing connection is established with the new slave device and the master pairing information is sent to the new slave device.
[0207] Optionally, the pairing connection module 10 is further configured to:
[0208] When a new master device is detected, establish a pairing connection with the new master device;
[0209] Obtain the new master pairing information of the new master device, and send the new master pairing information to the slave device.
[0210] Optionally, the instruction control module 20 is further configured to:
[0211] When a multi-machine control command is received from the slave device, multiple target master devices corresponding to the multi-machine control command are determined;
[0212] Establish Bluetooth connections with multiple target master devices, and synchronously send the multi-machine control commands to multiple target master devices so that the central control master device and multiple target master devices respond to the multi-machine control commands simultaneously.
[0213] Optionally, the instruction control module 20 is further configured to:
[0214] The target master device is treated as a master device that has been paired and connected with a slave device. The step of repeatedly executing the step of disconnecting the Bluetooth connection with the slave device when a switching control command is received from the slave device, so that the slave device can perform control operations on the target master device corresponding to the switching control command among the secondary master devices based on the master pairing information.
[0215] The specific implementation of the Bluetooth switching control device of the present invention is basically the same as the embodiments of the Bluetooth switching control method described above, and will not be repeated here.
[0216] Furthermore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a Bluetooth switching control program, wherein when executed by a processor, the Bluetooth switching control program implements the steps of the Bluetooth switching control method described above.
[0217] The method implemented when the Bluetooth switching control program is executed can be referred to in various embodiments of the Bluetooth switching control method of the present invention, and will not be repeated here.
[0218] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0219] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0220] These computer program instructions may also be stored in a computer-readable storage unit that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage unit produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0221] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0222] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0223] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0224] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. All equivalent structural transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the patent protection scope of the present invention.
Claims
1. A Bluetooth switching control method, characterized in that, The master device that has been paired and connected with the slave device is designated as the central control master device; the Bluetooth switching control method is applied to the central control master device; The Bluetooth switching control method includes the following steps: Each secondary master device is sequentially paired with another secondary master device to obtain master pairing information including each secondary master device and the central master device. Establish a Bluetooth connection with the slave device and send the master pairing information to the slave device; When a switching control command is received from the slave device, the Bluetooth connection with the slave device is disconnected, so that the slave device can perform a control operation on the target master device in the secondary master devices corresponding to the switching control command based on the master pairing information. The switching control command includes the identifier of the master device to be controlled. The connection and control between the slave device and the target master device are based on the slave device sending a broadcast containing the pairing information of the central master device and the pairing information of the target master device. The target master device determines whether the slave device is a paired slave device in the system by using the pairing information of the central master device and the pairing information of the target master device. After the step of sending the master pairing information to the slave device, the method further includes: When a multi-machine control command is received from the slave device, multiple target master devices corresponding to the multi-machine control command are determined; Establish Bluetooth connections with multiple target master devices, and synchronously send the multi-machine control commands to multiple target master devices so that the central control master device and multiple target master devices respond to the multi-machine control commands simultaneously.
2. The Bluetooth switching control method as described in claim 1, characterized in that, The pairing connection method between the central control master device and the slave device includes: Based on preset specific information, it performs targeted scanning of similar slave devices; When a pairing broadcast is received from the slave device based on the preset specific information, a pairing connection is established with the slave device and the slave pairing information is obtained.
3. The Bluetooth switching control method as described in claim 1, characterized in that, Before the step of sequentially establishing pairing connections with each secondary master device, the method further includes: Determine whether the central control unit includes pairing information for all master devices within a preset scanning range; If the central control main device does not include the pairing information of all the main devices, then pairing connections are established with each secondary main device in sequence.
4. The Bluetooth switching control method as described in claim 1, characterized in that, After the step of obtaining the master pairing information including each of the secondary master devices and the central control master device, the method further includes: When a new slave device is detected, a pairing connection is established with the new slave device and the master pairing information is sent to the new slave device.
5. The Bluetooth switching control method as described in claim 1, characterized in that, After the step of obtaining the master pairing information including each of the secondary master devices and the central control master device, the method further includes: When a new master device is detected, establish a pairing connection with the new master device; Obtain the new master pairing information of the new master device, and send the new master pairing information to the slave device.
6. The Bluetooth switching control method as described in claim 1, characterized in that, After the step of disconnecting the Bluetooth connection with the slave device upon receiving a switching control command from the slave device, so that the slave device can perform a control operation on the target master device in the secondary master device corresponding to the switching control command based on the master pairing information, the method further includes: The target master device is treated as a master device that has been paired and connected with a slave device. The step of repeatedly executing the step of disconnecting the Bluetooth connection with the slave device when a switching control command is received from the slave device, so that the slave device can perform control operations on the target master device corresponding to the switching control command among the secondary master devices based on the master pairing information.
7. A Bluetooth switching control device, characterized in that, The Bluetooth switching control device includes: The pairing connection module is used to establish pairing connections with each secondary master device in sequence, obtain master pairing information including each of the secondary master devices and the central control master device; establish a Bluetooth connection with the slave device, and send the master pairing information to the slave device; The instruction control module is used to disconnect the Bluetooth connection with the slave device when it receives a switching control instruction sent by the slave device, so that the slave device can perform a control operation on the target master device in the secondary master devices corresponding to the switching control instruction based on the master pairing information. The switching control instruction includes the identifier of the master device to be controlled. The connection and control between the slave device and the target master device are based on the slave device sending a broadcast containing the pairing information of the central master device and the pairing information of the target master device. The target master device determines whether the slave device is a slave device that has been paired in the system by using the pairing information of the central master device and the pairing information of the target master device. The instruction control module is further configured to: when receiving a multi-machine control instruction sent by the slave device, determine multiple target master devices corresponding to the multi-machine control instruction; establish a Bluetooth connection with the multiple target master devices; and synchronously send the multi-machine control instruction to the multiple target master devices, so that the central control master device and the multiple target master devices respond to the multi-machine control instruction simultaneously.
8. A Bluetooth device, characterized in that, The Bluetooth device includes a processor, a storage unit, and a Bluetooth switching control program stored on the storage unit that can be executed by the processor, wherein when the Bluetooth switching control program is executed by the processor, it implements the steps of the Bluetooth switching control method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a Bluetooth switching control program, wherein when the Bluetooth switching control program is executed by a processor, it implements the steps of the Bluetooth switching control method as described in any one of claims 1 to 6.