WO2021043277A1 - Method for configuring bluetooth connection parameter, and electronic device - Google Patents

Method for configuring bluetooth connection parameter, and electronic device Download PDF

Info

Publication number
WO2021043277A1
WO2021043277A1 PCT/CN2020/113554 CN2020113554W WO2021043277A1 WO 2021043277 A1 WO2021043277 A1 WO 2021043277A1 CN 2020113554 W CN2020113554 W CN 2020113554W WO 2021043277 A1 WO2021043277 A1 WO 2021043277A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
bluetooth
scenario
bluetooth headset
mobile phone
Prior art date
Application number
PCT/CN2020/113554
Other languages
French (fr)
Chinese (zh)
Inventor
倪观军
苏炯金
朱宇洪
张小强
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021043277A1 publication Critical patent/WO2021043277A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W68/00User notification, e.g. alerting and paging, for incoming communication, change of service or the like
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • This application relates to the field of communications, and more specifically, to a method and electronic device for configuring Bluetooth connection parameters.
  • the connection delay is an important key performance indicator (KPI).
  • KPI key performance indicator
  • the scanning speed of Bluetooth devices is the same in different scenarios. For some special scenarios, too long Bluetooth connection delay will lead to poor user experience.
  • the present application provides a method for configuring the duty cycle, which helps to improve the flexibility of the duty cycle configuration and helps to improve the user experience.
  • a method for configuring a duty cycle is provided.
  • the method is applied to an electronic device, and the method includes: when the electronic device detects that the first scene is within a preset scene, the electronic device determines the first paging Scanning interval and a first page scanning window; the electronic device performs page scanning according to a first duty cycle, and the first duty cycle is determined by the first page scanning interval and the first page scanning window; when the When the electronic device detects that the second scene is not within the preset scene, the electronic device determines the second paging scan interval and the second paging scan window; the electronic device performs paging scan according to the second duty cycle, and the second The duty cycle is determined by the second paging scan interval and the second paging scan window; wherein, the first duty cycle is higher than the second duty cycle.
  • the electronic device configures different Bluetooth connection parameters through different scenarios. In some special scenarios, it helps to increase the speed of establishing a Bluetooth connection between the connected device and the connected device, and reduce the delay of the Bluetooth connection, thereby Improve user experience.
  • the preset scene includes but is not limited to the occurrence of an incoming call event, detection of entering the Bluetooth function setting interface, or detection of the user turning on the Bluetooth function, etc. .
  • the first scenario is that the electronic device detects an incoming call event
  • the second scenario is that the electronic device and the accessory device establish a Bluetooth connection.
  • the electronic device when the electronic device detects an incoming call event, the electronic device actually wants the accessory device to connect to itself as soon as possible, so that the user can answer the call through the accessory device.
  • the electronic device can be configured with a higher duty cycle to improve The speed at which the electronic device is connected by the accessory device reduces the time delay for the user to wait.
  • the electronic device After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
  • the first scenario is that the electronic device detects that it enters the Bluetooth function setting interface or the first scenario is that the electronic device detects that the user turns on the Bluetooth function, and the second scenario is that the electronic device detects that the user turns on the Bluetooth function.
  • the scenario establishes a Bluetooth connection between the electronic device and the accessory device.
  • the electronic device when the electronic device detects that it enters the Bluetooth function setting interface or detects that the user turns on the Bluetooth function, the electronic device actually hopes that the accessory device can connect to itself as soon as possible. At this time, the electronic device can be configured with a higher duty cycle, so that Improve the speed at which electronic devices are connected by accessory devices, and reduce the time delay for users to wait. After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
  • the first scenario is that the electronic device is in a Bluetooth function on and screen on state
  • the second scenario is that the electronic device is in a Bluetooth function on and off screen state.
  • the electronic device when the electronic device detects that the Bluetooth function is turned on and is in a bright screen state, the electronic device actually hopes that the accessory device can connect to itself as soon as possible. At this time, the electronic device can be configured with a higher duty cycle, thereby improving the electronic device’s performance.
  • the connection speed of accessory devices reduces the time delay for users to wait. After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
  • the electronic device is a Bluetooth headset
  • the preset scene includes but is not limited to detecting the operation of the user opening the headset box, the Bluetooth headset entering the pairable mode, and the Bluetooth headset After the connection is established, both ears are disconnected.
  • the first scenario is that the Bluetooth headset detects the user's operation to open the headset box
  • the second scenario is that the Bluetooth headset establishes a connection between the two ears or the second scenario is
  • the scenario is that the Bluetooth headset establishes a Bluetooth connection with another electronic device.
  • the Bluetooth headset after the Bluetooth headset detects the user's operation to open the headset box, the Bluetooth headset hopes to complete the connection between the two ears as soon as possible, or the Bluetooth headset hopes that other devices can connect to the Bluetooth headset as soon as possible.
  • the Bluetooth headset can be configured with higher The duty cycle can increase the speed of the binaural connection and at the same time increase the speed of other devices connecting to the Bluetooth headset, reducing the time delay for other devices to establish a Bluetooth connection with the Bluetooth headset.
  • a lower duty cycle can be configured, which can save the power consumption of the Bluetooth headset.
  • the electronic device is a Bluetooth headset
  • the first scenario is that the Bluetooth headset enters a pairable state
  • the second scenario is that the Bluetooth headset establishes with another electronic device Bluetooth connection.
  • the Bluetooth headset hopes that other devices can connect to the Bluetooth headset as soon as possible.
  • the Bluetooth headset can be configured with a higher duty cycle, which can increase the speed of other devices connecting to the Bluetooth headset. It reduces the time delay for other devices to establish a Bluetooth connection with the Bluetooth headset.
  • a lower duty cycle can be configured, which can save the power consumption of the Bluetooth headset.
  • the electronic device is a Bluetooth headset
  • the first scenario is that the two ears of the Bluetooth headset are disconnected after being connected
  • the second scenario is that the two ears of the Bluetooth headset are disconnected. Re-establish the connection.
  • a device in a second aspect, is provided, the device is included in an electronic device, and the device has the function of realizing the above aspects and the behavior of the electronic device in the possible implementation manners of the above aspects.
  • the function can be realized by hardware, or the corresponding software can be executed by hardware.
  • the hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
  • an electronic device including: a Bluetooth chip; one or more processors; a memory; and one or more computer programs.
  • One or more computer programs are stored in the memory, and the one or more computer programs include instructions.
  • the electronic device is caused to execute the Bluetooth connection method in the possible implementation of the first aspect described above.
  • a chip system which is set in an electronic device, and the chip system includes a Bluetooth chip and a processor.
  • the processor is used to determine the first page scanning interval and the first page scanning window when the current scene of the electronic device is within the preset scene;
  • the Bluetooth chip is used to perform page scanning according to the first duty cycle, The first duty cycle is determined by the first paging scan interval and the first paging scan window;
  • the processor is configured to determine that the current scene of the electronic device is not within the preset scene, and determine the second paging scan interval and the first paging scan interval.
  • Two page scanning windows; the Bluetooth chip is used to perform page scanning according to a second duty cycle, the second duty cycle being determined by the second page scanning interval and the second page scanning window; wherein, the first A duty cycle is greater than the second duty cycle.
  • the present technical solution provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to perform the configuration of any one of the possible implementations of the above-mentioned Bluetooth connection Parameter method.
  • the present technical solution provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute the method of configuring Bluetooth connection parameters in any one of the above-mentioned possible designs.
  • Fig. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a Bluetooth protocol framework provided by an embodiment of the present application.
  • Fig. 3 is a schematic structural diagram of an accessory device provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of scan parameters configured in a connected device provided by an embodiment of the present application.
  • Fig. 5 is a process for a connected device to determine a Bluetooth connection parameter configuration level provided by an embodiment of the present application.
  • Fig. 6 is a schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
  • FIG. 7 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
  • FIG. 8 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
  • FIG. 9 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
  • FIG. 10 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • references described in this specification to "one embodiment” or “some embodiments”, etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in conjunction with the embodiment. Therefore, the sentences “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless it is specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
  • the electronic device may be a portable electronic device that also contains other functions such as a personal digital assistant and/or a music player function, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait.
  • portable electronic devices include, but are not limited to, carrying Or portable electronic devices with other operating systems.
  • the above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • FIG. 1 shows a schematic structural diagram of an electronic device 100.
  • the 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, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • different processing units may be independent components, or may be integrated in one or more processors.
  • the electronic device 101 may also include one or more processors 110.
  • the controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in the processor 110 may be a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the electronic device 101 in processing data or executing instructions is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transceiver (universal asynchronous transceiver) interface.
  • asynchronous receiver/transmitter, UART) interface mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface and/or USB interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transfer data between the electronic device 101 and peripheral devices.
  • the USB interface 130 can also be used to connect earphones and play audio through the earphones.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves and radiate it through the antenna 2.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store one or more computer programs, and the one or more computer programs include instructions.
  • the processor 110 can run the above-mentioned instructions stored in the internal memory 121 to enable the electronic device 101 to execute the Bluetooth pairing and connection methods provided in some embodiments of the present application, as well as various applications and data processing.
  • the internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system; the storage program area can also store one or more applications (such as photo galleries, contacts, etc.) and so on.
  • the data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 101.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 110 may execute the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 to cause the electronic device 101 to execute the instructions provided in the embodiments of the present application.
  • the electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • an embodiment of the present application provides a Bluetooth protocol framework, including but not limited to a host protocol stack, a host controller interface (HCI), and a controller.
  • a Bluetooth protocol framework including but not limited to a host protocol stack, a host controller interface (HCI), and a controller.
  • the Host protocol stack defines multiple applications (profiles) and core protocols (protocol) in the Bluetooth framework, each profile defines its own corresponding message format and application rules, and the profile is a Bluetooth service (application).
  • the Bluetooth protocol has formulated specifications for various possible and universal application scenarios, such as the Bluetooth audio distribution profile (advanced audio distribution profile, A2DP), Bluetooth free Proposal agreement (hands-free profile, HFP) and so on.
  • Core protocols include but are not limited to Bluetooth's basic service protocol (service discovery protocol, SDP), logical link control and adaptation protocol (logical link control and adaptation protocol, L2CAP), etc.
  • SDP service discovery protocol
  • L2CAP logical link control and adaptation protocol
  • the core protocol is indispensable in the Bluetooth protocol stack.
  • HCI provides a unified interface for the upper layer protocol to enter the link manager and a unified way to enter the baseband.
  • SIG Bluetooth Special Interest Group
  • the Bluetooth Special Interest Group (SIG) specifies four physical bus methods for connecting with hardware, namely, four HCI transmission layers: USB, RS232, UART and PC card.
  • the controller defines the underlying hardware, including radio frequency (RF), baseband (BB), and link management (LM).
  • RF radio frequency
  • BB baseband
  • LM link management
  • the RF layer uses the 2.4GHz unlicensed ISM band microwave to achieve data bit stream filtering and transmission. It mainly defines the conditions that the Bluetooth transceiver needs to meet in this frequency band.
  • the baseband is responsible for frequency hopping and the transmission of Bluetooth data and information frames.
  • Link management is responsible for connecting, establishing and dismantling links and performing security control.
  • the link manager (LM) layer is the link management layer protocol of the Bluetooth protocol stack, which is responsible for translating the upper-layer HCI commands into operations that the baseband can accept, and establishing asynchronous connection-oriented link (ACL) and synchronous links Road (synchronous connection-oriented/extended, SCO) and working modes that enable Bluetooth devices to enter an energy-saving state, etc.
  • the link control (LC) layer is responsible for responding to upper-layer LM commands (such as executing LM commands for establishing the transmission link of the data packet and maintaining the link) during the transmission of a batch of data packets.
  • Part of the content of the method described in the embodiment of the present application that is implemented by the wireless communication module 160 of the electronic device 100 shown in FIG. 1 may be specifically executed by a Bluetooth module or a Bluetooth chip.
  • Fig. 3 exemplarily shows a schematic structural diagram of a Bluetooth device 200 provided in an embodiment of the present application.
  • the Bluetooth device 200 shown in FIG. 3 is only an example, and the Bluetooth device 200 may have more or less components than those shown in FIG. 3, two or more components may be combined, or There are different component configurations.
  • the various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits,
  • the Bluetooth device 200 may include: a processor 201, a memory 202, a Bluetooth communication module 203, an antenna 204, a power switch 205, a USB communication processing module 206, and an audio module 207. among them:
  • the processor 201 can be used to read and execute computer-readable instructions.
  • the processor 201 may mainly include a controller, an arithmetic unit, and a register.
  • the controller is mainly responsible for the instruction decoding, and sends out control signals for the operation corresponding to the instruction.
  • the arithmetic unit is mainly responsible for saving the register operands and intermediate operation results temporarily stored during the execution of instructions.
  • the hardware architecture of the processor 201 may be an application specific integrated circuit (ASIC) architecture, MIPS architecture, ARM architecture, or NP architecture, and so on.
  • ASIC application specific integrated circuit
  • the processor 201 may be used to parse the signal received by the Bluetooth communication processing module 203, such as a pairing mode modification request sent by the electronic device 100, and so on.
  • the processing 201 may be used to perform corresponding processing operations according to the analysis result, such as generating a pairing mode modification response, and so on.
  • the memory 202 is coupled with the processor 201, and is used to store various software programs and/or multiple sets of instructions.
  • the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
  • the memory 202 may store an operating system, such as embedded operating systems such as uCOS, VxWorks, and RTLinux.
  • the memory 202 may also store a communication program, which may be used to communicate with the electronic device 100, one or more servers, or other devices.
  • the Bluetooth communication module 203 may include a classic Bluetooth (BT) module and a Bluetooth low energy (Bluetooth low energy, BLE) module,
  • the Bluetooth communication module 203 can monitor signals emitted by other devices (such as the electronic device 100), such as detection requests, scan signals, etc., and can send response signals, scan responses, etc., so that other devices (such as The electronic device 100) can discover the Bluetooth device 200, and go to other devices (such as the electronic device 100) to establish a wireless communication connection, and communicate with other devices (such as the electronic device 100) through Bluetooth.
  • other devices such as the electronic device 100
  • the Bluetooth communication module 203 can monitor signals emitted by other devices (such as the electronic device 100), such as detection requests, scan signals, etc., and can send response signals, scan responses, etc., so that other devices (such as The electronic device 100) can discover the Bluetooth device 200, and go to other devices (such as the electronic device 100) to establish a wireless communication connection, and communicate with other devices (such as the electronic device 100) through Bluetooth.
  • the Bluetooth communication module 203 can also transmit signals, such as broadcasting BLE signals, so that other devices (such as the electronic device 100) can discover the Bluetooth device 200 and establish a wireless communication connection with other devices (such as the electronic device 100) , Communicate with other devices (such as the electronic device 100) via Bluetooth.
  • signals such as broadcasting BLE signals
  • the wireless communication function of the Bluetooth device 200 can be implemented by the antenna 204, the Bluetooth communication module 203, the modem processor, and the like.
  • the antenna 204 can be used to transmit and receive electromagnetic wave signals.
  • Each antenna in the Bluetooth device 200 can be used to cover a single or multiple communication frequency bands.
  • the power switch 205 can be used to control the power supply to the Bluetooth device 200 from the power source.
  • the USB communication processing module 206 can be used to communicate with other devices through a USB interface (not shown).
  • the audio module 26 can be used to output audio signals through an audio output interface, so that the Bluetooth device 200 can support audio playback.
  • the audio module can also be used to receive audio data through the audio input interface.
  • the Bluetooth device 200 may be a media playback device such as a Bluetooth headset.
  • the Bluetooth device 200 may further include a display screen (not shown), where the display screen can be used to display images, prompt information, and the like.
  • the display can adopt LCD display, OLED display, AMOLED display, FLED display, QLED display and so on.
  • the Bluetooth device 200 may also include a serial interface such as an RS-232 interface.
  • the serial interface can be connected to other devices, such as audio amplifiers such as speakers, so that the Bluetooth device 200 and the audio amplifiers can cooperate to play audio and video.
  • the structure illustrated in FIG. 3 does not constitute a specific limitation on the Bluetooth device 200.
  • the Bluetooth device 200 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the Bluetooth protocol framework used by the Bluetooth device can be referred to as shown in Figure 2 above, which will not be repeated here.
  • Figure 4 shows a schematic diagram of scanning parameters configured in a connected device.
  • the connected device usually does not know when there is a device to connect, so it is usually configured with typical scan parameters.
  • the page scan interval (page scan interval) and the page scan window (page scan window) are two scan parameters, and the duty cycle of the connected device during scan search is as shown in formula (1):
  • the duty cycle actually represents the percentage of time that the connected device performs page scanning in a page scanning interval.
  • the larger the ratio the easier it is for the connected device to be scanned; but the larger the ratio, the power consumption of the connected device will increase accordingly.
  • the duty cycle configuration of the connected device is not flexible, and the same duty cycle is configured for all scenarios, which cannot meet the needs of users in different scenarios.
  • the connected device can change the Bluetooth connection parameters (for example, page scan interval and/or page scan window) through scene recognition, so as to achieve the purpose of flexibly configuring the duty cycle.
  • the mobile phone can be configured with a lower duty cycle, which can achieve the purpose of saving power consumption; for scenarios where the user wants to connect to the Bluetooth headset as soon as possible, such as a mobile phone call, a higher duty cycle can be configured , Which can reduce the delay of Bluetooth connection between the mobile phone and the Bluetooth headset.
  • the mobile phone waits for the Bluetooth headset to connect.
  • an existing Bluetooth headset is connected to a mobile phone
  • the user needs to open the headset box, and the headset initiates a paging message to the MAC address of the mobile phone to connect to the mobile phone.
  • the existing connection mode when the mobile phone performs page scan, its duty cycle is fixed.
  • a fixed duty cycle may cause the Bluetooth headset to connect to the mobile phone too slowly, thereby affecting the user's experience.
  • different duty cycles can be configured for different scenarios, which helps to increase the speed of the accessory device connecting to the mobile phone.
  • Table 1 shows a mapping relationship between a scene and a scan parameter.
  • the duty cycle in different scenarios can be configured by fixing the page scan interval and changing the page scan window.
  • the on-screen and off-screen of the mobile phone in the above scenario refer to the on-screen and off-screen of the mobile phone under the premise of turning on the Bluetooth function of the mobile phone.
  • Table 2 shows the mapping relationship between another scene and the scanning parameters.
  • Scenes page scan window page scan interval Phone call 11.25ms 320ms
  • the phone detects that the user has turned on the Bluetooth switch 11.25ms 320ms
  • the phone detects that it enters the Bluetooth settings interface 11.25ms 320ms
  • Mobile phone bright screen 11.25ms 640ms Connected Bluetooth device is working 11.25ms 1280ms Phone screen off 11.25ms 1280ms ... ... ...
  • the duty cycle in different scenarios can be configured by fixing the page scan window and changing the page scan interval.
  • Table 3 shows the mapping relationship between another scene and the scanning parameters.
  • Scenes page scan window page scan interval Phone call 22.5ms 640ms The phone detects that the user has turned on the Bluetooth switch 22.5ms 640ms The phone detects that it enters the Bluetooth settings interface 22.5ms 640ms Mobile phone bright screen 11.25ms 640ms Connected Bluetooth device is working 11.25ms 1280ms Phone screen off 11.25ms 1280ms ... ... ...
  • the duty cycle in different scenarios can also be configured by changing the page scan interval and page scan window at the same time.
  • the mobile phone can also be configured with different Bluetooth connection parameter configuration levels.
  • Table 4 shows a mapping relationship between a scenario and a Bluetooth connection parameter configuration level.
  • mapping relationship between the configuration level and page scan interval and page scan window shown in Table 4 may be as shown in Table 4, and the configuration conditions in Table 2 and Table 3 may also be referred to.
  • Fig. 5 is a process for a connected device to determine a Bluetooth connection parameter configuration level provided by an embodiment of the present application. As shown in Figure 5, the process can include:
  • S501 Generate different Bluetooth connection parameter configuration levels.
  • different Bluetooth connection parameter configuration levels can correspond to different page scan interval and/or page scan window.
  • the mapping relationship between the configuration level and page scan interval and page scan window can be as shown in Table 4.
  • S502 Map the scenario and the Bluetooth connection parameter configuration level.
  • the scan parameters in the Bluetooth connection parameter configuration level may be sent by the host protocol stack to the controller, and the controller performs page scan.
  • the mobile phone can configure the mapping relationship between different scenarios and different parameter configuration levels.
  • different configuration levels can correspond to different Bluetooth connection parameters. This can improve the flexibility of duty cycle configuration and meet the requirements of different scenarios. The needs of users.
  • FIG. 6 shows a schematic flowchart of a Bluetooth connection method 600 in an embodiment of the present application. As shown in FIG. 6, the method 600 includes:
  • S601 The mobile phone detects an incoming call event.
  • S602 The mobile phone searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
  • the mobile phone when the mobile phone detects an incoming call event, it can be determined that the page scan interval in the scan parameters is 640 ms, and the page scan window is 22.5 mss.
  • S603 The Bluetooth headset detects the user's operation to open the headset box.
  • the Bluetooth headset In response to the operation, the Bluetooth headset initiates a page for the MAC address of the mobile phone.
  • the method 600 assumes that the last connected device of the Bluetooth headset is a mobile phone, and after detecting that the user has opened the box, the Bluetooth headset can initiate a page for the MAC address of the mobile phone.
  • the mobile phone and the Bluetooth headset perform a standard Bluetooth pairing process.
  • an HFP connection can be made between the mobile phone and the Bluetooth headset.
  • S607 When a Bluetooth connection is established between the mobile phone and the Bluetooth headset, the mobile phone can search for corresponding scanning parameters according to the mapping relationship.
  • the page scan interval in the scan parameters is 1280 ms
  • the page scan window is 11.25 ms.
  • the mobile phone can also set different timing durations for different scenarios. For example, for a mobile phone to detect an incoming call event, the mobile phone can be configured with a higher duty cycle; but if the mobile phone does not establish a Bluetooth connection with any Bluetooth device within the timing period corresponding to the incoming call event, then the mobile phone can be configured with a lower duty cycle ratio.
  • the mobile phone when the mobile phone detects an incoming call event, it can be determined that the page scan interval in the scan parameters is 640ms, and the page scan window is 11.25ms; if the mobile phone does not detect the establishment of Bluetooth with any Bluetooth device within 10s after the mobile phone detects the incoming call event If connected, the mobile phone can adjust the scan parameters. For example, the mobile phone can determine that the scan parameters are page scan interval to 1280ms and page scan window to 11.25ms.
  • the mobile phone when the mobile phone detects an incoming call event, the user wants the Bluetooth headset to establish a Bluetooth connection with the mobile phone as soon as possible to answer the call, then the mobile phone can be configured with a higher duty cycle, thereby reducing the time delay of the Bluetooth headset connecting with the mobile phone; After the Bluetooth connection between the mobile phone and the Bluetooth headset is established, the mobile phone can be configured with a lower duty cycle, which can save the power consumption of the mobile phone.
  • FIG. 7 shows a schematic flowchart of a Bluetooth connection method 700 in an embodiment of the present application. As shown in FIG. 7, the method 700 includes:
  • S701 The mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface.
  • S702 The mobile phone searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
  • the mobile phone when the mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface, it can be determined that the page scan interval in the scan parameters is 640 ms, and the page scan window is 22.5 ms.
  • the mobile phone determines that the user turns on the Bluetooth switch or enters the Bluetooth device interface, it can determine that the user wants to connect to the mobile phone via the Bluetooth device, then the mobile phone can be configured with a higher duty cycle, thereby reducing the time delay for the Bluetooth headset to establish a Bluetooth connection with the mobile phone.
  • S703 The mobile phone has not established a Bluetooth connection with any Bluetooth device within a preset period of time since the mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface. At this time, the mobile phone can change the scanning parameters.
  • the mobile phone within 10 seconds after the mobile phone detects that the user turns on the Bluetooth switch, the mobile phone does not detect that the user is connected to any Bluetooth device and the mobile phone is still on the screen. At this time, the mobile phone can determine that the page scan interval in the scan parameters is 640 ms, page scan The window is 11.25ms.
  • the mobile phone within 10 seconds after the mobile phone detects that the user turns on the Bluetooth switch, the mobile phone does not detect that the user is connected to any Bluetooth device and the mobile phone is in the off-screen state. At this time, the mobile phone can determine that the page scan interval in the scan parameters is 1280 ms, page scan The window is 11.25ms.
  • a higher duty cycle can be configured to reduce the time delay of the connection between the mobile phone and the Bluetooth headset; The predicted event did not happen, so the mobile phone can reduce the duty cycle at this time to avoid wasting the power consumption of the mobile phone.
  • the connected device can change the Bluetooth connection parameters (for example, page scan interval and/or page scan window) through scene recognition, so as to achieve the purpose of flexibly configuring the duty cycle.
  • the connection speed between the connected device and the Bluetooth device can be increased; at the same time in some common scenarios (for example, the mobile phone screen is off or the mobile phone has established a Bluetooth connection with the Bluetooth headset), you can Save the power consumption of the connected device.
  • different scanning parameters can be configured in different scenarios.
  • the following takes an accessory device (for example, a Bluetooth headset) as an example for description.
  • the Bluetooth headset can also be configured with different scanning parameters according to different scenarios.
  • the Bluetooth headset is in a certain scene (for example, a mobile phone call), it is hoped to increase the speed of the binaural connection.
  • a certain scene for example, a mobile phone call
  • an existing Bluetooth headset is connected to a mobile phone, the user needs to open the headset box, and one headset can initiate a paging to the other headset.
  • the existing connection method when another headset performs page scan, its duty cycle is fixed.
  • a fixed duty cycle may cause the speed of the binaural connection to be too slow, thereby affecting the user's experience.
  • different duty cycles can be configured for different scenarios, which helps to increase the speed of the binaural connection and the speed of other devices connecting to accessory devices.
  • Table 5 shows the mapping relationship between another scene and scan parameters.
  • the manner in which the Bluetooth headset configures different scanning parameters can also refer to the above Table 1 to Table 4. That is, the Bluetooth headset can adjust one or two of the page scan interval and page scan window. To adjust the duty cycle, I won't repeat it here for brevity.
  • FIG. 8 shows a schematic flowchart of a Bluetooth connection method 800 in an embodiment of the present application. As shown in FIG. 8, the method 800 includes:
  • the Bluetooth headset detects that the user has opened the headset box, and at this time, the headset box includes both ears.
  • the Bluetooth headset searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
  • the Bluetooth headset detects binaural open box, if both ears are not connected, in order to achieve fast binaural connection, it can be determined that the page scan interval is 48 ms and the page scan window is 11.25 ms.
  • the purpose of configuring a higher duty cycle for the Bluetooth headset at this time may be to increase the speed of other devices scanning to the Bluetooth headset and increase the speed of the binaural connection.
  • other devices devices other than the device connected last time
  • the primary ear when increasing the speed of the binaural connection, the primary ear may be configured with a higher duty cycle, and the secondary ear normally sends a page, thereby increasing the speed of the binaural connection.
  • the Bluetooth headset can determine that the page scan interval is 640 ms and the page scan window is 11.25 ms.
  • the Bluetooth headset can initiate a page for the MAC address of the mobile phone.
  • the mobile phone and the Bluetooth headset perform a standard Bluetooth pairing process.
  • the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms. At this time, a lower duty cycle helps to save the power consumption of the mobile phone.
  • the Bluetooth headset can also be configured with timing durations in different scenarios. For example, after a Bluetooth headset detects a binaural box opening operation, it can be determined that the page scan interval is 48 ms and the page scan window is 11.25 ms. When both ears are connected, the Bluetooth headset can determine that the page scan interval is 640ms and the page scan window is 11.25ms. If the Bluetooth headset does not establish a Bluetooth connection with the last connected device within the time period from the binaural connection, then the Bluetooth headset can adjust the scanning parameters. For example, the Bluetooth headset has not been connected to the last connected device within 5 seconds from the binaural connection If the mobile phone establishes a Bluetooth connection, the mobile phone can determine that the page scan interval is 1280ms and the page scan window is 11.25ms.
  • the page scan interval can be determined to be 320ms and the page scan window is 11.25ms according to the mapping relationship. At this time, the Bluetooth headset can think that the other headset is working, and the user may want to Take out another headset to listen to a song or answer a call.
  • the Bluetooth headset can determine that the page scan interval is 320ms and the page scan window is 11.25ms. The purpose of configuring a higher duty cycle at this time is to increase the speed of re-establishing the connection between the ears.
  • FIG. 9 shows a schematic flowchart of a Bluetooth connection method 900 in an embodiment of the present application. As shown in FIG. 9, the method 900 includes:
  • the Bluetooth headset detects that the user opens the headset box and presses a function key on the headset box.
  • the Bluetooth headset in response to the operation, enters a pairable state.
  • the Bluetooth headset may determine the scanning parameters according to the mapping relationship.
  • the Bluetooth headset when the Bluetooth headset is determined to enter the pairable state (or the mandatory pairing state), it can be determined that the page scan interval is 160 ms, and the page scan window is 11.25 ms.
  • the Bluetooth headset may also be configured with a duty cycle during a page scan.
  • Table 6 shows the mapping relationship between another scene and scan parameters.
  • the duty cycle in the page scan process can be increased, which can increase the speed at which other devices can query the Bluetooth headset.
  • the Bluetooth headset and other devices can establish a Bluetooth connection as soon as possible.
  • the Bluetooth headset performs a standard Bluetooth pairing process with other devices.
  • the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms. At this time, a lower duty cycle helps to save the power consumption of the mobile phone.
  • the Bluetooth headset in addition to determining the scanning parameters of the Bluetooth headset according to the scene determined by itself, can also change the scanning parameters according to instructions from other devices.
  • FIG. 10 shows a schematic flowchart of a Bluetooth connection method 1000 in an embodiment of the present application. As shown in FIG. 10, the method 1000 includes:
  • the Bluetooth headset detects the user's operation to open the headset box.
  • the Bluetooth headset connects back to the mobile phone A that was connected last time.
  • S1003 Mobile phone B detects an incoming call event.
  • the Bluetooth headset can be configured with a higher duty cycle through the above method 800
  • the purpose is to increase the speed of the binaural connection; when the binaural connection is connected, the Bluetooth headset can be configured with a medium duty cycle, the purpose is to page other devices to the Bluetooth headset; when the Bluetooth headset and mobile phone A establish a Bluetooth connection , Bluetooth headset can be configured with a lower duty cycle, the purpose is to save the power consumption of the Bluetooth headset.
  • the Bluetooth headset After the Bluetooth headset and mobile phone A establish a Bluetooth connection, the Bluetooth headset is configured with a lower duty cycle. Then when mobile phone B detects an incoming call event, the user actually wants mobile phone B to be connected to the Bluetooth headset as soon as possible, but the Bluetooth headset is in a lower duty cycle state at this time, which will affect the connection speed of mobile phone B and the Bluetooth headset. Then the mobile phone B can notify the Bluetooth headset to increase the duty cycle through the mobile phone A at this time.
  • Mobile phone B sends a first indication message to mobile phone A, where the first indication message indicates that mobile phone B has an incoming call event.
  • the event that triggers the mobile phone B to send the first indication message to the mobile phone A may be that the mobile phone B detects that the user turns on the Bluetooth switch and clicks to connect the Bluetooth headset.
  • S1005 The mobile phone A sends a second instruction message to the Bluetooth headset according to the first instruction message, where the second instruction message is used to instruct the Bluetooth headset to increase the duty cycle.
  • S1006 The Bluetooth headset determines scanning parameters according to the second instruction message.
  • the Bluetooth headset may configure the current scan parameters according to the received second indication message, for example, the age scan interval is 320 ms, and the page scan window is 11.25 ms. This helps the Bluetooth headset and mobile phone B quickly establish a Bluetooth connection.
  • the Bluetooth headset after the Bluetooth headset receives the second indication message, it can be learned that other devices wish to connect to the Bluetooth headset, and the Bluetooth headset can disconnect the Bluetooth connection with the mobile phone A.
  • S1008 Mobile phone B uses the MAC address of the Bluetooth headset to initiate a page to the Bluetooth headset.
  • the Bluetooth headset and mobile phone B perform a standard Bluetooth pairing process.
  • the standard Bluetooth pairing process between the Bluetooth headset and mobile phone B may include: mobile phone B initiates a paging for the MAC address of the Bluetooth headset; at this time, the Bluetooth headset is configured with a higher page scan duty cycle, The Bluetooth headset and mobile phone B can quickly establish a Bluetooth connection.
  • the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms.
  • an HFP connection can be made between mobile phone B and the Bluetooth headset.
  • FIG. 11 shows a schematic diagram of a system architecture 1100 provided by an embodiment of the present application.
  • the system 1100 may include: an electronic device 1101 and an accessory device 1102.
  • the electronic device 1101 may be the mobile phone in the above embodiment, and the accessory device 1102 may be the Bluetooth headset in the above embodiment.
  • the electronic device 1101 may also be a smart phone, a tablet computer, a personal computer, or the like.
  • the accessory device 1102 may also be a Bluetooth headset, Bluetooth speaker, smart watch, or other devices that support Bluetooth functions.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the 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.
  • the technical solution of the present application 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, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Telephone Function (AREA)

Abstract

The present application provides a method for configuring a Bluetooth connection parameter, and an electronic device. Take connecting a mobile phone to Bluetooth headphones as an example. When the mobile phone detects an incoming call event, a user immediately opens a headphone box, hoping that the Bluetooth headphones are connected to the mobile phone as soon as possible to answer the phone. At this time, a high duty ratio can be configured for the mobile phone to accelerate the speed at which the Bluetooth headphones are connected to the mobile phone, and reduce the time delay when the Bluetooth headphones are connected to the mobile phone. After the mobile phone establishes a Bluetooth connection with the Bluetooth headphones, a low duty ratio can be configured for the mobile phone to reduce the power consumption of the mobile phone. Embodiments of the present application can improve the flexibility for configuring the Bluetooth connection parameter for the mobile phone and improve the user experience.

Description

配置蓝牙连接参数的方法和电子设备Method and electronic device for configuring Bluetooth connection parameters
本申请要求于2019年9月6日提交中国专利局、申请号为201910844329.9、申请名称为“配置蓝牙连接参数的方法和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 6, 2019, the application number is 201910844329.9, and the application name is "Method and Electronic Device for Configuring Bluetooth Connection Parameters", the entire content of which is incorporated herein by reference. Applying.
技术领域Technical field
本申请涉及通信领域,并且更具体地,涉及一种配置蓝牙连接参数的方法和电子设备。This application relates to the field of communications, and more specifically, to a method and electronic device for configuring Bluetooth connection parameters.
背景技术Background technique
蓝牙(Bluetooth,BT)连接过程中,连接时延是一个重要的关键性能指标(key performance indicator,KPI)。蓝牙连接包括发起设备发送寻呼消息(page),被连接设备在特定的扫描窗口中进行寻呼扫描(page scan)。通常发起设备是主动连接设备,有明确的指向性,所以寻呼消息会连续发送,直到超时。In the Bluetooth (BT) connection process, the connection delay is an important key performance indicator (KPI). The Bluetooth connection includes the initiating device sending a page message (page), and the connected device performs a page scan (page scan) in a specific scanning window. Usually the initiating device is actively connected to the device and has a clear directivity, so paging messages will be sent continuously until the timeout expires.
目前,在不同场景下扫描蓝牙设备的速度一致,对于一些特殊场景,蓝牙连接时延过长会导致用户体验不佳。At present, the scanning speed of Bluetooth devices is the same in different scenarios. For some special scenarios, too long Bluetooth connection delay will lead to poor user experience.
发明内容Summary of the invention
本申请提供一种配置占空比的方法,有助于提高占空比配置的灵活度,有助于提升用户的体验。The present application provides a method for configuring the duty cycle, which helps to improve the flexibility of the duty cycle configuration and helps to improve the user experience.
第一方面,提供了一种配置占空比的方法,该方法应用于电子设备,该方法包括:当该电子设备检测到第一场景在预设场景内时,该电子设备确定第一寻呼扫描间隔和第一寻呼扫描窗口;该电子设备按照第一占空比进行寻呼扫描,该第一占空比由该第一寻呼扫描间隔和该第一寻呼扫描窗口确定;当该电子设备检测到第二场景不在该预设场景内时,该电子设备确定第二寻呼扫描间隔和第二寻呼扫描窗口;该电子设备按照第二占空比进行寻呼扫描,该第二占空比由该第二寻呼扫描间隔和该第二寻呼扫描窗口确定;其中,该第一占空比高于该第二占空比。In a first aspect, a method for configuring a duty cycle is provided. The method is applied to an electronic device, and the method includes: when the electronic device detects that the first scene is within a preset scene, the electronic device determines the first paging Scanning interval and a first page scanning window; the electronic device performs page scanning according to a first duty cycle, and the first duty cycle is determined by the first page scanning interval and the first page scanning window; when the When the electronic device detects that the second scene is not within the preset scene, the electronic device determines the second paging scan interval and the second paging scan window; the electronic device performs paging scan according to the second duty cycle, and the second The duty cycle is determined by the second paging scan interval and the second paging scan window; wherein, the first duty cycle is higher than the second duty cycle.
本申请实施例中,电子设备通过不同的场景配置不同的蓝牙连接参数,在某些特殊场景下,有助于提高被连接设备与连接设备建立蓝牙连接的速度,降低蓝牙连接的时延,从而提升用户体验。In the embodiments of the present application, the electronic device configures different Bluetooth connection parameters through different scenarios. In some special scenarios, it helps to increase the speed of establishing a Bluetooth connection between the connected device and the connected device, and reduce the delay of the Bluetooth connection, thereby Improve user experience.
在一些可能的实现方式中,当该电子设备为手机、平板等被连接设备时,该预设场景包括但不限于来电事件发生、检测到进入蓝牙功能设置界面或者检测到用户打开蓝牙功能等等。In some possible implementations, when the electronic device is a connected device such as a mobile phone or a tablet, the preset scene includes but is not limited to the occurrence of an incoming call event, detection of entering the Bluetooth function setting interface, or detection of the user turning on the Bluetooth function, etc. .
结合第一方面,在第一方面的某些实现方式中,该第一场景为该电子设备检测到来电事件,该第二场景为该电子设备和配件设备建立蓝牙连接。With reference to the first aspect, in some implementations of the first aspect, the first scenario is that the electronic device detects an incoming call event, and the second scenario is that the electronic device and the accessory device establish a Bluetooth connection.
本申请实施例中,在电子设备检测到来电事件时,电子设备其实希望配件设备尽快连 接上自己,从而用户可以通过配件设备接听电话,此时电子设备可以配置较高的占空比,从而提升电子设备被配件设备连接上的速度,较少用户等待的时延。在电子设备被配件设备连接上后,电子设备可以配置较低的占空比,这样可以节省电子设备的功耗。In the embodiment of this application, when the electronic device detects an incoming call event, the electronic device actually wants the accessory device to connect to itself as soon as possible, so that the user can answer the call through the accessory device. At this time, the electronic device can be configured with a higher duty cycle to improve The speed at which the electronic device is connected by the accessory device reduces the time delay for the user to wait. After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
结合第一方面,在第一方面的某些实现方式中,该第一场景为该电子设备检测到进入蓝牙功能设置界面或者该第一场景为该电子设备检测到用户打开蓝牙功能,该第二场景为该电子设备和配件设备建立蓝牙连接。With reference to the first aspect, in some implementations of the first aspect, the first scenario is that the electronic device detects that it enters the Bluetooth function setting interface or the first scenario is that the electronic device detects that the user turns on the Bluetooth function, and the second scenario is that the electronic device detects that the user turns on the Bluetooth function. The scenario establishes a Bluetooth connection between the electronic device and the accessory device.
本申请实施例中,在电子设备检测到进入蓝牙功能设置界面或者检测到用户打开蓝牙功能时,电子设备其实希望配件设备尽快连接上自己,此时电子设备可以配置较高的占空比,从而提升电子设备被配件设备连接上的速度,较少用户等待的时延。在电子设备被配件设备连接上后,电子设备可以配置较低的占空比,这样可以节省电子设备的功耗。In the embodiment of this application, when the electronic device detects that it enters the Bluetooth function setting interface or detects that the user turns on the Bluetooth function, the electronic device actually hopes that the accessory device can connect to itself as soon as possible. At this time, the electronic device can be configured with a higher duty cycle, so that Improve the speed at which electronic devices are connected by accessory devices, and reduce the time delay for users to wait. After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
结合第一方面,在第一方面的某些实现方式中,该第一场景为该电子设备处于蓝牙功能开启和亮屏状态,该第二场景为该电子设备处于蓝牙功能开启和灭屏状态。With reference to the first aspect, in some implementations of the first aspect, the first scenario is that the electronic device is in a Bluetooth function on and screen on state, and the second scenario is that the electronic device is in a Bluetooth function on and off screen state.
本申请实施例中,在电子设备检测到蓝牙功能开启且处于亮屏状态时,电子设备其实希望配件设备尽快连接上自己,此时电子设备可以配置较高的占空比,从而提升电子设备被配件设备连接上的速度,较少用户等待的时延。在电子设备被配件设备连接上后,电子设备可以配置较低的占空比,这样可以节省电子设备的功耗。In the embodiment of this application, when the electronic device detects that the Bluetooth function is turned on and is in a bright screen state, the electronic device actually hopes that the accessory device can connect to itself as soon as possible. At this time, the electronic device can be configured with a higher duty cycle, thereby improving the electronic device’s performance. The connection speed of accessory devices reduces the time delay for users to wait. After the electronic device is connected by the accessory device, the electronic device can be configured with a lower duty cycle, which can save the power consumption of the electronic device.
结合第一方面,在第一方面的某些实现方式中,该电子设备为蓝牙耳机,该预设场景包括但不限于检测到用户打开耳机盒的操作,蓝牙耳机进入可配对模式以及蓝牙耳机的双耳建立连接后断开。With reference to the first aspect, in some implementations of the first aspect, the electronic device is a Bluetooth headset, and the preset scene includes but is not limited to detecting the operation of the user opening the headset box, the Bluetooth headset entering the pairable mode, and the Bluetooth headset After the connection is established, both ears are disconnected.
结合第一方面,在第一方面的某些实现方式中,该第一场景为该蓝牙耳机检测到用户打开耳机盒的操作,该第二场景为该蓝牙耳机的双耳建立连接或者该第二场景为该蓝牙耳机与另一电子设备建立蓝牙连接。With reference to the first aspect, in some implementations of the first aspect, the first scenario is that the Bluetooth headset detects the user's operation to open the headset box, and the second scenario is that the Bluetooth headset establishes a connection between the two ears or the second scenario is The scenario is that the Bluetooth headset establishes a Bluetooth connection with another electronic device.
本申请实施例中,在蓝牙耳机检测到用户打开耳机盒的操作后,蓝牙耳机希望尽快完成双耳的连接,或者蓝牙耳机希望其他设备尽快连接上蓝牙耳机,此时蓝牙耳机可以配置较高的占空比,从而可以提升双耳连接的速度,同时也可以提升其他设备连接蓝牙耳机的速度,减少了其他设备和蓝牙耳机建立蓝牙连接的时延。当蓝牙耳机和其他设备建立蓝牙连接后,可以配置较低的占空比,这样可以节省蓝牙耳机的功耗。In the embodiment of this application, after the Bluetooth headset detects the user's operation to open the headset box, the Bluetooth headset hopes to complete the connection between the two ears as soon as possible, or the Bluetooth headset hopes that other devices can connect to the Bluetooth headset as soon as possible. At this time, the Bluetooth headset can be configured with higher The duty cycle can increase the speed of the binaural connection and at the same time increase the speed of other devices connecting to the Bluetooth headset, reducing the time delay for other devices to establish a Bluetooth connection with the Bluetooth headset. When the Bluetooth headset and other devices establish a Bluetooth connection, a lower duty cycle can be configured, which can save the power consumption of the Bluetooth headset.
结合第一方面,在第一方面的某些实现方式中,该电子设备为蓝牙耳机,该第一场景为该蓝牙耳机进入可配对状态,该第二场景为该蓝牙耳机与另一电子设备建立蓝牙连接。With reference to the first aspect, in some implementations of the first aspect, the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset enters a pairable state, and the second scenario is that the Bluetooth headset establishes with another electronic device Bluetooth connection.
本申请实施例中,在蓝牙耳机进入可配对模式后,蓝牙耳机希望其他设备尽快连接上蓝牙耳机,此时蓝牙耳机可以配置较高的占空比,从而可以提升其他设备连接蓝牙耳机的速度,减少了其他设备和蓝牙耳机建立蓝牙连接的时延。当蓝牙耳机和其他设备建立蓝牙连接后,可以配置较低的占空比,这样可以节省蓝牙耳机的功耗。In the embodiment of this application, after the Bluetooth headset enters the pairable mode, the Bluetooth headset hopes that other devices can connect to the Bluetooth headset as soon as possible. At this time, the Bluetooth headset can be configured with a higher duty cycle, which can increase the speed of other devices connecting to the Bluetooth headset. It reduces the time delay for other devices to establish a Bluetooth connection with the Bluetooth headset. When the Bluetooth headset and other devices establish a Bluetooth connection, a lower duty cycle can be configured, which can save the power consumption of the Bluetooth headset.
结合第一方面,在第一方面的某些实现方式中,该电子设备为蓝牙耳机,该第一场景为该蓝牙耳机的双耳连接后断开,该第二场景为该蓝牙耳机的双耳重新建立连接。With reference to the first aspect, in some implementations of the first aspect, the electronic device is a Bluetooth headset, the first scenario is that the two ears of the Bluetooth headset are disconnected after being connected, and the second scenario is that the two ears of the Bluetooth headset are disconnected. Re-establish the connection.
第二方面,提供了一种装置,该装置包含在电子设备中,该装置具有实现上述方面及上述方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。In a second aspect, a device is provided, the device is included in an electronic device, and the device has the function of realizing the above aspects and the behavior of the electronic device in the possible implementation manners of the above aspects. The function can be realized by hardware, or the corresponding software can be executed by hardware. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions.
第三方面,提供了一种电子设备,包括:蓝牙芯片;一个或多个处理器;存储器;以 及一个或多个计算机程序。一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。当指令被电子设备执行时,使得电子设备执行上述第一方面可能的实现中的蓝牙连接的方法。In a third aspect, an electronic device is provided, including: a Bluetooth chip; one or more processors; a memory; and one or more computer programs. One or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instruction is executed by the electronic device, the electronic device is caused to execute the Bluetooth connection method in the possible implementation of the first aspect described above.
第四方面,提供了一种芯片***,设置于电子设备中,该芯片***包括:蓝牙芯片和处理器。其中,该处理器用于确定电子设备当前的场景在预设场景内时,确定第一寻呼扫描间隔和第一寻呼扫描窗口;该蓝牙芯片用于按照第一占空比进行寻呼扫描,该第一占空比由该第一寻呼扫描间隔和该第一寻呼扫描窗口确定;该处理器用于确定电子设备当前的场景不在预设场景内时,确定第二寻呼扫描间隔和第二寻呼扫描窗口;该蓝牙芯片用于按照第二占空比进行寻呼扫描,该第二占空比由该第二寻呼扫描间隔和该第二寻呼扫描窗口确定;其中,该第一占空比大于该第二占空比。In a fourth aspect, a chip system is provided, which is set in an electronic device, and the chip system includes a Bluetooth chip and a processor. Wherein, the processor is used to determine the first page scanning interval and the first page scanning window when the current scene of the electronic device is within the preset scene; the Bluetooth chip is used to perform page scanning according to the first duty cycle, The first duty cycle is determined by the first paging scan interval and the first paging scan window; the processor is configured to determine that the current scene of the electronic device is not within the preset scene, and determine the second paging scan interval and the first paging scan interval. Two page scanning windows; the Bluetooth chip is used to perform page scanning according to a second duty cycle, the second duty cycle being determined by the second page scanning interval and the second page scanning window; wherein, the first A duty cycle is greater than the second duty cycle.
第五方面,本技术方案提供了一种计算机可读存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的实现中的配置蓝牙连接参数的方法。In a fifth aspect, the present technical solution provides a computer-readable storage medium, including computer instructions, which when the computer instructions run on an electronic device, cause the electronic device to perform the configuration of any one of the possible implementations of the above-mentioned Bluetooth connection Parameter method.
第六方面,本技术方案提供了一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设备执行上述任一方面任一项可能的设计中的配置蓝牙连接参数的方法。In a sixth aspect, the present technical solution provides a computer program product that, when the computer program product runs on an electronic device, causes the electronic device to execute the method of configuring Bluetooth connection parameters in any one of the above-mentioned possible designs.
附图说明Description of the drawings
图1是本申请实施例提供的电子设备的结构示意图。Fig. 1 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
图2是本申请实施例提供的蓝牙协议框架的示意图。Figure 2 is a schematic diagram of a Bluetooth protocol framework provided by an embodiment of the present application.
图3是本申请实施例提供的配件设备的结构示意图。Fig. 3 is a schematic structural diagram of an accessory device provided by an embodiment of the present application.
图4是本申请实施例提供的一种被连接设备中配置的扫描参数的示意图。Fig. 4 is a schematic diagram of scan parameters configured in a connected device provided by an embodiment of the present application.
图5是本申请实施例提供的被连接设备确定蓝牙连接参数配置等级的过程。Fig. 5 is a process for a connected device to determine a Bluetooth connection parameter configuration level provided by an embodiment of the present application.
图6是本申请实施例提供的蓝牙连接方法的示意性流程图。Fig. 6 is a schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
图7是本申请实施例提供的蓝牙连接方法的另一示意性流程图。FIG. 7 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
图8是本申请实施例提供的蓝牙连接方法的另一示意性流程图。FIG. 8 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
图9是本申请实施例提供的蓝牙连接方法的另一示意性流程图。FIG. 9 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
图10是本申请实施例提供的蓝牙连接方法的另一示意性流程图。FIG. 10 is another schematic flowchart of a Bluetooth connection method provided by an embodiment of the present application.
图11是本申请实施例提供的一种***架构的示意图。FIG. 11 is a schematic diagram of a system architecture provided by an embodiment of the present application.
具体实施方式detailed description
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个、两个或两个以上。术语“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。The terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "this" are intended to also This includes expressions such as "one or more" unless the context clearly indicates to the contrary. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" refer to one, two, or more than two. The term "and/or" is used to describe the association relationship of associated objects, indicating that there can be three types of relationships; for example, A and/or B can mean: A alone exists, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References described in this specification to "one embodiment" or "some embodiments", etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in conjunction with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless it is specifically emphasized otherwise. The terms "including", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
以下介绍电子设备、用于这样的电子设备的用户界面、和用于使用这样的电子设备的实施例。在一些实施例中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载
Figure PCTCN2020113554-appb-000001
Figure PCTCN2020113554-appb-000002
或者其它操作***的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。
The following describes an electronic device, a user interface for such an electronic device, and embodiments for using such an electronic device. In some embodiments, the electronic device may be a portable electronic device that also contains other functions such as a personal digital assistant and/or a music player function, such as a mobile phone, a tablet computer, and a wearable electronic device with wireless communication function (such as a smart watch) Wait. Exemplary embodiments of portable electronic devices include, but are not limited to, carrying
Figure PCTCN2020113554-appb-000001
Figure PCTCN2020113554-appb-000002
Or portable electronic devices with other operating systems. The above-mentioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
示例性的,图1示出了电子设备100的结构示意图。电子设备100可以包括处理器110、外部存储器接口120、内部存储器121、通用串行总线(universal serial bus,USB)接口130、充电管理模块140、电源管理模块141、电池142、天线1、天线2、移动通信模块150、无线通信模块160、音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、传感器模块180、指南针190、马达191、指示器192、摄像头193、显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。Exemplarily, FIG. 1 shows a schematic structural diagram of an electronic device 100. The 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, an antenna 1, and an antenna 2. , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone interface 170D, sensor module 180, compass 190, motor 191, indicator 192, camera 193, display screen 194, and user Identification module (subscriber identification module, SIM) card interface 195, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备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 electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备101也可以包括一个或多个处理器110。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器110中还可以设置存储器,用于存储指令和数据。示例性地,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备101处理数据或执行指令的效率。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, the electronic device 101 may also include one or more processors 110. Among them, the controller can generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching instructions and executing instructions. In some other embodiments, a memory may also be provided in the processor 110 for storing instructions and data. Exemplarily, the memory in the processor 110 may be a cache memory. The memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the electronic device 101 in processing data or executing instructions is improved.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry  processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、SIM卡接口和/或USB接口等。其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口130可以用于连接充电器为电子设备101充电,也可以用于电子设备101与***设备之间传输数据。该USB接口130也可以用于连接耳机,通过耳机播放音频。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transceiver (universal asynchronous transceiver) interface. asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface and/or USB interface, etc. Among them, the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 101, and can also be used to transfer data between the electronic device 101 and peripheral devices. The USB interface 130 can also be used to connect earphones and play audio through the earphones.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely a schematic description, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110、内部存储器121、外部存储器、显示屏194、摄像头193和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量、电池循环次数、电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备100的无线通信功能可以通过天线1、天线2、移动通信模块150、无线通信模块160、调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic wave radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、蓝牙(bluetooth,BT),全球导航卫星***(global navigation satellite system,GNSS)、调频(frequency modulation,FM)、近距离无线通信技术(near field communication,NFC)、红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110 接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves and radiate it through the antenna 2.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器110可以通过运行存储在内部存储器121的上述指令,从而使得电子设备101执行本申请一些实施例中所提供的蓝牙配对连接的方法,以及各种应用以及数据处理等。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作***;该存储程序区还可以存储一个或多个应用(比如图库、联系人等)等。存储数据区可存储电子设备101使用过程中所创建的数据(比如照片,联系人等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器110可以通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,来使得电子设备101执行本申请实施例中所提供的蓝牙配对连接的方法,以及其他应用及数据处理。电子设备100可以通过音频模块170、扬声器170A、受话器170B、麦克风170C、耳机接口170D、以及应用处理器等实现音频功能。例如音乐播放、录音等。The internal memory 121 may be used to store one or more computer programs, and the one or more computer programs include instructions. The processor 110 can run the above-mentioned instructions stored in the internal memory 121 to enable the electronic device 101 to execute the Bluetooth pairing and connection methods provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 121 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system; the storage program area can also store one or more applications (such as photo galleries, contacts, etc.) and so on. The data storage area can store data (such as photos, contacts, etc.) created during the use of the electronic device 101. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like. In some embodiments, the processor 110 may execute the instructions stored in the internal memory 121 and/or the instructions stored in the memory provided in the processor 110 to cause the electronic device 101 to execute the instructions provided in the embodiments of the present application. The method of Bluetooth pairing and connection, as well as other applications and data processing. The electronic device 100 may implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and an application processor. For example, music playback, recording, etc.
传感器模块180可以包括压力传感器180A、陀螺仪传感器180B、气压传感器180C、磁传感器180D、加速度传感器180E、距离传感器180F、接近光传感器180G、指纹传感器180H、温度传感器180J、触摸传感器180K、环境光传感器180L、骨传导传感器180M等。The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and an ambient light sensor 180L, bone conduction sensor 180M, etc.
如图2所示,本申请实施例提供一种蓝牙协议框架,包括但不限于主机(host)协议栈、主机控制接口(host controller interface,HCI)、控制器(controller)。As shown in FIG. 2, an embodiment of the present application provides a Bluetooth protocol framework, including but not limited to a host protocol stack, a host controller interface (HCI), and a controller.
其中,Host协议栈定义了蓝牙框架中的多个应用(profile)和核心协议(protocol),每个profile定义了各自相应的消息格式与应用规则,profile是蓝牙服务(application)。为了实现不同平台下的不同设备的互联互通,蓝牙协议为各种可能的、有通用意义的应用场景,都制定的了规范,如蓝牙音频传输模型协定(advanced audio distribution profile,A2DP)、蓝牙免提协议(hands-free profile,HFP)等等。Among them, the Host protocol stack defines multiple applications (profiles) and core protocols (protocol) in the Bluetooth framework, each profile defines its own corresponding message format and application rules, and the profile is a Bluetooth service (application). In order to realize the interconnection and intercommunication of different devices under different platforms, the Bluetooth protocol has formulated specifications for various possible and universal application scenarios, such as the Bluetooth audio distribution profile (advanced audio distribution profile, A2DP), Bluetooth free Proposal agreement (hands-free profile, HFP) and so on.
核心协议包括但不限于蓝牙基本的服务协议(service discover protocol,SDP)、逻辑链路控制和适配协议(logical link control and adaptation protocol,L2CAP)等。核心协议是蓝牙协议栈中必不可少的。Core protocols include but are not limited to Bluetooth's basic service protocol (service discovery protocol, SDP), logical link control and adaptation protocol (logical link control and adaptation protocol, L2CAP), etc. The core protocol is indispensable in the Bluetooth protocol stack.
其中,HCI为上层协议提供了进入链路管理器的统一接口和进入基带的统一方式,在主机核心协议栈和控制器之间会存在若干传输层,这些传输层是透明的,完成传输数据的任务,蓝牙技术联盟(Bluetooth special interest group,SIG)规定了四种与硬件连接的物理总线方式,即四种HCI传输层:USB,RS232,UART和PC卡。Among them, HCI provides a unified interface for the upper layer protocol to enter the link manager and a unified way to enter the baseband. There will be several transmission layers between the host core protocol stack and the controller. These transmission layers are transparent and complete the transmission of data. For the task, the Bluetooth Special Interest Group (SIG) specifies four physical bus methods for connecting with hardware, namely, four HCI transmission layers: USB, RS232, UART and PC card.
其中,controller定义了底层硬件部分,包括无线射频(RF)、基带(BB)和链路管理(LM),RF层通过2.4GHz无需授权的ISM频段的微波,实现数据位流的过滤和传输,主要定义了蓝牙收发器在此频带正常工作所需要满足的条件。基带负责跳频以及蓝牙数据和信息帧的传输。链路管理负责连接、建立和拆除链路并进行安全控制。链路管理(link  manager,LM)层是蓝牙协议栈的链路管理层协议,负责将上层HCI命令翻译成基带能接受的操作,建立异步链路(asynchronous connection-oriented link,ACL)和同步链路(synchronous connection-oriented/extended,SCO)以及使蓝牙设备进入节能状态的工作模式等。链路控制(link control,LC)层负责在一批数据包传送期间,响应上层LM命令(如执行建立数据包的传输链路,维持链路等功能的LM命令)。Among them, the controller defines the underlying hardware, including radio frequency (RF), baseband (BB), and link management (LM). The RF layer uses the 2.4GHz unlicensed ISM band microwave to achieve data bit stream filtering and transmission. It mainly defines the conditions that the Bluetooth transceiver needs to meet in this frequency band. The baseband is responsible for frequency hopping and the transmission of Bluetooth data and information frames. Link management is responsible for connecting, establishing and dismantling links and performing security control. The link manager (LM) layer is the link management layer protocol of the Bluetooth protocol stack, which is responsible for translating the upper-layer HCI commands into operations that the baseband can accept, and establishing asynchronous connection-oriented link (ACL) and synchronous links Road (synchronous connection-oriented/extended, SCO) and working modes that enable Bluetooth devices to enter an energy-saving state, etc. The link control (LC) layer is responsible for responding to upper-layer LM commands (such as executing LM commands for establishing the transmission link of the data packet and maintaining the link) during the transmission of a batch of data packets.
本申请实施例所述的方法由图1所示的电子设备100的无线通信模块160来实现的部分内容,具体可以是蓝牙模块或者是蓝牙芯片来执行。Part of the content of the method described in the embodiment of the present application that is implemented by the wireless communication module 160 of the electronic device 100 shown in FIG. 1 may be specifically executed by a Bluetooth module or a Bluetooth chip.
图3示例性的示出了本申请实施例提供的蓝牙设备200的结构示意图。Fig. 3 exemplarily shows a schematic structural diagram of a Bluetooth device 200 provided in an embodiment of the present application.
下面以蓝牙设备200为例对实施例进行具体说明。应该理解的是,图3所示蓝牙设备200仅是一个范例,并且蓝牙设备200可以具有比图3中所示的更多或更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现,The embodiments are described in detail below taking the Bluetooth device 200 as an example. It should be understood that the Bluetooth device 200 shown in FIG. 3 is only an example, and the Bluetooth device 200 may have more or less components than those shown in FIG. 3, two or more components may be combined, or There are different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits,
如图3所示,蓝牙设备200可以包括:处理器201,存储器202,蓝牙通信模块203,天线204,电源开关205,USB通信处理模块206,音频模块207。其中:As shown in FIG. 3, the Bluetooth device 200 may include: a processor 201, a memory 202, a Bluetooth communication module 203, an antenna 204, a power switch 205, a USB communication processing module 206, and an audio module 207. among them:
处理器201可用于读取和执行计算机可读指令。具体实现中,处理器201可主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器201的硬件架构可以是专用集成电路(ASIC)架构、MIPS架构、ARM架构或者NP架构等等。The processor 201 can be used to read and execute computer-readable instructions. In specific implementation, the processor 201 may mainly include a controller, an arithmetic unit, and a register. Among them, the controller is mainly responsible for the instruction decoding, and sends out control signals for the operation corresponding to the instruction. The arithmetic unit is mainly responsible for saving the register operands and intermediate operation results temporarily stored during the execution of instructions. In specific implementation, the hardware architecture of the processor 201 may be an application specific integrated circuit (ASIC) architecture, MIPS architecture, ARM architecture, or NP architecture, and so on.
在一些实施例中,处理器201可以用于解析蓝牙通信处理模块203接收到的信号,如电子设备100发送的配对模式修改请求,等等。处理201可以用于根据解析结果进行相应的处理操作,如生成配对模式修改响应,等等。In some embodiments, the processor 201 may be used to parse the signal received by the Bluetooth communication processing module 203, such as a pairing mode modification request sent by the electronic device 100, and so on. The processing 201 may be used to perform corresponding processing operations according to the analysis result, such as generating a pairing mode modification response, and so on.
存储器202与处理器201耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器202可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器202可以存储操作***,例如uCOS,VxWorks、RTLinux等嵌入式操作***。存储器202还可以存储通信程序,该通信程序可用于与电子设备100,一个或多个服务器,或其他设备进行通信。The memory 202 is coupled with the processor 201, and is used to store various software programs and/or multiple sets of instructions. In a specific implementation, the memory 202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 may store an operating system, such as embedded operating systems such as uCOS, VxWorks, and RTLinux. The memory 202 may also store a communication program, which may be used to communicate with the electronic device 100, one or more servers, or other devices.
蓝牙通信模块203可以包括经典蓝牙(BT)模块和低功耗蓝牙(Bluetooth low energy,BLE)模块,The Bluetooth communication module 203 may include a classic Bluetooth (BT) module and a Bluetooth low energy (Bluetooth low energy, BLE) module,
在一些实施例中,蓝牙通信模块203、可以监听到其他设备(如电子设备100)发射的信号,如探测请求、扫描信号等等,并可以发送响应信号、扫描响应等,使得其他设备(如电子设备100)可以发现蓝牙设备200,并去其他设备(如电子设备100)建立无线通信连接,通过蓝牙与其他设备(如电子设备100)进行通信。In some embodiments, the Bluetooth communication module 203 can monitor signals emitted by other devices (such as the electronic device 100), such as detection requests, scan signals, etc., and can send response signals, scan responses, etc., so that other devices (such as The electronic device 100) can discover the Bluetooth device 200, and go to other devices (such as the electronic device 100) to establish a wireless communication connection, and communicate with other devices (such as the electronic device 100) through Bluetooth.
在另一些实施例中,蓝牙通信模块203也可以发射信号,如广播BLE信号,使得其他设备(如电子设备100)可以发现蓝牙设备200,并与其他设备(如电子设备100)建立无线通信连接,通过蓝牙与其他设备(如电子设备100)进行通信。In other embodiments, the Bluetooth communication module 203 can also transmit signals, such as broadcasting BLE signals, so that other devices (such as the electronic device 100) can discover the Bluetooth device 200 and establish a wireless communication connection with other devices (such as the electronic device 100) , Communicate with other devices (such as the electronic device 100) via Bluetooth.
蓝牙设备200的无线通信功能可以通过天线204,蓝牙通信模块203,调制解调处理器等实现。The wireless communication function of the Bluetooth device 200 can be implemented by the antenna 204, the Bluetooth communication module 203, the modem processor, and the like.
天线204可用于发射和接收电磁波信号。蓝牙设备200中的每个天线可用于覆盖单个或多个通信频带。The antenna 204 can be used to transmit and receive electromagnetic wave signals. Each antenna in the Bluetooth device 200 can be used to cover a single or multiple communication frequency bands.
在一些实施例中蓝牙通信模块203的天线可以有一个或多个。In some embodiments, there may be one or more antennas of the Bluetooth communication module 203.
电源开关205可用于控制电源向蓝牙设备200的供电。The power switch 205 can be used to control the power supply to the Bluetooth device 200 from the power source.
USB通信处理模块206可用于通过USB接口(未示出)与其他设备进行通信。The USB communication processing module 206 can be used to communicate with other devices through a USB interface (not shown).
音频模块26可用于通过音频输出接口输出音频信号,这样可使得蓝牙设备200支持音频播放。音频模块还可用于通过音频输入接口接收音频数据。蓝牙设备200可以为蓝牙耳机等媒体播放设备。The audio module 26 can be used to output audio signals through an audio output interface, so that the Bluetooth device 200 can support audio playback. The audio module can also be used to receive audio data through the audio input interface. The Bluetooth device 200 may be a media playback device such as a Bluetooth headset.
在一些实施例中,蓝牙设备200还可以包括显示屏(未示出),其中,该显示屏可用于显示图像,提示信息等。显示屏可以采用LCD显示屏,OLED显示屏,AMOLED显示屏,FLED显示屏,QLED显示屏等等。In some embodiments, the Bluetooth device 200 may further include a display screen (not shown), where the display screen can be used to display images, prompt information, and the like. The display can adopt LCD display, OLED display, AMOLED display, FLED display, QLED display and so on.
在一些实施例中,蓝牙设备200还可以包括RS-232接口等串行接口。该串行接口可连接至其他设备,如音箱等音频外放设备,使得蓝牙设备200和音频外放设备协作播放音视频。In some embodiments, the Bluetooth device 200 may also include a serial interface such as an RS-232 interface. The serial interface can be connected to other devices, such as audio amplifiers such as speakers, so that the Bluetooth device 200 and the audio amplifiers can cooperate to play audio and video.
可以理解的是图3示意的结构并不构成对蓝牙设备200的具体限定。在本申请另一些实施例中,蓝牙设备200可以包括比图示更多或更少的部件,或组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in FIG. 3 does not constitute a specific limitation on the Bluetooth device 200. In other embodiments of the present application, the Bluetooth device 200 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
本申请实施例所述的方法中,蓝牙设备使用的蓝牙协议框架可以参考上述图2所示,在此不再赘述。In the method described in the embodiment of the present application, the Bluetooth protocol framework used by the Bluetooth device can be referred to as shown in Figure 2 above, which will not be repeated here.
为了便于理解,本申请以下实施例将以具有图1和图2所示结构的手机,以及图3所示的蓝牙耳机为例,结合附图对本申请实施例提供的蓝牙配对连接的方法进行具体阐述。For ease of understanding, the following embodiments of the present application will take the mobile phone with the structure shown in FIG. 1 and FIG. 2 and the Bluetooth headset shown in FIG. 3 as examples, and the Bluetooth pairing connection method provided by the embodiments of the present application will be specifically described with reference to the accompanying drawings. Elaboration.
图4示出了一种被连接设备中配置的扫描参数的示意图。被连接设备通常不知道何时有设备来连接,所以一般会被配置成典型的扫描参数。其中,寻呼扫描间隔(page scan interval)和寻呼扫描窗口(page scan window)为2个扫描参数,被连接设备在进行扫描搜索时的占空比如公式(1)所示:Figure 4 shows a schematic diagram of scanning parameters configured in a connected device. The connected device usually does not know when there is a device to connect, so it is usually configured with typical scan parameters. Among them, the page scan interval (page scan interval) and the page scan window (page scan window) are two scan parameters, and the duty cycle of the connected device during scan search is as shown in formula (1):
Figure PCTCN2020113554-appb-000003
Figure PCTCN2020113554-appb-000003
占空比其实表示在一个寻呼扫描间隔内被连接设备进行寻呼扫描的时间占比。这个比例越大,则被连接设备越容易被扫描到;但是这个比例越大,被连接设备的功耗也会同时相应的增加。The duty cycle actually represents the percentage of time that the connected device performs page scanning in a page scanning interval. The larger the ratio, the easier it is for the connected device to be scanned; but the larger the ratio, the power consumption of the connected device will increase accordingly.
目前,被连接设备的占空比配置不灵活,对于所有的场景都配置一样的占空比,不能满足不同场景下用户的需求。Currently, the duty cycle configuration of the connected device is not flexible, and the same duty cycle is configured for all scenarios, which cannot meet the needs of users in different scenarios.
本申请实施例中,被连接设备通过场景识别,可以改变蓝牙连接参数(例如,page scan interval和/或page scan window),达到灵活配置占空比的目的。示例性的,对于手机灭屏状态,手机可以配置较低的占空比,这样可以达到节省功耗的目的;对于手机来电等用户希望尽快连接蓝牙耳机的场景,可以配置较高的占空比,从而可以降低手机和蓝牙耳机之间进行蓝牙连接的时延。In this embodiment of the application, the connected device can change the Bluetooth connection parameters (for example, page scan interval and/or page scan window) through scene recognition, so as to achieve the purpose of flexibly configuring the duty cycle. Exemplarily, for the mobile phone screen off state, the mobile phone can be configured with a lower duty cycle, which can achieve the purpose of saving power consumption; for scenarios where the user wants to connect to the Bluetooth headset as soon as possible, such as a mobile phone call, a higher duty cycle can be configured , Which can reduce the delay of Bluetooth connection between the mobile phone and the Bluetooth headset.
下面以被连接设备为手机为例进行说明。手机在处于某一个场景(例如,手机来电)下时,手机等待蓝牙耳机连接。现有的蓝牙耳机连接手机时,需要用户打开耳机盒,耳机 针对手机的MAC地址发起寻呼消息,从而和手机相连。现有的连接方式中,手机进行寻呼扫描(page scan)时,其占空比是固定不变的。但是在某些场景下,用户其实希望蓝牙耳机尽快连接上手机,占空比固定不变可能会造成蓝牙耳机连接手机的速度过慢,从而影响用户的体验。本申请实施例中,对于不同的场景可以配置不同的占空比,有助于提高配件设备连接手机的速度。The following is an example of the connected device being a mobile phone. When the mobile phone is in a certain scene (for example, a mobile phone call), the mobile phone waits for the Bluetooth headset to connect. When an existing Bluetooth headset is connected to a mobile phone, the user needs to open the headset box, and the headset initiates a paging message to the MAC address of the mobile phone to connect to the mobile phone. In the existing connection mode, when the mobile phone performs page scan, its duty cycle is fixed. However, in some scenarios, users actually hope that the Bluetooth headset is connected to the mobile phone as soon as possible. A fixed duty cycle may cause the Bluetooth headset to connect to the mobile phone too slowly, thereby affecting the user's experience. In the embodiments of the present application, different duty cycles can be configured for different scenarios, which helps to increase the speed of the accessory device connecting to the mobile phone.
示例性的,表1示出了一种场景与扫描参数的映射关系。Exemplarily, Table 1 shows a mapping relationship between a scene and a scan parameter.
表1场景与扫描参数的映射关系Table 1 Mapping relationship between scenarios and scan parameters
场景Scenes page scan windowpage scan window page scan intervalpage scan interval
手机来电Phone call 45ms45ms 1280ms1280ms
手机检测到用户打开蓝牙开关The phone detects that the user has turned on the Bluetooth switch 45ms45ms 1280ms1280ms
手机检测到进入蓝牙设置界面The phone detects that it enters the Bluetooth settings interface 45ms45ms 1280ms1280ms
手机亮屏Mobile phone bright screen 22.5ms22.5ms 1280ms1280ms
已连接蓝牙设备工作中Connected Bluetooth device is working 11.25ms11.25ms 1280ms1280ms
手机灭屏Phone screen off 11.25ms11.25ms 1280ms1280ms
本申请实施例中,可以通过固定page scan interval而改变page scan window的方式配置不同场景下的占空比。In the embodiment of the present application, the duty cycle in different scenarios can be configured by fixing the page scan interval and changing the page scan window.
应理解,表1和下文中的表格中有关page scan interval和page scan window的值仅仅是示意性的,本申请实施例对此并不作任何限定。It should be understood that the values of page scan interval and page scan window in Table 1 and the following tables are merely illustrative, and the embodiments of the present application do not impose any limitation on this.
还应理解,上述场景中的手机亮屏和手机灭屏指的是手机在打开蓝牙功能的前提下的手机亮屏和手机灭屏。It should also be understood that the on-screen and off-screen of the mobile phone in the above scenario refer to the on-screen and off-screen of the mobile phone under the premise of turning on the Bluetooth function of the mobile phone.
示例性的,表2示出了另一种场景与扫描参数的映射关系。Exemplarily, Table 2 shows the mapping relationship between another scene and the scanning parameters.
表2场景与扫描参数的映射关系Table 2 Mapping relationship between scenarios and scan parameters
场景Scenes page scan windowpage scan window page scan intervalpage scan interval
手机来电Phone call 11.25ms11.25ms 320ms320ms
手机检测到到用户打开蓝牙开关The phone detects that the user has turned on the Bluetooth switch 11.25ms11.25ms 320ms320ms
手机检测到进入蓝牙设置界面The phone detects that it enters the Bluetooth settings interface 11.25ms11.25ms 320ms320ms
手机亮屏Mobile phone bright screen 11.25ms11.25ms 640ms640ms
已连接蓝牙设备工作中Connected Bluetooth device is working 11.25ms11.25ms 1280ms1280ms
手机灭屏Phone screen off 11.25ms11.25ms 1280ms1280ms
本申请实施例中,可以通过固定page scan window而改变page scan interval的方式配置不同场景下的占空比。In the embodiment of the present application, the duty cycle in different scenarios can be configured by fixing the page scan window and changing the page scan interval.
示例性的,表3示出了另一种场景与扫描参数的映射关系。Exemplarily, Table 3 shows the mapping relationship between another scene and the scanning parameters.
表3场景与扫描参数的映射关系Table 3 Mapping relationship between scenarios and scan parameters
场景Scenes page scan windowpage scan window page scan intervalpage scan interval
手机来电Phone call 22.5ms22.5ms 640ms640ms
手机检测到到用户打开蓝牙开关The phone detects that the user has turned on the Bluetooth switch 22.5ms22.5ms 640ms640ms
手机检测到进入蓝牙设置界面The phone detects that it enters the Bluetooth settings interface 22.5ms22.5ms 640ms640ms
手机亮屏Mobile phone bright screen 11.25ms11.25ms 640ms640ms
已连接蓝牙设备工作中Connected Bluetooth device is working 11.25ms11.25ms 1280ms1280ms
手机灭屏Phone screen off 11.25ms11.25ms 1280ms1280ms
本申请实施例中,还可以通过同时改变page scan interval和page scan window的方式配置不同场景下的占空比。In the embodiments of the present application, the duty cycle in different scenarios can also be configured by changing the page scan interval and page scan window at the same time.
一个实施例中,手机也可以配置不同的蓝牙连接参数配置等级。In an embodiment, the mobile phone can also be configured with different Bluetooth connection parameter configuration levels.
示例性的,表4示出了一种场景与蓝牙连接参数配置等级的映射关系。Exemplarily, Table 4 shows a mapping relationship between a scenario and a Bluetooth connection parameter configuration level.
表4场景与蓝牙连接参数配置等级的映射关系Table 4 Mapping relationship between scenarios and Bluetooth connection parameter configuration levels
Figure PCTCN2020113554-appb-000004
Figure PCTCN2020113554-appb-000004
应理解,表4所示的配置等级和page scan interval、page scan window的映射关系可以如表4所示,也可以参考上述表2和表3中的配置情况。It should be understood that the mapping relationship between the configuration level and page scan interval and page scan window shown in Table 4 may be as shown in Table 4, and the configuration conditions in Table 2 and Table 3 may also be referred to.
图5是本申请实施例提供的被连接设备确定蓝牙连接参数配置等级的过程。如图5所示,该过程可以包括:Fig. 5 is a process for a connected device to determine a Bluetooth connection parameter configuration level provided by an embodiment of the present application. As shown in Figure 5, the process can include:
S501,生成不同的蓝牙连接参数配置等级。S501: Generate different Bluetooth connection parameter configuration levels.
其中,不同的蓝牙连接参数配置等级可以对应不同的page scan interval和/或page scan window。例如,配置等级和page scan interval、page scan window的映射关系可以如表4所示。Among them, different Bluetooth connection parameter configuration levels can correspond to different page scan interval and/or page scan window. For example, the mapping relationship between the configuration level and page scan interval and page scan window can be as shown in Table 4.
S502,将场景与蓝牙连接参数配置等级进行映射。S502: Map the scenario and the Bluetooth connection parameter configuration level.
S503,当前场景超时或者当场景发生变化时,变更蓝牙连接参数配置等级。S503: When the current scene times out or when the scene changes, change the Bluetooth connection parameter configuration level.
应理解,本申请实施例中,蓝牙连接参数配置等级中的扫描参数可以由主机(host)协议栈发送给控制器(controller),并由控制器执行寻呼扫描(page scan)。It should be understood that, in the embodiment of the present application, the scan parameters in the Bluetooth connection parameter configuration level may be sent by the host protocol stack to the controller, and the controller performs page scan.
本申请实施例中,手机可以配置不同场景与不同参数配置等级的映射关系,同时,不同的配置等级又可以对应不同蓝牙连接参数,这样可以提高占空比配置的灵活度,可以满足不同场景下用户的需求。In the embodiment of this application, the mobile phone can configure the mapping relationship between different scenarios and different parameter configuration levels. At the same time, different configuration levels can correspond to different Bluetooth connection parameters. This can improve the flexibility of duty cycle configuration and meet the requirements of different scenarios. The needs of users.
下面结合具体场景对本申请实施例中的蓝牙连接的方法进行说明。The Bluetooth connection method in the embodiment of the present application will be described below in conjunction with specific scenarios.
图6示出了本申请实施例中的蓝牙连接方法600的示意性流程图。如图6所示,该方法600包括:FIG. 6 shows a schematic flowchart of a Bluetooth connection method 600 in an embodiment of the present application. As shown in FIG. 6, the method 600 includes:
S601,手机检测到来电事件。S601: The mobile phone detects an incoming call event.
S602,手机根据映射关系查找对应的扫描参数,其中,扫描参数包括page scan interval和page scan window。S602: The mobile phone searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
示例性的,如表1所示,当手机检测到来电事件时,可以确定扫描参数中page scan interval为640ms,page scan window为22.5mss。Exemplarily, as shown in Table 1, when the mobile phone detects an incoming call event, it can be determined that the page scan interval in the scan parameters is 640 ms, and the page scan window is 22.5 mss.
S603,蓝牙耳机检测到用户打开耳机盒的操作。S603: The Bluetooth headset detects the user's operation to open the headset box.
S604,响应于该操作,蓝牙耳机针对手机的MAC地址发起寻呼(page)。S604: In response to the operation, the Bluetooth headset initiates a page for the MAC address of the mobile phone.
应理解,方法600中假设蓝牙耳机上一次连接的设备为手机,那么蓝牙耳机在检测到用户开盒后,就可以针对手机的MAC地址发起page。It should be understood that the method 600 assumes that the last connected device of the Bluetooth headset is a mobile phone, and after detecting that the user has opened the box, the Bluetooth headset can initiate a page for the MAC address of the mobile phone.
S605,手机和蓝牙耳机进行标准蓝牙配对过程。S605, the mobile phone and the Bluetooth headset perform a standard Bluetooth pairing process.
S606,手机和蓝牙耳机之间建立HFP连接。In S606, an HFP connection is established between the mobile phone and the Bluetooth headset.
示例性的,当手机通过蓝牙耳机接听电话时,手机和蓝牙耳机之间可以进行HFP连接。Exemplarily, when the mobile phone answers a call through the Bluetooth headset, an HFP connection can be made between the mobile phone and the Bluetooth headset.
S607,当手机和蓝牙耳机建立了蓝牙连接时,手机可以根据该映射关系查找对应的扫描参数。S607: When a Bluetooth connection is established between the mobile phone and the Bluetooth headset, the mobile phone can search for corresponding scanning parameters according to the mapping relationship.
示例性的,如表1所示,当手机已连接蓝牙设备工作时,可以确定扫描参数中page scan interval为1280ms,page scan window为11.25ms。Exemplarily, as shown in Table 1, when the mobile phone is connected to a Bluetooth device to work, it can be determined that the page scan interval in the scan parameters is 1280 ms, and the page scan window is 11.25 ms.
应理解,手机还可以为不同的场景设置不同的定时时长。例如,对于手机检测到来电事件,手机可以配置较高的占空比;但是如果在该来电事件对应的定时时长内,手机没有与任何蓝牙设备建立蓝牙连接,那么手机可以配置较低的占空比。It should be understood that the mobile phone can also set different timing durations for different scenarios. For example, for a mobile phone to detect an incoming call event, the mobile phone can be configured with a higher duty cycle; but if the mobile phone does not establish a Bluetooth connection with any Bluetooth device within the timing period corresponding to the incoming call event, then the mobile phone can be configured with a lower duty cycle ratio.
示例性的,当手机检测到来电事件时,可以确定扫描参数中page scan interval为640ms,page scan window为11.25ms;若从手机检测到来电事件起10s内手机没有检测到与任何蓝牙设备建立蓝牙连接,那么手机可以调整扫描参数,例如,手机可以确定扫描参数为page scan interval为1280ms,page scan window为11.25ms。Exemplarily, when the mobile phone detects an incoming call event, it can be determined that the page scan interval in the scan parameters is 640ms, and the page scan window is 11.25ms; if the mobile phone does not detect the establishment of Bluetooth with any Bluetooth device within 10s after the mobile phone detects the incoming call event If connected, the mobile phone can adjust the scan parameters. For example, the mobile phone can determine that the scan parameters are page scan interval to 1280ms and page scan window to 11.25ms.
本申请实施例中,当手机检测到来电事件时,用户希望蓝牙耳机尽快和手机建立蓝牙连接以接听电话,那么手机可以配置较高的占空比,从而降低蓝牙耳机与手机连接的时延;在手机和蓝牙耳机建立了蓝牙连接后,手机可以配置较低的占空比,这样可以节省手机的功耗。In the embodiment of the present application, when the mobile phone detects an incoming call event, the user wants the Bluetooth headset to establish a Bluetooth connection with the mobile phone as soon as possible to answer the call, then the mobile phone can be configured with a higher duty cycle, thereby reducing the time delay of the Bluetooth headset connecting with the mobile phone; After the Bluetooth connection between the mobile phone and the Bluetooth headset is established, the mobile phone can be configured with a lower duty cycle, which can save the power consumption of the mobile phone.
图7示出了本申请实施例中的蓝牙连接方法700的示意性流程图。如图7所示,该方法700包括:FIG. 7 shows a schematic flowchart of a Bluetooth connection method 700 in an embodiment of the present application. As shown in FIG. 7, the method 700 includes:
S701,手机检测到用户打开蓝牙开关或者进入蓝牙设置界面。S701: The mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface.
S702,手机根据映射关系查找对应的扫描参数,其中,扫描参数包括page scan interval和page scan window。S702: The mobile phone searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
示例性的,如表1所示,当手机检测到用户打开蓝牙开关或者进入蓝牙设置界面时,可以确定扫描参数中page scan interval为640ms,page scan window为22.5ms。Exemplarily, as shown in Table 1, when the mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface, it can be determined that the page scan interval in the scan parameters is 640 ms, and the page scan window is 22.5 ms.
手机在确定用户打开蓝牙开关或者进入蓝牙设备界面时,可以判断用户希望经蓝牙设 备与手机相连,那么手机可以配置较高的占空比,从而降低蓝牙耳机与手机建立蓝牙连接的时延。When the mobile phone determines that the user turns on the Bluetooth switch or enters the Bluetooth device interface, it can determine that the user wants to connect to the mobile phone via the Bluetooth device, then the mobile phone can be configured with a higher duty cycle, thereby reducing the time delay for the Bluetooth headset to establish a Bluetooth connection with the mobile phone.
S703,手机从检测到用户打开蓝牙开关或者进入蓝牙设置界面开始的预设时间段内,手机没有和任何蓝牙设备建立蓝牙连接,此时手机可以变更扫描参数。S703: The mobile phone has not established a Bluetooth connection with any Bluetooth device within a preset period of time since the mobile phone detects that the user turns on the Bluetooth switch or enters the Bluetooth setting interface. At this time, the mobile phone can change the scanning parameters.
示例性的,从手机检测到用户打开蓝牙开关起10s内,手机没有检测到用户连接任何蓝牙设备且手机还处于亮屏状态时,此时手机可以确定扫描参数中page scan interval为640ms,page scan window为11.25ms。Exemplarily, within 10 seconds after the mobile phone detects that the user turns on the Bluetooth switch, the mobile phone does not detect that the user is connected to any Bluetooth device and the mobile phone is still on the screen. At this time, the mobile phone can determine that the page scan interval in the scan parameters is 640 ms, page scan The window is 11.25ms.
示例性的,从手机检测到用户打开蓝牙开关起10s内,手机没有检测到用户连接任何蓝牙设备且手机已经处于灭屏状态时,此时手机可以确定扫描参数中page scan interval为1280ms,page scan window为11.25ms。Exemplarily, within 10 seconds after the mobile phone detects that the user turns on the Bluetooth switch, the mobile phone does not detect that the user is connected to any Bluetooth device and the mobile phone is in the off-screen state. At this time, the mobile phone can determine that the page scan interval in the scan parameters is 1280 ms, page scan The window is 11.25ms.
本申请实施例中,当手机预判用户希望手机和蓝牙耳机建立连接时,可以配置较高的占空比,从而降低手机和蓝牙耳机的连接的时延;但是当在预设时间内,手机预判的事件并没有发生,那么此时手机可以将占空比调低,从而避免浪费手机的功耗。In the embodiment of this application, when the mobile phone predicts that the user wants the mobile phone to establish a connection with the Bluetooth headset, a higher duty cycle can be configured to reduce the time delay of the connection between the mobile phone and the Bluetooth headset; The predicted event did not happen, so the mobile phone can reduce the duty cycle at this time to avoid wasting the power consumption of the mobile phone.
本申请实施例中,被连接设备通过场景识别,可以改变蓝牙连接参数(例如,page scan interval和/或page scan window),达到灵活配置占空比的目的。这样在一些特殊场景(例如,手机来电时)下,可以提升被连接设备和蓝牙设备的连接速度;同时在一些普通场景下(例如,手机灭屏或者手机已经和蓝牙耳机建立蓝牙连接),可以节省被连接设备的功耗。In this embodiment of the application, the connected device can change the Bluetooth connection parameters (for example, page scan interval and/or page scan window) through scene recognition, so as to achieve the purpose of flexibly configuring the duty cycle. In this way, in some special scenarios (for example, when a mobile phone calls), the connection speed between the connected device and the Bluetooth device can be increased; at the same time in some common scenarios (for example, the mobile phone screen is off or the mobile phone has established a Bluetooth connection with the Bluetooth headset), you can Save the power consumption of the connected device.
以上以手机为例,手机作为被连接设备时,可以配置不同场景下不同的扫描参数。下面以配件设备(例如,蓝牙耳机)为例进行说明。蓝牙耳机也可以根据不同的场景配置不同的扫描参数。蓝牙耳机在处于某一个场景(例如,手机来电)下时,希望提高双耳连接的速度。现有的蓝牙耳机连接手机时,需要用户打开耳机盒,一只耳机可以向另一只耳机发起寻呼。现有的连接方式中,另一只耳机进行寻呼扫描(page scan)时,其占空比是固定不变的。但是在某些场景下,用户其实希望双耳连接的速度,占空比固定不变可能会造成双耳连接的速度过慢,从而影响用户的体验。本申请实施例中,对于不同的场景可以配置不同的占空比,有助于提高双耳连接的速度以及其他设备连接配件设备的速度。Taking the mobile phone as an example above, when the mobile phone is used as a connected device, different scanning parameters can be configured in different scenarios. The following takes an accessory device (for example, a Bluetooth headset) as an example for description. The Bluetooth headset can also be configured with different scanning parameters according to different scenarios. When the Bluetooth headset is in a certain scene (for example, a mobile phone call), it is hoped to increase the speed of the binaural connection. When an existing Bluetooth headset is connected to a mobile phone, the user needs to open the headset box, and one headset can initiate a paging to the other headset. In the existing connection method, when another headset performs page scan, its duty cycle is fixed. However, in some scenarios, users actually want the speed of the binaural connection, and a fixed duty cycle may cause the speed of the binaural connection to be too slow, thereby affecting the user's experience. In the embodiments of the present application, different duty cycles can be configured for different scenarios, which helps to increase the speed of the binaural connection and the speed of other devices connecting to accessory devices.
示例性的,表5示出了另一种场景与扫描参数的映射关系。Exemplarily, Table 5 shows the mapping relationship between another scene and scan parameters.
表5场景与扫描参数的映射关系Table 5 Mapping relationship between scenarios and scan parameters
Figure PCTCN2020113554-appb-000005
Figure PCTCN2020113554-appb-000005
应理解,蓝牙耳机作为被连接设备时,蓝牙耳机配置不同的扫描参数的方式也可以参考上述表1至表4,即蓝牙耳机可以调整page scan interval和page scan window中的一个或者两个参数来调整占空比,这里为了简洁不在赘述。It should be understood that when a Bluetooth headset is used as a connected device, the manner in which the Bluetooth headset configures different scanning parameters can also refer to the above Table 1 to Table 4. That is, the Bluetooth headset can adjust one or two of the page scan interval and page scan window. To adjust the duty cycle, I won't repeat it here for brevity.
应理解,表4中有关page scan interval和page scan window的值仅仅是示意性的,本申请实施例对此并不作任何限定。It should be understood that the values of page scan interval and page scan window in Table 4 are only illustrative, and the embodiment of the present application does not impose any limitation on this.
下面结合具体场景对本申请实施例中的蓝牙连接的方法进行说明。The Bluetooth connection method in the embodiment of the present application will be described below in conjunction with specific scenarios.
图8示出了本申请实施例中的蓝牙连接方法800的示意性流程图。如图8所示,该方法800包括:FIG. 8 shows a schematic flowchart of a Bluetooth connection method 800 in an embodiment of the present application. As shown in FIG. 8, the method 800 includes:
S801,蓝牙耳机检测到用户打开耳机盒,且此时耳机盒中包括双耳。S801: The Bluetooth headset detects that the user has opened the headset box, and at this time, the headset box includes both ears.
S802,蓝牙耳机根据映射关系查找对应的扫描参数,其中,扫描参数包括page scan interval和page scan window。S802. The Bluetooth headset searches for corresponding scan parameters according to the mapping relationship, where the scan parameters include page scan interval and page scan window.
示例性的,如表5所示,当蓝牙耳机检测到双耳开盒时,如果双耳未连接,为达到快速实现双耳连接,可以确定page scan interval为48ms,page scan window为11.25ms。Exemplarily, as shown in Table 5, when the Bluetooth headset detects binaural open box, if both ears are not connected, in order to achieve fast binaural connection, it can be determined that the page scan interval is 48 ms and the page scan window is 11.25 ms.
应理解,此时蓝牙耳机配置较高占空比的目的可以是提高其他设备扫描到蓝牙耳机的速度,以及提高双耳连接的速度。同时,此时蓝牙耳机配置较高占空比可以使得其他设备(除上次连接的设备以外的设备)扫描到蓝牙耳机的速度。It should be understood that the purpose of configuring a higher duty cycle for the Bluetooth headset at this time may be to increase the speed of other devices scanning to the Bluetooth headset and increase the speed of the binaural connection. At the same time, when the Bluetooth headset is configured with a higher duty cycle, other devices (devices other than the device connected last time) can scan to the speed of the Bluetooth headset.
还应理解,在提高双耳连接的速度时,可以是主耳配置较高的占空比,副耳正常发送寻呼(page),从而提高双耳连接的速度。It should also be understood that when increasing the speed of the binaural connection, the primary ear may be configured with a higher duty cycle, and the secondary ear normally sends a page, thereby increasing the speed of the binaural connection.
S803,当双耳连接后,蓝牙耳机可以根据映射关系变更到对应的扫描参数。S803: After the two ears are connected, the Bluetooth headset can be changed to the corresponding scanning parameter according to the mapping relationship.
示例性的,如表5所示,当双耳已经连接时,蓝牙耳机可以确定page scan interval为640ms,page scan window为11.25ms。Exemplarily, as shown in Table 5, when both ears are connected, the Bluetooth headset can determine that the page scan interval is 640 ms and the page scan window is 11.25 ms.
S804,蓝牙耳机可以针对手机的MAC地址发起寻呼(page)。S804: The Bluetooth headset can initiate a page for the MAC address of the mobile phone.
S805,手机和蓝牙耳机进行标准蓝牙配对过程。In S805, the mobile phone and the Bluetooth headset perform a standard Bluetooth pairing process.
S806,当手机和蓝牙耳机建立蓝牙连接后,蓝牙耳机根据映射关系变更扫描参数。S806: After the mobile phone and the Bluetooth headset establish a Bluetooth connection, the Bluetooth headset changes scanning parameters according to the mapping relationship.
示例性的,手机和蓝牙耳机建立蓝牙连接后,蓝牙耳机可以确定page scan interval为1280ms,page scan window为11.25ms。此时,较低的占空比有助于节省手机的功耗。Exemplarily, after the Bluetooth connection between the mobile phone and the Bluetooth headset is established, the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms. At this time, a lower duty cycle helps to save the power consumption of the mobile phone.
一个实施例中,蓝牙耳机还可以配置不同场景下的定时时长。例如,蓝牙耳机检测到双耳开盒的操作后,可以确定page scan interval为48ms,page scan window为11.25ms。当双耳连接上后,蓝牙耳机可以确定page scan interval为640ms,page scan window为11.25ms。若从双耳连接上开始的定时时长内,蓝牙耳机没有和上一次连接的设备建立蓝牙连接,那么蓝牙耳机可以调整扫描参数,例如,蓝牙耳机从双耳连接上5s内没有和上一次连接的手机建立蓝牙连接,那么手机可以确定page scan interval为1280ms,page scan window为11.25ms。In an embodiment, the Bluetooth headset can also be configured with timing durations in different scenarios. For example, after a Bluetooth headset detects a binaural box opening operation, it can be determined that the page scan interval is 48 ms and the page scan window is 11.25 ms. When both ears are connected, the Bluetooth headset can determine that the page scan interval is 640ms and the page scan window is 11.25ms. If the Bluetooth headset does not establish a Bluetooth connection with the last connected device within the time period from the binaural connection, then the Bluetooth headset can adjust the scanning parameters. For example, the Bluetooth headset has not been connected to the last connected device within 5 seconds from the binaural connection If the mobile phone establishes a Bluetooth connection, the mobile phone can determine that the page scan interval is 1280ms and the page scan window is 11.25ms.
一个实施例中,若蓝牙耳机检测到单耳开盒时,可以根据映射关系确定page scan interval为320ms,page scan window为11.25ms,此时蓝牙耳机可以认为另一个耳机正在进行工作,用户可能想拿出来另一支耳机听歌或者接听电话。In one embodiment, if the Bluetooth headset detects that the single-ear box is opened, the page scan interval can be determined to be 320ms and the page scan window is 11.25ms according to the mapping relationship. At this time, the Bluetooth headset can think that the other headset is working, and the user may want to Take out another headset to listen to a song or answer a call.
一个实施例中,若双耳连接过程中发生中断,例如,左耳和右耳之间的距离过远导致双耳发生中断。此时蓝牙耳机可以确定page scan interval为320ms,page scan window为11.25ms。此时配置较高占空比的目的是为了提升双耳重新建立连接的速度。In one embodiment, if an interruption occurs during the connection between the two ears, for example, the distance between the left ear and the right ear is too far, causing the two ears to be interrupted. At this time, the Bluetooth headset can determine that the page scan interval is 320ms and the page scan window is 11.25ms. The purpose of configuring a higher duty cycle at this time is to increase the speed of re-establishing the connection between the ears.
图9示出了本申请实施例中的蓝牙连接方法900的示意性流程图。如图9所示,该方法900包括:FIG. 9 shows a schematic flowchart of a Bluetooth connection method 900 in an embodiment of the present application. As shown in FIG. 9, the method 900 includes:
S901,蓝牙耳机检测到用户打开耳机盒,并按压耳机盒上的功能键。S901: The Bluetooth headset detects that the user opens the headset box and presses a function key on the headset box.
S902,响应于该操作,蓝牙耳机进入可配对状态。S902, in response to the operation, the Bluetooth headset enters a pairable state.
S903,蓝牙耳机可以根据映射关系确定扫描参数。S903: The Bluetooth headset may determine the scanning parameters according to the mapping relationship.
示例性的,如表5所示,蓝牙耳机在确定进入可配对状态(或者,强制配对状态)时,可以确定page scan interval为160ms,page scan window为11.25ms。Exemplarily, as shown in Table 5, when the Bluetooth headset is determined to enter the pairable state (or the mandatory pairing state), it can be determined that the page scan interval is 160 ms, and the page scan window is 11.25 ms.
一个实施例中,蓝牙耳机也可以配置查询扫描(page scan)过程中的占空比。In an embodiment, the Bluetooth headset may also be configured with a duty cycle during a page scan.
示例性的,表6示出了另一种场景与扫描参数的映射关系。Exemplarily, Table 6 shows the mapping relationship between another scene and scan parameters.
表6场景与扫描参数的映射关系Table 6 Mapping relationship between scenarios and scan parameters
Figure PCTCN2020113554-appb-000006
Figure PCTCN2020113554-appb-000006
本申请实施例中,蓝牙耳机确定用户按压耳机盒上的功能键进入强制配对状态时,可以提升查询扫描(page scan)过程中的占空比,这样可以提升其他设备查询到蓝牙耳机的速度,从而可以使得蓝牙耳机和其他设备尽快建立蓝牙连接。In the embodiment of the present application, when the Bluetooth headset determines that the user presses the function key on the headset box to enter the forced pairing state, the duty cycle in the page scan process can be increased, which can increase the speed at which other devices can query the Bluetooth headset. Thereby, the Bluetooth headset and other devices can establish a Bluetooth connection as soon as possible.
S904,蓝牙耳机与其他设备进行标准蓝牙配对过程。S904, the Bluetooth headset performs a standard Bluetooth pairing process with other devices.
S905,当蓝牙耳机和其他设备建立蓝牙连接后,蓝牙耳机根据映射关系变更扫描参数。S905: After the Bluetooth headset establishes a Bluetooth connection with other devices, the Bluetooth headset changes scanning parameters according to the mapping relationship.
示例性的,蓝牙耳机和其他设备建立蓝牙连接后,蓝牙耳机可以确定page scan interval为1280ms,page scan window为11.25ms。此时,较低的占空比有助于节省手机的功耗。Exemplarily, after the Bluetooth headset establishes a Bluetooth connection with other devices, the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms. At this time, a lower duty cycle helps to save the power consumption of the mobile phone.
本申请实施例中,蓝牙耳机除了可以根据自身确定的场景确定扫描参数以外,蓝牙耳机还可以根据其他设备的指示来变更扫描参数。In the embodiments of the present application, in addition to determining the scanning parameters of the Bluetooth headset according to the scene determined by itself, the Bluetooth headset can also change the scanning parameters according to instructions from other devices.
图10示出了本申请实施例中的蓝牙连接方法1000的示意性流程图。如图10所示,该方法1000包括:FIG. 10 shows a schematic flowchart of a Bluetooth connection method 1000 in an embodiment of the present application. As shown in FIG. 10, the method 1000 includes:
S1001,蓝牙耳机检测到用户打开耳机盒的操作。S1001: The Bluetooth headset detects the user's operation to open the headset box.
S1002,蓝牙耳机回连上一次连接过的手机A。S1002, the Bluetooth headset connects back to the mobile phone A that was connected last time.
S1003,手机B检测到来电事件。S1003: Mobile phone B detects an incoming call event.
示例性的,用户有手机A和手机B,蓝牙耳机上一次连接的是手机A,那么在蓝牙耳机检测到用户打开耳机盒的操作后,蓝牙耳机可以通过上述方法800先配置较高的占空比,目的是为了提高双耳连接的速度;当双耳连接上后,蓝牙耳机可以配置中等的占空比,目的是为了其他设备寻呼到蓝牙耳机;当蓝牙耳机和手机A建立蓝牙连接后,蓝牙耳机可以配置较低的占空比,目的是为了节省蓝牙耳机的功耗。Exemplarily, the user has mobile phone A and mobile phone B, and the last time the Bluetooth headset is connected to mobile phone A, then after the Bluetooth headset detects the operation of the user to open the headset box, the Bluetooth headset can be configured with a higher duty cycle through the above method 800 The purpose is to increase the speed of the binaural connection; when the binaural connection is connected, the Bluetooth headset can be configured with a medium duty cycle, the purpose is to page other devices to the Bluetooth headset; when the Bluetooth headset and mobile phone A establish a Bluetooth connection , Bluetooth headset can be configured with a lower duty cycle, the purpose is to save the power consumption of the Bluetooth headset.
在蓝牙耳机和手机A建立蓝牙连接后,蓝牙耳机配置了较低的占空比。那么当手机B检测到来电事件时,用户其实希望手机B尽快和蓝牙耳机相连,但是蓝牙耳机此时又处于一个较低占空比的状态,会影响手机B和蓝牙耳机连接的速度。那么手机B此时可以通过手机A通知蓝牙耳机提升占空比。After the Bluetooth headset and mobile phone A establish a Bluetooth connection, the Bluetooth headset is configured with a lower duty cycle. Then when mobile phone B detects an incoming call event, the user actually wants mobile phone B to be connected to the Bluetooth headset as soon as possible, but the Bluetooth headset is in a lower duty cycle state at this time, which will affect the connection speed of mobile phone B and the Bluetooth headset. Then the mobile phone B can notify the Bluetooth headset to increase the duty cycle through the mobile phone A at this time.
S1004,手机B向手机A发送第一指示消息,该第一指示消息指示手机B有一个来电事件。S1004: Mobile phone B sends a first indication message to mobile phone A, where the first indication message indicates that mobile phone B has an incoming call event.
一个实施例中,触发手机B向手机A发送第一指示消息的事件可以是手机B检测到用户打开蓝牙开关并点击连接蓝牙耳机。In one embodiment, the event that triggers the mobile phone B to send the first indication message to the mobile phone A may be that the mobile phone B detects that the user turns on the Bluetooth switch and clicks to connect the Bluetooth headset.
S1005,手机A根据该第一指示消息,向蓝牙耳机发送第二指示消息,该第二指示消息用于指示蓝牙耳机提高占空比。S1005: The mobile phone A sends a second instruction message to the Bluetooth headset according to the first instruction message, where the second instruction message is used to instruct the Bluetooth headset to increase the duty cycle.
S1006,蓝牙耳机根据该第二指示消息,确定扫描参数。S1006: The Bluetooth headset determines scanning parameters according to the second instruction message.
示例性的,蓝牙耳机可以根据接收到的第二指示消息,配置当前的扫描参数,例如,age scan interval为320ms,page scan window为11.25ms。这样有助于蓝牙耳机和手机B快速建立蓝牙连接。Exemplarily, the Bluetooth headset may configure the current scan parameters according to the received second indication message, for example, the age scan interval is 320 ms, and the page scan window is 11.25 ms. This helps the Bluetooth headset and mobile phone B quickly establish a Bluetooth connection.
S1007,蓝牙耳机和手机A断开蓝牙连接。S1007, the Bluetooth headset and mobile phone A disconnect the Bluetooth connection.
示例性的,当蓝牙耳机接收到该第二指示消息后,可以获知有其他设备希望连接蓝牙耳机,则蓝牙耳机可以断开与手机A的蓝牙连接。Exemplarily, after the Bluetooth headset receives the second indication message, it can be learned that other devices wish to connect to the Bluetooth headset, and the Bluetooth headset can disconnect the Bluetooth connection with the mobile phone A.
S1008,手机B使用蓝牙耳机的MAC地址向蓝牙耳机发起寻呼(page)。S1008: Mobile phone B uses the MAC address of the Bluetooth headset to initiate a page to the Bluetooth headset.
S1009,蓝牙耳机与手机B进行标准蓝牙配对过程。S1009, the Bluetooth headset and mobile phone B perform a standard Bluetooth pairing process.
一个实施例中,蓝牙耳机与手机B进行标准蓝牙配对过程可以包括:手机B针对蓝牙耳机的MAC地址发起寻呼;此时蓝牙耳机配置较高的寻呼扫描(page scan)的占空比,可以使得蓝牙耳机和手机B快速建立蓝牙连接。In one embodiment, the standard Bluetooth pairing process between the Bluetooth headset and mobile phone B may include: mobile phone B initiates a paging for the MAC address of the Bluetooth headset; at this time, the Bluetooth headset is configured with a higher page scan duty cycle, The Bluetooth headset and mobile phone B can quickly establish a Bluetooth connection.
示例性的,蓝牙耳机和手机B建立蓝牙连接后,蓝牙耳机可以确定page scan interval为1280ms,page scan window为11.25ms。Exemplarily, after the Bluetooth headset and the mobile phone B establish a Bluetooth connection, the Bluetooth headset can determine that the page scan interval is 1280 ms and the page scan window is 11.25 ms.
S1010,手机B和蓝牙耳机之间进行数据传输。S1010, data transmission between mobile phone B and Bluetooth headset.
示例性的,当手机B通过蓝牙耳机接听电话时,手机B和蓝牙耳机之间可以进行HFP连接。Exemplarily, when mobile phone B answers a call through a Bluetooth headset, an HFP connection can be made between mobile phone B and the Bluetooth headset.
图11示出了本申请实施例提供的一种***架构1100的示意图。如图11所示,该***1100可包括:电子设备1101和配件设备1102。FIG. 11 shows a schematic diagram of a system architecture 1100 provided by an embodiment of the present application. As shown in FIG. 11, the system 1100 may include: an electronic device 1101 and an accessory device 1102.
其中,电子设备1101可以为上述实施例中的手机,该配件设备1102可以为上述实施例中的蓝牙耳机。The electronic device 1101 may be the mobile phone in the above embodiment, and the accessory device 1102 may be the Bluetooth headset in the above embodiment.
示例性的,电子设备1101还可以是智能手机、平板电脑、个人电脑等。配件设备1102 还可以是蓝牙耳机、蓝牙音箱、智能手表等支持蓝牙功能的设备。Exemplarily, the electronic device 1101 may also be a smart phone, a tablet computer, a personal computer, or the like. The accessory device 1102 may also be a Bluetooth headset, Bluetooth speaker, smart watch, or other devices that support Bluetooth functions.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the 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 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, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (17)

  1. 一种配置蓝牙连接参数的方法,所述方法应用于电子设备,其特征在于,包括:A method for configuring Bluetooth connection parameters, which is applied to an electronic device, and is characterized in that it includes:
    当所述电子设备检测到第一场景在预设场景内时,所述电子设备确定第一寻呼扫描间隔和第一寻呼扫描窗口;When the electronic device detects that the first scene is within the preset scene, the electronic device determines the first paging scan interval and the first paging scan window;
    所述电子设备按照第一占空比进行寻呼扫描,所述第一占空比由所述第一寻呼扫描间隔和所述第一寻呼扫描窗口确定;The electronic device performs paging scanning according to a first duty cycle, where the first duty cycle is determined by the first paging scan interval and the first paging scan window;
    当所述电子设备检测到第二场景不在所述预设场景内时,所述电子设备确定第二寻呼扫描间隔和第二寻呼扫描窗口;When the electronic device detects that the second scene is not within the preset scene, the electronic device determines a second page scan interval and a second page scan window;
    所述电子设备按照第二占空比进行寻呼扫描,所述第二占空比由所述第二寻呼扫描间隔和所述第二寻呼扫描窗口确定;The electronic device performs page scanning according to a second duty cycle, the second duty cycle being determined by the second page scanning interval and the second page scanning window;
    其中,所述第一占空比高于所述第二占空比。Wherein, the first duty cycle is higher than the second duty cycle.
  2. 根据权利要求1所述的方法,其特征在于,所述第一场景为所述电子设备检测到来电事件,所述第二场景为所述电子设备和配件设备建立蓝牙连接。The method according to claim 1, wherein the first scenario is that the electronic device detects an incoming call event, and the second scenario is that the electronic device and the accessory device establish a Bluetooth connection.
  3. 根据权利要求1所述的方法,其特征在于,所述第一场景为所述电子设备检测到进入蓝牙功能设置界面或者所述第一场景为所述电子设备检测到用户打开蓝牙功能,所述第二场景为所述电子设备和配件设备建立蓝牙连接。The method according to claim 1, wherein the first scenario is that the electronic device detects that it enters the Bluetooth function setting interface or the first scenario is that the electronic device detects that the user has turned on the Bluetooth function, and the The second scenario is to establish a Bluetooth connection between the electronic device and the accessory device.
  4. 根据权利要求1所述的方法,其特征在于,所述第一场景为所述电子设备处于蓝牙功能开启和亮屏状态,所述第二场景为所述电子设备处于蓝牙功能开启和灭屏状态。The method according to claim 1, wherein the first scene is that the electronic device is in a Bluetooth function on and screen on state, and the second scene is that the electronic device is in a Bluetooth function on and screen off state. .
  5. 根据权利要求1所述的方法,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机检测到用户打开耳机盒的操作,所述第二场景为所述蓝牙耳机的双耳建立连接或者所述第二场景为所述蓝牙耳机与另一电子设备建立蓝牙连接。The method according to claim 1, wherein the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset detects a user's operation to open the headset box, and the second scenario is the Bluetooth headset Or the second scenario is that the Bluetooth headset establishes a Bluetooth connection with another electronic device.
  6. 根据权利要求1所述的方法,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机进入可配对状态,所述第二场景为所述蓝牙耳机与另一电子设备建立蓝牙连接。The method according to claim 1, wherein the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset enters a pairable state, and the second scenario is that the Bluetooth headset and another electronic device The device establishes a Bluetooth connection.
  7. 根据权利要求1所述的方法,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机的双耳连接后断开,所述第二场景为所述蓝牙耳机的双耳重新建立连接。The method according to claim 1, wherein the electronic device is a Bluetooth headset, the first scenario is that the pair of ears of the Bluetooth headset is disconnected after being connected, and the second scenario is that of the Bluetooth headset. Re-establish the connection between the ears.
  8. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    一个或多个存储器;One or more memories;
    所述一个或多个存储器存储有一个或多个计算机程序,所述一个或多个计算机程序包括指令,当所述指令被所述一个或多个处理器执行时,使得所述电子设备执行以下步骤:The one or more memories store one or more computer programs, and the one or more computer programs include instructions. When the instructions are executed by the one or more processors, the electronic device executes the following step:
    当检测到第一场景在预设场景内时,确定第一寻呼扫描间隔和第一寻呼扫描窗口;When it is detected that the first scene is within the preset scene, determining the first paging scan interval and the first paging scan window;
    按照第一占空比进行寻呼扫描,所述第一占空比由所述第一寻呼扫描间隔和所述第一寻呼扫描窗口确定;Performing page scanning according to a first duty cycle, where the first duty cycle is determined by the first page scanning interval and the first page scanning window;
    当检测到第二场景不在所述预设场景内时,确定第二寻呼扫描间隔和第二寻呼扫描窗口;When it is detected that the second scene is not within the preset scene, determining the second paging scan interval and the second paging scan window;
    按照第二占空比进行寻呼扫描,所述第二占空比由所述第二寻呼扫描间隔和所述第二寻呼扫描窗口确定;Performing page scanning according to a second duty cycle, where the second duty cycle is determined by the second page scanning interval and the second page scanning window;
    其中,所述第一占空比高于所述第二占空比。Wherein, the first duty cycle is higher than the second duty cycle.
  9. 根据权利要求8所述的电子设备,其特征在于,所述第一场景为所述电子设备检测到来电事件,所述第二场景为所述电子设备和配件设备建立蓝牙连接。The electronic device according to claim 8, wherein the first scenario is that the electronic device detects an incoming call event, and the second scenario is that the electronic device establishes a Bluetooth connection with an accessory device.
  10. 根据权利要求8所述的电子设备,其特征在于,所述第一场景为所述电子设备检测到进入蓝牙功能设置界面或者所述第一场景为所述电子设备检测到用户打开蓝牙功能,所述第二场景为所述电子设备和配件设备建立蓝牙连接。The electronic device according to claim 8, wherein the first scenario is that the electronic device detects that it enters the Bluetooth function setting interface or the first scenario is that the electronic device detects that the user turns on the Bluetooth function, so In the second scenario, a Bluetooth connection is established between the electronic device and the accessory device.
  11. 根据权利要求8所述的电子设备,其特征在于,所述第一场景为所述电子设备处于蓝牙功能开启和亮屏状态,所述第二场景为所述电子设备处于蓝牙功能开启和灭屏状态。The electronic device according to claim 8, wherein the first scene is that the electronic device is in a Bluetooth function on and screen on state, and the second scene is that the electronic device is in a Bluetooth function on and off screen. status.
  12. 根据权利要求8所述的电子设备,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机检测到用户打开耳机盒的操作,所述第二场景为所述蓝牙耳机的双耳建立连接或者所述第二场景为所述蓝牙耳机与另一电子设备建立蓝牙连接。The electronic device according to claim 8, wherein the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset detects a user's operation to open the headset box, and the second scenario is the Bluetooth headset. The two ears of the headset establish a connection or the second scenario is that the Bluetooth headset establishes a Bluetooth connection with another electronic device.
  13. 根据权利要求8所述的电子设备,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机进入可配对状态,所述第二场景为所述蓝牙耳机与另一电子设备建立蓝牙连接。The electronic device according to claim 8, wherein the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset enters a pairable state, and the second scenario is that the Bluetooth headset and another The electronic device establishes a Bluetooth connection.
  14. 根据权利要求8所述的电子设备,其特征在于,所述电子设备为蓝牙耳机,所述第一场景为所述蓝牙耳机的双耳连接后断开,所述第二场景为所述蓝牙耳机的双耳重新建立连接。The electronic device according to claim 8, wherein the electronic device is a Bluetooth headset, the first scenario is that the Bluetooth headset is disconnected after the binaural connection, and the second scenario is the Bluetooth headset Re-establish the connection between the ears.
  15. 一种芯片***,其特征在于,所述芯片***包括至少一个处理器,当程序指令在所述至少一个处理器中执行时,使得如权利要求1-7中任一所述的方法在所述电子设备上的功能得以实现。A chip system, characterized in that the chip system includes at least one processor, and when a program instruction is executed in the at least one processor, the method according to any one of claims 1-7 is The function on the electronic device is realized.
  16. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-7中任一项所述的配置占空比的方法。A computer storage medium, characterized by comprising computer instructions, when the computer instructions run on an electronic device, the electronic device is caused to perform the duty cycle configuration according to any one of claims 1-7. method.
  17. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-7中任一项所述的配置占空比的方法。A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the method for configuring a duty cycle according to any one of claims 1-7.
PCT/CN2020/113554 2019-09-06 2020-09-04 Method for configuring bluetooth connection parameter, and electronic device WO2021043277A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910844329.9A CN112469014A (en) 2019-09-06 2019-09-06 Method and electronic equipment for configuring Bluetooth connection parameters
CN201910844329.9 2019-09-06

Publications (1)

Publication Number Publication Date
WO2021043277A1 true WO2021043277A1 (en) 2021-03-11

Family

ID=74806830

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/113554 WO2021043277A1 (en) 2019-09-06 2020-09-04 Method for configuring bluetooth connection parameter, and electronic device

Country Status (2)

Country Link
CN (1) CN112469014A (en)
WO (1) WO2021043277A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116056051B (en) * 2022-06-06 2023-10-27 荣耀终端有限公司 Bluetooth connection control method, system and equipment
CN115499946B (en) * 2022-11-15 2023-03-24 成都爱旗科技有限公司 Distribution network control method and system based on BLE MESH and electronic equipment
CN118075719A (en) * 2022-11-22 2024-05-24 荣耀终端有限公司 State notification method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105451369A (en) * 2015-12-04 2016-03-30 小米科技有限责任公司 Method and apparatus for updating connection parameter of Bluetooth device with low power consumption
CN106332132A (en) * 2015-07-03 2017-01-11 中兴通讯股份有限公司 Communication terminal for performance adjustment of self-adaptable Bluetooth and method
CN106341782A (en) * 2016-09-27 2017-01-18 美的智慧家居科技有限公司 Mobile terminal and household electric appliance communication method and system
CN106535104A (en) * 2016-12-16 2017-03-22 中南大学 Adaptive Bluetooth transmission method based on flow perception
CN109075944A (en) * 2016-04-27 2018-12-21 高通股份有限公司 Near-field communication (NFC) arrives the switching of bluetooth
AU2019100803A4 (en) * 2018-09-27 2019-08-22 Apple Inc. Low-power activation of accessory in sleep state
CN110166974A (en) * 2019-05-30 2019-08-23 拉扎斯网络科技(上海)有限公司 Method and device for establishing communication connection, electronic equipment and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI439851B (en) * 2011-02-24 2014-06-01 E Ink Holdings Inc Low power consumption circuit and method for reducing power consumption
CN103024131A (en) * 2011-09-20 2013-04-03 希姆通信息技术(上海)有限公司 Bluetooth function control method of mobile terminal and mobile terminal
CN103442428A (en) * 2013-07-19 2013-12-11 华侨大学 Relative motion positioning method based on Bluetooth device names
CN105357402B (en) * 2015-11-27 2019-07-30 努比亚技术有限公司 A kind of low-power consumption management method and mobile terminal of pressure sensor
US10687184B2 (en) * 2016-05-13 2020-06-16 Google Llc Systems, methods, and devices for utilizing radar-based touch interfaces
CN106412326B (en) * 2016-10-28 2019-09-13 Oppo广东移动通信有限公司 A kind of parameter regulation means and terminal device of terminal device
CN106792314B (en) * 2016-12-29 2019-06-18 歌尔科技有限公司 A kind of detection method of ear-sticking headphone and its wearing state
US10421440B2 (en) * 2017-01-18 2019-09-24 Snap-On Incorporated Systems and methods of configuring vehicle service tools associated with display device based on operating condition of vehicle
CN107018554B (en) * 2017-03-07 2020-11-06 Oppo广东移动通信有限公司 Data transmission method and device and intelligent terminal
CN109002215B (en) * 2018-07-27 2021-03-19 青岛海信移动通信技术股份有限公司 Method for determining touch initial position of terminal with touch screen and terminal
CN109348431B (en) * 2018-11-14 2021-09-17 Oppo广东移动通信有限公司 Bluetooth scanning method, device, equipment and storage medium
CN109743619A (en) * 2019-01-16 2019-05-10 四川长虹电器股份有限公司 Smart television WiFi and Bluetooth coexistence optimization method and device
CN109618393B (en) * 2019-02-01 2021-03-02 Oppo广东移动通信有限公司 Communication control method, communication control device, mobile terminal and storage medium
CN110198522B (en) * 2019-06-14 2020-11-03 拉扎斯网络科技(上海)有限公司 Data transmission method and device, electronic equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106332132A (en) * 2015-07-03 2017-01-11 中兴通讯股份有限公司 Communication terminal for performance adjustment of self-adaptable Bluetooth and method
CN105451369A (en) * 2015-12-04 2016-03-30 小米科技有限责任公司 Method and apparatus for updating connection parameter of Bluetooth device with low power consumption
CN109075944A (en) * 2016-04-27 2018-12-21 高通股份有限公司 Near-field communication (NFC) arrives the switching of bluetooth
CN106341782A (en) * 2016-09-27 2017-01-18 美的智慧家居科技有限公司 Mobile terminal and household electric appliance communication method and system
CN106535104A (en) * 2016-12-16 2017-03-22 中南大学 Adaptive Bluetooth transmission method based on flow perception
AU2019100803A4 (en) * 2018-09-27 2019-08-22 Apple Inc. Low-power activation of accessory in sleep state
CN110166974A (en) * 2019-05-30 2019-08-23 拉扎斯网络科技(上海)有限公司 Method and device for establishing communication connection, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112469014A (en) 2021-03-09

Similar Documents

Publication Publication Date Title
WO2020192546A1 (en) Bluetooth transmission power control method and terminal device
US11825539B2 (en) Bluetooth connection method and electronic device
WO2020253695A1 (en) Smart home device access method and electronic device
WO2020107485A1 (en) Bluetooth connection method and device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
WO2021043277A1 (en) Method for configuring bluetooth connection parameter, and electronic device
WO2021008614A1 (en) Method for establishing communication connection and wearable device
WO2020133183A1 (en) Audio data synchronization method and device
WO2021082829A1 (en) Bluetooth connection method and related apparatus
WO2021218451A1 (en) Method and device for device connection on basis of neighborhood aware network
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021063189A1 (en) Method and system for information synchronization between multiple devices, and electronic device
WO2021115193A1 (en) Device networking method, electronic device, and system
CN114499587B (en) Audio synchronization communication method, system, wireless earphone, terminal and storage medium
WO2022262387A1 (en) Volume management method and electronic device
WO2021147660A1 (en) Data transmission method, and device
JP2024516668A (en) DEVICE NETWORKING METHOD, ELECTRONIC DEVICE, AND STORAGE MEDIUM
WO2021233398A1 (en) Wireless audio system, wireless communication method, and device
CN113038627A (en) File sharing method, mobile device and computer storage medium
WO2021213266A1 (en) Method for determining sidelink relay node, sidelink relay node and terminal
WO2021227942A1 (en) Information sharing method, electronic devices and system
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2022160967A1 (en) Communication method, mobile device, electronic device, and computer-readable storage medium
US11818781B2 (en) Communication method between multi devices in Bluetooth communication environment and electronic device therefor
CN115175159A (en) Bluetooth headset playing method and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20860132

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20860132

Country of ref document: EP

Kind code of ref document: A1