Movatterモバイル変換


[0]ホーム

URL:


CN116056051B - Bluetooth connection control method, system and equipment - Google Patents

Bluetooth connection control method, system and equipment
Download PDF

Info

Publication number
CN116056051B
CN116056051BCN202210630679.7ACN202210630679ACN116056051BCN 116056051 BCN116056051 BCN 116056051BCN 202210630679 ACN202210630679 ACN 202210630679ACN 116056051 BCN116056051 BCN 116056051B
Authority
CN
China
Prior art keywords
bluetooth
bluetooth module
identification information
electronic device
historical
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.)
Active
Application number
CN202210630679.7A
Other languages
Chinese (zh)
Other versions
CN116056051A (en
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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co LtdfiledCriticalHonor Device Co Ltd
Priority to CN202210630679.7ApriorityCriticalpatent/CN116056051B/en
Publication of CN116056051ApublicationCriticalpatent/CN116056051A/en
Application grantedgrantedCritical
Publication of CN116056051BpublicationCriticalpatent/CN116056051B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The present application relates to the field of terminal technologies, and in particular, to a method, a system, and an apparatus for controlling bluetooth connection. The Bluetooth connection control method is applied to first electronic equipment, the first electronic equipment comprises a first Bluetooth module, and the method comprises the following steps: the first Bluetooth module detects a low-power Bluetooth BLE broadcast sent by the first Bluetooth device, and the BLE broadcast contains identification information and state information of the first Bluetooth device. The first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the identification information, and determines to adjust the parameter information of the paging scanning operation after determining that the first Bluetooth device is in a first box opening state according to the state information. Through the technical scheme, the paging response speed of the first electronic equipment can be improved on the premise of avoiding increasing unnecessary power consumption, and then the Bluetooth connection speed is improved.

Description

Translated fromChinese
蓝牙连接控制方法、系统和设备Bluetooth connection control method, system and device

技术领域Technical field

本申请涉及终端技术领域,尤其涉及一种蓝牙连接控制方法、系统和设备。The present application relates to the field of terminal technology, and in particular to a Bluetooth connection control method, system and device.

背景技术Background technique

真无线立体声(True Wireless Stereo,TWS)蓝牙耳机是基于蓝牙芯片技术发展而来的一种蓝牙耳机产品,其摆脱了有线束缚,能够真正实现蓝牙左右声道无线分离使用。True Wireless Stereo (TWS) Bluetooth headset is a Bluetooth headset product developed based on Bluetooth chip technology. It gets rid of the shackles of wires and can truly realize the wireless separation of left and right Bluetooth channels.

目前,TWS蓝牙耳机与电子设备之间的蓝牙连接过程通常为,首先,由TWS蓝牙耳机在开盒后发送寻呼请求。然后,电子设备通过寻呼扫描,在监听到该寻呼请求后反馈寻呼响应。进而,两设备之间可建立蓝牙连接。但是,在实际执行过程中,电子设备通常按照固定周期、固定跳频频率进行寻呼扫描,因而可能存在寻呼响应不及时的情况,造成TWS蓝牙耳机与电子设备之间的蓝牙连接速度较慢,影响用户体验。Currently, the Bluetooth connection process between a TWS Bluetooth headset and an electronic device is usually as follows: first, the TWS Bluetooth headset sends a paging request after opening the box. Then, the electronic device scans through paging and feeds back a paging response after monitoring the paging request. In turn, a Bluetooth connection can be established between the two devices. However, in the actual implementation process, electronic devices usually perform paging scans according to a fixed period and a fixed frequency hopping frequency, so the paging response may not be timely, resulting in a slow Bluetooth connection between the TWS Bluetooth headset and the electronic device. , affecting user experience.

发明内容Contents of the invention

本申请提供一种蓝牙连接控制方法、系统和设备,用于提升TWS蓝牙耳机与电子设备之间的蓝牙连接速度。This application provides a Bluetooth connection control method, system and device for improving the Bluetooth connection speed between TWS Bluetooth headsets and electronic devices.

第一方面,本技术方案提供了一种蓝牙连接控制方法,应用于第一电子设备,所述第一电子设备包括第一蓝牙模块,所述方法包括:所述第一蓝牙模块检测到第一蓝牙设备发送的低功耗蓝牙BLE广播,所述BLE广播包含所述第一蓝牙设备的标识信息以及状态信息;所述第一蓝牙模块根据所述标识信息,确定所述第一蓝牙设备为历史蓝牙设备,以及,所述第一蓝牙模块根据所述状态信息,确定所述第一蓝牙设备处于第一开盒状态;所述第一开盒状态表示开盒后时长小于设定阈值;所述第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整;其中,所述第一蓝牙模块为蓝牙芯片,或者,所述第一蓝牙模块为中央处理器。In a first aspect, this technical solution provides a Bluetooth connection control method, which is applied to a first electronic device. The first electronic device includes a first Bluetooth module. The method includes: the first Bluetooth module detects the first A low-power Bluetooth BLE broadcast sent by a Bluetooth device. The BLE broadcast includes identification information and status information of the first Bluetooth device; the first Bluetooth module determines that the first Bluetooth device is a historical device based on the identification information. A Bluetooth device, and the first Bluetooth module determines that the first Bluetooth device is in a first box-opening state according to the status information; the first box-opening state indicates that the time after boxing is less than a set threshold; the The first Bluetooth module determines to adjust the parameter information of the paging scan operation; wherein the first Bluetooth module is a Bluetooth chip, or the first Bluetooth module is a central processing unit.

上述技术方案提供的蓝牙连接控制方法,可在根据标识信息以及状态信息确定第一蓝牙设备满足特定条件后,对寻呼扫描操作的参数信息进行调整,从而提升蓝牙连接速度。The Bluetooth connection control method provided by the above technical solution can adjust the parameter information of the paging scan operation after determining that the first Bluetooth device meets specific conditions based on the identification information and status information, thereby improving the Bluetooth connection speed.

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块根据所述标识信息,确定所述第一蓝牙设备为历史蓝牙设备,包括:所述第一蓝牙模块将所述标识信息与历史蓝牙设备的参考标识信息进行比对;所述第一蓝牙模块根据比对结果,确定所述第一蓝牙设备为历史蓝牙设备。With reference to the first aspect, in some implementations of the first aspect, the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device based on the identification information, including: the first Bluetooth module converts the first Bluetooth device to a historical Bluetooth device. The identification information is compared with the reference identification information of the historical Bluetooth device; the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device based on the comparison result.

结合第一方面,在第一方面的某些实现方式中,所述标识信息包括BLE蓝牙地址;所述参考标识信息包括参考经典蓝牙地址。With reference to the first aspect, in some implementations of the first aspect, the identification information includes a BLE Bluetooth address; and the reference identification information includes a reference classic Bluetooth address.

在本实现方式中,可根据历史蓝牙设备的经典蓝牙地址以及第一蓝牙设备的BLE蓝牙地址,实现对第一蓝牙设备的识别,从而确定第一蓝牙设备为曾经连接过的历史蓝牙设备。In this implementation, the first Bluetooth device can be identified based on the classic Bluetooth address of the historical Bluetooth device and the BLE Bluetooth address of the first Bluetooth device, thereby determining that the first Bluetooth device is a historical Bluetooth device that has been connected.

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块将所述标识信息与历史蓝牙设备的参考标识信息进行比对,包括:所述第一蓝牙模块根据预设的地址映射关系,确定与所述参考经典蓝牙地址对应的参考BLE蓝牙地址;所述第一蓝牙模块将所述参考BLE蓝牙地址与所述BLE蓝牙地址进行比对。With reference to the first aspect, in some implementations of the first aspect, the first Bluetooth module compares the identification information with reference identification information of historical Bluetooth devices, including: the first Bluetooth module determines The address mapping relationship determines the reference BLE Bluetooth address corresponding to the reference classic Bluetooth address; the first Bluetooth module compares the reference BLE Bluetooth address with the BLE Bluetooth address.

在本实现方式中,可预先建立地址映射关系,从而实现经典蓝牙地址与BLE蓝牙地址两种不同蓝牙协议地址的比对。In this implementation, the address mapping relationship can be established in advance to achieve comparison of two different Bluetooth protocol addresses, the classic Bluetooth address and the BLE Bluetooth address.

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块将所述标识信息与历史蓝牙设备的参考标识信息进行比对之前,所述方法还包括:所述第一蓝牙模块获取所述历史蓝牙设备的参考标识信息。With reference to the first aspect, in some implementations of the first aspect, before the first Bluetooth module compares the identification information with the reference identification information of historical Bluetooth devices, the method further includes: the first The Bluetooth module obtains the reference identification information of the historical Bluetooth device.

结合第一方面,在第一方面的某些实现方式中,所述第一电子设备还包括第二蓝牙模块,所述第二蓝牙模块为中央处理器,所述第一蓝牙模块为蓝牙芯片;所述第一蓝牙模块获取所述历史蓝牙设备的参考标识信息,包括:所述蓝牙芯片接收所述中央处理器发送的历史蓝牙设备的参考标识信息。With reference to the first aspect, in some implementations of the first aspect, the first electronic device further includes a second Bluetooth module, the second Bluetooth module is a central processing unit, and the first Bluetooth module is a Bluetooth chip; The first Bluetooth module obtains the reference identification information of the historical Bluetooth device, including: the Bluetooth chip receives the reference identification information of the historical Bluetooth device sent by the central processor.

结合第一方面,在第一方面的某些实现方式中,所述第二蓝牙模块为蓝牙芯片,所述第一蓝牙模块为中央处理器;所述第一蓝牙模块获取所述历史蓝牙设备的参考标识信息,包括:所述中央处理器根据历史蓝牙连接记录,确定历史蓝牙设备的参考标识信息。With reference to the first aspect, in some implementations of the first aspect, the second Bluetooth module is a Bluetooth chip, and the first Bluetooth module is a central processing unit; the first Bluetooth module obtains the data of the historical Bluetooth device. The reference identification information includes: the central processor determines the reference identification information of the historical Bluetooth device based on the historical Bluetooth connection records.

结合第一方面,在第一方面的某些实现方式中,所述参数信息包括扫描速率以及业务优先级;所述第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整,包括:所述第一蓝牙模块确定将寻呼扫描操作的当前扫描速率调整为目标扫描速率,所述目标扫描速率高于所述当前扫描速率;和/或,所述第一蓝牙模块确定将寻呼扫描操作的当前业务优先级调整为目标业务优先级,所述目标业务优先级高于所述当前业务优先级。With reference to the first aspect, in some implementations of the first aspect, the parameter information includes a scan rate and a service priority; the first Bluetooth module determines to adjust the parameter information of the paging scan operation, including: The first Bluetooth module determines to adjust the current scan rate of the paging scan operation to a target scan rate, and the target scan rate is higher than the current scan rate; and/or the first Bluetooth module determines to adjust the paging scan operation to a target scan rate. The current service priority is adjusted to the target service priority, and the target service priority is higher than the current service priority.

在本实现方式中,可通过调整寻呼扫描操作的扫描速率和/或业务优先级,缩短第一电子设备监听到寻呼请求的时间,从而提升蓝牙连接速度。In this implementation, the scanning rate and/or service priority of the paging scan operation can be adjusted to shorten the time for the first electronic device to monitor the paging request, thereby improving the Bluetooth connection speed.

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块为中央处理器,所述第二蓝牙模块为蓝牙芯片;所述第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整,包括:所述中央处理器生成第一参数调节指令,所述第一参数调节指令包含目标参数信息;所述中央处理器将所述第一参数调节指令发送给所述蓝牙芯片。With reference to the first aspect, in some implementations of the first aspect, the first Bluetooth module is a central processor, and the second Bluetooth module is a Bluetooth chip; the first Bluetooth module determines the response to the paging scan operation. Adjusting the parameter information includes: the central processor generates a first parameter adjustment instruction, the first parameter adjustment instruction includes target parameter information; the central processor sends the first parameter adjustment instruction to the Bluetooth chip .

结合第一方面,在第一方面的某些实现方式中,所述方法还包括:所述蓝牙芯片接收所述第一参数调节指令;所述蓝牙芯片根据所述第一参数调节指令,将寻呼扫描操作的当前参数信息调整为所述目标参数信息。With reference to the first aspect, in some implementations of the first aspect, the method further includes: the Bluetooth chip receiving the first parameter adjustment instruction; the Bluetooth chip searching for the first parameter adjustment instruction according to the first parameter adjustment instruction. The current parameter information of the scanning operation is adjusted to the target parameter information.

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块检测到第一蓝牙设备发送的BLE广播之后,所述方法还包括:所述第一蓝牙模块读取第一标志位;所述第一蓝牙模块检测到所述第一标志位为第一目标值,确定寻呼扫描操作的参数信息处于可调状态。With reference to the first aspect, in some implementations of the first aspect, after the first Bluetooth module detects the BLE broadcast sent by the first Bluetooth device, the method further includes: the first Bluetooth module reads the first Flag bit; the first Bluetooth module detects that the first flag bit is the first target value and determines that the parameter information of the paging scan operation is in an adjustable state.

在本实现方式中,可设置第一标志位,通过第一标志位的不同取值对寻呼扫描操作的参数信息的状态进行指示,实现对寻呼扫描操作的参数信息的“解锁”或“锁定”。In this implementation, the first flag bit can be set, and different values of the first flag bit are used to indicate the status of the parameter information of the paging scan operation, thereby realizing "unlocking" or "unlocking" or "unlocking" of the parameter information of the paging scan operation. locking".

结合第一方面,在第一方面的某些实现方式中,所述第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整之后,所述方法还包括:在预设时间段内,所述第一蓝牙模块检测到所述第一蓝牙设备的蓝牙连接请求,或者,所述第一蓝牙模块未检测到所述第一蓝牙设备的蓝牙连接请求;所述第一蓝牙模块恢复所述寻呼扫描操作的参数信息。With reference to the first aspect, in some implementations of the first aspect, after the first Bluetooth module determines to adjust the parameter information of the paging scan operation, the method further includes: within a preset time period, the The first Bluetooth module detects the Bluetooth connection request of the first Bluetooth device, or the first Bluetooth module does not detect the Bluetooth connection request of the first Bluetooth device; the first Bluetooth module resumes the paging Parameter information for the scan operation.

结合第一方面,在第一方面的某些实现方式中,在预设时间段内所述第一蓝牙模块未检测到所述第一蓝牙设备的蓝牙连接请求的情况下,所述第一蓝牙模块恢复所述寻呼扫描操作的参数信息之后,所述方法还包括:所述第一蓝牙模块将所述第一标志位更改为第二目标值,所述第二目标值用于指示所述参数信息处于不可调状态。With reference to the first aspect, in some implementations of the first aspect, when the first Bluetooth module does not detect the Bluetooth connection request of the first Bluetooth device within a preset time period, the first Bluetooth module After the module restores the parameter information of the paging scan operation, the method further includes: the first Bluetooth module changes the first flag bit to a second target value, and the second target value is used to indicate that the Parameter information is in an unadjustable state.

第二方面,本技术方案提供了一种蓝牙连接控制系统,所述系统包括第一蓝牙设备以及第一电子设备;所述第一蓝牙设备用于向所述第一电子设备发送BLE广播;所述BLE广播被所述第一电子设备在接收后,触发所述第一电子设备执行所述第一方面或者第一方面的任一可能的实现方式中的方法。In a second aspect, this technical solution provides a Bluetooth connection control system. The system includes a first Bluetooth device and a first electronic device; the first Bluetooth device is used to send a BLE broadcast to the first electronic device; After the BLE broadcast is received by the first electronic device, the first electronic device triggers the first electronic device to execute the method in the first aspect or any possible implementation of the first aspect.

第三方面,本技术方案提供了一种电子设备,包括:第一蓝牙模块;所述第一蓝牙模块用于,检测到第一蓝牙设备发送的低功耗蓝牙BLE广播,所述BLE广播包含所述第一蓝牙设备的标识信息以及状态信息;根据所述标识信息,确定所述第一蓝牙设备为历史蓝牙设备,以及,根据所述状态信息,确定所述第一蓝牙设备处于第一开盒状态;所述第一开盒状态表示开盒后时长小于设定阈值;确定对寻呼扫描操作的参数信息进行调整;其中,所述第一蓝牙模块为蓝牙芯片,或者,所述第一蓝牙模块为中央处理器。In a third aspect, this technical solution provides an electronic device, including: a first Bluetooth module; the first Bluetooth module is configured to detect a low-power Bluetooth BLE broadcast sent by the first Bluetooth device, where the BLE broadcast includes Identification information and status information of the first Bluetooth device; according to the identification information, it is determined that the first Bluetooth device is a historical Bluetooth device; and based on the status information, it is determined that the first Bluetooth device is on the first box state; the first box-opening state indicates that the time after box-opening is less than the set threshold; it is determined to adjust the parameter information of the paging scan operation; wherein the first Bluetooth module is a Bluetooth chip, or the first The Bluetooth module is the central processing unit.

上述技术方案提供的电子设备,可在根据标识信息以及状态信息确定第一蓝牙设备满足特定条件后,对寻呼扫描操作的参数信息进行调整,从而提升蓝牙连接速度。The electronic device provided by the above technical solution can adjust the parameter information of the paging scan operation after determining that the first Bluetooth device meets specific conditions based on the identification information and status information, thereby improving the Bluetooth connection speed.

结合第三方面,在第三方面的某些实现方式中,第一蓝牙模块具体用于,将所述标识信息与历史蓝牙设备的参考标识信息进行比对;根据比对结果,确定所述第一蓝牙设备为历史蓝牙设备。In conjunction with the third aspect, in some implementations of the third aspect, the first Bluetooth module is specifically configured to compare the identification information with reference identification information of historical Bluetooth devices; and determine the first Bluetooth device based on the comparison result. A Bluetooth device is a historical Bluetooth device.

结合第三方面,在第三方面的某些实现方式中,所述标识信息包括BLE蓝牙地址;所述参考标识信息包括参考经典蓝牙地址。With reference to the third aspect, in some implementations of the third aspect, the identification information includes a BLE Bluetooth address; the reference identification information includes a reference classic Bluetooth address.

在本实现方式中,可根据历史蓝牙设备的经典蓝牙地址以及第一蓝牙设备的BLE蓝牙地址,实现对第一蓝牙设备的识别,从而确定第一蓝牙设备为曾经连接过的历史蓝牙设备。In this implementation, the first Bluetooth device can be identified based on the classic Bluetooth address of the historical Bluetooth device and the BLE Bluetooth address of the first Bluetooth device, thereby determining that the first Bluetooth device is a historical Bluetooth device that has been connected.

结合第三方面,在第三方面的某些实现方式中,第一蓝牙模块具体用于,根据预设的地址映射关系,确定与所述参考经典蓝牙地址对应的参考BLE蓝牙地址;将所述参考BLE蓝牙地址与所述BLE蓝牙地址进行比对。In connection with the third aspect, in some implementations of the third aspect, the first Bluetooth module is specifically configured to determine a reference BLE Bluetooth address corresponding to the reference classic Bluetooth address according to a preset address mapping relationship; Compare the reference BLE Bluetooth address with the BLE Bluetooth address.

在本实现方式中,可预先建立地址映射关系,从而实现经典蓝牙地址与BLE蓝牙地址两种不同蓝牙协议地址的比对。In this implementation, the address mapping relationship can be established in advance to achieve comparison of two different Bluetooth protocol addresses, the classic Bluetooth address and the BLE Bluetooth address.

结合第三方面,在第三方面的某些实现方式中,将所述标识信息与历史蓝牙设备的参考标识信息进行比对之前,所述第一蓝牙模块还用于:获取所述历史蓝牙设备的参考标识信息。Combined with the third aspect, in some implementations of the third aspect, before comparing the identification information with the reference identification information of historical Bluetooth devices, the first Bluetooth module is also used to: obtain the historical Bluetooth device reference identification information.

结合第三方面,在第三方面的某些实现方式中,所述第一电子设备还包括第二蓝牙模块,所述第二蓝牙模块为中央处理器,所述第一蓝牙模块为蓝牙芯片;所述蓝牙芯片具体用于:接收所述中央处理器发送的历史蓝牙设备的参考标识信息。With reference to the third aspect, in some implementations of the third aspect, the first electronic device further includes a second Bluetooth module, the second Bluetooth module is a central processor, and the first Bluetooth module is a Bluetooth chip; The Bluetooth chip is specifically configured to: receive reference identification information of historical Bluetooth devices sent by the central processor.

结合第三方面,在第三方面的某些实现方式中,所述第二蓝牙模块为蓝牙芯片,所述第一蓝牙模块为中央处理器;所述中央处理器具体用于:根据历史蓝牙连接记录,确定历史蓝牙设备的参考标识信息。Combined with the third aspect, in some implementations of the third aspect, the second Bluetooth module is a Bluetooth chip, and the first Bluetooth module is a central processing unit; the central processing unit is specifically used to: according to historical Bluetooth connections Record and determine the reference identification information of historical Bluetooth devices.

结合第三方面,在第三方面的某些实现方式中,所述参数信息包括扫描速率以及业务优先级;所述第一蓝牙模块具体用于:确定将寻呼扫描操作的当前扫描速率调整为目标扫描速率,所述目标扫描速率高于所述当前扫描速率;和/或,确定将寻呼扫描操作的当前业务优先级调整为目标业务优先级,所述目标业务优先级高于所述当前业务优先级。With reference to the third aspect, in some implementations of the third aspect, the parameter information includes a scan rate and a service priority; the first Bluetooth module is specifically configured to: determine to adjust the current scan rate of the paging scan operation to Target scan rate, the target scan rate is higher than the current scan rate; and/or, determine to adjust the current service priority of the paging scan operation to the target service priority, the target service priority is higher than the current scan rate. Business priorities.

在本实现方式中,可通过调整寻呼扫描操作的扫描速率和/或业务优先级,缩短第一电子设备监听到寻呼请求的时间,从而提升蓝牙连接速度。In this implementation, the scanning rate and/or service priority of the paging scan operation can be adjusted to shorten the time for the first electronic device to monitor the paging request, thereby improving the Bluetooth connection speed.

结合第三方面,在第三方面的某些实现方式中,所述第一蓝牙模块为中央处理器,所述第二蓝牙模块为蓝牙芯片;所述中央处理器具体用于:生成第一参数调节指令,所述第一参数调节指令包含目标参数信息;将所述第一参数调节指令发送给所述蓝牙芯片。In connection with the third aspect, in some implementations of the third aspect, the first Bluetooth module is a central processing unit, and the second Bluetooth module is a Bluetooth chip; the central processing unit is specifically used to: generate a first parameter Adjustment instructions, the first parameter adjustment instructions include target parameter information; send the first parameter adjustment instructions to the Bluetooth chip.

结合第三方面,在第三方面的某些实现方式中,所述蓝牙芯片用于,接收所述第一参数调节指令;根据所述第一参数调节指令,将寻呼扫描操作的当前参数信息调整为所述目标参数信息。With reference to the third aspect, in some implementations of the third aspect, the Bluetooth chip is configured to receive the first parameter adjustment instruction; and, according to the first parameter adjustment instruction, convert the current parameter information of the paging scan operation to Adjust to the target parameter information.

结合第三方面,在第三方面的某些实现方式中,检测到第一蓝牙设备发送的BLE广播之后,所述第一蓝牙模块还用于:读取第一标志位;检测到所述第一标志位为第一目标值,确定寻呼扫描操作的参数信息处于可调状态。Combined with the third aspect, in some implementations of the third aspect, after detecting the BLE broadcast sent by the first Bluetooth device, the first Bluetooth module is further configured to: read the first flag bit; detect the first flag bit. A flag bit is a first target value, which determines that the parameter information of the paging scan operation is in an adjustable state.

在本实现方式中,可设置第一标志位,通过第一标志位的不同取值对寻呼扫描操作的参数信息的状态进行指示,实现对寻呼扫描操作的参数信息的“解锁”或“锁定”。In this implementation, the first flag bit can be set, and different values of the first flag bit are used to indicate the status of the parameter information of the paging scan operation, thereby realizing "unlocking" or "unlocking" or "unlocking" of the parameter information of the paging scan operation. locking".

结合第三方面,在第三方面的某些实现方式中,确定对寻呼扫描操作的参数信息进行调整之后,所述第一蓝牙模块还用于:在预设时间段内检测到所述第一蓝牙设备的蓝牙连接请求,或者,未检测到所述第一蓝牙设备的蓝牙连接请求;恢复所述寻呼扫描操作的参数信息。With reference to the third aspect, in some implementations of the third aspect, after determining to adjust the parameter information of the paging scan operation, the first Bluetooth module is further configured to: detect that the third A Bluetooth connection request from a Bluetooth device, or a Bluetooth connection request from the first Bluetooth device is not detected; and the parameter information of the paging scan operation is restored.

结合第三方面,在第三方面的某些实现方式中,在预设时间段内未检测到所述第一蓝牙设备的蓝牙连接请求的情况下,恢复所述寻呼扫描操作的参数信息之后,所述第一蓝牙模块还用于:将所述第一标志位更改为第二目标值,所述第二目标值用于指示所述参数信息处于不可调状态。Combined with the third aspect, in some implementations of the third aspect, if the Bluetooth connection request of the first Bluetooth device is not detected within a preset time period, after the parameter information of the paging scan operation is restored , the first Bluetooth module is also configured to: change the first flag bit to a second target value, the second target value is used to indicate that the parameter information is in an unadjustable state.

第四方面,本技术方案提供了一种电子设备,包括:一个或多个处理器;存储器;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行所述第一方面或者第一方面的任一可能的实现方式中的方法。In a fourth aspect, the present technical solution provides an electronic device, including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, The one or more computer programs include instructions that, when executed by the device, cause the device to perform the method in the first aspect or any possible implementation of the first aspect.

第五方面,本技术方案提供了一种电子设备,所述设备包括存储介质和中央处理器,所述存储介质可以是非易失性存储介质,所述存储介质中存储有计算机可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述计算机可执行程序以实现所述第一方面或者第一方面的任一可能的实现方式中的方法。In a fifth aspect, this technical solution provides an electronic device. The device includes a storage medium and a central processor. The storage medium may be a non-volatile storage medium. A computer executable program is stored in the storage medium. The central processor is connected to the non-volatile storage medium, and executes the computer executable program to implement the method in the first aspect or any possible implementation of the first aspect.

第六方面,本技术方案提供了一种芯片,所述芯片包括处理器与数据接口,所述处理器通过所述数据接口读取存储器上存储的指令,执行第一方面或第一方面的任一可能的实现方式中的方法。In a sixth aspect, this technical solution provides a chip. The chip includes a processor and a data interface. The processor reads instructions stored in the memory through the data interface and executes the first aspect or any of the first aspects. method in one possible implementation.

可选的,作为一种实现方式,所述芯片还可以包括存储器,所述存储器中存储有指令,所述处理器用于执行所述存储器上存储的指令,当所述指令被执行时,所述处理器用于执行第一方面或第一方面的任一可能的实现方式中的方法。Optionally, as an implementation manner, the chip may also include a memory, in which instructions are stored, and the processor is configured to execute the instructions stored in the memory. When the instructions are executed, the The processor is configured to execute the method in the first aspect or any possible implementation of the first aspect.

第七方面,本技术方案提供了一种计算机可读存储介质,所述计算机可读介质存储用于设备执行的程序代码,所述程序代码包括用于执行第一方面或者第一方面的任一可能的实现方式中的方法的指令。In a seventh aspect, the present technical solution provides a computer-readable storage medium that stores program code for device execution, where the program code includes for executing the first aspect or any one of the first aspects. Instructions for methods in possible implementations.

上述技术方案中,第一电子设备能够对第一蓝牙设备进行条件判断,当确定第一蓝牙设备为曾经连接过的历史蓝牙设备、且第一蓝牙设备处于刚开盒状态后,可确定对寻呼扫描操作的参数信息进行调整,从而可加快寻呼响应速度,进而提升蓝牙连接速度。并且,由于该参数调整操作是以第一蓝牙设备满足特定条件为前提的,因此可避免增加不必要的功耗,实现蓝牙连接速度以及功耗兼顾。In the above technical solution, the first electronic device can perform conditional judgment on the first Bluetooth device. When it is determined that the first Bluetooth device is a historical Bluetooth device that has been connected before, and the first Bluetooth device is in a newly opened state, it can determine that the first Bluetooth device is in a conditional state. The parameter information of the page scanning operation can be adjusted to speed up the paging response speed and thereby improve the Bluetooth connection speed. Moreover, since the parameter adjustment operation is based on the premise that the first Bluetooth device meets specific conditions, unnecessary increase in power consumption can be avoided and both Bluetooth connection speed and power consumption can be achieved.

附图说明Description of the drawings

图1是本申请实施例提供的第一电子设备的一种结构示意图;Figure 1 is a schematic structural diagram of a first electronic device provided by an embodiment of the present application;

图2是本申请实施例提供的第一电子设备的一种软件结构框图;Figure 2 is a software structure block diagram of the first electronic device provided by the embodiment of the present application;

图3是本申请实施例提供的蓝牙连接控制方法的一个示意性流程图;Figure 3 is a schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application;

图4是本申请实施例提供的BLE蓝牙广播数据包的一种结构示意图;Figure 4 is a schematic structural diagram of a BLE Bluetooth broadcast data packet provided by an embodiment of the present application;

图5是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图;Figure 5 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application;

图6是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图;Figure 6 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application;

图7是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图;Figure 7 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application;

图8是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图;Figure 8 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application;

图9是本申请实施例提供的蓝牙连接控制系统的一种结构示意图;Figure 9 is a schematic structural diagram of a Bluetooth connection control system provided by an embodiment of the present application;

图10是本申请实施例提供的电子设备的一种结构示意图。Figure 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

在对本申请实施例进行说明之前,首先对相关技术进行介绍。Before describing the embodiments of the present application, related technologies will first be introduced.

真无线立体声(True Wireless Stereo,TWS)蓝牙耳机是基于蓝牙芯片技术发展而来的一种蓝牙耳机产品,其摆脱了有线束缚,能够真正实现蓝牙左右声道无线分离使用。TWS蓝牙耳机通常置于耳机盒内,可在开盒后实现自动开机启动,进而,与设定范围内的可连接设备建立蓝牙连接。True Wireless Stereo (TWS) Bluetooth headset is a Bluetooth headset product developed based on Bluetooth chip technology. It gets rid of the shackles of wires and can truly realize the wireless separation of left and right Bluetooth channels. TWS Bluetooth headsets are usually placed in the headphone box, and can be automatically turned on after opening the box, and then establish Bluetooth connections with connectable devices within the set range.

现有的技术方案中,TWS蓝牙耳机与电子设备的蓝牙连接过程通常为,由TWS蓝牙耳机在开盒后发送寻呼请求。电子设备通过寻呼扫描监听到该寻呼请求后反馈寻呼响应。进而,电子设备接收TWS蓝牙耳机的蓝牙连接请求,两设备之间建立蓝牙连接。In existing technical solutions, the Bluetooth connection process between a TWS Bluetooth headset and an electronic device usually involves the TWS Bluetooth headset sending a paging request after opening the box. The electronic device monitors the paging request through paging scanning and then feeds back a paging response. Furthermore, the electronic device receives the Bluetooth connection request from the TWS Bluetooth headset, and a Bluetooth connection is established between the two devices.

但是,在实际执行过程中,电子设备通常按照固定周期、固定跳频频率进行寻呼扫描,因而可能无法及时地监听到TWS蓝牙耳机在开盒后发送的寻呼请求,导致寻呼响应不及时,造成TWS蓝牙耳机与电子设备之间的蓝牙连接速度较慢,影响用户体验。However, in the actual implementation process, electronic devices usually perform paging scans according to a fixed period and a fixed frequency hopping frequency. Therefore, the paging request sent by the TWS Bluetooth headset after opening the box may not be monitored in time, resulting in untimely paging response. , causing the Bluetooth connection speed between the TWS Bluetooth headset and the electronic device to be slow, affecting the user experience.

为解决上述问题,提出本申请。In order to solve the above problems, this application is proposed.

本申请中,可提供第一蓝牙设备以及第一电子设备。其中,第一蓝牙设备可以为TWS蓝牙耳机,第一电子设备可以是能够与TWS蓝牙耳机建立蓝牙连接的任意一种电子设备。示例性的,第一电子设备可以是手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personaldigital assistant,PDA)等电子设备,本申请实施例对第一电子设备的具体类型不作任何限制。In this application, a first Bluetooth device and a first electronic device can be provided. The first Bluetooth device may be a TWS Bluetooth headset, and the first electronic device may be any electronic device capable of establishing a Bluetooth connection with the TWS Bluetooth headset. For example, the first electronic device may be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR)/virtual reality (VR) device, a notebook computer, or an ultra mobile personal computer (Ultra). -mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA) and other electronic devices. The embodiments of the present application do not place any restrictions on the specific type of the first electronic device.

本申请提供了一种蓝牙连接控制方法,应用于第一电子设备。本申请提供的第一电子设备可在检测到第一蓝牙设备发送的低功耗蓝牙(Bluetooth Low Energy,BLE)广播后,根据其中携带的第一蓝牙设备的标识信息,确定第一蓝牙设备为历史蓝牙设备,以及,根据其中携带的第一蓝牙设备的状态信息,确定第一蓝牙设备处于第一开盒状态。第一开盒状态表示开盒后时长小于设定阈值,可通俗理解为刚开盒状态。进而,第一电子设备可确定对寻呼扫描操作的参数信息进行调整。通过本申请的技术方案,可提升第一电子设备对第一蓝牙设备寻呼请求的响应速度,进而提升蓝牙连接速度,改善用户体验。This application provides a Bluetooth connection control method, which is applied to the first electronic device. The first electronic device provided by this application can determine that the first Bluetooth device is based on the identification information of the first Bluetooth device carried therein after detecting a Bluetooth Low Energy (BLE) broadcast sent by the first Bluetooth device. The historical Bluetooth device, and based on the status information of the first Bluetooth device carried therein, determine that the first Bluetooth device is in the first unboxed state. The first box-opening state indicates that the time after box-opening is less than the set threshold, which can be commonly understood as the just-box-opening state. Furthermore, the first electronic device may determine to adjust the parameter information of the paging scan operation. Through the technical solution of this application, the response speed of the first electronic device to the paging request of the first Bluetooth device can be improved, thereby increasing the Bluetooth connection speed and improving the user experience.

下面将结合附图,对本申请的技术方案进行描述。The technical solution of the present application will be described below with reference to the accompanying drawings.

示例性的,图1示出了本申请实施例提供的第一电子设备100的一种结构示意图。第一电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,传感器模块180,按键190,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identificationmodule,SIM)卡接口195等,可选地,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,加速度传感器180E,距离传感器180F,指纹传感器180H,触摸传感器180K。For example, FIG. 1 shows a schematic structural diagram of a first electronic device 100 provided by an embodiment of the present application. The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, and an antenna 1, Antenna 2, mobile communication module 150, wireless communication module 160, sensor module 180, button 190, indicator 192, camera 193, display screen 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc., optionally, The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an acceleration sensor 180E, a distance sensor 180F, a fingerprint sensor 180H, and a touch sensor 180K.

可以理解的是,本申请实施例示意的结构并不构成对第一电子设备100的具体限定。在本申请另一些实施例中,第一电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100 . In other embodiments of the present application, the first electronic device 100 may include more or less components than shown in the figures, or combine some components, or split some components, or arrange different components. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),中央处理器(central processing unit,CPU),蓝牙芯片111,调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digitalsignal processor,DSP),基带处理器,和/或神经网络处理器(neural-networkprocessing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a central processing unit (central processing unit, CPU), a Bluetooth chip 111, a modem processor, Graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and/or neural Network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.

其中,中央处理器可以是第一电子设备100的运算和控制中心。中央处理器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。例如可完成本申请实施例提供的蓝牙连接控制方法。The central processing unit may be the computing and control center of the first electronic device 100 . The central processing unit can generate operation control signals based on the instruction opcode and timing signals to complete the control of fetching and executing instructions. For example, the Bluetooth connection control method provided by the embodiment of the present application can be completed.

蓝牙芯片可以是第一电子设备100中用于执行蓝牙相关业务的控制单元,可服务于蓝牙连接、蓝牙音频传输、蓝牙数据传输等各种蓝牙场景。例如可用于执行本申请实施例提供的蓝牙连接控制方法。The Bluetooth chip can be a control unit in the first electronic device 100 for executing Bluetooth-related services, and can serve various Bluetooth scenarios such as Bluetooth connection, Bluetooth audio transmission, and Bluetooth data transmission. For example, it can be used to execute the Bluetooth connection control method provided by the embodiment of the present application.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or Universal serial bus (USB) interface, etc.

可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对第一电子设备100的结构限定。在本申请另一些实施例中,第一电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the first electronic device 100 . In other embodiments of the present application, the first electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如蓝牙连接功能等)等。存储数据区可存储第一电子设备100使用过程中所创建的数据(比如寻呼扫描操作的参数等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行第一电子设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the stored program area can store an operating system, at least one application required for a function (such as a Bluetooth connection function, etc.), etc. The storage data area may store data created during use of the first electronic device 100 (such as parameters of a paging scan operation, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.

图2是本申请实施例提供的第一电子设备100的一种软件结构框图。分层架构将蓝牙协议栈分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将第一电子设备100的蓝牙协议栈分为两层,从上至下分别为主机host和控制器controller。host和controller之间可通过主控制层接口(Host InterfaceController,HCI)协议进行通信。FIG. 2 is a software structure block diagram of the first electronic device 100 provided by the embodiment of the present application. The layered architecture divides the Bluetooth protocol stack into several layers, and each layer has a clear role and division of labor. The layers communicate through software interfaces. In some embodiments, the Bluetooth protocol stack of the first electronic device 100 is divided into two layers, namely the host and the controller from top to bottom. The host and controller can communicate through the Host InterfaceController (HCI) protocol.

为方便理解,本申请以下实施例将以具有图1和图2所示结构的第一电子设备为例,对本申请实施例提供的蓝牙连接控制方法进行说明。本申请实施例提供的蓝牙连接控制方法可执行于第一电子设备,具体可执行于第一电子设备的第一蓝牙模块。其中,第一蓝牙模块可以是上述提及的蓝牙芯片,或者,还可以是上述提及的中央处理器。当第一蓝牙模块为蓝牙芯片时,蓝牙芯片所执行的方法流程可运行于蓝牙协议栈的controller层,当第一蓝牙模块为中央处理器时,中央处理器所执行的方法流程可运行于蓝牙协议栈的host层。To facilitate understanding, the following embodiments of the present application will take the first electronic device having the structure shown in FIG. 1 and FIG. 2 as an example to describe the Bluetooth connection control method provided by the embodiments of the present application. The Bluetooth connection control method provided by the embodiment of the present application can be executed on the first electronic device, and specifically can be executed on the first Bluetooth module of the first electronic device. The first Bluetooth module may be the above-mentioned Bluetooth chip, or may also be the above-mentioned central processing unit. When the first Bluetooth module is a Bluetooth chip, the method flow executed by the Bluetooth chip can be run in the controller layer of the Bluetooth protocol stack. When the first Bluetooth module is a central processor, the method flow executed by the central processor can be run in the Bluetooth protocol stack. The host layer of the protocol stack.

图3是本申请实施例提供的蓝牙连接控制方法的一个示意性流程图。如图3所示,本申请实施例提供的蓝牙连接控制方法包括:Figure 3 is a schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application. As shown in Figure 3, the Bluetooth connection control method provided by the embodiment of the present application includes:

101,第一蓝牙设备开盒后,向第一电子设备发送BLE广播。BLE广播包含第一蓝牙设备的标识信息以及状态信息。101. After opening the box, the first Bluetooth device sends a BLE broadcast to the first electronic device. The BLE broadcast includes identification information and status information of the first Bluetooth device.

102,第一电子设备的第一蓝牙模块检测到第一蓝牙设备发送的BLE广播。102. The first Bluetooth module of the first electronic device detects the BLE broadcast sent by the first Bluetooth device.

103,第一蓝牙模块根据BLE广播携带的标识信息,确定第一蓝牙设备为历史蓝牙设备。103. The first Bluetooth module determines the first Bluetooth device as a historical Bluetooth device based on the identification information carried in the BLE broadcast.

104,第一蓝牙模块根据BLE广播携带的状态信息,确定第一蓝牙设备处于第一开盒状态,第一开盒状态表示开盒后时长小于设定阈值。104. The first Bluetooth module determines that the first Bluetooth device is in the first unboxing state based on the status information carried by the BLE broadcast. The first unboxing state indicates that the time after unboxing is less than the set threshold.

105,第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整。105. The first Bluetooth module determines to adjust the parameter information of the paging scan operation.

第一蓝牙设备可包括左右两个耳机。在实际执行场景中,第一蓝牙设备开盒后,需要先建立左右两个耳机之间的连接,该过程所需时长大约为300~500毫秒。左右耳机连接建立后,方可与周围处于可连接状态的第一电子设备建立蓝牙连接。需要说明的是,在左右两个耳机建立连接的过程中,第一蓝牙设备还并行执行如下业务,即,向第一电子设备发送BLE蓝牙广播。BLE蓝牙广播可用于通知第一电子设备第一蓝牙设备处于可连接状态。The first Bluetooth device may include two left and right earphones. In an actual execution scenario, after the first Bluetooth device is unboxed, it needs to establish a connection between the left and right earphones. This process takes about 300 to 500 milliseconds. After the connection between the left and right earphones is established, a Bluetooth connection can be established with the first electronic device in the surrounding connectable state. It should be noted that during the process of establishing a connection between the left and right earphones, the first Bluetooth device also performs the following services in parallel, that is, sending a BLE Bluetooth broadcast to the first electronic device. The BLE Bluetooth broadcast may be used to notify the first electronic device that the first Bluetooth device is in a connectable state.

基于上述现实场景,本申请实施例中,可在第一蓝牙设备发送的BLE蓝牙广播中,添加第一蓝牙设备的目标信息。进而,第一电子设备的第一蓝牙模块可利用第一蓝牙设备左右两个耳机之间建立连接的时间差,接收该BLE蓝牙广播,并基于BLE蓝牙广播中携带的目标信息,对第一蓝牙设备进行条件判断。Based on the above realistic scenario, in the embodiment of the present application, the target information of the first Bluetooth device can be added to the BLE Bluetooth broadcast sent by the first Bluetooth device. Furthermore, the first Bluetooth module of the first electronic device can use the time difference between the two earphones of the first Bluetooth device to establish a connection to receive the BLE Bluetooth broadcast, and based on the target information carried in the BLE Bluetooth broadcast, the first Bluetooth device Make conditional judgments.

当确定第一蓝牙设备满足第一条件之后,第一蓝牙模块可确定对寻呼扫描操作的参数信息进行调整。通过调整寻呼扫描操作的参数信息,可提高第一电子设备对第一蓝牙设备寻呼请求的响应速度,进而提升两者之间的蓝牙连接速度,改善用户体验。并且,可以理解的,上述接收蓝牙广播、进行条件判断的过程是利用第一蓝牙设备左右两个耳机之间建立连接的时间差执行的,因此可实现对同一时间段的复用,避免增加额外的耗时。After determining that the first Bluetooth device meets the first condition, the first Bluetooth module may determine to adjust the parameter information of the paging scan operation. By adjusting the parameter information of the paging scan operation, the response speed of the first electronic device to the paging request of the first Bluetooth device can be improved, thereby increasing the Bluetooth connection speed between the two and improving the user experience. Moreover, it can be understood that the above-mentioned process of receiving Bluetooth broadcasts and making condition judgments is performed by utilizing the time difference between the establishment of a connection between the left and right earphones of the first Bluetooth device. Therefore, the same time period can be reused and additional information can be avoided. time consuming.

下面对第一蓝牙模块判断第一蓝牙设备满足第一条件的方法进行详细说明。The method for the first Bluetooth module to determine that the first Bluetooth device meets the first condition will be described in detail below.

本申请实施例中,BLE蓝牙广播中携带的目标信息可包括第一蓝牙设备的标识信息以及状态信息。其中,标识信息可用于唯一标识蓝牙设备。状态信息可用于表征第一蓝牙设备的当前状态,包括第一开盒状态等。本申请实施例中,第一开盒状态指的是开盒后时长小于设定阈值的状态,可通俗理解为刚开盒状态。In this embodiment of the present application, the target information carried in the BLE Bluetooth broadcast may include the identification information and status information of the first Bluetooth device. Among them, the identification information can be used to uniquely identify the Bluetooth device. The status information can be used to characterize the current status of the first Bluetooth device, including the first unboxing status, etc. In the embodiment of the present application, the first box-opening state refers to the state in which the duration after opening the box is less than the set threshold, which can be generally understood as the just-opened box state.

基于此种实现方式,第一电子设备的第一蓝牙模块在接收到上述BLE蓝牙广播之后,首先,可读取其中携带的第一蓝牙设备的标识信息。Based on this implementation, after receiving the above-mentioned BLE Bluetooth broadcast, the first Bluetooth module of the first electronic device can first read the identification information of the first Bluetooth device carried therein.

在实际场景中,如图4所示,BLE蓝牙广播数据包Data可包括有效数据significant和无效数据non-significant两部分。其中,significant部分可进一步包含若干个广播数据单元AD Structure。每个AD Structure均可包括长度Length以及数据Data两部分。其中,Length用于表示本广播数据单元的长度。Data可进一步包含数据类型AD Type以及数据内容AD data两部分。In actual scenarios, as shown in Figure 4, the BLE Bluetooth broadcast data packet Data may include two parts: valid data significant and invalid data non-significant. Among them, the significant part may further include several broadcast data units AD Structure. Each AD Structure can include two parts: length and data. Among them, Length is used to indicate the length of this broadcast data unit. Data can further include two parts: data type AD Type and data content AD data.

基于上述场景,本申请实施例中,标识信息例如可添加于BLE蓝牙广播的包头位置,或者,标识信息还可添加于BLE蓝牙广播报文的第一目标字段AD Structure X。ADStructure X可以是第一蓝牙设备与第一电子设备预先协议的任意字段,例如可以是ADType为manufacturer specific的字段。manufacturer specific字段的AD data可以包括manufacturer ID以及additional data两部分,本申请实施例的标识信息例如可添加于additional data部分。Based on the above scenario, in the embodiment of the present application, the identification information can be added to the header position of the BLE Bluetooth broadcast, or the identification information can also be added to the first target field AD Structure X of the BLE Bluetooth broadcast message. ADStructure X may be any field pre-agreed between the first Bluetooth device and the first electronic device, for example, it may be a field whose ADType is manufacturer specific. The AD data of the manufacturer specific field may include two parts: manufacturer ID and additional data. For example, the identification information in the embodiment of the present application may be added to the additional data part.

进一步的,标识信息可以是任意一种能够唯一标识第一蓝牙设备的信息。一种可选的实现方式中,该标识信息可以是第一蓝牙设备的BLE蓝牙地址。另一种可选的实现方式中,该标识信息可以是第一蓝牙设备与第一电子设备预先协议的随机数序列。Further, the identification information may be any information that can uniquely identify the first Bluetooth device. In an optional implementation manner, the identification information may be the BLE Bluetooth address of the first Bluetooth device. In another optional implementation, the identification information may be a random number sequence pre-agreed between the first Bluetooth device and the first electronic device.

第一蓝牙模块可根据读取到的标识信息,判断第一蓝牙设备是否为历史蓝牙设备。历史蓝牙设备指的是,曾经与第一电子设备建立过蓝牙连接的蓝牙设备。The first Bluetooth module can determine whether the first Bluetooth device is a historical Bluetooth device based on the read identification information. Historical Bluetooth devices refer to Bluetooth devices that have established Bluetooth connections with the first electronic devices.

具体的,第一蓝牙模块中可存储历史蓝牙设备的参考标识信息。在读取到第一蓝牙设备的标识信息之后,可将该标识信息与历史蓝牙设备的参考标识信息进行比对。根据比对结果,如果比对结果一致,那么,可确定第一蓝牙设备为历史蓝牙设备。Specifically, the first Bluetooth module may store reference identification information of historical Bluetooth devices. After reading the identification information of the first Bluetooth device, the identification information can be compared with the reference identification information of the historical Bluetooth device. According to the comparison results, if the comparison results are consistent, it can be determined that the first Bluetooth device is a historical Bluetooth device.

以第一蓝牙设备的标识信息为BLE蓝牙地址为例进行说明。此时,历史蓝牙设备的参考标识信息可以为参考经典蓝牙地址。由于BLE蓝牙地址与经典蓝牙地址属于不同的蓝牙协议,二者之间无法直接进行比对。因此,本申请实施例中,第一蓝牙模块中可预先存储有地址映射关系。地址映射关系可用于规定BLE蓝牙地址与经典蓝牙地址的映射关系。该映射关系可由厂商自行协商设置,例如可设置为BLE蓝牙地址与经典蓝牙地址相同,或不同。This is explained by taking the identification information of the first Bluetooth device as the BLE Bluetooth address as an example. At this time, the reference identification information of the historical Bluetooth device may be the reference classic Bluetooth address. Since the BLE Bluetooth address and the classic Bluetooth address belong to different Bluetooth protocols, they cannot be directly compared. Therefore, in the embodiment of the present application, the address mapping relationship may be pre-stored in the first Bluetooth module. The address mapping relationship can be used to specify the mapping relationship between the BLE Bluetooth address and the classic Bluetooth address. This mapping relationship can be negotiated and set by the manufacturer. For example, it can be set so that the BLE Bluetooth address is the same as the classic Bluetooth address, or different.

基于上述,第一蓝牙模块可根据该预设的地址映射关系,确定与历史蓝牙设备的参考经典蓝牙地址对应的参考BLE蓝牙地址。进而,第一蓝牙模块可将该参考BLE蓝牙地址与第一蓝牙设备的BLE蓝牙地址进行比对。如果比对一致,那么,可确定第一蓝牙设备为历史蓝牙设备。Based on the above, the first Bluetooth module can determine the reference BLE Bluetooth address corresponding to the reference classic Bluetooth address of the historical Bluetooth device according to the preset address mapping relationship. Furthermore, the first Bluetooth module can compare the reference BLE Bluetooth address with the BLE Bluetooth address of the first Bluetooth device. If the comparison is consistent, the first Bluetooth device can be determined to be a historical Bluetooth device.

在第一蓝牙模块根据标识信息确定第一蓝牙设备为历史蓝牙设备的情况下,可认为第一蓝牙设备有较大的可能性与第一电子设备建立蓝牙连接。When the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device based on the identification information, it can be considered that the first Bluetooth device has a greater possibility of establishing a Bluetooth connection with the first electronic device.

然后,第一蓝牙模块可继续读取BLE蓝牙广播中携带的第一蓝牙设备的状态信息。Then, the first Bluetooth module can continue to read the status information of the first Bluetooth device carried in the BLE Bluetooth broadcast.

具体的,状态信息例如可设置于BLE蓝牙广播报文的第二目标字段。该第二目标字段可以是第一蓝牙设备与第一电子设备预先协议的任意字段。状态信息的具体数据内容、以及每种数据内容所表征的含义可由第一蓝牙设备与第一电子设备预先协议确定。Specifically, the status information may be set in the second target field of the BLE Bluetooth broadcast message, for example. The second target field may be any field pre-agreed between the first Bluetooth device and the first electronic device. The specific data content of the status information and the meaning represented by each data content may be determined by a pre-agreement between the first Bluetooth device and the first electronic device.

第一蓝牙模块可根据读取到的状态信息,判断第一蓝牙设备是否为处于第一开盒状态,即刚开盒状态。如果第一蓝牙设备处于刚开盒状态,那么,说明第一蓝牙设备有较大可能性正在连接第一电子设备。The first Bluetooth module can determine whether the first Bluetooth device is in the first unboxing state, that is, the just-unboxed state, based on the read status information. If the first Bluetooth device is in a newly opened state, it means that the first Bluetooth device is most likely to be connected to the first electronic device.

进而,确定第一蓝牙设备满足第一条件。Furthermore, it is determined that the first Bluetooth device meets the first condition.

确定第一蓝牙设备满足第一条件之后,进一步的,第一蓝牙模块可确定对寻呼扫描操作的参数信息进行调整。After determining that the first Bluetooth device meets the first condition, the first Bluetooth module may further determine to adjust the parameter information of the paging scan operation.

一种可能的实现方式中,寻呼扫描操作的参数信息可包括扫描速率。In a possible implementation, the parameter information of the paging scan operation may include a scan rate.

扫描速率可用于表征两次寻呼扫描操作的间隔时间大小。扫描速率越大,两次寻呼扫描操作之间的间隔越小,监听到寻呼请求的速度越快,但同时功耗也越大。基于此,当确定第一蓝牙设备满足第一条件后,第一蓝牙模块可确定将寻呼扫描操作的当前扫描速率调整为目标扫描速率。其中,目标扫描速率高于当前扫描速率。The scan rate can be used to characterize the time interval between two paging scan operations. The greater the scan rate, the smaller the interval between two paging scan operations, and the faster the paging request is detected, but at the same time, the power consumption is greater. Based on this, after determining that the first Bluetooth device meets the first condition, the first Bluetooth module may determine to adjust the current scan rate of the paging scan operation to the target scan rate. Among them, the target scan rate is higher than the current scan rate.

在实际执行场景中,根据现行蓝牙协议标准,扫描速率可包括R0、R1、R2等若干个档位。其中,档位R1还可包括Fast R1、Medium R1以及Slow R1多个档位。相应的,档位R2还可包括Fast R2以及Slow R2多个档位。每个档位均对应特定的扫描速率值。R0对应的扫描速率最大,R2对应的扫描速率最小。In actual execution scenarios, according to the current Bluetooth protocol standard, the scan rate can include several gears such as R0, R1, and R2. Among them, the gear R1 can also include multiple gears Fast R1, Medium R1 and Slow R1. Correspondingly, gear R2 may also include multiple gears Fast R2 and Slow R2. Each gear corresponds to a specific scan rate value. The scan rate corresponding to R0 is the largest, and the scan rate corresponding to R2 is the smallest.

基于上述,本申请实施例中,举例来说,如果当前扫描速率的档位为Medium R1,那么,调整后的目标扫描速率的档位可以是Fast R1。Based on the above, in the embodiment of the present application, for example, if the current scan rate is Medium R1, then the adjusted target scan rate may be Fast R1.

通过调整寻呼扫描操作的扫描速率,能够提升第一电子设备扫描到第一蓝牙设备的寻呼请求的速度,使第一电子设备能够更加快速地响应寻呼请求,从而提升第一蓝牙设备与第一电子设备之间的蓝牙连接速度。By adjusting the scanning rate of the paging scan operation, the speed at which the first electronic device scans the paging request from the first Bluetooth device can be increased, so that the first electronic device can respond to the paging request more quickly, thereby improving the communication between the first Bluetooth device and the first Bluetooth device. The first Bluetooth connection speed between electronic devices.

另一种可能的实现方式中,寻呼扫描操作的参数信息可包括业务优先级。In another possible implementation manner, the parameter information of the paging scan operation may include service priority.

对于第一电子设备,在同一时间段待执行的蓝牙业务可能有多个,例如可包括寻呼扫描、蓝牙数据传输等。在实际执行场景中,为使得多个蓝牙业务能够有序执行,通常可为不同的蓝牙业务设置不同的优先级,进而,可根据优先级由高至低的顺序依次执行各个蓝牙业务。基于此,本申请实施例中,当确定第一蓝牙设备满足第一条件之后,可将寻呼扫描操作的当前业务优先级调整为目标业务优先级。其中,目标业务优先级高于当前业务优先级。For the first electronic device, there may be multiple Bluetooth services to be executed in the same time period, which may include, for example, paging scanning, Bluetooth data transmission, etc. In actual execution scenarios, in order to enable multiple Bluetooth services to be executed in an orderly manner, different priorities can usually be set for different Bluetooth services. Furthermore, each Bluetooth service can be executed in order from high to low priority. Based on this, in the embodiment of the present application, after it is determined that the first Bluetooth device meets the first condition, the current service priority of the paging scan operation can be adjusted to the target service priority. Among them, the target business priority is higher than the current business priority.

通过调整业务优先级,可使得寻呼扫描操作相较于其他蓝牙业务优先执行,从而能够使第一电子设备更加快速地响应寻呼请求,提升第一电子设备与第一蓝牙设备之间的蓝牙连接速度。By adjusting the service priority, the paging scan operation can be executed with priority compared to other Bluetooth services, thereby enabling the first electronic device to respond to the paging request more quickly and improving the Bluetooth connection between the first electronic device and the first Bluetooth device. Connection speed.

再一种可能的实现方式中,寻呼扫描操作的参数信息可同时包括上述扫描速率以及业务优先级。在此种实现方式中,确定第一蓝牙设备满足第一条件后,第一电子设备的第一蓝牙模块可同时将寻呼扫描操作的当前扫描速率调整为目标扫描速率,以及,将寻呼扫描操作的当前业务优先级调整为目标业务优先级。In another possible implementation manner, the parameter information of the paging scan operation may include both the above-mentioned scanning rate and the service priority. In this implementation, after it is determined that the first Bluetooth device meets the first condition, the first Bluetooth module of the first electronic device can simultaneously adjust the current scanning rate of the paging scan operation to the target scanning rate, and adjust the paging scan operation to the target scanning rate. The current business priority of the operation is adjusted to the target business priority.

通过此种实现方式,可从两方面同时提升第一电子设备的寻呼响应速度,更加高效地提升第一电子设备与第一蓝牙设备之间的蓝牙连接速度。Through this implementation method, the paging response speed of the first electronic device can be improved simultaneously from two aspects, and the Bluetooth connection speed between the first electronic device and the first Bluetooth device can be improved more efficiently.

通过本申请实施例提供的技术方案,第一电子设备能够对第一蓝牙设备进行条件判断,当确定第一蓝牙设备为曾经连接过的历史蓝牙设备、且第一蓝牙设备处于刚开盒状态后,可确定对寻呼扫描操作的参数信息进行调整,从而可加快寻呼响应速度,进而提升蓝牙连接速度。并且,由于该参数调整操作是以第一蓝牙设备满足特定条件为前提的,因此可避免增加不必要的功耗,实现蓝牙连接速度以及功耗兼顾。Through the technical solutions provided by the embodiments of this application, the first electronic device can perform conditional judgment on the first Bluetooth device. When it is determined that the first Bluetooth device is a historical Bluetooth device that has been connected before, and the first Bluetooth device is in a newly opened state. , the parameter information of the paging scan operation can be determined to be adjusted, thereby speeding up the paging response speed and thus improving the Bluetooth connection speed. Moreover, since the parameter adjustment operation is based on the premise that the first Bluetooth device meets specific conditions, unnecessary increase in power consumption can be avoided and both Bluetooth connection speed and power consumption can be achieved.

本申请另一实施例中,为进一步提升方案的可靠性,除标识信息以及状态信息之外,第一蓝牙设备发送的BLE广播中还可添加第一蓝牙设备的待连接设备信息。In another embodiment of the present application, in order to further improve the reliability of the solution, in addition to the identification information and status information, the BLE broadcast sent by the first Bluetooth device can also be added with the device information to be connected of the first Bluetooth device.

在此种实现方式中,如图5所示,在执行上述步骤103之前,还可以包括:In this implementation, as shown in Figure 5, before executing the above step 103, it may also include:

1021,第一蓝牙模块根据BLE广播携带的待连接设备信息,确定第一电子设备为第一蓝牙设备的待连接设备。1021. The first Bluetooth module determines that the first electronic device is the device to be connected to the first Bluetooth device based on the device information to be connected carried in the BLE broadcast.

本申请实施例中,待连接设备信息例如可以是待连接设备的设备地址。待连接设备信息例如可以设置于BLE蓝牙广播报文的第三目标字段。该第三目标字段可以是第一蓝牙设备与第一电子设备预先协议的任意字段。In this embodiment of the present application, the information of the device to be connected may be, for example, the device address of the device to be connected. For example, the device information to be connected may be set in the third target field of the BLE Bluetooth broadcast message. The third target field may be any field pre-agreed between the first Bluetooth device and the first electronic device.

通过上述技术方案,可更加可靠地实现对第一蓝牙设备的判断,确保第一蓝牙设备正在连接的设备为第一电子设备,从而避免第一电子设备进行不必要的运算,节约运算资源。Through the above technical solution, the first Bluetooth device can be determined more reliably, ensuring that the device being connected to the first Bluetooth device is the first electronic device, thereby preventing the first electronic device from performing unnecessary calculations and saving computing resources.

本申请另一实施例中,除了第一蓝牙模块,第一电子设备还可包括第二蓝牙模块。本申请实施例中,以第一蓝牙模块为蓝牙芯片、第二蓝牙模块为中央处理器为例,对本申请提供的蓝牙连接控制方法进行说明。In another embodiment of the present application, in addition to the first Bluetooth module, the first electronic device may also include a second Bluetooth module. In the embodiment of this application, the first Bluetooth module is a Bluetooth chip and the second Bluetooth module is a central processing unit as an example to describe the Bluetooth connection control method provided by this application.

图6是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图。如图6所示,本申请实施例提供的蓝牙连接控制方法可以包括:Figure 6 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application. As shown in Figure 6, the Bluetooth connection control method provided by the embodiment of the present application may include:

201,蓝牙芯片获取历史蓝牙设备的参考标识信息。201. The Bluetooth chip obtains the reference identification information of the historical Bluetooth device.

本申请实施例中,第一电子设备的中央处理器中可检测第一电子设备的蓝牙功能是否开启。响应于蓝牙功能开启,中央处理器可根据历史蓝牙连接记录,获取第一电子设备曾连接过的历史蓝牙设备的参考标识信息。然后,中央处理器可将历史蓝牙设备的参考标识信息发送给蓝牙芯片。In this embodiment of the present application, the central processor of the first electronic device can detect whether the Bluetooth function of the first electronic device is turned on. In response to the Bluetooth function being turned on, the central processor may obtain reference identification information of historical Bluetooth devices that the first electronic device has been connected to based on historical Bluetooth connection records. Then, the central processor can send the reference identification information of the historical Bluetooth device to the Bluetooth chip.

202,第一蓝牙设备开盒后,向第一电子设备发送BLE广播。BLE广播包含第一蓝牙设备的标识信息以及状态信息。202. After opening the box, the first Bluetooth device sends a BLE broadcast to the first electronic device. The BLE broadcast includes identification information and status information of the first Bluetooth device.

203,蓝牙芯片检测到第一蓝牙设备发送的BLE广播。203. The Bluetooth chip detects the BLE broadcast sent by the first Bluetooth device.

204,蓝牙芯片将BLE广播携带的标识信息与历史蓝牙设备的参考标识信息进行比对。204. The Bluetooth chip compares the identification information carried in the BLE broadcast with the reference identification information of historical Bluetooth devices.

205,蓝牙芯片根据比对结果,确定第一蓝牙设备为历史蓝牙设备。205. The Bluetooth chip determines that the first Bluetooth device is a historical Bluetooth device based on the comparison result.

206,蓝牙芯片根据BLE广播携带的状态信息,确定第一蓝牙设备处于第一开盒状态,第一开盒状态表示开盒后时长小于设定阈值。206. The Bluetooth chip determines that the first Bluetooth device is in the first unboxing state based on the status information carried by the BLE broadcast. The first unboxing state indicates that the time after unboxing is less than the set threshold.

207,蓝牙芯片确定对寻呼扫描操作的参数信息进行调整。207. The Bluetooth chip determines to adjust the parameter information of the paging scan operation.

具体的,蓝牙芯片可将寻呼扫描操作的当前扫描速率调整为目标扫描速率,以及,将寻呼扫描操作的当前业务优先级调整为目标业务优先级。其中,目标扫描速率高于当前扫描速率,目标业务优先级高于当前业务优先级。Specifically, the Bluetooth chip can adjust the current scanning rate of the paging scanning operation to the target scanning rate, and adjust the current business priority of the paging scanning operation to the target business priority. Among them, the target scanning rate is higher than the current scanning rate, and the target service priority is higher than the current service priority.

通过上述方案,第一电子设备可在确定第一蓝牙设备为历史蓝牙设备、且处于刚开盒状态时,对寻呼扫描操作的参数信息进行调整,从而提升蓝牙连接速度。并且,上述技术方案主要执行于第一电子设备的蓝牙芯片,避免了对中央处理器的资源占用,处理效率更高。Through the above solution, when the first electronic device determines that the first Bluetooth device is a historical Bluetooth device and is in a newly opened state, it can adjust the parameter information of the paging scan operation, thereby improving the Bluetooth connection speed. Moreover, the above technical solution is mainly executed on the Bluetooth chip of the first electronic device, which avoids occupying resources of the central processor and results in higher processing efficiency.

本申请另一实施例中,以第一蓝牙模块为中央处理器、第二蓝牙模块为蓝牙芯片为例,对本申请提供的蓝牙连接控制方法进行说明。In another embodiment of the present application, the Bluetooth connection control method provided by the present application is explained by taking the first Bluetooth module as a central processor and the second Bluetooth module as a Bluetooth chip as an example.

图7是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图。如图7所示,本申请实施例提供的蓝牙连接控制方法可以包括:Figure 7 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application. As shown in Figure 7, the Bluetooth connection control method provided by the embodiment of the present application may include:

301,中央处理器获取历史蓝牙设备的参考标识信息。301. The central processor obtains the reference identification information of historical Bluetooth devices.

本申请实施例中,第一电子设备的中央处理器中可检测第一电子设备的蓝牙功能是否开启。响应于蓝牙功能开启,中央处理器可根据历史蓝牙连接记录,获取第一电子设备曾连接过的历史蓝牙设备的参考标识信息。In this embodiment of the present application, the central processor of the first electronic device can detect whether the Bluetooth function of the first electronic device is turned on. In response to the Bluetooth function being turned on, the central processor may obtain reference identification information of historical Bluetooth devices that the first electronic device has been connected to based on historical Bluetooth connection records.

302,第一蓝牙设备开盒后,向第一电子设备发送BLE广播。BLE广播包含第一蓝牙设备的标识信息以及状态信息。302. After opening the box, the first Bluetooth device sends a BLE broadcast to the first electronic device. The BLE broadcast includes identification information and status information of the first Bluetooth device.

303,中央处理器检测到第一蓝牙设备发送的BLE广播。303. The central processor detects the BLE broadcast sent by the first Bluetooth device.

304,中央处理器将BLE广播携带的标识信息与历史蓝牙设备的参考标识信息进行比对。304. The central processor compares the identification information carried in the BLE broadcast with the reference identification information of historical Bluetooth devices.

305,中央处理器根据比对结果,确定第一蓝牙设备为历史蓝牙设备。305. The central processor determines that the first Bluetooth device is a historical Bluetooth device based on the comparison result.

306,中央处理器根据BLE广播携带的状态信息,确定第一蓝牙设备处于第一开盒状态,第一开盒状态表示开盒后时长小于设定阈值。306. The central processor determines that the first Bluetooth device is in the first unboxing state based on the status information carried by the BLE broadcast. The first unboxing state indicates that the time after unboxing is less than the set threshold.

307,中央处理器生成第一参数调节指令,第一参数调节指令包含目标参数信息。307. The central processor generates a first parameter adjustment instruction, where the first parameter adjustment instruction includes target parameter information.

一种可能的实现方式中,第一参数调节指令具体可以是蓝牙协议中规定的HCI_Write_Page_-Scan_Activity命令。目标参数信息可包括目标扫描速率以及目标业务优先级。其中,目标扫描速率高于寻呼扫描操作的当前扫描速率,目标业务优先级高于寻呼扫描操作的当前业务优先级。In a possible implementation, the first parameter adjustment instruction may specifically be the HCI_Write_Page_-Scan_Activity command specified in the Bluetooth protocol. The target parameter information may include target scanning rate and target service priority. The target scanning rate is higher than the current scanning rate of the paging scanning operation, and the target service priority is higher than the current service priority of the paging scanning operation.

308,中央处理器将第一参数调节指令发送给蓝牙芯片。308. The central processor sends the first parameter adjustment instruction to the Bluetooth chip.

309,蓝牙芯片接收第一参数调节指令。309. The Bluetooth chip receives the first parameter adjustment instruction.

310,蓝牙芯片根据第一参数调节指令,将寻呼扫描操作的当前参数信息调整为目标参数信息。310. The Bluetooth chip adjusts the current parameter information of the paging scan operation to the target parameter information according to the first parameter adjustment instruction.

通过上述方案,第一电子设备可在确定第一蓝牙设备为历史蓝牙设备、且处于刚开盒状态时,对寻呼扫描操作的参数信息进行调整,从而提升蓝牙连接速度。并且,上述技术方案可执行于第一电子设备的中央处理器,无需对更多硬件进行复杂配置。Through the above solution, when the first electronic device determines that the first Bluetooth device is a historical Bluetooth device and is in a newly opened state, it can adjust the parameter information of the paging scan operation, thereby improving the Bluetooth connection speed. Moreover, the above technical solution can be executed on the central processor of the first electronic device without the need for complicated configuration of more hardware.

图8是本申请实施例提供的蓝牙连接控制方法的另一个示意性流程图。如图8所示,本申请实施例提供的蓝牙连接控制方法可以包括:Figure 8 is another schematic flow chart of the Bluetooth connection control method provided by the embodiment of the present application. As shown in Figure 8, the Bluetooth connection control method provided by the embodiment of the present application may include:

401,第一蓝牙设备开盒后,向第一电子设备发送BLE广播。BLE广播包含第一蓝牙设备的标识信息以及状态信息。401. After opening the box, the first Bluetooth device sends a BLE broadcast to the first electronic device. The BLE broadcast includes identification information and status information of the first Bluetooth device.

402,第一电子设备的第一蓝牙模块检测到第一蓝牙设备发送的BLE广播。402. The first Bluetooth module of the first electronic device detects the BLE broadcast sent by the first Bluetooth device.

403,第一蓝牙模块读取第一标志位。403. The first Bluetooth module reads the first flag bit.

404,第一蓝牙模块根据第一标志位,确定寻呼扫描操作的参数信息是否处于可调状态。如果是,执行步骤405,否则,执行步骤411。404. The first Bluetooth module determines whether the parameter information of the paging scan operation is in an adjustable state according to the first flag bit. If yes, perform step 405; otherwise, perform step 411.

本申请实施例中,第一电子设备中可设置第一标志位flag。第一标志位flag可设置为不同的值,不同的值可用于表征寻呼扫描操作的参数信息的不同状态。In this embodiment of the present application, the first flag bit flag may be set in the first electronic device. The first flag bit flag can be set to different values, and different values can be used to represent different states of parameter information of the paging scan operation.

示例性的,第一标志位flag的取值可包括第一目标值以及第二目标值。第一目标值例如可用于表征寻呼扫描操作的参数信息处于可调状态,第二目标值例如可用于表征寻呼扫描操作的参数信息处于不可调状态。For example, the value of the first flag flag may include a first target value and a second target value. The first target value, for example, can be used to characterize that the parameter information of the paging scan operation is in an adjustable state, and the second target value, for example, can be used to characterize that the parameter information of the paging scan operation is in an unadjustable state.

一种可能的实现方式中,上述第一目标值例如可以为1,第二目标值例如可以为0。本申请对此不做限制。In a possible implementation manner, the first target value may be, for example, 1, and the second target value may be, for example, 0. This application does not limit this.

第一蓝牙模块在检测到第一蓝牙设备发送的BLE广播之后,可先读取第一标志位flag,并根据第一标志位flag,确定寻呼扫描操作的参数信息是否处于可调状态。在确定处于可调状态的情况下,第一蓝牙模块可进一步执行后续流程,对BLE广播携带的标识信息以及状态信息进行判断。否则,第一蓝牙模块可直接结束当前方法流程。After detecting the BLE broadcast sent by the first Bluetooth device, the first Bluetooth module may first read the first flag flag, and determine whether the parameter information of the paging scan operation is in an adjustable state according to the first flag flag. If it is determined to be in the adjustable state, the first Bluetooth module can further perform subsequent processes to determine the identification information and status information carried by the BLE broadcast. Otherwise, the first Bluetooth module can directly end the current method flow.

405,第一蓝牙模块根据BLE广播携带的标识信息,确定第一蓝牙设备是否为历史蓝牙设备。如果是,执行步骤406,否则,执行步骤411。405. The first Bluetooth module determines whether the first Bluetooth device is a historical Bluetooth device based on the identification information carried in the BLE broadcast. If yes, perform step 406; otherwise, perform step 411.

406,第一蓝牙模块根据BLE广播携带的状态信息,确定第一蓝牙设备是否处于第一开盒状态,第一开盒状态表示开盒后时长小于设定阈值。如果是,执行步骤407,否则,执行步骤411。406. The first Bluetooth module determines whether the first Bluetooth device is in the first unboxing state based on the status information carried by the BLE broadcast. The first unboxing state indicates that the time after unboxing is less than the set threshold. If yes, execute step 407; otherwise, execute step 411.

407,第一蓝牙模块确定对寻呼扫描操作的参数信息进行调整。407. The first Bluetooth module determines to adjust the parameter information of the paging scan operation.

408,第一蓝牙模块确定预设时间段内是否检测到第一蓝牙设备的蓝牙连接请求。如果是,执行步骤409,否则,执行步骤410。408. The first Bluetooth module determines whether a Bluetooth connection request from the first Bluetooth device is detected within the preset time period. If yes, perform step 409; otherwise, perform step 410.

409,第一蓝牙模块恢复寻呼扫描操作的参数信息。409. The first Bluetooth module restores the parameter information of the paging scan operation.

410,第一蓝牙模块恢复寻呼扫描操作的参数信息,并将第一标志位更改为第二目标值,第二目标值用于指示参数信息处于不可调状态。410. The first Bluetooth module restores the parameter information of the paging scan operation, and changes the first flag bit to the second target value. The second target value is used to indicate that the parameter information is in an unadjustable state.

考虑到提升寻呼扫描操作的扫描速率等参数信息会增加功耗,因此,本申请实施例中,为避免不必要的功耗开销,可预先设置一时间段,该预设时间段的取值可用于规定将寻呼扫描操作的参数信息调整为目标参数信息后,目标参数信息的最大维持时长。Considering that increasing the scanning rate and other parameter information of the paging scan operation will increase power consumption, in the embodiment of the present application, in order to avoid unnecessary power consumption overhead, a time period can be preset, and the value of the preset time period It can be used to specify the maximum maintenance time of the target parameter information after adjusting the parameter information of the paging scan operation to the target parameter information.

第一蓝牙模块在完成对寻呼扫描操作参数信息的调整之后,可确定预设时间段内是否检测到第一蓝牙设备的蓝牙连接请求。该预设时间段的取值可根据实际场景灵活设置,例如可以是10S。After completing the adjustment of the paging scan operation parameter information, the first Bluetooth module may determine whether a Bluetooth connection request from the first Bluetooth device is detected within a preset time period. The value of the preset time period can be flexibly set according to the actual scenario, for example, it can be 10 seconds.

如果确定在预设时间段内检测到第一蓝牙设备的蓝牙连接请求,那么,可完成与第一蓝牙设备之间的蓝牙连接,确认此次蓝牙连接流程结束。此时,为避免增加功耗,第一蓝牙模块可恢复寻呼扫描操作的参数信息,将该参数信息调整回原值。If it is determined that the Bluetooth connection request of the first Bluetooth device is detected within the preset time period, then the Bluetooth connection with the first Bluetooth device can be completed, and the end of the Bluetooth connection process is confirmed. At this time, in order to avoid increasing power consumption, the first Bluetooth module can restore the parameter information of the paging scan operation and adjust the parameter information back to the original value.

相反的,如果确定在预设时间段内未检测到第一蓝牙设备的蓝牙连接请求,那么,可确定第一蓝牙设备当前没有与第一电子设备的蓝牙连接需求。此时,为避免增加功耗,第一蓝牙模块也可恢复寻呼扫描操作的参数信息,将该参数信息调整回原值。On the contrary, if it is determined that the Bluetooth connection request of the first Bluetooth device is not detected within the preset time period, then it can be determined that the first Bluetooth device currently has no Bluetooth connection requirement with the first electronic device. At this time, in order to avoid increasing power consumption, the first Bluetooth module can also restore the parameter information of the paging scan operation and adjust the parameter information back to the original value.

进一步的,对于上述在预设时间段内未检测到第一蓝牙设备的蓝牙连接请求的情况,第一蓝牙模块在恢复寻呼扫描操作的参数信息之后,还可将第一标志位更改为第二目标值。通过此项技术手段,可实现对寻呼扫描操作的参数信息的“锁定”,使之处于不可调状态。那么,当第一电子设备再次接收到第一蓝牙设备的BLE广播之后,可根据第一标志位结束当前方法流程,而不再对其中包含的标识信息以及状态信息等进行判断,从而避免了不必要的运算,节约了运算资源和功耗。Further, for the above-mentioned situation where the Bluetooth connection request of the first Bluetooth device is not detected within the preset time period, the first Bluetooth module can also change the first flag bit to the third flag after restoring the parameter information of the paging scan operation. Two target values. Through this technical means, the parameter information of the paging scan operation can be "locked" so that it is in an unadjustable state. Then, when the first electronic device receives the BLE broadcast of the first Bluetooth device again, it can end the current method process according to the first flag bit and no longer judge the identification information and status information contained therein, thereby avoiding unnecessary errors. Necessary calculations save computing resources and power consumption.

更进一步的,承接上述流程,第一蓝牙模块将第一标志位更改为第二目标值之后,可启动计时,确定计时时长超过设定阈值之后,可将第一标志位更改回第一目标值,实现对寻呼扫描操的参数信息的“解锁”。此后,当第一电子设备再次接收到第一蓝牙设备的BLE广播之后,可正常执行本申请的方法流程,对BLE广播中包含的标识信息以及状态信息等进行判断。其中,该设定阈值的取值可灵活设置,例如可以是30分钟。从而,可避免影响第一电子设备与第一蓝牙设备之间的正常蓝牙连接。Furthermore, following the above process, after the first Bluetooth module changes the first flag bit to the second target value, it can start the timing. After determining that the timing duration exceeds the set threshold, it can change the first flag bit back to the first target value. , to realize the "unlocking" of the parameter information of the paging scan operation. Thereafter, when the first electronic device receives the BLE broadcast of the first Bluetooth device again, it can normally execute the method flow of the present application and judge the identification information and status information contained in the BLE broadcast. The value of the set threshold can be set flexibly, for example, it can be 30 minutes. Therefore, affecting the normal Bluetooth connection between the first electronic device and the first Bluetooth device can be avoided.

步骤411,结束当前流程。Step 411, end the current process.

上述技术方案中,可通过设置第一标志位,实现对寻呼扫描操作的参数信息的“锁定”以及“解锁”。通过上述技术方案,可避免第一电子设备在特定场景下(如用户无意识地对第一蓝牙设备进行频繁开关盒的场景)频繁响应第一蓝牙设备的BLE广播、频繁调整寻呼扫描操作的参数信息,避免了对运算资源和功耗的浪费。In the above technical solution, "locking" and "unlocking" of the parameter information of the paging scan operation can be achieved by setting the first flag bit. Through the above technical solution, it is possible to prevent the first electronic device from frequently responding to the BLE broadcast of the first Bluetooth device and frequently adjusting the parameters of the paging scan operation in certain scenarios (such as the scenario where the user unconsciously frequently switches the box on and off the first Bluetooth device). information, avoiding waste of computing resources and power consumption.

图9是本申请实施例提供的蓝牙连接控制系统的一种结构示意图。如图9所示,本申请实施例提供的蓝牙连接控制系统800可包括第一蓝牙设备801以及第一电子设备802。其中,第一蓝牙设备801可向第一电子设备802发送BLE广播。第一电子设备802在接收到BLE广播后,可触发执行本申请提供的蓝牙连接控制方法。Figure 9 is a schematic structural diagram of a Bluetooth connection control system provided by an embodiment of the present application. As shown in FIG. 9 , the Bluetooth connection control system 800 provided by the embodiment of the present application may include a first Bluetooth device 801 and a first electronic device 802 . Among them, the first Bluetooth device 801 can send a BLE broadcast to the first electronic device 802. After receiving the BLE broadcast, the first electronic device 802 can trigger execution of the Bluetooth connection control method provided by this application.

本申请另一实施例中,可提供了一种电子设备。可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的步骤,本申请能够以硬件或者硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能。In another embodiment of the present application, an electronic device may be provided. It can be understood that, in order to implement the above functions, the electronic device includes corresponding hardware and/or software modules that perform each function. In conjunction with the steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions in conjunction with the embodiments for each specific application.

本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或者两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。This embodiment can divide the electronic device into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. In actual implementation, there may be other division methods.

在采用对应各个功能划分各个功能模块的情况下,图10示出了上述实施例中涉及的电子设备的一种可能的组成示意图,如图10所示,该电子设备600可以包括:第一蓝牙模块601以及第二蓝牙模块602。其中:In the case of dividing each functional module corresponding to each function, Figure 10 shows a possible composition diagram of the electronic device involved in the above embodiment. As shown in Figure 10, the electronic device 600 may include: a first Bluetooth module 601 and the second Bluetooth module 602. in:

第一蓝牙模块601用于,检测到第一蓝牙设备发送的低功耗蓝牙BLE广播,BLE广播包含所述第一蓝牙设备的标识信息以及状态信息;根据标识信息,确定第一蓝牙设备为历史蓝牙设备,以及,根据状态信息,确定第一蓝牙设备处于第一开盒状态;第一开盒状态表示开盒后时长小于设定阈值;确定对寻呼扫描操作的参数信息进行调整;其中,第一蓝牙模块601为蓝牙芯片,或者,第一蓝牙模块601为中央处理器。The first Bluetooth module 601 is configured to detect the low-power Bluetooth BLE broadcast sent by the first Bluetooth device. The BLE broadcast contains the identification information and status information of the first Bluetooth device; and determine the first Bluetooth device as a historical device based on the identification information. The Bluetooth device, and, based on the status information, determine that the first Bluetooth device is in the first unboxing state; the first unboxing state indicates that the time after unboxing is less than the set threshold; determine to adjust the parameter information of the paging scan operation; wherein, The first Bluetooth module 601 is a Bluetooth chip, or the first Bluetooth module 601 is a central processing unit.

在一种可能的实现方式中,第一蓝牙模块601具体用于,将标识信息与历史蓝牙设备的参考标识信息进行比对;根据比对结果,确定第一蓝牙设备为历史蓝牙设备。In a possible implementation, the first Bluetooth module 601 is specifically configured to compare the identification information with the reference identification information of the historical Bluetooth device; and determine the first Bluetooth device as the historical Bluetooth device according to the comparison result.

在一种可能的实现方式中,标识信息包括BLE蓝牙地址;参考标识信息包括参考经典蓝牙地址。In a possible implementation, the identification information includes a BLE Bluetooth address; the reference identification information includes a reference to the classic Bluetooth address.

在一种可能的实现方式中,第一蓝牙模块601具体用于,根据预设的地址映射关系,确定与参考经典蓝牙地址对应的参考BLE蓝牙地址;将参考BLE蓝牙地址与BLE蓝牙地址进行比对。In a possible implementation, the first Bluetooth module 601 is specifically configured to determine a reference BLE Bluetooth address corresponding to the reference classic Bluetooth address according to a preset address mapping relationship; compare the reference BLE Bluetooth address with the BLE Bluetooth address. right.

在一种可能的实现方式中,将标识信息与历史蓝牙设备的参考标识信息进行比对之前,第一蓝牙模块601还用于:获取历史蓝牙设备的参考标识信息。In a possible implementation, before comparing the identification information with the reference identification information of the historical Bluetooth device, the first Bluetooth module 601 is further configured to: obtain the reference identification information of the historical Bluetooth device.

在一种可能的实现方式中,电子设备600还包括第二蓝牙模块602,第二蓝牙模块602为中央处理器,第一蓝牙模块601为蓝牙芯片;蓝牙芯片具体用于:接收中央处理器发送的历史蓝牙设备的参考标识信息。In a possible implementation, the electronic device 600 also includes a second Bluetooth module 602. The second Bluetooth module 602 is a central processor, and the first Bluetooth module 601 is a Bluetooth chip. The Bluetooth chip is specifically used to: receive signals sent by the central processor. Reference identification information for historical Bluetooth devices.

在一种可能的实现方式中,第二蓝牙模块602为蓝牙芯片,第一蓝牙模块601为中央处理器;中央处理器具体用于:根据历史蓝牙连接记录,确定历史蓝牙设备的参考标识信息。In a possible implementation, the second Bluetooth module 602 is a Bluetooth chip, and the first Bluetooth module 601 is a central processing unit; the central processing unit is specifically configured to determine reference identification information of historical Bluetooth devices based on historical Bluetooth connection records.

在一种可能的实现方式中,参数信息包括扫描速率以及业务优先级;第一蓝牙模块601具体用于:确定将寻呼扫描操作的当前扫描速率调整为目标扫描速率,目标扫描速率高于当前扫描速率;和/或,确定将寻呼扫描操作的当前业务优先级调整为目标业务优先级,目标业务优先级高于当前业务优先级。In a possible implementation, the parameter information includes scan rate and service priority; the first Bluetooth module 601 is specifically configured to: determine to adjust the current scan rate of the paging scan operation to the target scan rate, and the target scan rate is higher than the current scan rate. Scan rate; and/or, determine to adjust the current service priority of the paging scan operation to the target service priority, and the target service priority is higher than the current service priority.

在一种可能的实现方式中,第一蓝牙模块601为中央处理器,第二蓝牙模块602为蓝牙芯片;中央处理器具体用于:生成第一参数调节指令,第一参数调节指令包含目标参数信息;将第一参数调节指令发送给蓝牙芯片。In a possible implementation, the first Bluetooth module 601 is a central processor, and the second Bluetooth module 602 is a Bluetooth chip; the central processor is specifically used to: generate a first parameter adjustment instruction, and the first parameter adjustment instruction includes the target parameter. Information; send the first parameter adjustment instruction to the Bluetooth chip.

在一种可能的实现方式中,蓝牙芯片用于,接收第一参数调节指令;根据第一参数调节指令,将寻呼扫描操作的当前参数信息调整为目标参数信息。In a possible implementation, the Bluetooth chip is configured to receive a first parameter adjustment instruction; and adjust the current parameter information of the paging scan operation to the target parameter information according to the first parameter adjustment instruction.

在一种可能的实现方式中,检测到第一蓝牙设备发送的BLE广播之后,第一蓝牙模块601还用于:读取第一标志位;检测到第一标志位为第一目标值,确定寻呼扫描操作的参数信息处于可调状态。In a possible implementation, after detecting the BLE broadcast sent by the first Bluetooth device, the first Bluetooth module 601 is also configured to: read the first flag bit; detect that the first flag bit is the first target value, determine The parameter information of the paging scan operation is in an adjustable state.

在一种可能的实现方式中,确定对寻呼扫描操作的参数信息进行调整之后,第一蓝牙模块601还用于:在预设时间段内检测到第一蓝牙设备的蓝牙连接请求,或者,未检测到第一蓝牙设备的蓝牙连接请求;恢复寻呼扫描操作的参数信息。In a possible implementation, after determining to adjust the parameter information of the paging scan operation, the first Bluetooth module 601 is further configured to: detect a Bluetooth connection request from the first Bluetooth device within a preset time period, or, The Bluetooth connection request of the first Bluetooth device is not detected; parameter information of the paging scan operation is restored.

在一种可能的实现方式中,在预设时间段内未检测到第一蓝牙设备的蓝牙连接请求的情况下,恢复寻呼扫描操作的参数信息之后,第一蓝牙模块601还用于:将第一标志位更改为第二目标值,第二目标值用于指示参数信息处于不可调状态。In a possible implementation, when the Bluetooth connection request of the first Bluetooth device is not detected within the preset time period, after restoring the parameter information of the paging scan operation, the first Bluetooth module 601 is also used to: The first flag bit is changed to a second target value, and the second target value is used to indicate that the parameter information is in an unadjustable state.

通过上述技术方案,电子设备600能够对第一蓝牙设备进行条件判断,当确定第一蓝牙设备为曾经连接过的历史蓝牙设备、且第一蓝牙设备处于刚开盒状态后,可确定对寻呼扫描操作的参数信息进行调整,从而可加快寻呼响应速度,进而提升蓝牙连接速度。并且,由于该参数调整操作是以第一蓝牙设备满足特定条件为前提的,因此可避免增加不必要的功耗,实现蓝牙连接速度以及功耗兼顾。Through the above technical solution, the electronic device 600 can perform conditional judgment on the first Bluetooth device. When it is determined that the first Bluetooth device is a historical Bluetooth device that has been connected before, and the first Bluetooth device is in the state of just opening the box, it can determine the paging request. The parameter information of the scanning operation is adjusted to speed up the paging response speed and thereby improve the Bluetooth connection speed. Moreover, since the parameter adjustment operation is based on the premise that the first Bluetooth device meets specific conditions, unnecessary increase in power consumption can be avoided and both Bluetooth connection speed and power consumption can be achieved.

应理解,这里的电子设备以功能单元的形式体现。这里的术语“单元”可以通过软件和/或硬件形式实现,对此不作具体限定。例如,“单元”可以是实现上述功能的软件程序、硬件电路或二者结合。所述硬件电路可能包括应用特有集成电路(application specificintegrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。It should be understood that the electronic equipment here is embodied in the form of functional units. The term "unit" here can be implemented in the form of software and/or hardware, and is not specifically limited. For example, a "unit" may be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor or a group processor) for executing one or more software or firmware programs, etc. ) and memory, merged logic, and/or other suitable components to support the described functionality.

本申请还提供了一种电子设备,所述设备包括存储介质和中央处理器,所述存储介质可以是非易失性存储介质,所述存储介质中存储有计算机可执行程序,所述中央处理器与所述非易失性存储介质连接,并执行所述计算机可执行程序以实现上述蓝牙连接控制方法。This application also provides an electronic device. The device includes a storage medium and a central processing unit. The storage medium may be a non-volatile storage medium. Computer executable programs are stored in the storage medium. The central processing unit Connect to the non-volatile storage medium, and execute the computer executable program to implement the above Bluetooth connection control method.

本申请还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行本申请蓝牙连接控制方法的各个步骤。This application also provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are run on a computer, they cause the computer to execute each step of the Bluetooth connection control method of this application.

本申请还提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机或任一至少一种处理器上运行时,使得计算机执行本申请蓝牙连接控制方法的各个步骤。This application also provides a computer program product containing instructions. When the computer program product is run on a computer or at least one processor, it causes the computer to execute each step of the Bluetooth connection control method of this application.

本申请还提供一种芯片,包括处理器与数据接口,所述处理器通过所述数据接口读取存储器上存储的指令,以执行本申请提供的蓝牙连接控制方法执行的相应操作和/或流程。This application also provides a chip, including a processor and a data interface. The processor reads instructions stored in the memory through the data interface to execute corresponding operations and/or processes performed by the Bluetooth connection control method provided by this application. .

可选地,该芯片还包括存储器,该存储器与该处理器通过电路或电线与存储器连接,处理器用于读取并执行该存储器中的计算机程序。进一步可选地,该芯片还包括通信接口,处理器与该通信接口连接。通信接口用于接收需要处理的数据和/或信息,处理器从该通信接口获取该数据和/或信息,并对该数据和/或信息进行处理。该通信接口可以是输入输出接口。Optionally, the chip further includes a memory, which is connected to the processor through circuits or wires, and the processor is used to read and execute the computer program in the memory. Further optionally, the chip also includes a communication interface, and the processor is connected to the communication interface. The communication interface is used to receive data and/or information that needs to be processed. The processor obtains the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface.

存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electricallyerasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质等。The memory may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), or other types that can store information and instructions. Dynamic storage devices can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including Compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage device, or can also be used to carry or store the desired program code in the form of instructions or data structures and can be used by Any other media accessed by the computer, etc.

本申请实施例中,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiment of this application, "and/or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean that A exists alone, A and B exist simultaneously, and B exists alone. Condition. Where A and B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. "At least one of the following" and similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c can be single or multiple.

本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that each unit and algorithm step described in the embodiments disclosed herein can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.

在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program code. .

以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and they should be covered by the protection scope of the present application. The protection scope of this application shall be subject to the protection scope of the claims.

Claims (17)

CN202210630679.7A2022-06-062022-06-06Bluetooth connection control method, system and equipmentActiveCN116056051B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210630679.7ACN116056051B (en)2022-06-062022-06-06Bluetooth connection control method, system and equipment

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210630679.7ACN116056051B (en)2022-06-062022-06-06Bluetooth connection control method, system and equipment

Publications (2)

Publication NumberPublication Date
CN116056051A CN116056051A (en)2023-05-02
CN116056051Btrue CN116056051B (en)2023-10-27

Family

ID=86127807

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210630679.7AActiveCN116056051B (en)2022-06-062022-06-06Bluetooth connection control method, system and equipment

Country Status (1)

CountryLink
CN (1)CN116056051B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN119233437A (en)*2023-06-282024-12-31荣耀终端有限公司Bluetooth hearing aid connection method, electronic equipment and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106102129A (en)*2016-05-232016-11-09深圳Tcl数字技术有限公司Connect the method and device of bluetooth equipment
WO2021027666A1 (en)*2019-08-142021-02-18华为技术有限公司Bluetooth reconnection method and related apparatus
CN112449332A (en)*2019-08-302021-03-05华为技术有限公司Bluetooth connection method and electronic equipment
CN112469014A (en)*2019-09-062021-03-09华为技术有限公司Method and electronic equipment for configuring Bluetooth connection parameters
CN112640505A (en)*2018-12-222021-04-09华为技术有限公司Transmission rate control method and equipment
CN113038437A (en)*2019-12-252021-06-25Oppo广东移动通信有限公司Data transmission method, device, storage medium and terminal equipment
CN113923641A (en)*2021-12-072022-01-11荣耀终端有限公司Connection method and device
CN114079893A (en)*2020-08-132022-02-22华为技术有限公司 Bluetooth communication method, terminal device and computer-readable storage medium
CN114339696A (en)*2020-09-302022-04-12华为技术有限公司Bluetooth communication system, Bluetooth connection method, electronic device, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20070047506A1 (en)*2005-08-312007-03-01Froehling Timothy PMethods and devices for dynamically adjusting page scan intervals of bluetooth enabled devices

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106102129A (en)*2016-05-232016-11-09深圳Tcl数字技术有限公司Connect the method and device of bluetooth equipment
CN112640505A (en)*2018-12-222021-04-09华为技术有限公司Transmission rate control method and equipment
WO2021027666A1 (en)*2019-08-142021-02-18华为技术有限公司Bluetooth reconnection method and related apparatus
CN112399390A (en)*2019-08-142021-02-23华为技术有限公司Bluetooth connection method and related device
CN112449332A (en)*2019-08-302021-03-05华为技术有限公司Bluetooth connection method and electronic equipment
CN112469014A (en)*2019-09-062021-03-09华为技术有限公司Method and electronic equipment for configuring Bluetooth connection parameters
CN113038437A (en)*2019-12-252021-06-25Oppo广东移动通信有限公司Data transmission method, device, storage medium and terminal equipment
CN114079893A (en)*2020-08-132022-02-22华为技术有限公司 Bluetooth communication method, terminal device and computer-readable storage medium
CN114339696A (en)*2020-09-302022-04-12华为技术有限公司Bluetooth communication system, Bluetooth connection method, electronic device, and storage medium
CN113923641A (en)*2021-12-072022-01-11荣耀终端有限公司Connection method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
低功耗蓝牙BLE协议;杨一聪;;企业技术开发(第04期);全文*
杨一聪 ; .低功耗蓝牙BLE协议.企业技术开发.2019,(第04期),全文.*
蓝牙在智能家居中设备识别的改进;杨志斌;周兴斌;;计算机与现代化(第11期);全文*

Also Published As

Publication numberPublication date
CN116056051A (en)2023-05-02

Similar Documents

PublicationPublication DateTitle
US20210176810A1 (en)Method and device for reconnecting bluetooth communication
US9668294B2 (en)Method and apparatus for bluetooth low energy suspend and resume
CN110446193B (en) Bluetooth data packet processing method and device
CN112637013A (en)CAN bus message abnormity detection method and device, equipment and storage medium
US20130165047A1 (en)Wireless communication device and wireless communication method
CN116150054B (en)Interrupt information processing method based on PCIE
CN107968848B (en) A method, terminal device and storage medium for obtaining IP address
CN116056051B (en)Bluetooth connection control method, system and equipment
CN110958710A (en) Channel access method, configuration method, terminal and network side device
CN116126744B (en) A memory recovery method, device and terminal equipment
KR20200114166A (en)Method for prcoessing network packets and electronic devic therefor
CN111083190B (en) Method and electronic device for processing data
CN115407864A (en) Data processing method, data processing device, electronic device and readable storage medium
CN116419359B (en) Bluetooth control method and device
CN117707618B (en)Data reading method, electronic device and storage medium
CN116661875B (en) Method for realizing terminal device startup and electronic device
EP4451091A1 (en)Data processing method and electronic device
CN117729651A (en)Network connection method, electronic device and computer readable storage medium
CN112769196B (en) A charging control method, device, electronic equipment and charger
CN113282361B (en)Window processing method and electronic equipment
CN113498166B (en) Resource indication method and communication device
WO2022126584A1 (en)Link reestablishment method and device
CN116661678B (en) Data dump method and electronic device
US12069130B2 (en)Media clock recovery device and a method for recovering media clock, and an electronic device
TWI839237B (en)A method for performing dynamic traffic shaping and a device thereof

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP03Change of name, title or address

Address after:Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after:Honor Terminal Co.,Ltd.

Country or region after:China

Address before:3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before:Honor Device Co.,Ltd.

Country or region before:China

CP03Change of name, title or address

[8]ページ先頭

©2009-2025 Movatter.jp