Bluetooth one-to-many data transmission method and device, electronic equipment and storage medium

By acquiring and establishing connections between the master Bluetooth device and multiple slave devices, and identifying and executing job commands, the complexity of Bluetooth one-to-many data transmission is solved, enabling efficient control of multiple slave devices by the master Bluetooth device.

CN116033400BActive Publication Date: 2026-04-28SHENZHEN FEASYCOM TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN FEASYCOM TECH CO LTD
Filing Date
2022-12-09
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing Bluetooth technology is mainly based on a one-to-one connection method. In many Bluetooth application scenarios, it is necessary to frequently disconnect and reconnect, which cannot achieve true one-to-many data transmission, resulting in complex operation and low efficiency.

Method used

By obtaining the list of available devices from the master Bluetooth device, establishing a connection, acquiring device attributes, identifying and executing job commands, the master Bluetooth device can simultaneously control the data transmission of multiple slave devices.

Benefits of technology

It enables a single master Bluetooth device to control multiple slave devices simultaneously, resulting in fast and accurate data transmission, thus improving user experience and operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116033400B_ABST
    Figure CN116033400B_ABST
Patent Text Reader

Abstract

The present application relates to a Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium, the method comprises the following steps: S1, obtain the available Bluetooth device corresponding to the master Bluetooth device, to obtain a plurality of available Bluetooth devices as target Bluetooth devices; S2, generate a connection list containing all target Bluetooth devices, and trigger the master Bluetooth device to establish a connection with the target Bluetooth device in turn based on the connection list to obtain the slave Bluetooth device corresponding to the master Bluetooth device; S3, obtain the device attribute of the slave Bluetooth device respectively, to obtain the executable job of all slave Bluetooth devices according to the device attribute of the slave Bluetooth device; S4, obtain the job instruction generated by the master Bluetooth device, identify the target job of the job instruction, obtain the corresponding slave Bluetooth device as the target job device based on the target job and the executable job of all slave Bluetooth devices, so that the target job device responds to the job instruction. The present application can quickly realize that one master Bluetooth device controls multiple slave Bluetooth devices at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and more specifically, to a Bluetooth one-to-many data transmission method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the increasing maturity of Bluetooth technology, it has become ubiquitous in our daily lives. Most Bluetooth connections are one-to-one, typically used in applications such as connecting mobile phones or computers to Bluetooth printers for printing delivery slips, takeout orders, or images; Bluetooth access control systems for unlocking doors; Bluetooth headsets for listening to music and making calls; and Bluetooth wristbands for monitoring heart rate. Because of this one-to-one connection, when multiple Bluetooth applications are running simultaneously, the previous connection must be disconnected before connecting to the desired application. In some one-to-many Bluetooth applications, commands are sent to specific devices one by one, which does not achieve true one-to-many data transmission. Summary of the Invention

[0003] The technical problem to be solved by the present invention is to provide a Bluetooth one-to-many data transmission method, apparatus, electronic device and storage medium.

[0004] The technical solution adopted by this invention to solve its technical problem is: constructing a Bluetooth one-to-many data transmission method, including the following steps:

[0005] S1. Obtain available Bluetooth devices corresponding to the main Bluetooth device, and obtain multiple available Bluetooth devices as target Bluetooth devices;

[0006] S2. Generate a connection list containing all the target Bluetooth devices, and trigger the master Bluetooth device to establish connections with the target Bluetooth devices sequentially based on the connection list to obtain the corresponding slave Bluetooth devices of the master Bluetooth device;

[0007] S3. Obtain the device attributes of each slave Bluetooth device to obtain all executable jobs of the slave Bluetooth devices based on the device attributes of the slave Bluetooth devices;

[0008] S4. Obtain the job instruction generated by the master Bluetooth device, identify the target job of the job instruction, and obtain the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices, so that the target job device responds to the job instruction.

[0009] Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in step S1, obtaining the available Bluetooth devices corresponding to the master Bluetooth device includes:

[0010] The master Bluetooth device is triggered to start scanning to obtain Bluetooth broadcast data, and a scan request is sent to the Bluetooth device corresponding to the Bluetooth broadcast data to obtain the corresponding response data. The Bluetooth device that generated the response data is identified as the available Bluetooth device.

[0011] Preferably, the Bluetooth one-to-many data transmission method of the present invention further includes:

[0012] The slave Bluetooth device is obtained based on the historical connection information of the master Bluetooth device.

[0013] Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in step S2, obtaining the slave Bluetooth device corresponding to the master Bluetooth device includes:

[0014] The connection status between the master Bluetooth device and the target Bluetooth device is obtained, and when the target Bluetooth device successfully connects with the master Bluetooth device, the target Bluetooth device is designated as the slave Bluetooth device of the master Bluetooth device.

[0015] Preferably, the Bluetooth one-to-many data transmission method of the present invention further includes:

[0016] Obtain the historical connection information and currently available Bluetooth devices of the main Bluetooth device; based on the historical connection information and currently available Bluetooth devices, obtain the unavailable Bluetooth devices corresponding to the historical connection information;

[0017] The relationship between the unavailable Bluetooth devices and the available Bluetooth devices is obtained, so as to obtain the relay device corresponding to the unavailable Bluetooth device from the available Bluetooth devices;

[0018] The relay device and the unavailable Bluetooth device are designated as slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth device can receive the corresponding operation instructions through the relay device.

[0019] Preferably, the Bluetooth one-to-many data transmission method of the present invention further includes:

[0020] S21. Monitor the connection status between the slave Bluetooth device and the master Bluetooth device. When the slave Bluetooth device disconnects from the master Bluetooth device, remove the slave Bluetooth device and execute step S3.

[0021] Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in step S4, obtaining the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices further includes:

[0022] When multiple corresponding slave Bluetooth devices are obtained based on the job instruction, the best slave Bluetooth device is selected as the target job device according to the device information of the multiple corresponding slave Bluetooth devices.

[0023] Preferably, the Bluetooth one-to-many data transmission method of the present invention further includes:

[0024] S5. Receive feedback information generated by the target working device based on the working instruction, and determine the execution status of the target working device on the working instruction based on the feedback information.

[0025] The present invention also constructs a Bluetooth one-to-many data transmission device, comprising:

[0026] A target Bluetooth device acquisition unit is used to acquire available Bluetooth devices corresponding to the main Bluetooth device, and to acquire multiple available Bluetooth devices as target Bluetooth devices.

[0027] The Bluetooth device acquisition unit is used to generate a connection list containing all the target Bluetooth devices, and trigger the master Bluetooth device to establish connections with the target Bluetooth devices sequentially based on the connection list to obtain the corresponding slave Bluetooth devices of the master Bluetooth device;

[0028] An executable job acquisition unit is configured to acquire the device attributes of the slave Bluetooth devices respectively, so as to acquire all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices;

[0029] The target job device acquisition unit acquires the job instruction generated by the master Bluetooth device, identifies the target job of the job instruction, and acquires the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices, so that the target job device responds to the job instruction.

[0030] The present invention also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the steps of the Bluetooth one-to-many data transmission method as described in any of the preceding claims.

[0031] The present invention also provides an electronic device, characterized in that it includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the Bluetooth one-to-many data transmission method as described above by calling the computer program stored in the memory.

[0032] The Bluetooth one-to-many data transmission method, apparatus, electronic device and storage medium of the present invention have the following beneficial effects: they can quickly realize the simultaneous control of multiple slave Bluetooth devices by one master Bluetooth device. Attached Figure Description

[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0034] Figure 1 This is a flowchart of an embodiment of the Bluetooth one-to-many data transmission method of the present invention;

[0035] Figure 2 This is a flowchart of another embodiment of the Bluetooth one-to-many data transmission method of the present invention;

[0036] Figure 3 This is a flowchart of another embodiment of the Bluetooth one-to-many data transmission method of the present invention;

[0037] Figure 4 This is a flowchart of another embodiment of the Bluetooth one-to-many data transmission method of the present invention;

[0038] Figure 5 This is a logic block diagram of an embodiment of the Bluetooth one-to-many data transmission device of the present invention. Detailed Implementation

[0039] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0040] like Figure 1 As shown, in a first embodiment of a Bluetooth one-to-many data transmission method of the present invention, the method includes the following steps: S1, obtaining available Bluetooth devices corresponding to the master Bluetooth device, and obtaining multiple available Bluetooth devices as target Bluetooth devices. Specifically, when the Bluetooth device acts as the master Bluetooth device, it searches for all Bluetooth devices that currently meet the distance requirement, i.e., are within the effective range, according to a trigger command. All these Bluetooth devices can be understood as available Bluetooth devices corresponding to the master Bluetooth device. That is, these available Bluetooth devices can meet the connection requirements of the master Bluetooth device, such as signal strength, communication protocol, etc., all of which can meet the connection requirements with the master Bluetooth device. It can be understood that all available Bluetooth devices corresponding to the current master Bluetooth device are not necessarily the devices that the master Bluetooth device needs to connect to. Therefore, the required Bluetooth device can be selected from the available Bluetooth devices as the target Bluetooth device based on the needs.

[0041] S2. Generate a connection list containing all target Bluetooth devices, and trigger the master Bluetooth device to establish connections with the target Bluetooth devices sequentially based on the connection list to obtain the corresponding slave Bluetooth devices. Specifically, a corresponding connection list is generated based on the obtained target Bluetooth devices, meaning that all target Bluetooth devices that need to be connected can be obtained from this connection list. Based on this connection list, a one-click connection between the master Bluetooth device and the target Bluetooth devices can be triggered. Once a target Bluetooth device establishes a connection with the master Bluetooth device, it becomes the slave Bluetooth device of that master Bluetooth device. In one embodiment, the specific Bluetooth connection process can be as follows: the master Bluetooth device actively sends a key to the slave Bluetooth device. If the slave Bluetooth device receives the key and successfully parses it, it sends a callback to the master Bluetooth device. The master Bluetooth device then actively sends a command to the slave Bluetooth device to establish a high-speed communication channel. After receiving the command from the master Bluetooth device, the slave Bluetooth device establishes a high-speed communication channel according to a preset Bluetooth communication protocol. After the master Bluetooth device receives the message from the slave Bluetooth device confirming that the high-speed communication channel is open, the connection process is officially completed. In one embodiment, the connection status of each target Bluetooth device can be reflected by the status of the connection list.

[0042] S3. Obtain the device attributes of each slave Bluetooth device to retrieve all executable jobs for those devices. Specifically, after obtaining the slave Bluetooth devices connected to the master Bluetooth device, each slave Bluetooth device is verified. The device attributes of each slave Bluetooth device are obtained, and the executable jobs for that device are determined based on these attributes. This means confirming the type of connected slave Bluetooth device and the tasks it can perform. For example, if the slave Bluetooth device is a printer, the executable jobs for that device are copying and printing. If the slave Bluetooth device is an air conditioner, the executable jobs for that device are temperature adjustment and fan speed adjustment.

[0043] S4. Obtain the job command generated by the master Bluetooth device, identify the target job of the job command, and based on the target job and all executable jobs of the slave Bluetooth devices, obtain the corresponding slave Bluetooth device as the target job device so that the target job device responds to the job command. Specifically, the master Bluetooth device generates the job command. This job command is a control command used to control the actions of the slave Bluetooth devices. The job command can be identified to determine what operation it is used to perform. For example, if the master Bluetooth device generates a print command, then the target job corresponding to this print command is a print job. The system can search among all slave Bluetooth devices to find a Bluetooth device that can perform printing and execute the print job. Through this process, the master Bluetooth device's job command can be automatically identified and the corresponding data transmitted, achieving fast and accurate data transmission in one-to-many Bluetooth connections.

[0044] Optionally, in step S1, obtaining the available Bluetooth devices corresponding to the master Bluetooth device includes: triggering the master Bluetooth device to start scanning to obtain Bluetooth broadcast data, sending a scan request to the Bluetooth device corresponding to the Bluetooth broadcast data to obtain the corresponding response data, and obtaining the Bluetooth device that generated the response data as the available Bluetooth device. Specifically, the master device first starts scanning, and the slave device continuously sends broadcasts to its surroundings. When the master device starts scanning, it can receive the broadcasts sent by the slave device. After receiving the broadcasts sent by the slave device, the master device sends a scan request to the slave device. After receiving the scan request sent by the master device, the slave device sends a scan response (including the slave device's UUID, MAC, name, etc.) to the master device. After receiving the scan response sent by the slave device, the master device obtains the slave device's information and displays it in a list.

[0045] Optionally, the Bluetooth one-to-many data transmission method of the invention further includes: obtaining slave Bluetooth devices based on the historical connection information of the master Bluetooth device. Specifically, after the master Bluetooth device disconnects from a slave Bluetooth device, it can save all previously connected information to the internal storage of each slave Bluetooth device. Simultaneously, the master Bluetooth device also records information about all previously connected slave Bluetooth devices. When the master Bluetooth device re-enters the effective range of a slave Bluetooth device's signal coverage, the master Bluetooth device actively sends broadcast data. After receiving the broadcast data from the master Bluetooth device, the slave Bluetooth device feeds back the previously stored connection-related information to the master Bluetooth device. The master Bluetooth device, based on the previously connected information fed back by the slave Bluetooth device and parsing the previously saved slave Bluetooth device connection information, automatically uses that slave Bluetooth device as the current target Bluetooth device and automatically completes the connection to the target Bluetooth device, thus obtaining the slave Bluetooth device corresponding to the current master Bluetooth device. For example, the system algorithm automatically connects previously connected slave Bluetooth devices by default, with the checkbox checked by default, and the status displayed as connected. New, unconnected devices are not checked, and the status displays as unconnected. In other words, for Bluetooth devices that have been connected in the past, the connection status can be directly modified to show the connected status.

[0046] Optionally, in step S2, obtaining the corresponding slave Bluetooth device of the master Bluetooth device includes: obtaining the connection status between the master Bluetooth device and the target Bluetooth device, and designating the target Bluetooth device as the slave Bluetooth device of the master Bluetooth device when the target Bluetooth device successfully connects to the master Bluetooth device. Specifically, not every selected target Bluetooth device can connect to the master Bluetooth device; that is, the connection status between the target Bluetooth device and the master Bluetooth device can be determined. Only after a selected target Bluetooth device establishes a connection with the master Bluetooth device can it be designated as the slave Bluetooth device of the master Bluetooth device.

[0047] Optional, such as Figure 2 As shown, the Bluetooth one-to-many data transmission method of the invention further includes: S21, monitoring the connection status between the slave Bluetooth device and the master Bluetooth device; when the slave Bluetooth device disconnects from the master Bluetooth device, removing the slave Bluetooth device, and executing step S3. Specifically, during the operation of the master Bluetooth device, the connection status between the master Bluetooth device and each slave Bluetooth device is monitored; when a slave Bluetooth device disconnects from the master Bluetooth device, that Bluetooth device is removed from the slave Bluetooth devices of the master Bluetooth device. At this time, the executable job corresponding to the master Bluetooth device will also change, avoiding situations where some job instructions cannot reach the actual slave Bluetooth device, thus preventing the task from being completed.

[0048] Optionally, in step S4, obtaining the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of slave Bluetooth devices further includes: when multiple corresponding slave Bluetooth devices are obtained based on the job instruction, selecting the best slave Bluetooth device as the target job device based on the device information of the multiple corresponding slave Bluetooth devices. Specifically, when a job instruction can correspond to multiple slave Bluetooth devices, the device information of the multiple slave Bluetooth devices can be judged, and the best slave Bluetooth device can be selected to respond. For example, when the user terminal connects to each printer, it first obtains the transmission characteristics of each slave Bluetooth device and records and saves this information. Before the user terminal sends the document to be printed to the printer through the APP, it first matches the document information to be printed according to the previously saved transmission characteristics of the slave Bluetooth devices and selects the printer that meets the requirements as the best printer. For example, there are three slave printers, used to print photos (A), documents (B), and receipts (C). The user terminal sends a document printing instruction to A, B, and C. After A, B, and C receive the printing instruction, A and C provide feedback to the user terminal that they are not suitable for printing documents, and no further steps are taken. Command B sends feedback information to the user terminal, indicating that the document is suitable for printing. After receiving B's request, the user terminal sends the document to B in the form of a byte array via a high-speed channel. After B receives the complete document data, the printer prints the document.

[0049] In one embodiment, when the device includes an air conditioner and a refrigerator, and the corresponding operation instructions both perform temperature adjustment functions, the executable operations are similar. Therefore, when generating executable operations, device information is added to the executable operations, and the generation of operation instructions also adds the instruction type corresponding to the device information. When the mobile phone simultaneously sends temperature adjustment instructions to both the air conditioner and the refrigerator, the Bluetooth slave modules in the air conditioner and refrigerator actively identify the type of the instruction. If it is an air conditioner type, the air conditioner responds to the operation instruction, but the refrigerator does not respond to the operation instruction because the instruction type identification does not match. For example, when the mobile phone connects to air conditioner 1 (A), air conditioner 2 (B), refrigerator 3 (C), and refrigerator 4 (D), it first obtains the types of A, B, C, and D. For example, A returns Type=1, B returns Type=1, C returns Type=2, and D returns Type=2, and saves this information to the mobile phone. When a user wants to control the temperature of the mall's air conditioning, they select the instruction with type=1 from the instruction set and send the instruction to A, B, C, and D. After receiving the instruction, A and B determine that it was sent to them and adjust the temperature accordingly. After receiving the instruction, C and D determine that it was not sent to them and do not process it.

[0050] Optional, such as Figure 3 As shown, the Bluetooth one-to-many data transmission method of the invention further includes: A1, obtaining the historical connection information and currently available Bluetooth devices of the master Bluetooth device; obtaining the unavailable Bluetooth devices corresponding to the historical connection information based on the historical connection information and the currently available Bluetooth devices; A2, obtaining the relationship between the unavailable Bluetooth devices and the available Bluetooth devices, so as to obtain the relay device corresponding to the unavailable Bluetooth device from the available Bluetooth devices; A3, using the relay device and the unavailable Bluetooth devices as slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth devices receive the corresponding job instructions through the relay device. Specifically, if some historically connected devices, i.e., some devices in the list of job devices, are currently not within the control range of the mobile phone, then these devices can be defined as unavailable Bluetooth devices.

[0051] For example, devices A (Air Conditioner 1), B (Air Conditioner 2), C (Air Conditioner 3), D (Air Conditioner 4), E (Air Conditioner 5), and F (Air Conditioner 6) have all previously connected to the phone, and their device attributes are saved in the phone. When the phone can only scan A (Air Conditioner 1), B (Air Conditioner 2), and C (Air Conditioner 3), then D (Air Conditioner 4), E (Air Conditioner 5), and F (Air Conditioner 6) are defined as unavailable devices corresponding to the master Bluetooth device. At this time, an available Bluetooth device, such as A (Air Conditioner 1), can be used as the master device to start the scanning function. After receiving the broadcast from the surrounding unavailable Bluetooth slave devices, it initiates a scanning request. The surrounding unavailable Bluetooth slave devices provide a scanning response (including UUID, MAC, name, RSSI value, etc.) to obtain the corresponding unavailable device. The signal strength of the RSSI value is used to determine whether to act as a proxy or relay device for the unavailable device and establish a connection. For example, if A searches for D and the RSSI value is -45, A searches for E and the RSSI value is -80, A searches for F and the RSSI value is -80. If the RSSI value is -100, then A (Air Conditioner 1) acts as a proxy, or relay device, for D (Air Conditioner 4). A (Air Conditioner 1) and D (Air Conditioner 4) establish a connection. When A (Air Conditioner 1) receives a work instruction, it forwards the instruction, such as a work instruction to turn off the air conditioner, to D (Air Conditioner 4). D (Air Conditioner 4) receives the instruction and completes the action of turning off the air conditioner. B (Air Conditioner 2), acting as the master device, activates the scanning function. After receiving a broadcast from nearby unavailable Bluetooth slave devices, it initiates a scanning request. The nearby unavailable Bluetooth slave devices provide scanning responses (including UUID, MAC, name, RSSI value, etc.). Ultimately, it identifies the aforementioned unavailable Bluetooth devices and uses the signal strength of the RSSI value to determine the corresponding unavailable device, acting as a proxy, or relay device, for that unavailable device. For example, if (B searches for E and the RSSI value is -45, B searches for D and the RSSI value is -80, B searches for F and the RSSI value is -100), then B (Air Conditioner 2) acts as a proxy for E (Air Conditioner 5). B (Air Conditioner 2) and E (Air Conditioner 5) establish a connection. When B (Air Conditioner 2) receives a work instruction, it forwards the work instruction to turn off the air conditioner sent by the mobile phone to E (Air Conditioner 5). After receiving the instruction, E (Air Conditioner 5) completes the action of turning off the air conditioner. C (Air Conditioner 3), as the master device, starts the scanning function. After receiving the broadcast of unavailable Bluetooth slave devices in the vicinity, it initiates a scanning request. The unavailable Bluetooth slave devices in the vicinity provide scanning responses (including UUID, MAC, name, RSSI value, etc.). Finally, the unavailable Bluetooth devices mentioned above are obtained. The corresponding unavailable devices are identified by the signal strength of the RSSI value, and the device acts as a proxy or relay device for the unavailable device.For example, if C searches for F and the RSSI value is -45, C searches for D and the RSSI value is -80, and C searches for E and the RSSI value is -100, then C (Air Conditioner 3) acts as an agent for F (Air Conditioner 6). C (Air Conditioner 3) establishes a connection with F (Air Conditioner 6) and forwards the operation instruction to turn off the air conditioner sent by the mobile phone to F (Air Conditioner 6). After receiving the instruction, F (Air Conditioner 6) completes the action of turning off the air conditioner.

[0052] It is understandable that when unavailable Bluetooth devices can be detected based on historical connection information and currently available Bluetooth devices, all currently available Bluetooth devices can be set to start scanning to scan their respective RSSI values ​​relative to the target devices. Then, all RSSI values ​​are transmitted back to the mobile phone for statistical analysis, and finally, the optimal relay device corresponding to each unavailable Bluetooth device is determined based on the signal strength of the RSSI values.

[0053] Optionally, if some unavailable Bluetooth devices cannot find corresponding relay devices, all slave Bluetooth devices of the current master Bluetooth device can be defined as the currently available Bluetooth devices of that master Bluetooth device. Based on these new currently available Bluetooth devices, the search continues to acquire relay devices for the remaining unavailable Bluetooth devices. This process expands the search range and enhances the scanning function. Specifically, after acquiring a new relay device, it is determined whether there are still unavailable Bluetooth devices. Based on the result, it is decided whether to acquire relay devices again until no unavailable Bluetooth devices remain. The specific process can be as follows: Available Bluetooth devices within the effective scanning range of the mobile phone are designated as first-order scanning master devices. All first-order scanning master devices initiate scanning. All devices scanned by first-order scanning master devices are designated as second-order scanning master devices. If some target devices are still not in the second-order scanning master device list, all second-order scanning master devices initiate scanning. All devices scanned by second-order scanning master devices are designated as third-order scanning master devices. If some target devices are still not in the third-order scanning master device list, all third-order scanning master devices initiate scanning, thus exhaustively searching for all scannable devices and connecting to as many target devices as possible.

[0054] For example, if the target devices include A, D, E, K, and M, and the available Bluetooth devices on the mobile phone are A, B, and C, then according to the above, A, B, and C are first-order scanning master devices. Since D, E, K, and M are not among the first-order scanning master devices, the first-order scanning master devices are activated. The RSSI value when A scans to D is -70, when B scans to D is -40, when B scans to E is -80, and when C scans to E is -30. Therefore, devices D and E are second-order scanning master devices. Since K and M are not among the second-order scanning master devices, the second-order scanning master devices are activated. The RSSI value when D scans to F is -60, and when D scans to G is -75. Therefore, devices F and G are third-order scanning master devices. Since K and M are not among the third-order scanning master devices, the third-order scanning master devices are activated. The RSSI value when F scans to H is -70, and when G scans to H is -80. Therefore, H is a fourth-order scanning master device. Since K and M are not in the fourth-order scanning master device, the fourth-order scanning master device is initiated to start scanning. H scans K and finds an RSSI value of -45, therefore K is the fifth-order scanning master device. Since M is not in the fifth-order scanning master device, the fifth-order scanning master device is initiated to start scanning. K scans L and finds an RSSI value of -60, therefore L is the sixth-order scanning master device. Since M is not in the sixth-order scanning master device, the sixth-order scanning master device is initiated to start scanning. Because no connectable Bluetooth device is found within L's effective scanning range, the enhanced scanning function is terminated. All useful data acquired during the enhanced scanning process is returned to the mobile phone for processing. Valid data such as (A->D:-70) means that A scans D, and D returns an RSSI value of -70 to A. The same applies below. (B->D:-40), (B->E:-80), (C->E:-30), (D->F:-60), (D->G:-75), (F->H:-70), (H->K:-45), (K->L:-60), (L->M: Not scanned). After the above data is returned to the mobile phone for processing, the optimal links for the target Bluetooth devices (D, E, K) that are not within the effective scanning range of the mobile phone are: (1) Mobile phone->B->D, (2) Mobile phone->C->E, (3) Mobile phone->B->D->F->H->K. However, since L cannot find the target working device M, M, although it is the target working device, cannot ultimately execute the working instructions issued by the mobile phone. Therefore, the link (4) Mobile phone->B->D->F->H->K->L->M does not exist.

[0055] In (2) above, it can be seen that C acts as a proxy, i.e. a relay device, for the target work device E, establishes a connection and forwards the work instructions sent by the mobile phone to E, and E acts as the target work device to execute the relevant actions of the instructions.

[0056] In (1) above, B acts as a proxy (relay device) for the target work device D, establishing a connection and forwarding the work instructions sent by the mobile phone to D. D, as the target work device, executes the instructions. According to (3) above, B, D, F, and H act as proxies (relay devices) for the target work device K, establishing connections sequentially and forwarding the work instructions sent by the mobile phone layer by layer until they reach the target work device K. K, as the target work device, receives the work instructions and executes the instructions. Ultimately, this ensures that all unavailable Bluetooth devices within the effective connection range of available Bluetooth devices find corresponding available Bluetooth devices as proxies (relay devices) and receive the necessary work instructions through these relay devices.

[0057] Optional, such as Figure 4 As shown, the Bluetooth one-to-many data transmission method of the present invention further includes: S5, receiving feedback information generated by the target working device based on the working instruction, and determining the execution status of the target working device on the working instruction based on the feedback information. Specifically, to ensure that the instruction set can be transmitted securely, quickly, and accurately to the slave Bluetooth devices, the instructions go through a dedicated channel, which includes data encryption / decryption and a fast channel protocol mechanism. To ensure that all executed slave Bluetooth devices can accurately execute the instructions issued by the master Bluetooth device, there is an error correction mechanism. When a slave Bluetooth device receives an instruction from the master Bluetooth device but does not execute the corresponding action, it feeds back the execution failure result to the master Bluetooth device. The master Bluetooth device receives the failure result returned by the slave Bluetooth device and resends the instruction set to the slave Bluetooth device. This process is repeated until the slave Bluetooth device executes successfully within a specified number of times and feeds back this message to the master Bluetooth device, at which point the operation is complete. Otherwise, after the specified number of times is exceeded, the master Bluetooth device sends a restart instruction to the slave Bluetooth device and saves the information in the database. After receiving the restart instruction and restarting, the slave Bluetooth device disconnects. After the slave Bluetooth device restarts and reconnects to the master Bluetooth device, the master Bluetooth device sends the previous command again. If the message returned by the slave Bluetooth device to the master Bluetooth device still fails, the master Bluetooth device displays that the device has malfunctioned and needs repair. This cycle repeats until all slave Bluetooth devices have executed the command sent by the master Bluetooth device, at which point the operation is considered complete.

[0058] In one specific embodiment, the Bluetooth multi-connection application (hereinafter referred to as A) is opened on the mobile phone. Conditions: The master Bluetooth device is within the effective signal coverage range of the slave Bluetooth devices, and the Bluetooth speaker, Bluetooth printer, Bluetooth curtains, Bluetooth access control, Bluetooth air conditioner, and Bluetooth ambient light are all powered on. The A application is opened, and the A interface, based on filtering conditions, only scans and displays the six slave Bluetooth devices mentioned above, selecting the desired slave Bluetooth devices and clicking "One-Click Connect." After the selected slave Bluetooth devices successfully connect, the connection status information is displayed on the A interface. At this point, the A application on the master Bluetooth device can simultaneously send command sets to the slave Bluetooth devices to control the Bluetooth speaker (start playback, pause playback, previous track, next track, etc.), the Bluetooth printer (print documents, photos, etc.), the Bluetooth curtains (open and close), the Bluetooth access control device (open and close), and the Bluetooth air conditioner (open and close, adjust temperature, fan speed, and scan mode, etc.). Simultaneously, it sends command sets to the slave Bluetooth device to control the Bluetooth ambient light's on / off state, color temperature adjustment, etc. If application A on the master Bluetooth device sends a corresponding command to the slave Bluetooth device, and the slave Bluetooth device returns an incorrect command, an error correction mechanism is triggered to ensure that the slave Bluetooth device can correctly execute the control command set sent by the master Bluetooth device. When the master Bluetooth device leaves the effective signal coverage range of the slave Bluetooth device, the connection is automatically disconnected.

[0059] When the master Bluetooth device reappears within the effective range of the slave Bluetooth device's information, it automatically connects to the previously connected slave Bluetooth device. This enables one-to-many Bluetooth connectivity, significantly improving the user's quality of life and truly realizing the automated function of one master Bluetooth device controlling multiple slave Bluetooth devices simultaneously, making it much more convenient.

[0060] Additionally, as shown in Figure 5, a Bluetooth one-to-many data transmission device of the present invention includes:

[0061] The target Bluetooth device acquisition unit 110 is used to acquire available Bluetooth devices corresponding to the main Bluetooth device, so as to acquire multiple available Bluetooth devices as target Bluetooth devices.

[0062] The Bluetooth device acquisition unit 120 is used to generate a connection list containing all target Bluetooth devices and trigger the master Bluetooth device to establish connections with the target Bluetooth devices in turn based on the connection list to obtain the corresponding slave Bluetooth devices of the master Bluetooth device;

[0063] The executable job acquisition unit 130 is used to acquire the device attributes of the Bluetooth devices respectively, so as to acquire all executable jobs of the Bluetooth devices according to the device attributes of the Bluetooth devices;

[0064] The target job device acquisition unit 140 acquires the job command generated by the master Bluetooth device, identifies the target job of the job command, and acquires the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of slave Bluetooth devices, so that the target job device responds to the job command.

[0065] Specifically, the specific operational process of the cooperation between the units of the Bluetooth one-to-many data transmission device can be referred to the Bluetooth one-to-many data transmission method described above, and will not be repeated here.

[0066] Furthermore, an electronic device according to the present invention includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program to implement any of the Bluetooth one-to-many data transmission methods described above. Specifically, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, when the computer program is downloaded, installed, and executed by an electronic device, it performs the functions defined in the methods of the embodiments of the present invention. The electronic device in the present invention can be a terminal such as a laptop, desktop computer, tablet computer, or smartphone, or it can be a server.

[0067] Furthermore, this invention provides a computer storage medium storing a computer program, which, when executed by a processor, implements any of the Bluetooth one-to-many data transmission methods described above. Specifically, it should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0068] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0069] It is understood that the above embodiments only illustrate preferred embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can freely combine the above technical features without departing from the concept of the present invention, and can also make several modifications and improvements, all of which fall within the protection scope of the present invention. Therefore, all equivalent transformations and modifications made with respect to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.

Claims

1. A Bluetooth one-to-many data transmission method, characterized in that, Includes the following steps: S1. Obtain available Bluetooth devices corresponding to the main Bluetooth device, and obtain multiple available Bluetooth devices as target Bluetooth devices; S2. Generate a connection list containing all the target Bluetooth devices, and trigger the master Bluetooth device to establish a connection with the target Bluetooth devices in sequence based on the connection list to obtain the corresponding slave Bluetooth devices of the master Bluetooth device, so as to realize one-click triggering of the master Bluetooth device to establish a connection with the target Bluetooth devices by triggering the connection list; S3. Obtain the device attributes of each slave Bluetooth device to obtain all executable jobs of the slave Bluetooth devices based on the device attributes of the slave Bluetooth devices; S4. Obtain the job instruction generated by the master Bluetooth device, identify the target job of the job instruction, and obtain the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices, so that the target job device responds to the job instruction.

2. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, In step S1, obtaining the available Bluetooth devices corresponding to the master Bluetooth device includes: The master Bluetooth device is triggered to start scanning to obtain Bluetooth broadcast data, and a scan request is sent to the Bluetooth device corresponding to the Bluetooth broadcast data to obtain the corresponding response data. The Bluetooth device that generated the response data is identified as the available Bluetooth device.

3. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, The method further includes: The slave Bluetooth device is obtained based on the historical connection information of the master Bluetooth device; and / or S21. Monitor the connection status between the slave Bluetooth device and the master Bluetooth device. When the slave Bluetooth device disconnects from the master Bluetooth device, remove the slave Bluetooth device and execute step S3.

4. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, In step S2, obtaining the slave Bluetooth device corresponding to the master Bluetooth device includes: The connection status between the master Bluetooth device and the target Bluetooth device is obtained, and when the target Bluetooth device successfully connects with the master Bluetooth device, the target Bluetooth device is designated as the slave Bluetooth device of the master Bluetooth device.

5. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, The method further includes: Obtain the historical connection information and currently available Bluetooth devices of the main Bluetooth device; based on the historical connection information and currently available Bluetooth devices, obtain the unavailable Bluetooth devices corresponding to the historical connection information; The relationship between the unavailable Bluetooth devices and the available Bluetooth devices is obtained, so as to obtain the relay device corresponding to the unavailable Bluetooth device from the available Bluetooth devices; The relay device and the unavailable Bluetooth device are designated as slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth device can receive the corresponding operation instructions through the relay device.

6. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, In step S4, obtaining the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices further includes: When multiple corresponding slave Bluetooth devices are obtained based on the job instruction, the best slave Bluetooth device is selected as the target job device according to the device information of the multiple corresponding slave Bluetooth devices.

7. The Bluetooth one-to-many data transmission method according to claim 1, characterized in that, The method further includes: S5. Receive feedback information generated by the target working device based on the working instruction, and determine the execution status of the target working device on the working instruction based on the feedback information.

8. A Bluetooth one-to-many data transmission device, characterized in that, include: A target Bluetooth device acquisition unit is used to acquire available Bluetooth devices corresponding to the main Bluetooth device, and to acquire multiple available Bluetooth devices as target Bluetooth devices. The Bluetooth device acquisition unit is used to generate a connection list containing all the target Bluetooth devices, and trigger the master Bluetooth device to establish a connection with the target Bluetooth devices in sequence based on the connection list to obtain the corresponding slave Bluetooth devices of the master Bluetooth device, so as to realize one-click triggering of the master Bluetooth device to establish a connection with the target Bluetooth devices by triggering the connection list; An executable job acquisition unit is configured to acquire the device attributes of the slave Bluetooth devices respectively, so as to acquire all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices; The target job device acquisition unit acquires the job instruction generated by the master Bluetooth device, identifies the target job of the job instruction, and acquires the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth devices, so that the target job device responds to the job instruction.

9. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the Bluetooth one-to-many data transmission method as described in any one of claims 1 to 7 by calling the computer program stored in the memory.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the Bluetooth one-to-many data transmission method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Bluetooth one-to-many data transmission method and system and storage medium

    CN110113734A