





技术领域technical field
本申请涉及蓝牙技术领域,特别是涉及一种蓝牙设备系统。The present application relates to the technical field of bluetooth, in particular to a bluetooth device system.
背景技术Background technique
随着蓝牙无线通信技术的发展,携带及佩戴方便的蓝牙无线耳机等播放音频的蓝牙设备越来越广泛地被使用。With the development of Bluetooth wireless communication technology, Bluetooth devices that play audio, such as portable and easy-to-wear Bluetooth wireless earphones, are more and more widely used.
在相关技术中,多个蓝牙无线耳机等蓝牙设备往往是主从设备方式构成相应的蓝牙设备组合,主设备与智能设备建立连接后,主设备和智能设备之间进行蓝牙连接实现数据传输,智能设备将数据发送给主设备,主设备将数据转发给从设备,其传输路径长,在数据量较大的情况下传输缓慢,甚至需要将数据进行有损压缩后再传输,例如对于蓝牙耳机而言,就难以传输高品质音频。In related technologies, multiple Bluetooth wireless earphones and other Bluetooth devices often form a corresponding Bluetooth device combination in the form of a master-slave device. The device sends data to the master device, and the master device forwards the data to the slave device. The transmission path is long, and the transmission is slow when the amount of data is large. It even needs to compress the data before transmission. For example, for Bluetooth headsets language, it is difficult to transmit high-quality audio.
发明内容Contents of the invention
本申请的实施例提供一种蓝牙设备系统,能够提高外部蓝牙设备和第一蓝牙设备以及第二蓝牙设备之间所传输的数据量,并增强音频的高品质传输。Embodiments of the present application provide a bluetooth device system, which can increase the amount of data transmitted between an external bluetooth device and a first bluetooth device and a second bluetooth device, and enhance high-quality audio transmission.
本申请实施例提供一种蓝牙设备系统,该蓝牙设备系统包括第一蓝牙设备、第二蓝牙设备和外部蓝牙设备。第一蓝牙设备用于与外部蓝牙设备的第一蓝牙芯片建立第一通信链路的通信连接。第二蓝牙设备用于与外部蓝牙设备的不同于第一蓝牙芯片的第二蓝牙芯片建立第二通信链路的通信连接,且用于与第一蓝牙设备彼此之间建立第三通信链路的通信连接。其中,第一蓝牙设备用于通过第一通信链路接收外部蓝牙设备通过第一蓝牙芯片发送的第一音频数据,第二蓝牙设备用于通过第二通信链路接收外部蓝牙设备通过第二蓝牙芯片发送的第二音频数据。第一蓝牙设备和第二蓝牙设备用于对根据所接收到的第一音频数据和第二音频数据进行音频的同步播放。An embodiment of the present application provides a bluetooth device system, and the bluetooth device system includes a first bluetooth device, a second bluetooth device and an external bluetooth device. The first Bluetooth device is used to establish a communication connection of a first communication link with the first Bluetooth chip of the external Bluetooth device. The second bluetooth device is used to establish a communication connection of a second communication link with a second bluetooth chip different from the first bluetooth chip of the external bluetooth device, and is used to establish a third communication link with each other with the first bluetooth device communication connection. Among them, the first Bluetooth device is used to receive the first audio data sent by the external Bluetooth device through the first Bluetooth chip through the first communication link, and the second Bluetooth device is used to receive the audio data sent by the external Bluetooth device through the second Bluetooth chip through the second communication link. The second audio data sent by the chip. The first bluetooth device and the second bluetooth device are used for synchronously playing audio according to the received first audio data and second audio data.
本申请的有益效果是:区别于现有技术的情况,通过第一蓝牙设备、第二蓝牙设备分别与外部蓝牙设备建立第一路通信链路和第二路通信链路,通过分别接收音频数据可以提高第一蓝牙设备和第二蓝牙设备各自与外部蓝牙设备进行通信的效率和质量,也能够提高外部蓝牙设备和第一蓝牙设备以及第二蓝牙设备之间所传输的数据量,避免对音频数据的有损压缩,进而外部蓝牙设备能够分工地向第一蓝牙设备和第二蓝牙设备传输高品质音频。而且,第一蓝牙设备和第二蓝牙设备彼此建立第三通信链路可以便于第一蓝牙设备和第二蓝牙设备进行音频同步,提升音频同步的效率,进而减少音频卡顿和延迟而影响用户体验。The beneficial effects of the present application are: different from the situation of the prior art, through the first bluetooth device and the second bluetooth device respectively establish the first communication link and the second communication link with the external bluetooth device, and receive the audio data respectively It can improve the efficiency and quality of communication between the first Bluetooth device and the second Bluetooth device and the external Bluetooth device, and can also increase the amount of data transmitted between the external Bluetooth device and the first Bluetooth device and the second Bluetooth device, avoiding audio Lossy compression of data, so that the external bluetooth device can transmit high-quality audio to the first bluetooth device and the second bluetooth device in a divided manner. Moreover, the establishment of a third communication link between the first Bluetooth device and the second Bluetooth device can facilitate audio synchronization between the first Bluetooth device and the second Bluetooth device, improve the efficiency of audio synchronization, and reduce audio stuttering and delays that affect user experience .
附图说明Description of drawings
图1是本申请蓝牙设备系统实施例的系统组成示意图;FIG. 1 is a schematic diagram of the system composition of an embodiment of the Bluetooth device system of the present application;
图2是图1所示的蓝牙设备系统实施例的信道选择示意图;Fig. 2 is a schematic diagram of channel selection of the bluetooth device system embodiment shown in Fig. 1;
图3是图1所示的蓝牙设备系统实施例的音频同步示意图;Fig. 3 is a schematic diagram of audio synchronization of the Bluetooth device system embodiment shown in Fig. 1;
图4是图1所示的蓝牙设备系统实施例的另一音频同步示意图;Fig. 4 is another schematic diagram of audio synchronization of the Bluetooth device system embodiment shown in Fig. 1;
图5是图1所示的蓝牙设备系统实施例的声道处理示意图;Fig. 5 is a schematic diagram of channel processing of the bluetooth device system embodiment shown in Fig. 1;
图6是图1所示的蓝牙设备系统实施例的数据丢失处理示意图。FIG. 6 is a schematic diagram of data loss processing in the embodiment of the Bluetooth device system shown in FIG. 1 .
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请的一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
以下本申请蓝牙设备系统实施例描述蓝牙设备系统10的示例性结构。An exemplary structure of the Bluetooth
请参阅图1,图1是本申请蓝牙设备系统实施例的系统组成示意图。Please refer to FIG. 1 . FIG. 1 is a schematic diagram of the system composition of an embodiment of the Bluetooth device system of the present application.
蓝牙设备系统10包括第一蓝牙设备11、第二蓝牙设备12和外部蓝牙设备13。The Bluetooth
第一蓝牙设备11和第二蓝牙设备12可以是集成在同一个蓝牙装置中的两个可以各自播放音频的蓝牙设备。例如,第一蓝牙设备11和第二蓝牙设备12可以分别是tws耳机(True Wireless Stereo,真无线立体声耳机)的左耳机和右耳机、头戴耳机的左耳机和右耳机。第一蓝牙设备11和第二蓝牙设备12也可以分别是音频眼镜的左、右两个眼镜腿等,具体不做限定。当然,第一蓝牙设备11和第二蓝牙设备12也可以分别是独立的蓝牙设备,例如是智能手机、个人计算机、个人数字助理、平板电脑、蓝牙音响、蓝牙鼠标、蓝牙键盘、扫地机器人、智能吸尘器、智能电风扇、智能机器人、智能电视、佩戴于肢体或者嵌入于衣物、配件中的可穿戴设备等可以播放音频的任意可以实现蓝牙功能的电子设备。第二蓝牙设备12可以是与第一蓝牙设备11相同的电子设备,当然,也可以是不同的电子设备。外部蓝牙设备13同样具有蓝牙功能,可以是与第一蓝牙设备11或第二蓝牙设备12相同的电子设备,当然,也可以是不同的电子设备。例如,第一蓝牙设备11是蓝牙耳机、第二蓝牙设备12是蓝牙音响、外部蓝牙设备13是智能手机;或者第一蓝牙设备11是个人计算机、第二蓝牙设备12是智能手机、外部蓝牙设备13是个人计算机等,具体不做限定。The
其中,外部蓝牙设备13设置有至少两个蓝牙芯片,其中一个为第一蓝牙芯片131,其中另一个为第二蓝牙芯片132。第一蓝牙芯片131和第二蓝牙芯片132均为外部蓝牙设备13的SOC(System on Chip,系统级芯片)系统。第一蓝牙芯片131和第二蓝牙芯片132均可以包括中央处理器(Central Processing Unit,简称CPU),是外部蓝牙设备13的运算和控制核心,是信息处理、程序运行的最终执行单元。处理器可以是一种集成电路芯片,具有信号的处理能力。处理器还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器(MCU)或者该处理器也可以是任何常规的处理器等。进一步地,第一蓝牙设备11和第二蓝牙设备12分别设置有至少一个蓝牙芯片,以分别与外部蓝牙设备13建立两路蓝牙连接。Wherein, the
第一蓝牙设备11用于与外部蓝牙设备13的第一蓝牙芯片131建立第一通信链路的通信连接。第二蓝牙设备12用于与外部蓝牙设备13的第二蓝牙芯片132建立第二通信链路的通信连接,其中,第二蓝牙芯片132不同于第一蓝牙芯片131;且第二蓝牙设备12还用于与第一蓝牙设备11彼此之间建立第三通信链路的通信连接。其中,第一蓝牙设备11用于通过第一通信链路接收外部蓝牙设备13通过第一蓝牙芯片131发送的第一音频数据,第二蓝牙设备12用于通过第二通信链路接收外部蓝牙设备13通过第二蓝牙芯片132发送的第二音频数据。第一蓝牙设备11和第二蓝牙设备12用于对所接收到的第一音频数据和第二音频数据进行音频的同步播放。其中,第一音频数据和第二音频数据可以相同,也可以不同。例如,第一音频数据为左声道数据,第二音频数据为右声道数据,或者,第一音频数据和第二音频数据均为混合单声道数据等。第一蓝牙设备11和第二蓝牙设备12分别与外部蓝牙设备13建立两路蓝牙连接,可以提高第一通信链路和第二通信链路的抗干扰能力,进而保证通信质量。例如,在一个应用场景中,第一蓝牙设备11为用户的左耳机,第二蓝牙设备12为用户的右耳机,外部蓝牙设备13为智能手机,也即,用户的左耳机与智能手机建立第一通信链路,右耳机与智能手机建立第二通信链路,左耳机和右耳机彼此之间建立第三通信链路。左耳机通过第一通信链路接收智能手机通过第一蓝牙芯片131发送的第一音频数据,右耳机通过第二通信链路接收智能手机通过第二蓝牙芯片132发送的第二音频数据,且第一音频数据和第二音频数据相同,均为立体声道数据。左耳机和右耳机对所接收到的智能手机发送的第一音频数据和第二音频数据进行同步,以同步进行输出相同的立体声道数据。也即,音频同步后,用户左右耳机播放的音频一致。The first Bluetooth
请参阅图2,图2是图1所示的蓝牙设备系统实施例的信道选择示意图。Please refer to FIG. 2 . FIG. 2 is a schematic diagram of channel selection in the embodiment of the Bluetooth device system shown in FIG. 1 .
可选地,第一蓝牙设备11、第二蓝牙设备12、外部蓝牙设备13均可以支持经典蓝牙协议或者低功耗蓝牙协议。经典蓝牙协议或者低功耗蓝牙协议是由蓝牙技术联盟(Bluetooth Special Interest Group,简称SIG)陆续推出不同的蓝牙协议版本规格。例如,1999年的第一个正式版本1.0A至后续的版本1.1、版本2.0、版本3.0、版本4.0版本5.0、版本5.2等。其中,版本4.0之前的被称为经典蓝牙协议,版本4.0之后被成为低功耗蓝牙协议。支持不同蓝牙协议版本的蓝牙设备都使用2.4GHz ISM(Industrial ScientificMedical,工业、科学和医用)频段。支持经典蓝牙协议的蓝牙设备工作频率在ISM频率范围内被分成79个信道,而支持低功耗蓝牙协议的蓝牙设备工作频率在ISM频率范围内被分成40个信道。以低功耗蓝牙版本为例,在2.4GHz ISM频段中定义了40个信道。这些信道被分为三种:广播(advertising)、周期(periodic)和数据(data)信道。广播信道使用所有40个频道来发现设备、启动连接和广播数据。其中3个频道,称为主要广播频道,用于初始广播和所有传统广播活动;剩余37个信道称为次要广播信道,用于所涉及的大部分通信。因而支持低功耗协议的蓝牙设备可以使用37个信道进行通信。经典蓝牙协议的没有区分广播信道、周期信道和数据信道,因而可以使用79个信道进行通信。Optionally, the
具体地,第一蓝牙设备11用于接收第一蓝牙芯片131发送的第一空闲信道信息,并跟随第一蓝牙芯片131跳频至与第一空闲信道信息相应的空闲信道。第二蓝牙设备12用于接收第二蓝牙芯片132发送的第二空闲信道信息,并跟随第二蓝牙芯片132跳频至按照与第二空闲信道信息相应的空闲信道。其中,第一空闲信道信息是第一蓝牙芯片131在跳频时遍历所支持的所有信道中确定出所有的空闲信道,从所有的空闲信道中选择一个所述空闲信道时生成的。第一蓝牙芯片131并将剩余的空闲信道发送给第二蓝牙芯片132。第二空闲信道信息是第二蓝牙芯片132从剩余的空闲信道中选择一个空闲信道时生成的。具体地,外部蓝牙设备13分别与第一蓝牙设备11、第二蓝牙设备12进行连接之前,首先根据链路管理协议(LMP:Link Manager Protocol)交换双方之间的信息。LMP信息中包含了第一蓝牙设备11和第二蓝牙设备12可使用的最小信道数。外部蓝牙设备13可以通过LMP命令通知第一蓝牙设备11交换信道质量信息,信道被分为好信道,坏信道,未用信道。外部蓝牙设备13确定那些是空闲信道,那些信道已被占用。例如,在本实施例中,第一蓝牙设备11、第二蓝牙设备12、外部蓝牙设备13均支持经典蓝牙协议,外部蓝牙设备13在跳频时遍历所支持的79个信道中确定出所有的空闲信道,从所有的所述空闲信道中选择一个空闲信道,并将剩余的空闲信道发送给第二蓝牙芯片132,第二蓝牙芯片132从剩余的空闲信道中选择一个空闲信道。如此,可以避免外部蓝牙设备13分别与第一蓝牙设备11和第二蓝牙设备12建立通信链路时跳频至拥挤或不可用的信道,进而影响通信效率。Specifically, the
可选地,第一通信链路所跳频的信道和第二通信链路所跳频的信道之间可以至少间隔两个信道。例如,在本实施例中,第一蓝牙设备11、第二蓝牙设备12、外部蓝牙设备13均支持经典蓝牙协议,外部蓝牙设备13通过第一蓝牙芯片131在79个信道中选择出信道15发送给第一蓝牙设备11,以使得第一蓝牙设备11跳频至信道15。外部蓝牙设备13通过第二蓝牙芯片132在79个信道中选择出信道21发送给第二蓝牙设备,以使得第二蓝牙设备12跳频至相应信道21。第一蓝牙设备11和第二蓝牙设备12分别与外部蓝牙设备13建立通信链路时跳频的信道之间至少间隔两个信道可以避免在跳频时相互干扰进而影响通信质量。可选地,第一蓝牙设备11还可以将剩余空闲信道发送至第二蓝牙设备12,以使得第一蓝牙设备11和第二蓝牙设备12将第三通信链路跳频至相应的空闲信道。如此,可以保证第一通信链路、第二通信链路和第三通信链路避免相互干扰。Optionally, at least two channels may be separated between the frequency-hopping channel of the first communication link and the frequency-hopping channel of the second communication link. For example, in this embodiment, the
请参阅图3,图3是图1所示的蓝牙设备系统实施例的音频同步示意图。Please refer to FIG. 3 . FIG. 3 is a schematic diagram of audio synchronization of the embodiment of the Bluetooth device system shown in FIG. 1 .
第一蓝牙设备11和第二蓝牙设备12中的任意一者用于通过第三通信链路而与第一蓝牙设备11和第二蓝牙设备12中的另一者进行至少一个字节数据的交互,以使得第一蓝牙设备11和第二蓝牙设备12利用至少一个字节数据进行同步播放。其中,至少一个字节数据包括数据包的序列号、数据包的类型、数据包的接收时间差以及数据包的发送时间戳中的至少一者。Any one of the
具体地,至少一个字节数据包括数据包的序列号。蓝牙设备之间需要传输一个指令的所有数据,称为数据包。数据包可以拆分成单帧/多帧传输。数据包为首帧和其他数据帧的总和。首帧的数据格式包括序列号、数据帧的总数量、指令值等。其中,首帧的序列号默认为0×00。第二帧及之后的数据格式也包括当前帧的序列号和其他拆分的数据帧内容。其中,第二帧及之后的当前帧的序列号默认从0×01开始。例如,第二帧的序列号为0×01,第三帧的序列号为0×02,依次类推。Specifically, at least one byte of data includes a sequence number of the data packet. All data that needs to be transmitted for a command between Bluetooth devices is called a data packet. Data packets can be split into single frame/multi-frame transmission. A data packet is the sum of the first frame and other data frames. The data format of the first frame includes the serial number, the total number of data frames, and the command value. Among them, the serial number of the first frame defaults to 0×00. The data format of the second frame and after also includes the serial number of the current frame and the content of other split data frames. Wherein, the sequence numbers of the second frame and the current frame after that start from 0×01 by default. For example, the sequence number of the second frame is 0×01, the sequence number of the third frame is 0×02, and so on.
第一蓝牙设备11和第二蓝牙设备12用于通过第三通信链路交换彼此当前接收到的数据包的序列号,并比较彼此当前接收到的数据包的序列号。若彼此当前接收到的数据包的序列号不相同,则第一蓝牙设备11和第二蓝牙设备12中当前接收到的数据包的序列号较大的一者等待另一者接收到与该较大的序列号相同的数据包时,再同步将序列号相同的各自相应的数据包进行音频输出。例如,第一蓝牙设备11接收到当前数据包的序列号为0×07,而第二蓝牙设备12接收到前数据包的序列号为0×06,则第一蓝牙设备11等待第二蓝牙设备12接收到序列号为0×07的数据包时,再将相应的数据包进行音频输出。如此,第一蓝牙设备11和第二蓝牙设备12可以保证在同一时间输出一致的音频,避免出现延迟而影响用户听音体验。例如,在一个应用场景中,第一蓝牙设备11为左耳机,第二蓝牙设备12为右耳机,外部蓝牙设备13为智能手机,也即,用户的左耳机和右耳机的音频同步,避免用户不良体验。The
进一步地,至少一个字节数据包括数据包的类型。以低功耗蓝牙协议为例,数据包格式有:广播包、扫描包、初始化连接包、链路层控制包、逻辑链路控制和自适应协议数据包等。第一蓝牙设备11和第二蓝牙设备12用于通过第三通信链路交换彼此当前接收到的数据包的类型,并确定彼此当前接收到的数据包的类型是否相同。若彼此当前接收到的数据包的类型不相同,则第一蓝牙设备11和第二蓝牙设备12各自等待对方接收到的类型相同的数据包时,再同步将类型相同的各自相应的数据包进行音频输出。例如,以低功耗蓝牙协议为例,第一蓝牙设备11接收到外部蓝牙设备13发送的当前数据包的类型为广播包,第二蓝牙设备12接收到外部蓝牙设备13发送的当前数据包的类型为扫描包,则第二蓝牙设备12等待第一蓝牙设备11也接收到外部蓝牙设备13发送的扫描包时,再同步将相应的数据包进行音频输出。例如,在另一个家庭影院的应用场景中,该家庭影院的第一蓝牙设备11为智能音响,第二蓝牙设备12为另一个智能音响,两个智能音响布置在该家庭影院的前后不同位置,外部蓝牙设备13为个人电脑,个人电脑分别与两个智能音响建立第一链路连接和第二链路连接并分别发送某电影的音频至两个智能音响。因此,两个智能音响也可以通过此种方式音频同步,避免两个智能音响播放音频不同步进而影响观影体验。Further, at least one byte of data includes the type of data packet. Taking the Bluetooth low energy protocol as an example, the data packet formats include: broadcast packet, scan packet, initialization connection packet, link layer control packet, logical link control and adaptive protocol data packet, etc. The
更进一步地,至少一个字节数据包括数据包的发送时间戳。时间戳(Timestamp)通常是一个字符序列,唯一地标识某一刻的时间。时间戳包括三个部分:需加时间戳的文件的摘要、收到数据的日期和时间、数字签名。例如,蓝牙设备可以以4个字节表示时间戳。Furthermore, at least one byte of data includes a sending timestamp of the data packet. Timestamp (Timestamp) is usually a sequence of characters that uniquely identifies a certain moment of time. A timestamp consists of three parts: a digest of the file to be timestamped, the date and time the data was received, and a digital signature. For example, a bluetooth device can represent a timestamp in 4 bytes.
第一蓝牙设备11和第二蓝牙设备12用于通过第三通信链路交换彼此当前接收到的数据包的发送时间戳,并判断彼此当前接收到的数据包的发送时间戳是否相同。若彼此当前接收到的数据包的发送时间戳不相同,则第一蓝牙设备11和第二蓝牙设备12各自等待对方接收到的发送时间戳相同的数据包时,再同步将发送时间戳相同的各自相应的数据包进行音频输出。换言之,第一蓝牙设备11和第二蓝牙设备12接收到外部蓝牙设备13发送时间戳不同,即表示第一蓝牙设备11和第二蓝牙设备12接收到外部蓝牙设备13发送的音频数据不同,第一蓝牙设备11和第二蓝牙设备12需各自等待对方接收到的发送时间戳相同时,再同步将相应的数据包进行音频输出。例如,在如前所述的应用场景中,第一蓝牙设备11为左耳机,第二蓝牙设备12为右耳机,外部蓝牙设备13为智能手机,用户的左耳机和右耳机的也可以通过此种方式音频同步,进一步避免左右耳机延迟进而影响用户体验。The
再进一步地,至少一个字节数据包括数据包的接收时间差。接收时间差为第一蓝牙设备11和第二蓝牙设备12分别接收到同一数据包的时间与外部蓝牙设备13发送同一数据包的时间之差。无线音频延迟主要由数字音频编码器的特性以及为了确保在干扰环境条件下传输的服务质量而引入的传输冗余决定的。无线音频延迟是指模拟音频信号输入无线发射器至模拟音频信号输出无线接收器之间的时间差。无线音频延迟由编码延迟、传输延迟和解码延迟三部份构成。编码延迟:模拟音频信号会被采样。基于心理声学模型的感知编码需要编码器分析连续的多个采样样本以识别可压缩的机会,基本原理为基于心理声学中确定的人耳听觉特性对于样本中实际存在但人耳无法感知的音频信号不分配信息比特以得到压缩单位时间内比特数的目的。感知编码的以上特性意味着编码器需要收集足够的连续声音样本以应用心理声学模型。每一个连续声音样本被称为帧,声音样本持续时间被称为帧时长。不同的编码技术采用不同的帧时长。帧时长需要适合编码器本身的技术特性以及数字音频应用场景的要求。如果帧时长过短则有限的样本数量会降低编码器的压缩效率,过长则延迟增加从而影响用户体验。另外帧时长太长也会增加编码器的复杂程度从而增加功耗。实际编码器中的帧时长是在编码器效率、延迟和功耗之间权衡的结果。为了同时满足语音及音乐应用的需要,行业内找到了一个最佳的帧时长:10毫秒(1毫秒=1ms=0.001秒)。编码用时通常为数毫秒,取决于编码算法及编码处理器的计算效率。帧时长和编码用时共同构成编码延迟。传输延迟:经过编码后的数字音频流通过无线通讯技术进行传输,按特定的封包格式形成数据包,再通过一定的调制方式将数据包搬移到射频载波上进行无线传输。由于现实无线传输环境中存在干扰,为了提高传输的服务质量通常需要对相同的数据封包在一定时间内重复传输,从而造成传输延迟。传输延迟通常为数毫秒到几十毫秒之间,取决于对服务质量及数据可靠性的要求。解码延迟:解码器解码数字音频流所花的时间产生的延迟,解码延迟通常较编码延迟短,且没有编码器中的帧时长产生的延迟,因为解码器会将输出的帧自动进行扩展以形成连续的比特流以用于音频数字/模拟信号转换。解码延迟通常为数毫秒。无线音频延迟可能导致第一蓝牙设备11或第二蓝牙设备12分别接收外部蓝牙设备13发送的音频数据的接收时间差不同。Still further, the at least one byte of data includes a difference in receiving time of the data packet. The receiving time difference is the difference between the time when the
第一蓝牙设备11和第二蓝牙设备12用于通过第三通信链路交换彼此接收到的同一数据包的接收时间差,并比较彼此接收到的同一数据包的接收时间差。第一蓝牙设备11和第二蓝牙设备12中接收到的同一数据包的接收时间差较小中的一者,根据彼此的接收时间差之间的差值进行相应的延时处理,以同步将相应的同一数据包进行音频输出。例如,在如前所述的应用场景中,第一蓝牙设备11为左耳机,第二蓝牙设备12为右耳机,外部蓝牙设备13为智能手机,左耳机接收智能手机发送的一数据包的时间差相较于右耳机接收智能手机发送的该数据包的时间差大于30ms,也即,左耳机晚于30ms接收智能手机发送的该数据包。因而,左耳机和右耳机可以通过彼此之间建立第三通信链路交换接收到的该数据包的接收时间差,也即,右耳机可以进行30ms的延时处理,以使得左右耳机同时输出该数据包。The
请参阅图4,图4是图1所示的蓝牙设备系统实施例的另一音频同步示意图。Please refer to FIG. 4 . FIG. 4 is another schematic diagram of audio synchronization of the Bluetooth device system embodiment shown in FIG. 1 .
外部蓝牙设备13用于将音频数据的同一数据包或多个数据包按顺序分别连续向第一蓝牙设备11和第二蓝牙设备12发送至少两次。第一蓝牙设备11和第二蓝牙设备12用于接收外部蓝牙设备13连续至少两次发送的所有数据包,并在外部蓝牙设备13发送完成后的预设时间,同步将各自最后一次接收到的同一数据包或是将接收到的多个数据包按照预设规则进行音频输出。为了避免外部蓝牙设备13在将音频数据发送给第一蓝牙设备11和第二蓝牙设备12时出现发送失败或者第一蓝牙设备11和第二蓝牙设备12在接收音频数据时接收失败的情况,外部蓝牙设备13可以将音频数据的同一数据包或多个数据包分别连续向第一蓝牙设备11和第二蓝牙设备12发送至少两次。外部蓝牙设备13可以连续两次、三次、四次等向第一蓝牙设备11和第二蓝牙设备12发送音频数据的同一数据包或多个数据包,具体次数不做限定。第一蓝牙设备11和第二蓝牙设备12可以将预设时间设置成20ms、30ms、50ms等。预设规则可以是第一蓝牙设备11和第二蓝牙设备12分别接收外部蓝牙设备13最后一次发送的数据包30ms后再同步将音频输出,具体不做限定。例如,在一个实施例中,外部蓝牙设备13可以连续三次向第一蓝牙设备11和第二蓝牙设备12发送音频数据的同一数据包,第一蓝牙设备11和第二蓝牙设备12将预设时间设置成30ms,第一蓝牙设备11和第二蓝牙设备12在30ms时将第三次发送的音频数据的同一数据进行音频输出,如此,第一蓝牙设备11和第二蓝牙设备12可以在30ms时同时播放该音频。The
进一步地,外部蓝牙设备13向第一蓝牙设备11和第二蓝牙设备12分别发送的多个数据包可以是不同的。第一蓝牙设备11和第二蓝牙设备12用于在各自接收到外部蓝牙设备13发送的数据包时,通过第三通信链路交换彼此接收的数据包,并根据接收到的数据包中的同步信息,同步将各自相应的数据包进行音频输出。也即,第一蓝牙设备11和第二蓝牙设备12通过彼此建立的第三通信链路交换多个数据包的同步信息。Further, the multiple data packets sent by the
可选地,同步信息包括第一蓝牙设备11和第二蓝牙设备12彼此接收到的多个数据包的次号以及每个数据包接收时间差中的至少一者。接收时间差为第一蓝牙设备11和第二蓝牙设备12接收到每个数据包的时间分别与第一蓝牙设备11发送同一数据包的时间之差。数据包的次号为外部蓝牙设备13发送的该数据包的顺序号,例如可以表示为01、02、03等。例如,在一个实施例中,外部蓝牙设备13可以连续三次向第一蓝牙设备11和第二蓝牙设备12发送音频数据的数据包。第一蓝牙设备11和第二蓝牙设备12通过彼此建立的第三通信链路交换该音频数据接收的信息。因而,第一蓝牙设备11和第二蓝牙设备12可以接收到外部蓝牙设备13第二次发送的数据包的同时播放该音频,以实现音频同步播放。在另一个实施例中,第一蓝牙设备11在10ms时成功接收了外部蓝牙设备13第一次发送的音频数据,第二蓝牙设备12在20ms时成功接收了外部蓝牙设备13第二次发送的音频数据。第一蓝牙设备11和第二蓝牙设备12通过彼此建立的第三通信链路交换该音频数据接收的信息。因而,第一蓝牙设备11和第二蓝牙设备12可以在20ms时同时播放该音频,以实现音频同步播放。Optionally, the synchronization information includes at least one of order numbers of multiple data packets received by the
请参阅图5,图5是图1所示的蓝牙设备系统实施例的声道处理示意图。Please refer to FIG. 5 . FIG. 5 is a schematic diagram of channel processing of the embodiment of the Bluetooth device system shown in FIG. 1 .
第一蓝牙设备11和第二蓝牙设备12中的与外部蓝牙设备13通信连接正常的至少一者,用于接收外部蓝牙设备13根据第一通信链路和第二通信链路的在线状态并按照与在线状态相匹配的预设声道处理策略,将音频数据处理成与预设声道处理策略相匹配的声道数据。声道(Sound Channel)是指声音在录制或播放时在不同空间位置采集或回放的相互独立的音频信号,声道数也是声音录制时的音源数量或回放时相应的扬声器数量。按照不同的分类规则,声道可以分为左声道、右声道、立体声等。左声道一般是把相关的低音频区信号压缩后经此音轨播放人声对白、译音大多在此。右声道一般是把相关的高、中音频区信号压缩后经此音轨播放,以求声音播放圆润。立体声是除用左、右声道音轨播放外,经对声音进行深层的分析剥离处理后,又增加了中置音频和重低音音频音轨,声音播放的听觉更加清晰圆润并且能够准确的判断出声音的定位,使人如同身临其境。例如,外部蓝牙设备13发送左声道数据至第一蓝牙设备11且发送右声道数据至第二蓝牙设备12,预设声道处理策略可以是当第一蓝牙设备11和第二蓝牙设备12的其中一个断线时,外部蓝牙设备13同时将左声道数据和右声道数据发送给第一蓝牙设备11和第二蓝牙设备12的其中未断线的一个。如此,未断线的第一蓝牙设备11和第二蓝牙设备12可以播放两个声道数据,即使是只有一个蓝牙设备播放音频也可以达到同时有第一蓝牙设备11和第二蓝牙设备12同时播放音频的效果。At least one of the
若在线状态为第一通信链路和第二通信链路中的一者异常而另一者正常,预设声道处理策略则相应地为通过第一通信链路和第二通信链路中正常的一者发送混合单声道数据。其中,相匹配的声道数据相应地为混合单声道数据。混合单声道数据是由左声道数据和右声道数据混合而成的一个声道数据。例如,在如前所述的应用场景中,外部蓝牙设备13发送左声道数据至第一蓝牙设备11且发送右声道数据至第二蓝牙设备12,预设声道处理策略可以是当第一蓝牙设备11和第二蓝牙设备12的其中一个断线时,外部蓝牙设备13同时将混合单声道数据发送给第一蓝牙设备11和第二蓝牙设备12的其中未断线的一个。如此,未断线的第一蓝牙设备11和第二蓝牙设备12可以播放混合单声道数据,即使是只有一个蓝牙设备播放音频也可以达到同时有第一蓝牙设备11和第二蓝牙设备12同时播放音频的效果。If the online status is that one of the first communication link and the second communication link is abnormal and the other is normal, the preset channel processing strategy is correspondingly that the first communication link and the second communication link are normal One of them sends mixed mono data. Wherein, the matched channel data is correspondingly mixed mono-channel data. Mixed monaural data is one channel data in which left channel data and right channel data are mixed. For example, in the application scenario as mentioned above, the
若在线状态为第一通信链路和第二通信链路均正常,预设声道处理策略则相应地为通过正常的第一通信链路和第二通信链路分别发送相应的立体声道数据。其中,相匹配的声道数据相应地为立体声道数据。立体声道数据是左声道数据或者右声道数据。也即,外部蓝牙设备13分别通过第一通信链路和第二通信链路将左声道数据发送给第一蓝牙设备11以及将右声道数据发送给第二蓝牙设备12。换言之,外部蓝牙设备13设置的第一蓝牙芯片131和第二蓝牙芯片132分别建立两路蓝牙连接,以使得数据传播效率更高。If the online status is that both the first communication link and the second communication link are normal, the preset sound channel processing strategy is correspondingly sending corresponding stereo channel data through the normal first communication link and the second communication link respectively. Wherein, the matched channel data is correspondingly stereo channel data. The stereo channel data is left channel data or right channel data. That is, the
请参阅图6,图6是图1所示的蓝牙设备系统实施例的数据丢失处理示意图。Please refer to FIG. 6 . FIG. 6 is a schematic diagram of data loss processing in the embodiment of the Bluetooth device system shown in FIG. 1 .
在第一通信链路出现丢包时,第二蓝牙设备12用于通过第二通信链路接收外部蓝牙设备13将通过第一通信链路的数据包进行裁剪得到的第一通信链路所丢失的裁剪数据,并将裁剪数据通过第三通信链路发送给第一蓝牙设备11。第一蓝牙设备11用于将裁剪数据以及经第一通道链路已接收到的数据包的部分数据进行组包。例如,在如前所述的应用场景中,外部蓝牙设备13与第一蓝牙设备11建立第一通信链路,与第二蓝牙设备12建立第二通信链路。在第一通信链路出现丢包时,第一蓝牙设备11无法播放完整的音频,则外部蓝牙设备13将数据包进行剪裁得到所丢失的剪裁数据,并通过第二通信链路将剪裁数据发送给第二蓝牙设备12。第二蓝牙设备12再通过第三通信链路将剪裁数据发送给第一蓝牙设备11。因而,第一蓝牙设备11可以正常播放音频。When packet loss occurs in the first communication link, the
进一步地,在第二通信链路出现丢包时,第一蓝牙设备11用于通过第一通信链路接收外部蓝牙设备13将通过第二通信链路的数据包进行裁剪得到的第二通信链路所丢失的裁剪数据,并将裁剪数据通过第三通信链路发送给第二蓝牙设备12。在此种情况下的处理方式与第一通信链路出现丢包的方式一致,在此不再赘述。因而,第二蓝牙设备12亦可以正常播放音频。Further, when packet loss occurs in the second communication link, the
综上所述,本申请通过第一蓝牙设备11和第二蓝牙设备12分别与外部蓝牙设备13建立第一路通信链路和第二路通信链路进行接收音频数据,能够提高外部蓝牙设备13和第一蓝牙设备11以及第二蓝牙设备12之间所传输的数据量,进行提升通信的效率和质量。而且第一蓝牙设备11和第二蓝牙设备12彼此建立第三通信链路可以使得第一蓝牙设备11和第二蓝牙设备12进行音频同步,进而避免音频卡顿和延迟等影响用户听音体验。In summary, the present application establishes the first communication link and the second communication link with the
以上所述仅为本申请的实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only an embodiment of the application, and does not limit the patent scope of the application. Any equivalent structure or equivalent process conversion made by using the specification and drawings of the application, or directly or indirectly used in other related technologies fields, are all included in the scope of patent protection of this application in the same way.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211105357.7ACN115499814A (en) | 2022-09-09 | 2022-09-09 | Bluetooth equipment system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211105357.7ACN115499814A (en) | 2022-09-09 | 2022-09-09 | Bluetooth equipment system |
| Publication Number | Publication Date |
|---|---|
| CN115499814Atrue CN115499814A (en) | 2022-12-20 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211105357.7APendingCN115499814A (en) | 2022-09-09 | 2022-09-09 | Bluetooth equipment system |
| Country | Link |
|---|---|
| CN (1) | CN115499814A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116033404A (en)* | 2023-03-29 | 2023-04-28 | 上海物骐微电子有限公司 | Multi-path Bluetooth-linked hybrid communication system and method |
| WO2024221282A1 (en)* | 2023-04-26 | 2024-10-31 | 上海物骐微电子有限公司 | Hybrid communication system for multiple bluetooth links, and method |
| CN119629772A (en)* | 2023-09-14 | 2025-03-14 | Oppo广东移动通信有限公司 | Device, method and chip for transmitting audio data |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9742471B1 (en)* | 2016-06-17 | 2017-08-22 | Nxp B.V. | NFMI based synchronization |
| CN108683980A (en)* | 2018-05-31 | 2018-10-19 | 维沃移动通信有限公司 | An audio signal transmission method and mobile terminal |
| CN109379653A (en)* | 2018-09-30 | 2019-02-22 | Oppo广东移动通信有限公司 | Audio transmission method and device, electronic equipment and storage medium |
| CN110830970A (en)* | 2019-11-19 | 2020-02-21 | Oppo广东移动通信有限公司 | Audio transmission method, device, equipment and storage medium between Bluetooth equipment |
| CN113015057A (en)* | 2021-03-16 | 2021-06-22 | 歌尔科技有限公司 | Earphone and earphone system |
| CN114501412A (en)* | 2022-04-18 | 2022-05-13 | 成都市安比科技有限公司 | Bluetooth protocol data packet loss compensation method based on double-ear connection |
| CN114679710A (en)* | 2020-12-25 | 2022-06-28 | 华为技术有限公司 | TWS earphone connection method and equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9742471B1 (en)* | 2016-06-17 | 2017-08-22 | Nxp B.V. | NFMI based synchronization |
| CN108683980A (en)* | 2018-05-31 | 2018-10-19 | 维沃移动通信有限公司 | An audio signal transmission method and mobile terminal |
| CN109379653A (en)* | 2018-09-30 | 2019-02-22 | Oppo广东移动通信有限公司 | Audio transmission method and device, electronic equipment and storage medium |
| CN110830970A (en)* | 2019-11-19 | 2020-02-21 | Oppo广东移动通信有限公司 | Audio transmission method, device, equipment and storage medium between Bluetooth equipment |
| CN114679710A (en)* | 2020-12-25 | 2022-06-28 | 华为技术有限公司 | TWS earphone connection method and equipment |
| CN113015057A (en)* | 2021-03-16 | 2021-06-22 | 歌尔科技有限公司 | Earphone and earphone system |
| CN114501412A (en)* | 2022-04-18 | 2022-05-13 | 成都市安比科技有限公司 | Bluetooth protocol data packet loss compensation method based on double-ear connection |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116033404A (en)* | 2023-03-29 | 2023-04-28 | 上海物骐微电子有限公司 | Multi-path Bluetooth-linked hybrid communication system and method |
| WO2024221282A1 (en)* | 2023-04-26 | 2024-10-31 | 上海物骐微电子有限公司 | Hybrid communication system for multiple bluetooth links, and method |
| CN119629772A (en)* | 2023-09-14 | 2025-03-14 | Oppo广东移动通信有限公司 | Device, method and chip for transmitting audio data |
| Publication | Publication Date | Title |
|---|---|---|
| CN108337595B (en) | Bluetooth headset realizes the method being precisely played simultaneously | |
| US10271152B1 (en) | Synchronization of wireless headphones | |
| CN115499814A (en) | Bluetooth equipment system | |
| CN113825125B (en) | Audio sharing method for multiple groups of wireless Bluetooth headsets | |
| CN107708006A (en) | Computer-readable storage medium, real-time translation system | |
| CN109819303A (en) | Data output method and related equipment | |
| CN115022777A (en) | Audio playing parameter updating method, audio data adjusting method, device and medium | |
| CN115567086B (en) | Audio transmission device, audio playing device and audio transmission and synchronization system | |
| CN114501401B (en) | Audio transmission method and device, electronic device, and readable storage medium | |
| CN112954527B (en) | Wireless earphone, audio synchronization method, system, equipment and computer medium | |
| CN114727371B (en) | Communication method, device, equipment, and storage medium | |
| TWI798890B (en) | Bluetooth voice communication system and related computer program product for generating stereo voice effect | |
| US11172303B2 (en) | Audio concealment method and wireless audio output device using the same | |
| CN115103431B (en) | Method for realizing synchronous playing of Bluetooth headset equipment and Bluetooth headset equipment thereof | |
| US20230353920A1 (en) | Wireless headset and audio device | |
| CN113490268B (en) | Audio data wireless transmission method and system | |
| CN114946194A (en) | Wireless MIDI Headphones | |
| CN115776628B (en) | Method for accurate synchronization of two-ear recording of TWS Bluetooth headset | |
| CN112423197A (en) | Method and device for realizing multipath Bluetooth audio output | |
| CN222089726U (en) | A sound transmission system | |
| CN113423039B (en) | Wireless loudspeaker assembly, intelligent device and intelligent system thereof | |
| CN113423040B (en) | Wireless loudspeaker assembly, intelligent equipment and intelligent system thereof | |
| CN111263272B (en) | Audio signal shunting and returning method and system | |
| CN119629772A (en) | Device, method and chip for transmitting audio data | |
| CN119342382A (en) | A method and system for synchronously playing audio of a TWS headset, and a TWS headset |
| 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 |