[go: up one dir, main page]

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

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

Info

Publication number
CN116033400A
CN116033400A CN202211581837.0A CN202211581837A CN116033400A CN 116033400 A CN116033400 A CN 116033400A CN 202211581837 A CN202211581837 A CN 202211581837A CN 116033400 A CN116033400 A CN 116033400A
Authority
CN
China
Prior art keywords
bluetooth
bluetooth device
slave
target
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211581837.0A
Other languages
Chinese (zh)
Inventor
常纪刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Feasycom Technology Co ltd
Original Assignee
Shenzhen Feasycom Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Feasycom Technology Co ltd filed Critical Shenzhen Feasycom Technology Co ltd
Priority to CN202211581837.0A priority Critical patent/CN116033400A/en
Publication of CN116033400A publication Critical patent/CN116033400A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

本发明涉及蓝牙一对多数据传输方法、装置、电子设备及存储介质,该方法包括:S1、获取主蓝牙设备对应的可用蓝牙设备,以获取多个可用蓝牙设备为目标蓝牙设备;S2、生成包含所有目标蓝牙设备的连接列表,并触发主蓝牙设备基于连接列表依次与目标蓝牙设备建立连接以获取主蓝牙设备对应从蓝牙设备;S3、分别获取从蓝牙设备的设备属性,以根据从蓝牙设备的设备属性获取所有从蓝牙设备的可执行作业;S4、获取主蓝牙设备生成的作业指令,识别作业指令的目标作业,基于目标作业和所有从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使目标作业设备响应作业指令。实施本发明能够快速实现一个主蓝牙设备同时控制多个从蓝牙设备。

Figure 202211581837

The present invention relates to a Bluetooth one-to-many data transmission method, device, electronic device, and storage medium. The method includes: S1. Obtain an available Bluetooth device corresponding to a master Bluetooth device, and obtain multiple available Bluetooth devices as target Bluetooth devices; S2. Generate Contains the connection list of all target Bluetooth devices, and triggers 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; Obtain all executable jobs from the bluetooth device through the device attribute; 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 based on the target job and all executable jobs from the bluetooth device as The target operating device, so that the target operating device responds to the operating instructions. The implementation of the present invention can quickly realize that a master bluetooth device controls multiple slave bluetooth devices at the same time.

Figure 202211581837

Description

蓝牙一对多数据传输方法、装置、电子设备及存储介质Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium

技术领域technical field

本发明涉及通信技术领域,更具体地说,涉及蓝牙一对多数据传输方法、装置、电子设备及存储介质。The present invention relates to the technical field of communication, and more specifically, relates to a bluetooth one-to-many data transmission method, device, electronic equipment and storage medium.

背景技术Background technique

随着蓝牙技术的日渐成熟,蓝牙在我们的日常生活中随处可见,普通的蓝牙大多都是一对一的通讯,比较典型的有:手机或者电脑等设备与蓝牙打印机连接,实现快递单、外卖单或者图片资料的打印。蓝牙门禁连接手机开锁,蓝牙耳机连接手机听歌打电话,蓝牙手环连接手机监听心率等。基于一对一的连接方式,在同时有多个蓝牙应用场景时,必须断开之前的蓝牙连接,再去连接需要的蓝牙应用场景。在一些一对多的蓝牙应用场景过程中,其指令下发也是需要一个一个的对具体的设备指定发送,其不等实现完全意义上的一对多的数据传输。With the maturity of bluetooth technology, bluetooth can be seen everywhere in our daily life. Ordinary bluetooth is mostly one-to-one communication. The typical ones are: mobile phones or computers and other devices are connected to bluetooth printers to realize express orders and takeaways. Printing of single or picture materials. Bluetooth access control is connected to mobile phone to unlock, Bluetooth headset is connected to mobile phone to listen to music and make calls, Bluetooth bracelet is connected to mobile phone to monitor heart rate, etc. Based on the one-to-one connection method, when there are multiple Bluetooth application scenarios at the same time, the previous Bluetooth connection must be disconnected, and then connect to the required Bluetooth application scenario. In some one-to-many Bluetooth application scenarios, the command delivery also needs to be sent to specific devices one by one, which does not mean that the full sense of one-to-many data transmission is realized.

发明内容Contents of the invention

本发明要解决的技术问题在于,提供蓝牙一对多数据传输方法、装置、电子设备及存储介质。The technical problem to be solved by the present invention is to provide a Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium.

本发明解决其技术问题所采用的技术方案是:构造一种蓝牙一对多数据传输方法,包括以下步骤:The technical scheme that the present invention solves its technical problem is: construct a kind of bluetooth one-to-many data transmission method, comprise the following steps:

S1、获取主蓝牙设备对应的可用蓝牙设备,以获取多个所述可用蓝牙设备为目标蓝牙设备;S1. Obtain an available Bluetooth device corresponding to the main Bluetooth device, and obtain multiple available Bluetooth devices as target Bluetooth devices;

S2、生成包含所有所述目标蓝牙设备的连接列表,并触发所述主蓝牙设备基于所述连接列表依次与所述目标蓝牙设备建立连接以获取所述主蓝牙设备对应从蓝牙设备;S2. Generate a connection list including all the target Bluetooth devices, and trigger the master Bluetooth device to sequentially establish connections with the target Bluetooth devices based on the connection list to obtain the slave Bluetooth devices corresponding to the master Bluetooth device;

S3、分别获取所述从蓝牙设备的设备属性,以根据所述从蓝牙设备的设备属性获取所有所述从蓝牙设备的可执行作业;S3. Obtain the device attributes of the slave Bluetooth devices respectively, so as to obtain all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices;

S4、获取所述主蓝牙设备生成的作业指令,识别所述作业指令的目标作业,基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使所述目标作业设备响应所述作业指令。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 device, and making the target operation device respond to the operation instruction.

优选地,在本发明所述的蓝牙一对多数据传输方法中,在所述步骤S1中,所述获取主蓝牙设备对应的可用蓝牙设备;包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in the step S1, the obtaining of the available Bluetooth devices corresponding to the master Bluetooth device includes:

触发所述主蓝牙设备开启扫描以获取蓝牙广播数据,向所述蓝牙广播数据所对应的蓝牙设备发送扫描请求以获取对应的响应数据,获取生成所述响应数据的蓝牙设备为所述可用蓝牙设备。Trigger the master Bluetooth device to start scanning to obtain Bluetooth broadcast data, send a scan request to the Bluetooth device corresponding to the Bluetooth broadcast data to obtain corresponding response data, and obtain the Bluetooth device that generates the response data as the available Bluetooth device .

优选地,在本发明所述的蓝牙一对多数据传输方法中,还包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, it also includes:

基于所述主蓝牙设备的历史连接信息获取所述从蓝牙设备。The slave Bluetooth device is acquired based on historical connection information of the master Bluetooth device.

优选地,在本发明所述的蓝牙一对多数据传输方法中,在所述步骤S2中,所述获取所述主蓝牙设备对应从蓝牙设备包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in the step S2, the acquiring the corresponding slave Bluetooth device of the master Bluetooth device includes:

获取所述主蓝牙设备与所述目标蓝牙设备的连接状态,在所述目标蓝牙设备与所述主蓝牙设备连接成功时以所述目标蓝牙设备为所述主蓝牙设备的从蓝牙设备。Obtain the connection status between the master Bluetooth device and the target Bluetooth device, and use the target Bluetooth device as the slave Bluetooth device of the master Bluetooth device when the target Bluetooth device is successfully connected to the master Bluetooth device.

优选地,在本发明所述的蓝牙一对多数据传输方法中,还包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, it also includes:

获取所述主蓝牙设备的历史连接信息和当前可用蓝牙设备;根据所述历史连接信息和所述当前可用蓝牙设备获取所述历史连接信息对应的不可用蓝牙设备;Obtain historical connection information and currently available Bluetooth devices of the master Bluetooth device; obtain unavailable Bluetooth devices corresponding to the historical connection information according to the historical connection information and the currently available Bluetooth devices;

获取所述不可用蓝牙设备与所述可用蓝牙设备的关系,以从所述可用蓝牙设备中获取所述不可用蓝牙设备对应的中转设备;Obtain the relationship between the unavailable Bluetooth device and the available Bluetooth device, so as to obtain the transfer device corresponding to the unavailable Bluetooth device from the available Bluetooth devices;

以所述中转设备和所述不可用蓝牙设备为所述主蓝牙设备的从蓝牙设备,以使得所述不可用蓝牙设备通过所述中转设备接收对应的作业指令。The relay device and the unavailable Bluetooth device are slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth device receives a corresponding job instruction through the relay device.

优选地,在本发明所述的蓝牙一对多数据传输方法中,还包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, it also includes:

S21、监测所述从蓝牙设备与所述主蓝牙设备的连接状态,在所述从蓝牙设备与所述主蓝牙设备断开连接时,剔除所述从蓝牙设备,并执行所述步骤S3。S21. Monitor the connection status between the slave Bluetooth device and the master Bluetooth device, and remove the slave Bluetooth device when the slave Bluetooth device is disconnected from the master Bluetooth device, and perform the step S3.

优选地,在本发明所述的蓝牙一对多数据传输方法中,在所述步骤S4中,所述基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,还包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, in the step S4, the corresponding slave Bluetooth device is obtained based on the target job and all executable jobs of the slave Bluetooth devices Target operating equipment, also including:

在基于所述作业指令获取到多个对应的从蓝牙设备时,根据所述多个对应的从蓝牙设备的设备信息获取最佳从蓝牙设备为所述目标作业设备。When multiple corresponding slave Bluetooth devices are acquired based on the operation instruction, the best slave Bluetooth device is acquired as the target operation device according to device information of the multiple corresponding slave Bluetooth devices.

优选地,在本发明所述的蓝牙一对多数据传输方法中,还包括:Preferably, in the Bluetooth one-to-many data transmission method of the present invention, it also includes:

S5、接收所述目标作业设备基于所述作业指令生成的反馈信息,以根据所述反馈信息判定所述目标作业设备对所述作业指令的执行状态。S5. Receive feedback information generated by the target operation device based on the operation instruction, so as to determine an execution state of the operation instruction by the target operation device according to the feedback information.

本发明还构造一种蓝牙一对多数据传输装置,包括:The present invention also constructs a Bluetooth one-to-many data transmission device, comprising:

目标蓝牙设备获取单元,用于获取主蓝牙设备对应的可用蓝牙设备,以获取多个所述可用蓝牙设备为目标蓝牙设备;A target bluetooth device acquiring unit, configured to acquire available bluetooth devices corresponding to the master bluetooth device, to obtain multiple available bluetooth devices as target bluetooth devices;

从蓝牙设备获取单元,用于生成包含所有所述目标蓝牙设备的连接列表,并触发所述主蓝牙设备基于所述连接列表依次与所述目标蓝牙设备建立连接以获取所述主蓝牙设备对应从蓝牙设备;The slave bluetooth device acquisition unit is configured 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 device in turn based on the connection list to obtain the corresponding slave of the master bluetooth device bluetooth device;

可执行作业获取单元,用于分别获取所述从蓝牙设备的设备属性,以根据所述从蓝牙设备的设备属性获取所有所述从蓝牙设备的可执行作业;An executable job acquiring unit, configured to respectively acquire device attributes of the slave Bluetooth devices, so as to acquire all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices;

目标作业设备获取单元,获取所述主蓝牙设备生成的作业指令,识别所述作业指令的目标作业,基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使所述目标作业设备响应所述作业指令。The target operation device acquiring 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 based on the target job and all executable jobs of the slave bluetooth device an operation device, so that the target operation device responds to the operation instruction.

本发明还构造一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行如上面任一项所述的蓝牙一对多数据传输方法的步骤。The present invention also constructs a computer-readable storage medium, the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the Bluetooth one-to-many data as described in any one of the above The steps of the transfer method.

本发明还构造一种电子设备,其特征在于,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,执行如上面任一项所述的蓝牙一对多数据传输方法的步骤。The present invention also constructs an electronic device, which is characterized in that it includes a memory and a processor, and a computer program is stored in the memory, and the processor executes any one of the above by calling the computer program stored in the memory. The steps of the bluetooth one-to-many data transmission method described in item.

实施本发明的一种蓝牙一对多数据传输方法、装置、电子设备及存储介质,具有以下有益效果:能够快速实现了一个主蓝牙设备同时控制多个从蓝牙设备。A bluetooth one-to-many data transmission method, device, electronic equipment and storage medium implementing the present invention have the following beneficial effects: a master bluetooth device can quickly realize simultaneous control of multiple slave bluetooth devices.

附图说明Description of drawings

下面将结合附图及实施例对本发明作进一步说明,附图中:The present invention will be further described below in conjunction with accompanying drawing and embodiment, in the accompanying drawing:

图1是本发明蓝牙一对多数据传输方法一实施例的程序流程图;Fig. 1 is the program flowchart of an embodiment of the bluetooth one-to-many data transmission method of the present invention;

图2是本发明蓝牙一对多数据传输方法另一实施例的程序流程图;Fig. 2 is a program flow chart of another embodiment of the Bluetooth one-to-many data transmission method of the present invention;

图3是本发明蓝牙一对多数据传输方法另一实施例的程序流程图;Fig. 3 is a program flow chart of another embodiment of the Bluetooth one-to-many data transmission method of the present invention;

图4是本发明蓝牙一对多数据传输方法另一实施例的程序流程图;Fig. 4 is the program flowchart of another embodiment of the bluetooth one-to-many data transmission method of the present invention;

图5是本发明蓝牙一对多数据传输装置的一实施例的逻辑框图。FIG. 5 is a logic block diagram of an embodiment of the Bluetooth one-to-many data transmission device of the present invention.

具体实施方式Detailed ways

为了对本发明的技术特征、目的和效果有更加清楚的理解,现对照附图详细说明本发明的具体实施方式。In order to have a clearer understanding of the technical features, purposes and effects of the present invention, the specific implementation manners of the present invention will now be described in detail with reference to the accompanying drawings.

如图1所示,在本发明的一种蓝牙一对多数据传输方法第一实施例中,包括以下步骤:S1、获取主蓝牙设备对应的可用蓝牙设备,以获取多个可用蓝牙设备为目标蓝牙设备。具体的,蓝牙设备作为主蓝牙设备时,根据触发指令搜索当前满足距离要求即在有效范围内的所有蓝牙设备。该所有蓝牙设备可以理解为该主蓝牙设备对应的可用蓝牙设备。即,该可用蓝牙设备能够满足主蓝牙设备的连接要求,例如信号强度,通信协议等均可以满足与主蓝牙设备的连接要求。可以理解,当前主蓝牙设备对应的所有可用蓝牙设备并不一定是该主蓝牙设备需要连接的设备,因此,可以基于需求从该可用蓝牙设备中选择需要的蓝牙设备为目标蓝牙设备。As shown in FIG. 1, in the first embodiment of a Bluetooth one-to-many data transmission method of the present invention, the following steps are included: S1. Obtain the available Bluetooth devices corresponding to the master Bluetooth device, with the goal of obtaining multiple available Bluetooth devices bluetooth device. Specifically, when the Bluetooth device serves as the master Bluetooth device, it searches for all Bluetooth devices that currently meet the distance requirement, that is, are within the effective range according to the trigger instruction. All the bluetooth devices can be understood as available bluetooth devices corresponding to the master bluetooth device. That is, the available Bluetooth device can meet the connection requirements of the main Bluetooth device, such as signal strength, communication protocol, etc., can meet the connection requirements with the main 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 desired Bluetooth device can be selected from the available Bluetooth devices as the target Bluetooth device based on requirements.

S2、生成包含所有目标蓝牙设备的连接列表,并触发主蓝牙设备基于连接列表依次与目标蓝牙设备建立连接以获取主蓝牙设备对应从蓝牙设备。具体的,基于得到的目标蓝牙设备生成对应的连接列表,即可以从该连接列表中得到需要连接的所有的目标蓝牙设备。基于该连接列表可以触发实现一键式触发主蓝牙设备与目标蓝牙设备建立连接。其中当目标蓝牙设备与主蓝牙设备建立连接后,此时目标蓝牙设备对应的为该主蓝牙设备的从蓝牙设备。在一实施例中,其具体的蓝牙连接过程可以为,主蓝牙设备主动向从蓝牙设备发送密钥,如果从蓝牙设备接收到密钥并解析成功回调给主蓝牙设备,主蓝牙设备主动向从蓝牙设备发送打通高速通讯通道指令,从蓝牙设备接收到主蓝牙设备发来的打通高速通讯通道指令后根据预设蓝牙通信协议打通高速通讯通道,主蓝牙设备接收到从蓝牙设备反馈的高速通讯通道打开的消息后,连接步骤正式完成。在一实施例中,可以通过连接列表的状态反映每个目标蓝牙设备的连接状态。S2. Generate a connection list including all target Bluetooth devices, and trigger the master Bluetooth device to sequentially establish connections with the target Bluetooth devices based on the connection list to obtain the slave Bluetooth devices corresponding to the master Bluetooth device. Specifically, a corresponding connection list is generated based on the obtained target Bluetooth devices, that is, all target Bluetooth devices that need to be connected can be obtained from the connection list. Based on the connection list, one-click triggering can be triggered to establish a connection between the master Bluetooth device and the target Bluetooth device. Wherein, when the target Bluetooth device establishes a connection with the master Bluetooth device, the target Bluetooth device corresponds to the slave Bluetooth device of the master Bluetooth device. In an embodiment, the specific bluetooth connection process may be that the master bluetooth device actively sends the key to the slave bluetooth device, and if the slave bluetooth device receives the key and resolves successfully and calls back to the master bluetooth device, the master bluetooth device actively sends the key to the slave bluetooth device. The bluetooth device sends the command to open the high-speed communication channel, and after receiving the command to open the high-speed communication channel from the master bluetooth device, the bluetooth device opens the high-speed communication channel according to the preset bluetooth communication protocol, and the master bluetooth device receives the high-speed communication channel fed back from the bluetooth device After opening the message, the connection step is officially completed. In an embodiment, the connection status of each target Bluetooth device can be reflected by the status of the connection list.

S3、分别获取从蓝牙设备的设备属性,以根据从蓝牙设备的设备属性获取所有从蓝牙设备的可执行作业。具体的,在获得了与主蓝牙设备建立连接的从蓝牙设备后,对每个从蓝牙设备进行确认。获取每个从蓝牙设备的设备属性,根据设备属性来确定该蓝牙设备能够执行的作业任务即可执行作业。即确认连接的从蓝牙设备是什么样的设备,其可以用来执行什么样的任务。例如,当得到的从蓝牙设备为打印设备,那么可以得到该从蓝牙设备对应的可执行作业为复印、打印等作业。当得到的从蓝牙设备为空调,那么可以得到该从蓝牙设备对应的可执行作业为温度调节、风速调节等作业任务。S3. Obtain the device attributes of the slave Bluetooth devices respectively, so as to obtain all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices. Specifically, after obtaining the slave bluetooth devices that establish a connection with the master bluetooth device, each slave bluetooth device is confirmed. Obtain the device attribute of each slave Bluetooth device, and determine the job tasks that the Bluetooth device can perform according to the device attribute to execute the job. That is to confirm what kind of device the connected slave Bluetooth device is and what kind of tasks it can be used to perform. For example, when the obtained slave bluetooth device is a printing device, then the executable jobs corresponding to the slave bluetooth device can be obtained as jobs such as copying and printing. When the obtained slave bluetooth device is an air conditioner, then it can be obtained that the executable tasks corresponding to the slave bluetooth device are temperature adjustment, wind speed adjustment and other tasks.

S4、获取主蓝牙设备生成的作业指令,识别作业指令的目标作业,基于目标作业和所有从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使目标作业设备响应作业指令。具体的,通过主蓝牙设备生成作业指令。该作业指令为用来控制从蓝牙设备动作的控制指令,可以对该作业指令进行识别,得到其到底用来执行什么操作。例如,主蓝牙设备生成打印指令,那么该打印指令对应的目标作业为打印作业。可以从所有的从蓝牙设备中寻找可以执行打印的蓝牙设备执行该打印作业。通过该过程可以实现对主蓝牙设备作业指令的自动识别并进行对应的数据传输,实现在一对多的蓝牙连接时,数据的快速和准确传输。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 device, so that the target job device responds to the job command. Specifically, a job instruction is generated by the master Bluetooth device. The operation instruction is a control instruction used to control the action of the slave Bluetooth device, and the operation instruction can be identified to obtain what operation it is used to perform. For example, if the master Bluetooth device generates a print instruction, then the target job corresponding to the print instruction is a print job. The print job can be executed from all the bluetooth devices that can perform printing by searching for them. Through this process, the automatic identification of the master bluetooth device's operation instruction and corresponding data transmission can be realized, and the fast and accurate data transmission can be realized during the one-to-many bluetooth connection.

可选的,在步骤S1中,获取主蓝牙设备对应的可用蓝牙设备;包括:触发所述主蓝牙设备开启扫描以获取蓝牙广播数据,向所述蓝牙广播数据所对应的蓝牙设备发送扫描请求以获取对应的响应数据,获取生成所述响应数据的蓝牙设备为所述可用蓝牙设备。具体的,主设备先开启扫描,从设备不停的向周围发送广播,当主设备开启了扫描功能后,主设备可以接收到从设备发送的广播,主设备接收到了从设备发送的广播后再给从设备发送扫描请求,从设备接收到了主设备发送的扫描请求后,从设备再给主设备发送扫描响应(包括了从设备的uuid、mac、name等信息),主设备接收到了从设备发送的扫描响应后,获取到从设备的信息并在列表展示出来。Optionally, in step S1, obtaining available Bluetooth devices corresponding to the master Bluetooth device; including: triggering the master Bluetooth device to start scanning to obtain Bluetooth broadcast data, and sending a scan request to the Bluetooth device corresponding to the Bluetooth broadcast data to The corresponding response data is obtained, and the bluetooth device that generates the response data is obtained as the available bluetooth device. Specifically, the master device starts scanning first, and the slave device continuously sends broadcasts to the surroundings. When the master device turns on the scan function, the master device can receive the broadcast sent by the slave device, and then the master device receives the broadcast sent by the slave device. The slave device sends a scan request. After the slave device receives the scan request sent by the master device, the slave device sends a scan response to the master device (including uuid, mac, name and other information of the slave device), and the master device receives the scan request sent by the slave device. After scanning the response, get the slave device information and display it in the list.

可选的,在发明的蓝牙一对多数据传输方法中,还包括:基于主蓝牙设备的历史连接信息获取从蓝牙设备。具体的,主蓝牙设备在与从蓝牙设备断开连接之后,可以把之前连接的所有信息保存到各自从蓝牙设备内置存储里面,同时主蓝牙设备里面也记录了之前连接的所有从蓝牙设备的信息。当主蓝牙设备再次进入到从蓝牙设备信号覆盖的有效范围内,主蓝牙设备主动发送广播数据,从蓝牙设备接收到主蓝牙设备发送的广播数据后,把从蓝牙设备之前存储的连接相关信息反馈给主蓝牙设备,主蓝牙设备根据从蓝牙设备反馈的之前已连接的相关信息并解析之前保存的从蓝牙设备连接信息,自动将该从蓝牙设备作为当前的目标蓝牙设备,并自动完成目标蓝牙设备的连接,得到当前主蓝牙设备对应的从蓝牙设备。例如,自动通过系统算法,把已连接过的从蓝牙设备默认自动连接上,勾选框默认勾选,后面的状态显示成已连接。未连接的新设备勾选框不勾选,状态显示未连接。即连接列表中,对历史连接过的从蓝牙设备,其可以直接修改连接列表状态的为连接状态。Optionally, in the inventive bluetooth one-to-many data transmission method, further comprising: acquiring the slave bluetooth device based on historical connection information of the master bluetooth device. Specifically, after the master bluetooth device is disconnected from the slave bluetooth device, it can save all the previously connected information to the built-in storage of each slave bluetooth device, and the master bluetooth device also records the information of all the slave bluetooth devices connected before . When the master bluetooth device enters the effective range covered by the signal of the slave bluetooth device again, the master bluetooth device actively sends broadcast data, and after the slave bluetooth device receives the broadcast data sent by the master bluetooth device, it feeds back the connection-related information previously stored by the slave bluetooth device to Master Bluetooth device, the master Bluetooth device automatically takes the slave Bluetooth device as the current target Bluetooth device according to the previously connected relevant information fed back from the slave Bluetooth device and parses the previously saved slave Bluetooth device connection information, and automatically completes the target Bluetooth device. Connect to get the slave Bluetooth device corresponding to the current master Bluetooth device. For example, automatically through the system algorithm, the connected Bluetooth device is automatically connected by default, the check box is checked by default, and the subsequent status is displayed as connected. If the check box of the new device that is not connected is not checked, the status shows that it is not connected. That is, in the connection list, for the slave Bluetooth devices that have been connected in history, it can directly modify the state of the connection list as the connection state.

可选的,在步骤S2中,获取主蓝牙设备对应从蓝牙设备包括:获取主蓝牙设备与目标蓝牙设备的连接状态,在目标蓝牙设备与主蓝牙设备连接成功时以目标蓝牙设备为主蓝牙设备的从蓝牙设备。具体的,并不是每个选中的目标蓝牙设备都能够实现与主蓝牙设备的连接,即可以对目标蓝牙设备与主蓝牙设备的连接状态进行判断,即只有在选中的目标蓝牙设备与主蓝牙设备建立连接后,才能将该目标蓝牙设备作为主蓝牙设备的从蓝牙设备。Optionally, in step S2, obtaining the slave Bluetooth device corresponding to the master Bluetooth device includes: obtaining the connection status between the master Bluetooth device and the target Bluetooth device, and using the target Bluetooth device as the master Bluetooth device when the target Bluetooth device is successfully connected to the master Bluetooth device from the Bluetooth device. Specifically, not every selected target Bluetooth device can realize the connection with the main Bluetooth device, that is, the connection status between the target Bluetooth device and the main Bluetooth device can be judged, that is, only when the selected target Bluetooth device and the main Bluetooth device After the connection is established, the target Bluetooth device can be used as the slave Bluetooth device of the master Bluetooth device.

可选的,如图2所示,在发明的蓝牙一对多数据传输方法中,还包括:S21、监测从蓝牙设备与主蓝牙设备的连接状态,在从蓝牙设备与主蓝牙设备断开连接时,剔除从蓝牙设备,并执行步骤S3。具体的,在主蓝牙设备工作中,监测主蓝牙设备与每一从蓝牙设备的连接状态,当出现从蓝牙设备与主蓝牙设备断开连接时,则将该蓝牙设备从主蓝牙设备的从蓝牙设备中剔除。此时主蓝牙设备对应的可执行作业也会发生变化,避免对于一些作业指令到达不了实际的从蓝牙设备使得任务实际无法完成。Optionally, as shown in Figure 2, in the inventive Bluetooth one-to-many data transmission method, it also includes: S21, monitoring the connection status between the slave Bluetooth device and the master Bluetooth device, and disconnecting the slave Bluetooth device from the master Bluetooth device , remove the slave bluetooth device, and execute step S3. Specifically, in the work of the master bluetooth device, monitor the connection status between the master bluetooth device and each slave bluetooth device. removed from the device. At this time, the executable job corresponding to the master Bluetooth device will also change, so as to avoid that some job instructions cannot reach the actual slave Bluetooth device, so that the task cannot actually be completed.

可选的,在步骤S4中,基于目标作业和所有从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,还包括:在基于作业指令获取到多个对应的从蓝牙设备时,根据多个对应的从蓝牙设备的设备信息获取最佳从蓝牙设备为目标作业设备。具体的,当对一个作业指令可以对应到多个从蓝牙设备时,则可以对多个从蓝牙设备的设备信息进行判断,选择最佳的从蓝牙设备进行响应。例如,用户终端在连接到每台打印机时,首先获取每个从蓝牙设备的传输特性,并把该信息记录保存。在用户终端通过APP向打印机发送要打印的资料之前,先根据之前保存的从蓝牙设备的传输特性匹配要打印的资料信息,选择出满足要求的打印机为最佳打印机。例如,有三台从设备打印机,分别是用来打印照片(A)、文档(B)、小票(C)。用户终端向A、B、C发送打印文档的指令,当A、B、C接收到了打印的指令后,A和C反馈信息给到用户终端反馈其不适合打印文档,就不做下一步骤操作了。B指令反馈信息给到用户终端反馈其适合打印文档,用户终端接收到了B的请求后,走高速通道把文档以字节数组的形式发送给B,B完整的接收到了文档数据后,打印机打印出文档。Optionally, in step S4, acquiring the corresponding slave Bluetooth device as the target job device based on the target job and all executable jobs of the slave Bluetooth device, further includes: when multiple corresponding slave Bluetooth devices are obtained based on the job instruction, According to the device information of multiple corresponding slave bluetooth devices, the best slave bluetooth device is obtained as the target operation device. Specifically, when one 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 is connected to each printer, it first obtains the transmission characteristics of each slave Bluetooth device, and records and saves the information. Before the user terminal sends the data to be printed to the printer through the APP, it first matches the data information to be printed according to the previously saved transmission characteristics of the Bluetooth device, and selects the printer that meets the requirements as the best printer. For example, there are three slave device printers, which are used to print photos (A), documents (B), and receipts (C). The user terminal sends an instruction to print the document to A, B, and C. When A, B, and C receive the printing instruction, A and C feedback information to the user terminal that it is not suitable for printing the document, and do not proceed to the next step. up. The feedback information of the B command is sent to the user terminal to feedback that it is suitable for printing the document. After receiving the request from B, the user terminal takes the high-speed channel and sends the document to B in the form of a byte array. After B completely receives the document data, the printer prints out document.

在一实施例中,当从设备中包含空调和冰箱,其对应的作业指令执行的作业都是温度调节功能,此时可执行作业相似,因此在生成可执行作业时,其对可执行作业添加设备信息,作业指令的生成也增加设备信息对应的指令类型。当,手机同时向空调和冰箱都发送需要控制的设备的调节温度指令,空调和冰箱里面的蓝牙从模块主动辨别这一指令是哪种类型的,如果是空调类型的,空调响应该作业指令,但是冰箱因为指令类型识别不对应,则不对该作业指令作出响应。例如,当手机在连接到空调1(A)、空调2(B)、冰箱3(C)和冰箱4(D)时,首先获取A、B、C和D的类型,比如A返回Type=1,B返回Type=1,C返回Type=2,D返回Type=2并保存到手机里面。当用户想要控制商场空调的温度时,从指令集里面选择控制空调的类型为Type=1的指令并向A、B、C、D发送指令,A和B接收到指令以后,判断是发送给自己的就调节温度,C和D接收到指令后,判断不是发送给自己的,就不做处理。In one embodiment, when the slave equipment includes air conditioners and refrigerators, the jobs executed by the corresponding job instructions are all temperature adjustment functions. At this time, the executable jobs are similar. Therefore, when generating executable jobs, it adds For equipment information, the generation of operation instructions also increases the instruction type corresponding to equipment information. When the mobile phone sends an instruction to adjust the temperature of the device to be controlled 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, the air conditioner responds to the operation instruction. However, the refrigerator does not respond to the operation instruction because the instruction type identification does not correspond. For example, when the mobile phone is connected to air conditioner 1 (A), air conditioner 2 (B), refrigerator 3 (C) and refrigerator 4 (D), first obtain the types of A, B, C and D, for example, A returns Type=1 ,B returns Type=1, C returns Type=2, D returns Type=2 and saves it in the phone. When the user wants to control the temperature of the air conditioner in the shopping mall, he selects an instruction of Type=1 to control the air conditioner from the instruction set and sends the instruction to A, B, C, and D. After receiving the instruction, A and B judge whether to send it to Adjust the temperature for your own. After C and D receive the command, they judge that it is not sent to them, so they don’t process it.

可选的,如图3所示,在发明的蓝牙一对多数据传输方法中所述方法还包括:A1、获取所述主蓝牙设备的历史连接信息和当前可用蓝牙设备;根据所述历史连接信息和所述当前可用蓝牙设备获取所述历史连接信息对应的不可用蓝牙设备;A2、获取所述不可用蓝牙设备与所述可用蓝牙设备的关系,以从所述可用蓝牙设备中获取所述不可用蓝牙设备对应的中转设备;A3、以所述中转设备和所述不可用蓝牙设备为所述主蓝牙设备的从蓝牙设备,以使得所述不可用蓝牙设备通过所述中转设备接收对应的作业指令。具体的,如果一些历史连接过的设备即列表作业设备中的一些设备当前不在手机控制范围之内,那么可以定义这些设备为不可用蓝牙设备。Optionally, as shown in FIG. 3, the method in the inventive Bluetooth one-to-many data transmission method further includes: A1, obtaining historical connection information of the master Bluetooth device and currently available Bluetooth devices; Information and the currently available Bluetooth device to obtain the unavailable Bluetooth device corresponding to the historical connection information; A2. Obtain the relationship between the unavailable Bluetooth device and the available Bluetooth device, so as to obtain the The transfer device corresponding to the unavailable Bluetooth device; A3. The transfer device and the unavailable Bluetooth device are the slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth device receives the corresponding Bluetooth device through the transfer device. job order. Specifically, if some historically connected devices, that is, some devices in the list of operating devices are not currently within the control range of the mobile phone, then these devices can be defined as unavailable Bluetooth devices.

比如A(空调1)、B(空调2)、C(空调3)、D(空调4)、E(空调5)、F(空调6)从设备之前都和手机连接过,他们的设备属性已经保存到了手机里面。当手机只能扫描到A(空调1)、B(空调2)、C(空调3)的时候,那么D(空调4)、E(空调5)、F(空调6)就被定义为该主蓝牙设备对应的不可用设备,此时可以通过可用蓝牙设备例如A(空调1)作为主设备开启扫描功能,接收到周围不可用蓝牙从设备的广播后,发起扫描请求,周围不可用蓝牙从设备给出扫描响应(包括uuid、mac、name、rssi值等)”获取对应的不可用设备,通过RSSI值的信号强弱来判断是否作为该不可用设备的代理即中转设备并建立连接。比如A搜索D的RSSI值为-45,A搜索E的RSSI值为-80,A搜索F的RSSI值为-100,那么A(空调1)就作为D(空调4)的代理即中转设备。A(空调1)和D(空调4)建立连接,A(空调1)在接收到作业指令时,转发该指令例如关闭空调的作业指令给到D(空调4),D(空调4)接收到指令后完成关闭空调动作。B(空调2)作为主设备开启扫描功能,接收到周围不可用蓝牙从设备的广播后,发起扫描请求,周围不可用蓝牙从设备给出扫描响应(包括uuid、mac、name、rssi值等)”,最终获取上述的不可用蓝牙设备,通过RSSI值的信号强弱来获取对应的不可用设备并作为该不可用设备的代理即中转设备。比如(B搜索E的RSSI值为-45,B搜索D的RSSI值为-80,B搜索F的RSSI值为-100)那B(空调2)就作为E(空调5)的代理,B(空调2)和E(空调5)建立连接,B(空调2)在接收到作业指令时,转发手机发送的关闭空调的作业指令给到E(空调5),E(空调5)接收到指令后完成关闭空调动作。C(空调3)作为主设备开启扫描功能,接收到周围不可用蓝牙从设备的广播后,发起扫描请求,周围不可用蓝牙从设备给出扫描响应(包括uuid、mac、name、rssi值等)”最终得到上述的不可用蓝牙设备,通过RSSI值的信号强弱来获取对应的不可用设备并作为该不可用设备的代理即中转设备。比如C搜索F的RSSI值为-45,C搜索D的RSSI值为-80,C搜索E的RSSI值为-100,那么C(空调3)就作为F(空调6)的代理,C(空调3)和F(空调6)建立连接,并转发手机发送的关闭空调的作业指令给到F(空调6),F(空调6)接收到指令后完成关闭空调动作。For example, 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 been connected to mobile phones before, and their device attributes have been changed. Saved to the phone. When the mobile 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 the main For the unavailable device corresponding to the Bluetooth device, at this time, the available Bluetooth device such as A (air conditioner 1) can be used as the master device to start the scanning function, and after receiving the broadcast of the surrounding unavailable Bluetooth slave device, a scanning request is initiated, and the surrounding Bluetooth slave device is unavailable Give the scan response (including uuid, mac, name, rssi value, etc.)" to obtain the corresponding unavailable device, and use the signal strength of the RSSI value to determine whether it is the proxy of the unavailable device, that is, the transit device and establish a connection. For example, A The RSSI value of searching D is -45, the RSSI value of A searching E is -80, and the RSSI value of A searching F is -100, then A (air conditioner 1) is used as the agent of D (air conditioner 4), that is, the transit device. A( Air conditioner 1) establishes a connection with D (air conditioner 4). When A (air conditioner 1) receives the operation command, it forwards the command, such as turning off the air conditioner, to D (air conditioner 4). After receiving the command, D (air conditioner 4) Complete the action of turning off the air conditioner. B (air conditioner 2) starts the scanning function as the master device, and initiates a scan request after receiving the broadcast from the surrounding unavailable Bluetooth slave devices, and the surrounding unavailable Bluetooth slave devices give a scan response (including uuid, mac, name , rssi value, etc.)", and finally obtain the above-mentioned unavailable Bluetooth device, obtain the corresponding unavailable device through the signal strength of the RSSI value and act as the proxy of the unavailable device, that is, the transit device. For example (the RSSI value of B searching E is -45, the RSSI value of B searching D is -80, and the RSSI value of B searching F is -100), then B (air conditioner 2) acts as the agent of E (air conditioner 5), and B ( Air conditioner 2) establishes a connection with E (air conditioner 5), and when B (air conditioner 2) receives the operation command, it forwards the operation command to turn off the air conditioner sent by the mobile phone to E (air conditioner 5), and E (air conditioner 5) receives the command Complete the action of closing the air conditioner. C (air conditioner 3) starts the scan function as the master device, and initiates a scan request after receiving the broadcast from the surrounding unavailable Bluetooth slave devices, and the surrounding unavailable Bluetooth slave devices give a scan response (including uuid, mac, name, rssi value, etc.) "Finally get the above-mentioned unavailable Bluetooth device, obtain the corresponding unavailable device through the signal strength of the RSSI value and act as the proxy of the unavailable device, that is, the transit device. For example, C searches for the RSSI value of F -45, and C searches for D The RSSI value of C (air conditioner 3) is -80, the RSSI value of C searches for E is -100, then C (air conditioner 3) acts as the agent of F (air conditioner 6), C (air conditioner 3) and F (air conditioner 6) establish a connection, and forward the mobile phone The sent operation instruction to turn off the air conditioner is given to F (air conditioner 6), and F (air conditioner 6) completes the action of turning off the air conditioner after receiving the instruction.

可以理解,在基于历史连接信息和当前可用蓝牙设备能够获取到存在不可用蓝牙设备时,可以设置所有的当前可用蓝牙设备启动扫描功能,扫描其各自相对于所述的部分目标作业设备的RSSI值,然后将所述的RSSI值全部传递回手机进行统计分析,最终根据RSSI值的信号强弱得出每一不可用蓝牙设备对应的最优中转设备。It can be understood that when it is possible to obtain unavailable Bluetooth devices based on historical connection information and currently available Bluetooth devices, all currently available Bluetooth devices can be set to start the scanning function to scan their respective RSSI values relative to the part of the target operating device , and then transmit all the RSSI values back to the mobile phone for statistical analysis, and finally obtain the optimal transfer device corresponding to each unavailable Bluetooth device according to the signal strength of the RSSI value.

可选的,若出现部分不可用蓝牙设备找不到对应的中转设备,可以将当前主蓝牙设备的所有从蓝牙设备定义为该主蓝牙设备的当前可用蓝牙设备,基于新的当前可用蓝牙设备继续获取剩余的不可用蓝牙设备的中转设备。通过该过程可以实现扩大搜索范围,实现增强扫描功能。即,每一次获取到新的中转设备后对是否还存在不可用蓝牙设备进行判断,基于判断结果判定是否需要再次获取中转设备,直至不存在不可用蓝牙设备。其具体过程可以为:手机的有效扫描范围内的可用蓝牙设备作为一阶扫描主设备,让所有一阶扫描主设备启动扫描功能,所有被一阶扫描主设备扫描到的设备称之为二阶扫描主设备,如果仍然存在部分目标作业设备不在二阶扫描主设备列表中,则让所有二阶扫描主设备启动扫描功能,所有被二阶扫描主设备扫描到的设备称之为三阶扫描主设备,如果仍然存在部分目标作业设备不在三阶扫描主设备列表中,则让所有三阶扫描主设备启动扫描功能,以此穷尽可扫描到的设备,以此方法尽可能的连接上所有目标作业设备。Optionally, if some unavailable Bluetooth devices cannot find the corresponding transfer device, you can define all the slave Bluetooth devices of the current master Bluetooth device as the currently available Bluetooth devices of the master Bluetooth device, and continue based on the new currently available Bluetooth devices Get the relay device for remaining unavailable bluetooth devices. Through this process, the search range can be expanded and the scanning function can be enhanced. That is, each time a new transfer device is obtained, it is judged whether there is still an unavailable Bluetooth device, and based on the judgment result, it is determined whether the transfer device needs to be acquired again until there is no unavailable Bluetooth device. The specific process can be as follows: the available Bluetooth devices within the effective scanning range of the mobile phone are used as the first-order scanning master device, so that all the first-order scanning master devices start the scanning function, and all devices scanned by the first-order scanning master device are called second-order scanning. Scan the main device, if there are still some target operating devices that are not in the list of the main devices of the second-level scan, let all the main devices of the second-level scan start the scanning function, and all the devices scanned by the main device of the second-level scan are called the master of the third-level scan If there are still some target operation devices that are not in the three-level scanning main device list, let all three-level scanning main devices start the scanning function, so as to exhaust the devices that can be scanned, and connect all target jobs as much as possible in this way equipment.

比如目标作业设备包括A、D、E、K、M,手机的可用蓝牙设备为A、B、C,则根据如上所述A、B、C为一阶扫描主设备,因为D、E、K、M不在一阶扫描主设备中,则让一阶扫描主设备启动扫描功能,A扫描到D时的RSSI值为-70,B扫描到D时的RSSI值为-40,B扫描到E的RSSI值为-80,C扫描到E的RSSI值为-30,因此D、E设备为二阶扫描主设备。因为K、M不在二阶扫描主设备中,则让二阶扫描主设备启动扫描功能,D扫描到F时的RSSI值为-60,D扫描到G的RSSI值为-75,因此F、G设备为三阶扫描主设备。因为K、M不在三阶扫描主设备中,则让三阶扫描主设备启动扫描功能,F扫描到H的RSSI值为-70,G扫描到H的RSSI值为-80,因此H为四阶扫描主设备。因为K、M不在四阶扫描主设备中,则让四阶扫描主设备启动扫描功能,H扫描到K的RSSI值为-45,因此K设备为五阶扫描主设备。因为M不在五阶扫描主设备中,则让五阶扫描主设备启动扫描功能,K扫描到L的RSSI值为-60,因此L为六阶扫描主设备。因为M不在六阶扫描主设备中,则让六阶扫描主设备启动扫描功能,因为L的有效扫描范围内并未发现可连接的蓝牙设备,则增强扫描功能的执行终止。将增强扫描功能执行过程中所有获取到的有用数据返回到手机进行处理,有效数据如:(A->D:-70)意思为A扫描到D,D返回给到A的RSSI值为-70,下面同上。(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:扫描不到)。将上述数据返回给到手机进行处理后,得到未在手机扫描有效范围内的目标蓝牙设备(D、E、K)的最优链路分别为:(1)手机->B->D、(2)手机->C->E、(3)手机->B->D->F->H->K,但由于L搜索不到目标作业设备M,所以M虽然作为目标作业设备,最终不能执行手机给他下发的作业指令,所以(4)手机->B->D->F->H->K->L->M的链路也就不存在。For example, the target operating equipment includes A, D, E, K, and M, and the available Bluetooth devices of the mobile phone are A, B, and C. According to the above, A, B, and C are the first-order scanning master devices, because D, E, and K , M is not in the first-order scanning master device, let the first-order scanning master device start the scanning function, the RSSI value when A scans to D is -70, the RSSI value when B scans to D is -40, and the RSSI value when B scans to E The RSSI value is -80, and the RSSI value from C to E is -30, so D and E devices are the master devices of the second-order scan. Because K and M are not in the second-order scanning master device, let the second-order scanning master device start the scanning function. When D scans to F, the RSSI value is -60, and when D scans to G, the RSSI value is -75. Therefore, F, G The device is a three-stage scanning master device. Because K and M are not in the third-order scanning master device, let the third-order scanning master device start the scanning function, the RSSI value from F scanning to H is -70, and the RSSI value from G scanning to H is -80, so H is fourth-order Scan for master devices. Because K and M are not in the fourth-order scanning master device, let the fourth-order scanning master device start the scanning function, and the RSSI value of K scanned by H is -45, so K device is the fifth-order scanning master device. Because M is not in the fifth-level scanning master device, let the fifth-level scanning master device start the scanning function, and the RSSI value of L scanned by K is -60, so L is the sixth-level scanning master device. Because M is not in the sixth-level scanning master device, the sixth-level scanning master device is allowed to start the scanning function, and because no connectable Bluetooth device is found within the effective scanning range of L, the execution of the enhanced scanning function is terminated. Return all the useful data obtained during the execution of the enhanced scan function to the mobile phone for processing. Valid data such as: (A->D:-70) means that A scans to D, and the RSSI value returned by D to A is -70 , the same as above. (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: cannot be scanned). After returning the above data to the mobile phone for processing, the optimal links of the target Bluetooth devices (D, E, K) that are not within the effective range of mobile phone scanning are obtained: (1) mobile phone -> B -> D, ( 2) mobile phone->C->E, (3) mobile phone->B->D->F->H->K, but since L cannot search for the target operating device M, even though M is the target operating device, the final The job instructions issued by the mobile phone cannot be executed, so (4) the link of mobile phone->B->D->F->H->K->L->M does not exist.

上述(2)中,可以得到C作为E目标作业设备的代理即中转设备,建立连接并转发手机下发的作业指令给到E,E作为目标作业设备执行指令相关的动作。In the above (2), it can be obtained that C acts as the proxy of E's target operation device, that is, the transfer device, establishes a connection and forwards the operation instructions issued by the mobile phone to E, and E performs the actions related to the instructions as the target operation device.

上述(1)中,可以得到B作为D目标作业设备的代理即中转设备,建立连接并转发手机下发的作业指令给到D,D作为目标作业设备执行指令相关的动作的同时根据上述(3),可以得知B、D、F、H、作为K目标作业设备的代理即中转设备,依次建立连接,并转发手机下发的作业指令层层传输最终到达目标作业设备K,K作为目标作业设备接收到作业指令后执行指令相关的动作。最终尽可能的确保所有在可用蓝牙设备有效连接范围内的不可用蓝牙设备都找到对应的可用蓝牙设备作为代理即中转设备并通过所述中转设备接收到应当处理的作业指令。In the above (1), it can be obtained that B acts as the agent of D’s target operation equipment, that is, the transfer equipment, establishes a connection and forwards the operation instructions issued by the mobile phone to D, and D performs the actions related to the instructions as the target operation equipment. According to the above (3 ), it can be known that B, D, F, H, as the agent of the K target operation equipment, that is, the transfer equipment, establish connections in turn, and forward the operation instructions issued by the mobile phone to the layer-by-layer transmission and finally reach the target operation equipment K, K as the target operation After the device receives the job instruction, it executes the actions related to the instruction. Finally, it is ensured that all unavailable Bluetooth devices within the effective connection range of the available Bluetooth devices find the corresponding available Bluetooth devices as agents, that is, the transfer device, and receive the job instructions that should be processed through the transfer device.

可选的,如图4所示,在本发明的蓝牙一对多数据传输方法中,还包括:S5、接收目标作业设备基于作业指令生成的反馈信息,以根据反馈信息判定目标作业设备对作业指令的执行状态。具体的,为了确保指令集能安全、快速、准确的传送到从蓝牙设备,指令是走的专门的通道,这个通道包含了数据加解密、快速通道协议机制。为了确保所有被执行的从蓝牙设备都能准确无误的执行主蓝牙设备下发的指令,所以有纠错机制。当从蓝牙设备接收到一条来自于主蓝牙设备的指令后,没有执行相应的动作时,把执行失败的结果反馈给主蓝牙设备。主蓝牙设备接收到从蓝牙设备返回的失败的结果,重新向从蓝牙设备下发指令集,如此往复,在指定的次数范围内如果从蓝牙设备执行成功后并把这一消息反馈给到主蓝牙设备后,此操作才完成。否则,超过了指定的次数后,主蓝牙设备给从蓝牙设备发送重启的指令并把该信息保存到数据库里面。从蓝牙设备接收到重启指令并重启后,断开连接。待从蓝牙设备重新启动后连接上主蓝牙设备,主蓝牙设备再次下发之前指令,如果从蓝牙设备返回给主蓝牙设备的消息还是失败,主蓝牙设备上显示该设备出现故障需要维修。如此往复循环,直至所有的从蓝牙设备都执行了主蓝牙设备下发的指令,该动作才算完成。Optionally, as shown in FIG. 4 , in the Bluetooth one-to-many data transmission method of the present invention, it also includes: S5. Receive feedback information generated by the target operation device based on the operation instruction, so as to determine whether the target operation device is compatible with the operation according to the feedback information. The execution status of the instruction. Specifically, in order to ensure that the command set can be safely, quickly and accurately transmitted to the slave Bluetooth device, the command is passed through a special channel, which includes data encryption and decryption, and the fast channel protocol mechanism. In order 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 the slave bluetooth device receives an instruction from the master bluetooth device but fails to execute the corresponding action, it feeds back the execution failure result to the master bluetooth device. The master bluetooth device receives the failed result returned from the bluetooth device, and re-issues the command set to the slave bluetooth device, and so on. If the slave bluetooth device executes successfully within the specified number of times, it will feed back this message to the master bluetooth device. This operation is not complete until the device is installed. Otherwise, after exceeding the specified number of times, the master bluetooth device sends a restart command to the slave bluetooth device and saves the information in the database. After receiving the restart command from the Bluetooth device and restarting, disconnect. After the slave Bluetooth device restarts and connects to the master Bluetooth device, the master Bluetooth device sends the previous command again. If the message returned from the slave Bluetooth device to the master Bluetooth device still fails, the master Bluetooth device will display that the device is faulty and needs to be repaired. Such a reciprocating cycle, until all the slave Bluetooth devices have executed the instructions issued by the master Bluetooth device, the action is considered to be completed.

在一个具体的实施例中,手机里面打开蓝牙多连接的应用,简称A,下面都用A代替蓝牙多连接的应用。条件:主蓝牙设备在从蓝牙设备信号覆盖有效范围内,蓝牙音箱、蓝牙打印机、蓝牙窗帘、蓝牙门禁、蓝牙空调、蓝牙氛围灯都是在通电的情况下,打开A应用,A界面根据过滤条件,只扫描需要显示的上述六个从蓝牙设备并勾选要选择的从蓝牙设备,点击一键连接。待已勾选的从蓝牙设备连接成功后并在A界面显示已连接的状态信息,此时可以通过主蓝牙设备里面的A应用同时向从蓝牙设备下发指令集来控制蓝牙音箱开始播放、暂停播放、上一首、下一首等。同时向从蓝牙设备下发指令集控制蓝牙打印机打印文档、照片等。同时向从蓝牙设备下发指令集控制蓝牙窗帘的打开、关闭等。同时向从蓝牙设备下发指令集控制蓝牙门禁设备开、关等。同时向从蓝牙设备下发指令集控制蓝牙空调开、关、温度调节、风速、扫描模式等。同时向从蓝牙设备下发指令集控制蓝牙氛围灯开、关、色温调节等。如果主蓝牙设备的A应用向从蓝牙设备下发了相应的指令,从蓝牙设备返回了错误的指令,触发纠错机制,确保从蓝牙设备能正确的执行主蓝牙设备下发的控制指令集。当主蓝牙设备离开了从蓝牙设备信号覆盖有效范围后,自动断开连接。In a specific embodiment, the Bluetooth multi-connection application is opened in the mobile phone, referred to as A, and A is used to replace the Bluetooth multi-connection application in the following. Conditions: The master Bluetooth device is within the effective range of the signal coverage of the slave Bluetooth device, and the Bluetooth speaker, Bluetooth printer, Bluetooth curtain, Bluetooth access control, Bluetooth air conditioner, and Bluetooth ambient light are all powered on. Open the A application, and the A interface is based on the filter conditions , only scan the above six slave bluetooth devices that need to be displayed and check the slave bluetooth devices to be selected, and click one-click connection. After the selected slave Bluetooth device is successfully connected and the connected status information is displayed on the A interface, at this time, the A application in the master Bluetooth device can issue an instruction set to the slave Bluetooth device at the same time to control the Bluetooth speaker to start playing and pause Play, previous track, next track, etc. At the same time, send an instruction set to the slave Bluetooth device to control the Bluetooth printer to print documents, photos, etc. At the same time, the instruction set is sent to the slave Bluetooth device to control the opening and closing of the Bluetooth curtain. At the same time, the instruction set is issued to the slave Bluetooth device to control the opening and closing of the Bluetooth access control device. At the same time, the command set is issued to the slave Bluetooth device to control the Bluetooth air conditioner on and off, temperature adjustment, wind speed, scanning mode, etc. At the same time, the instruction set is sent to the slave Bluetooth device to control the Bluetooth ambient light on, off, color temperature adjustment, etc. If the A application of the master Bluetooth device sends corresponding instructions 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 issued by the master Bluetooth device. When the master bluetooth device leaves the effective range covered by the signal of the slave bluetooth device, it will automatically disconnect.

当主蓝牙设备重新出现在从蓝牙设备信息覆盖的有效范围时,自动连接之前连接过的从蓝牙设备。如此一来,实现了蓝牙一对多连接的实现,大幅度提升了用户的生活品质,真正意义上实现了一个主蓝牙设备同时控制多个从蓝牙设备的自动化功能,更加方便。When the master bluetooth device reappears in the valid range covered by the slave bluetooth device information, it will automatically connect to the previously connected slave bluetooth device. In this way, the realization of Bluetooth one-to-many connection is realized, which greatly improves the quality of life of users. In a real sense, it realizes the automation function of one master Bluetooth device controlling multiple slave Bluetooth devices at the same time, which is more convenient.

另,如5所示,本发明的一种蓝牙一对多数据传输装置,包括:In addition, as shown in 5, a Bluetooth one-to-many data transmission device of the present invention includes:

目标蓝牙设备获取单元110,用于获取主蓝牙设备对应的可用蓝牙设备,以获取多个可用蓝牙设备为目标蓝牙设备;The target bluetooth device obtaining unit 110 is used to obtain the available bluetooth device corresponding to the main bluetooth device, and to obtain multiple available bluetooth devices as the target bluetooth device;

从蓝牙设备获取单元120,用于生成包含所有目标蓝牙设备的连接列表,并触发主蓝牙设备基于连接列表依次与目标蓝牙设备建立连接以获取主蓝牙设备对应从蓝牙设备;Slave Bluetooth device acquisition unit 120, for generating a connection list including all target Bluetooth devices, and triggering 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;

可执行作业获取单元130,用于分别获取从蓝牙设备的设备属性,以根据从蓝牙设备的设备属性获取所有从蓝牙设备的可执行作业;Executable job acquisition unit 130, used to obtain the device attributes of the slave Bluetooth devices respectively, so as to obtain all executable jobs from the Bluetooth devices according to the device attributes of the slave Bluetooth devices;

目标作业设备获取单元140,获取主蓝牙设备生成的作业指令,识别作业指令的目标作业,基于目标作业和所有从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使目标作业设备响应作业指令。The target operation device acquisition unit 140 acquires the operation instruction generated by the master Bluetooth device, identifies the target operation of the operation instruction, and obtains the corresponding slave Bluetooth device as the target operation device based on the target operation and all executable operations of the slave Bluetooth device, so that the target operation The device responds to job instructions.

具体的,这里的蓝牙一对多数据传输装置各单元之间具体的配合操作过程具体可以参照上述蓝牙一对多数据传输方法,这里不再赘述。Specifically, the specific cooperation operation process between the units of the Bluetooth one-to-many data transmission device here can refer to the above-mentioned Bluetooth one-to-many data transmission method, and will not be repeated here.

另,本发明的一种电子设备,包括存储器和处理器;存储器用于存储计算机程序;处理器用于执行计算机程序实现如上面任意的蓝牙一对多数据传输方法。具体的,根据本发明的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过电子设备下载和安装并且执行时,执行本发明实施例的方法中限定的上述功能。本发明中的电子设备可为笔记本、台式机、平板电脑、智能手机等终端,也可为服务器。In addition, an electronic device of the present invention includes a memory and a processor; the memory is used to store computer programs; and the processor is used to execute the computer programs to implement any Bluetooth one-to-many data transmission method as above. Specifically, according to the embodiments of the present invention, the processes described above with reference to the flow charts can be implemented as computer software programs. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed by the electronic device, and when executed, executes the above-mentioned functions defined in the method of the embodiment of the present invention. The electronic equipment in the present invention can be a terminal such as a notebook, a desktop computer, a tablet computer, or a smart phone, and can also be a server.

另,本发明的一种计算机存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上面任意一项的蓝牙一对多数据传输方法。具体的,需要说明的是,本发明上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是但不限于是电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。In addition, a computer storage medium of the present invention stores a computer program thereon, and when the computer program is executed by a processor, any one of the above Bluetooth one-to-many data transmission methods is implemented. Specifically, it should be noted that the above-mentioned computer-readable medium in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, 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 of the above. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program codes therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.

可以理解的,以上实施例仅表达了本发明的优选实施方式,其描述较为具体和详细,但并不能因此而理解为对本发明专利范围的限制;应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,可以对上述技术特点进行自由组合,还可以做出若干变形和改进,这些都属于本发明的保护范围;因此,凡跟本发明权利要求范围所做的等同变换与修饰,均应属于本发明权利要求的涵盖范围。It can be understood that the above examples only express the preferred implementation of the present invention, and its description is relatively specific and detailed, but it should not be interpreted as limiting the patent scope of the present invention; it should be pointed out that for those of ordinary skill in the art In other words, on the premise of not departing from the concept of the present invention, the above-mentioned technical features can be freely combined, and some modifications and improvements can also be made, all of which belong to the protection scope of the present invention; All equivalent transformations and modifications should fall within the scope of the claims of the present invention.

Claims (10)

1.一种蓝牙一对多数据传输方法,其特征在于,包括以下步骤:1. A bluetooth one-to-many data transmission method, is characterized in that, comprises the following steps: S1、获取主蓝牙设备对应的可用蓝牙设备,以获取多个所述可用蓝牙设备为目标蓝牙设备;S1. Obtain an available Bluetooth device corresponding to the main Bluetooth device, and obtain multiple available Bluetooth devices as target Bluetooth devices; S2、生成包含所有所述目标蓝牙设备的连接列表,并触发所述主蓝牙设备基于所述连接列表依次与所述目标蓝牙设备建立连接以获取所述主蓝牙设备对应从蓝牙设备;S2. Generate a connection list including all the target Bluetooth devices, and trigger the master Bluetooth device to sequentially establish connections with the target Bluetooth devices based on the connection list to obtain the slave Bluetooth devices corresponding to the master Bluetooth device; S3、分别获取所述从蓝牙设备的设备属性,以根据所述从蓝牙设备的设备属性获取所有所述从蓝牙设备的可执行作业;S3. Obtain the device attributes of the slave Bluetooth devices respectively, so as to obtain all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices; S4、获取所述主蓝牙设备生成的作业指令,识别所述作业指令的目标作业,基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使所述目标作业设备响应所述作业指令。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 device, and making the target operation device respond to the operation instruction. 2.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,在所述步骤S1中,所述获取主蓝牙设备对应的可用蓝牙设备;包括:2. The bluetooth one-to-many data transmission method according to claim 1, characterized in that, in said step S1, said acquisition of available bluetooth devices corresponding to the master bluetooth device; comprising: 触发所述主蓝牙设备开启扫描以获取蓝牙广播数据,向所述蓝牙广播数据所对应的蓝牙设备发送扫描请求以获取对应的响应数据,获取生成所述响应数据的蓝牙设备为所述可用蓝牙设备。Trigger the master Bluetooth device to start scanning to obtain Bluetooth broadcast data, send a scan request to the Bluetooth device corresponding to the Bluetooth broadcast data to obtain corresponding response data, and obtain the Bluetooth device that generates the response data as the available Bluetooth device . 3.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,所述方法还包括:3. Bluetooth one-to-many data transmission method according to claim 1, is characterized in that, described method also comprises: 基于所述主蓝牙设备的历史连接信息获取所述从蓝牙设备;和/或Acquiring the slave bluetooth device based on historical connection information of the master bluetooth device; and/or S21、监测所述从蓝牙设备与所述主蓝牙设备的连接状态,在所述从蓝牙设备与所述主蓝牙设备断开连接时,剔除所述从蓝牙设备,并执行所述步骤S3。S21. Monitor the connection status between the slave Bluetooth device and the master Bluetooth device, and remove the slave Bluetooth device when the slave Bluetooth device is disconnected from the master Bluetooth device, and perform the step S3. 4.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,在所述步骤S2中,所述获取所述主蓝牙设备对应从蓝牙设备包括:4. The bluetooth one-to-many data transmission method according to claim 1, characterized in that, in the step S2, the acquisition of the master bluetooth device corresponding to the slave bluetooth device comprises: 获取所述主蓝牙设备与所述目标蓝牙设备的连接状态,在所述目标蓝牙设备与所述主蓝牙设备连接成功时以所述目标蓝牙设备为所述主蓝牙设备的从蓝牙设备。Obtain the connection status between the master Bluetooth device and the target Bluetooth device, and use the target Bluetooth device as the slave Bluetooth device of the master Bluetooth device when the target Bluetooth device is successfully connected to the master Bluetooth device. 5.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,所述方法还包括:5. Bluetooth one-to-many data transmission method according to claim 1, is characterized in that, described method also comprises: 获取所述主蓝牙设备的历史连接信息和当前可用蓝牙设备;根据所述历史连接信息和所述当前可用蓝牙设备获取所述历史连接信息对应的不可用蓝牙设备;Obtain historical connection information and currently available Bluetooth devices of the master Bluetooth device; obtain unavailable Bluetooth devices corresponding to the historical connection information according to the historical connection information and the currently available Bluetooth devices; 获取所述不可用蓝牙设备与所述可用蓝牙设备的关系,以从所述可用蓝牙设备中获取所述不可用蓝牙设备对应的中转设备;Obtain the relationship between the unavailable Bluetooth device and the available Bluetooth device, so as to obtain the transfer device corresponding to the unavailable Bluetooth device from the available Bluetooth device; 以所述中转设备和所述不可用蓝牙设备为所述主蓝牙设备的从蓝牙设备,以使得所述不可用蓝牙设备通过所述中转设备接收对应的作业指令。The relay device and the unavailable Bluetooth device are slave Bluetooth devices of the master Bluetooth device, so that the unavailable Bluetooth device receives a corresponding job instruction through the relay device. 6.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,在所述步骤S4中,所述基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,还包括:6. The bluetooth one-to-many data transmission method according to claim 1, characterized in that, in the step S4, the executable job based on the target job and all the slave bluetooth devices obtains the corresponding slave The Bluetooth device is the target operating device, which also includes: 在基于所述作业指令获取到多个对应的从蓝牙设备时,根据所述多个对应的从蓝牙设备的设备信息获取最佳从蓝牙设备为所述目标作业设备。When multiple corresponding slave Bluetooth devices are acquired based on the operation instruction, the best slave Bluetooth device is acquired as the target operation device according to device information of the multiple corresponding slave Bluetooth devices. 7.根据权利要求1所述的蓝牙一对多数据传输方法,其特征在于,所述方法还包括:7. Bluetooth one-to-many data transmission method according to claim 1, is characterized in that, described method also comprises: S5、接收所述目标作业设备基于所述作业指令生成的反馈信息,以根据所述反馈信息判定所述目标作业设备对所述作业指令的执行状态。S5. Receive feedback information generated by the target operation device based on the operation instruction, so as to determine an execution state of the operation instruction by the target operation device according to the feedback information. 8.一种蓝牙一对多数据传输装置,其特征在于,包括:8. A bluetooth one-to-many data transmission device, characterized in that, comprising: 目标蓝牙设备获取单元,用于获取主蓝牙设备对应的可用蓝牙设备,以获取多个所述可用蓝牙设备为目标蓝牙设备;A target bluetooth device acquiring unit, configured to acquire available bluetooth devices corresponding to the master bluetooth device, to obtain multiple available bluetooth devices as target bluetooth devices; 从蓝牙设备获取单元,用于生成包含所有所述目标蓝牙设备的连接列表,并触发所述主蓝牙设备基于所述连接列表依次与所述目标蓝牙设备建立连接以获取所述主蓝牙设备对应从蓝牙设备;The slave bluetooth device acquisition unit is configured 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 device in turn based on the connection list to obtain the corresponding slave of the master bluetooth device bluetooth device; 可执行作业获取单元,用于分别获取所述从蓝牙设备的设备属性,以根据所述从蓝牙设备的设备属性获取所有所述从蓝牙设备的可执行作业;An executable job acquiring unit, configured to respectively acquire device attributes of the slave Bluetooth devices, so as to acquire all executable jobs of the slave Bluetooth devices according to the device attributes of the slave Bluetooth devices; 目标作业设备获取单元,获取所述主蓝牙设备生成的作业指令,识别所述作业指令的目标作业,基于所述目标作业和所有所述从蓝牙设备的可执行作业获取对应的从蓝牙设备为目标作业设备,以使所述目标作业设备响应所述作业指令。The target operation device acquiring 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 based on the target job and all executable jobs of the slave bluetooth device an operation device, so that the target operation device responds to the operation instruction. 9.一种电子设备,其特征在于,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器通过调用所述存储器中存储的所述计算机程序,执行如权利要求1至7任一项所述的蓝牙一对多数据传输方法的步骤。9. An electronic device, characterized in that it comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program according to claims 1 to 7 by calling the computer program stored in the memory. The steps of the Bluetooth one-to-many data transmission method described in any one. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行如权利要求1至7任一项所述的蓝牙一对多数据传输方法的步骤。10. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to perform the operation described in any one of claims 1 to 7. The steps of the bluetooth one-to-many data transmission method.
CN202211581837.0A 2022-12-09 2022-12-09 Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium Pending CN116033400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211581837.0A CN116033400A (en) 2022-12-09 2022-12-09 Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211581837.0A CN116033400A (en) 2022-12-09 2022-12-09 Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116033400A true CN116033400A (en) 2023-04-28

Family

ID=86076741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211581837.0A Pending CN116033400A (en) 2022-12-09 2022-12-09 Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116033400A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116761110A (en) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108289289A (en) * 2016-09-29 2018-07-17 努比亚技术有限公司 A kind of transmission device of data for projection, system and method
CN108471610A (en) * 2018-03-02 2018-08-31 杨宪国 Bluetooth connection control system
CN110113734A (en) * 2019-04-02 2019-08-09 惠州高盛达科技有限公司 The one-to-many data transmission method of bluetooth, system and storage medium
CN111654847A (en) * 2020-05-25 2020-09-11 广东忠能科技集团有限公司 Bluetooth one-to-many data transmission method, system and storage medium for mobile phone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108289289A (en) * 2016-09-29 2018-07-17 努比亚技术有限公司 A kind of transmission device of data for projection, system and method
CN108471610A (en) * 2018-03-02 2018-08-31 杨宪国 Bluetooth connection control system
CN110113734A (en) * 2019-04-02 2019-08-09 惠州高盛达科技有限公司 The one-to-many data transmission method of bluetooth, system and storage medium
CN111654847A (en) * 2020-05-25 2020-09-11 广东忠能科技集团有限公司 Bluetooth one-to-many data transmission method, system and storage medium for mobile phone

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116761110A (en) * 2023-08-18 2023-09-15 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment
CN116761110B (en) * 2023-08-18 2023-11-14 江西斐耳科技有限公司 Multi-point bluetooth headset control method, system, storage medium and equipment

Similar Documents

Publication Publication Date Title
CN111741513B (en) Network distribution method of Internet of things equipment and related equipment
US20230300585A1 (en) Function Execution Device and Communication Terminal
KR102377724B1 (en) Device network configuration method and apparatus, and medium
US20190361408A1 (en) Information processing apparatus and non-transitory computer readable medium
US8810839B2 (en) Information processing apparatus for transferring image data, server apparatus for receiving transferred image data, and control methods and storage media therefor
US10009947B2 (en) Wireless communication terminal, wireless communication system, and storage medium storing wireless communication program
WO2020168569A1 (en) Intelligent device network distribution method, apparatus, electronic device and storage medium
US10701532B2 (en) System and method of providing sensing data to an electronic device using a template to identify a data type and format for the electronic device
JP6056558B2 (en) Wireless communication device, wireless communication terminal, reconnection program, wireless communication method, and wireless communication system
CN110996405A (en) Earphone connection method, terminal, earphone box and computer readable storage medium
US9619641B2 (en) Function performing apparatus and portable device
CN111915870A (en) Method, device, television and storage medium for adding remote control code value by voice
CN111867148B (en) Method and device for establishing device connection and data transmission
CN104714817A (en) Method, system and control terminal for upgrading household appliance software through infrared signal
JP2014179929A (en) Communication device, method and program of controlling the same, and printing device
JP2021022877A (en) Information processing device, control method, and program
US20170033989A1 (en) Shareable code objects for accessories and user devices
CN116033400A (en) Bluetooth one-to-many data transmission method, device, electronic equipment and storage medium
CN109709880B (en) Control method and control system of projector
US20250374346A1 (en) Communication system and communication method
JP4990987B2 (en) Electronic device setting management system, management method, server, and portable device using portable device
CN114126083B (en) Cross-segment wireless screen projection method, device, electronic device and storage medium
JP2013074579A (en) Wireless communication apparatus
CN114501449B (en) Information query method, device, electronic equipment and storage medium
KR101810623B1 (en) Mobile device, control method thereof, message sending apparatus and message sending method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination