WO2023284454A1 - 蓝牙连接的提示方法、装置、设备、存储介质及程序产品 - Google Patents

蓝牙连接的提示方法、装置、设备、存储介质及程序产品 Download PDF

Info

Publication number
WO2023284454A1
WO2023284454A1 PCT/CN2022/097786 CN2022097786W WO2023284454A1 WO 2023284454 A1 WO2023284454 A1 WO 2023284454A1 CN 2022097786 W CN2022097786 W CN 2022097786W WO 2023284454 A1 WO2023284454 A1 WO 2023284454A1
Authority
WO
WIPO (PCT)
Prior art keywords
bluetooth
message
pairing
bluetooth message
value
Prior art date
Application number
PCT/CN2022/097786
Other languages
English (en)
French (fr)
Inventor
吕生义
杨强
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023284454A1 publication Critical patent/WO2023284454A1/zh

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
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Definitions

  • the embodiments of the present application relate to the technical field of Bluetooth, and in particular to a method, device, equipment, storage medium and program product for prompting a Bluetooth connection.
  • Bluetooth technology As a short-distance wireless communication technology, Bluetooth technology has excellent performance in indicators such as communication distance, transmission delay and data volume. Therefore, Bluetooth technology is usually chosen as the means of short-range wireless communication between two devices.
  • a user usually uses a mobile phone as a main device in daily life.
  • a mobile phone For the convenience of using the Bluetooth headset and the mobile phone, when the Bluetooth headset has been paired with the mobile phone, the Bluetooth headset will automatically connect to the mobile phone after it is turned on.
  • Embodiments of the present application provide a Bluetooth connection prompting method, device, equipment, storage medium, and program product. Described technical scheme is as follows:
  • a method for prompting a Bluetooth connection is provided, the method is executed by a first device, and the method includes:
  • connection prompt window corresponding to the second device according to the first Bluetooth message, and the connection prompt window is used to prompt whether to connect with the second device Make a Bluetooth connection;
  • the pairing identification bit in the first Bluetooth packet is the second value, the first Bluetooth packet is not responded to.
  • a method for sending a Bluetooth message is provided, the method is executed by a second device, and the method includes:
  • the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices;
  • a Bluetooth connection prompt device comprising:
  • Scanning module used for scanning bluetooth broadcast channel
  • a determining module configured to determine a pairing identification bit in the first Bluetooth message when the first Bluetooth message of the second device is scanned, and the pairing identification bit is used to indicate whether the second device has There is a pairing relationship with other devices;
  • a prompt window display module configured to display a connection prompt window corresponding to the second device according to the first Bluetooth message when the pairing identification bit is the first value, and the connection prompt window is used to prompt Whether to perform Bluetooth connection with the second device;
  • An operation module configured to not respond to the first Bluetooth message when the pairing identification bit in the first Bluetooth message is the second value.
  • a device for sending a Bluetooth message comprising:
  • the state transition module is used to enter the bluetooth broadcast state when the trigger condition is met;
  • a message generation module configured to generate a first Bluetooth message, the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices;
  • a message broadcast module configured to broadcast the first Bluetooth message in a Bluetooth broadcast channel in the Bluetooth broadcast state.
  • a device includes a processor and a memory, at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method described in the present application.
  • the prompt method of Bluetooth connection provided by various aspects.
  • a device includes a processor and a memory, at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the method described in the present application.
  • the sending method of the bluetooth message provided by various aspects.
  • a computer-readable storage medium wherein at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to realize the Bluetooth connection as provided in various aspects of the present application prompt method.
  • a computer-readable storage medium is provided, and at least one instruction is stored in the storage medium, and the instruction is loaded and executed by a processor to implement the Bluetooth notification provided by various aspects of the present application.
  • the sending method of the text is provided.
  • a computer program product comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the Bluetooth connection prompting method provided in the various optional implementation manners above.
  • a computer program product comprising computer instructions stored in a computer readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for sending the Bluetooth message provided in the above various optional implementation manners.
  • FIG. 1 is a structural block diagram of a first device provided in an exemplary embodiment of the present application
  • Fig. 2 is a structural block diagram of a second device provided by an exemplary embodiment of the present application.
  • FIG. 3 is an architecture diagram of a Bluetooth connection device system provided by an embodiment of the present application.
  • Fig. 4 is a flowchart of a Bluetooth connection prompting method provided by an exemplary embodiment of the present application.
  • FIG. 5 is a flow chart of a method for sending a Bluetooth message provided by an exemplary embodiment of the present application
  • FIG. 6 is a flow chart of a method for prompting a Bluetooth connection provided in another exemplary embodiment of the present application.
  • Fig. 7 is a flowchart of a method for prompting a Bluetooth connection provided by another exemplary embodiment of the present application.
  • Fig. 8 is a structural block diagram of a prompting device for Bluetooth connection provided by an exemplary embodiment of the present application.
  • Fig. 9 is a structural block diagram of a device for sending a Bluetooth message provided by an exemplary embodiment of the present application.
  • personally identifiable information is subject to privacy policies and practices that are recognized as meeting or exceeding industry or government requirements for maintaining user privacy.
  • personally identifiable information should be managed and processed to clearly explain the nature of authorized use to users, so as to minimize the risk of inadvertent or unauthorized access or use.
  • the method for prompting a Bluetooth connection provided in the embodiment of the present application may be executed by the first device, and the method includes:
  • connection prompt window corresponding to the second device is displayed according to the first Bluetooth message, and the connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device;
  • the pairing identification bit in the first bluetooth message is the second value, the first bluetooth message is not responded to.
  • the first value is used to indicate that the second device does not have a pairing relationship with other devices
  • the second value is used to indicate that the second device has a pairing relationship with other devices.
  • the method also includes:
  • the pairing identification bit in the first bluetooth message is the second value, start the first timer according to the receiving moment of the first bluetooth message;
  • the second bluetooth message is not responded to.
  • the method also includes:
  • the pairing identification bit in the first bluetooth message is the second value, start the first timer according to the receiving moment of the first bluetooth message;
  • the pairing identification bit of the second bluetooth message is the second value and the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, according to the second bluetooth message, display the Connection prompt window.
  • the method also includes:
  • the connection prompt window corresponding to the second device is displayed, and the connection prompt window is used to prompt whether to carry out bluetooth connection with the second device;
  • the first value is used to indicate that the second device has a pairing relationship with other devices and the second timer expires, and the second timer is started when the second device broadcasts the first Bluetooth message.
  • the method also includes:
  • the second value indicates that the second device has a pairing relationship with other devices and the second timer has not timed out, and the second timer is started when the second device broadcasts the first Bluetooth message.
  • connection prompt window corresponding to the second device according to the first Bluetooth message including:
  • connection prompt window corresponding to the second device is displayed.
  • At least two identification bits are included in the first Bluetooth message, and different identification bits correspond to different device types, and the pairing identification bits in the first Bluetooth message are determined, including:
  • the identification bit corresponding to the device type of the first device among the at least two identification bits is determined as the pairing identification bit.
  • the method for sending a Bluetooth message may be performed by the second device, and the method includes:
  • the first Bluetooth message carries a pairing flag, and the pairing flag is used to indicate whether the second device has a pairing relationship with other devices;
  • the method also includes:
  • the pairing identification bit in the first Bluetooth message is the second value
  • the second timer is started; the second value is used to indicate that the second device has existed with other devices Pairing relationship;
  • the pairing identification bit of the second bluetooth message is the second value; broadcast the second bluetooth message in the bluetooth broadcast channel.
  • the method also includes:
  • the pairing identification bit in the first Bluetooth message is the second value
  • the second timer is started; the second value is used to indicate that the second device has existed with other devices Pairing relationship;
  • the pairing identification bit of the third bluetooth message is the first value; broadcast the third bluetooth message in the bluetooth broadcast channel.
  • the second device is at least one of a Bluetooth headset, a Bluetooth bracelet, a Bluetooth watch, a Bluetooth collar, a Bluetooth ring, or Bluetooth glasses.
  • the second device is a Bluetooth headset.
  • the Bluetooth headset When the Bluetooth headset is placed in the matching charging compartment and the charging compartment is in the closed state, the Bluetooth headset is in the standby state, and enters the Bluetooth broadcasting state when the trigger conditions are met, including:
  • the wake-up command is the command generated when the charging compartment changes from the closed state to the open state.
  • Bluetooth message It is a message generated based on the Bluetooth protocol. Based on different purposes, Bluetooth messages can be divided into multiple types. In this application, the Bluetooth message is used to provide connection information, and the connection information is used to connect two devices. For example, the Bluetooth message sent by the first device may be used for the device receiving the Bluetooth message to establish a Bluetooth connection with the first device.
  • the Bluetooth message may be broadcast to the Bluetooth channel by the first device in a broadcast manner.
  • Other devices can obtain the Bluetooth message from the Bluetooth channel by means of scanning.
  • the Bluetooth message may be periodically broadcast by the first device, and the period may be an advertising interval (Advertising interval). For example, if the broadcast interval is 0.2 seconds, the first device will broadcast a Bluetooth message every 0.2 seconds.
  • the Bluetooth message includes a first Bluetooth message, a second Bluetooth message, a third Bluetooth message, and the like. It should be noted that the nth Bluetooth message in this application is only used to distinguish different Bluetooth messages. The meaning of the nth Bluetooth message is the same as that of the above-mentioned conceptual Bluetooth message, and will not be repeated here. Wherein, n is a positive integer.
  • Pairing identification bit It is a data bit set in the Bluetooth message.
  • the pairing identification bits may be multiplexed with data bits in the Bluetooth message.
  • the pairing identification bit may be a newly added data bit in the Bluetooth message.
  • an introduction is made by taking m data bits in an original Bluetooth packet as an example.
  • the pairing identification bit may remain unchanged, and remain m data bits, where m is a positive integer.
  • the pairing identification bit does not reuse the data bits in the Bluetooth message, the number of data bits in the Bluetooth message needs to add a pairing identification bit, and the Bluetooth after adding the pairing identification bit The number of data bits of the message is m+1 bits.
  • the value of the pairing identification bit is a binary value. That is, the value of the pairing identification bit can be 0 or 1. In a possible implementation manner of the present application, the value of the pairing identification bit may be either the first value or the second value. In a possible assignment mode, the first value is 0, and the second value is 1. In another possible assignment mode, the first value is 1, and the second value is 0.
  • FIG. 1 is a structural block diagram of a first device provided by an exemplary embodiment of the present application.
  • the first device includes a processor 120 and a memory 140, and the memory 140 stores at least An instruction, the instruction is loaded and executed by the processor 120 to implement the Bluetooth connection prompting method described in each method embodiment of the present application.
  • the first device 100 is an electronic device with a Bluetooth function. Scan the Bluetooth broadcast channel; in the case of scanning the first Bluetooth message of the second device, determine the pairing identification bit in the first Bluetooth message, and the pairing identification bit is used to indicate whether the second device has a pairing relationship with other devices ; In the case that the pairing identification bit is the first value, according to the first bluetooth message, the connection prompt window corresponding to the second device is displayed, and the connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device; if the pairing identification bit is In the case of the second value, the first bluetooth message is not responded.
  • Processor 120 may include one or more processing cores.
  • the processor 120 uses various interfaces and lines to connect various parts of the entire first device 100, by running or executing instructions, programs, code sets or instruction sets stored in the memory 140, and calling data stored in the memory 140, Various functions of the first device 100 are performed and data is processed.
  • the processor 120 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • the processor 120 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 120, but may be implemented by a single chip.
  • the memory 140 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • the memory 140 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the memory 140 may be used to store instructions, programs, codes, sets of codes or sets of instructions.
  • the memory 140 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data and the like involved in the following method embodiments.
  • the first device may be a device with a control function such as a smart phone, a tablet computer, a personal computer, a laptop computer, a TV, smart glasses or a smart watch.
  • the first device may be referred to as the master device.
  • FIG. 2 is a structural block diagram of a second device provided by an exemplary embodiment of the present application.
  • the second device includes a processor 220 and a memory 240, and the memory 240 stores at least An instruction, the instruction is loaded and executed by the processor 220 to implement the method for prompting the Bluetooth connection as described in the various method embodiments of the present application.
  • the second device 200 is an electronic device with a Bluetooth function.
  • the second device 200 enters the Bluetooth broadcast state (Advertiser/advertising); generates a first Bluetooth message, the first Bluetooth message carries a pairing flag, and the pairing flag is used to indicate Whether the second device has a pairing relationship with other devices; in the Bluetooth broadcast state, broadcast the first Bluetooth message in a Bluetooth broadcast channel.
  • Processor 220 may include one or more processing cores.
  • the processor 220 uses various interfaces and lines to connect various parts in the entire second device 200, by running or executing instructions, programs, code sets or instruction sets stored in the memory 240, and calling data stored in the memory 240, Various functions of the second device 200 are performed and data is processed.
  • the processor 220 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 220 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the content that needs to be displayed on the display screen
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 220, but may be realized by a single chip.
  • the memory 240 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory, ROM).
  • the memory 240 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • Memory 240 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 240 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data and the like involved in the following method embodiments.
  • the second device may be a device with specified auxiliary functions, such as a Bluetooth headset, a Bluetooth bracelet, a Bluetooth watch, a Bluetooth collar, a Bluetooth ring, or Bluetooth glasses.
  • the first device may be referred to as the master device.
  • the Bluetooth headset may be a true wireless stereo (True Wireless Stereo, TWS) headset.
  • the TWS earphone can be connected with the first device based on Bluetooth technology.
  • the TWS earphone can be a single-ear earphone, or a pair of earphones including a left earphone and a right earphone.
  • TWS earphones can be stored in the charging compartment.
  • the second device when the second device is a Bluetooth bracelet, a Bluetooth watch, a Bluetooth collar, a Bluetooth ring or a Bluetooth glasses device, the second device may also switch from the standby state to the broadcast state.
  • FIG. 3 is a structure diagram of a Bluetooth connection device system provided by an embodiment of the present application.
  • a first device 310 and a second device 320 are included.
  • the second device 320 when the second device 320 is in a standby state, the second device 320 does not perform a Bluetooth connection with any device.
  • the first device 310 exists within the coverage range of the Bluetooth signal of the second device 320 .
  • the method for prompting the Bluetooth connection applied to the first device 310 and the method for sending the Bluetooth message applied to the second device 320 in this application will be executed separately.
  • FIG. 4 is a flow chart of a method for prompting a Bluetooth connection provided by an exemplary embodiment of the present application.
  • the method for prompting the Bluetooth connection may be performed by the above-mentioned first device.
  • the prompt methods for Bluetooth connection include:
  • Step 410 scan the bluetooth broadcast channel.
  • the first device can scan the Bluetooth broadcast channel.
  • the Bluetooth broadcast channel is a channel designated according to the regulations in the Bluetooth protocol. That is, when the Bluetooth device scans the Bluetooth broadcast signal, it will scan in the designated Bluetooth broadcast channel according to the Bluetooth protocol.
  • Step 420 in the case that the first Bluetooth message of the second device is scanned, the first device determines the pairing identification bit in the first Bluetooth message, and the pairing identification bit is used to indicate whether the second device has been paired with other devices relation.
  • the first device may periodically scan the Bluetooth broadcast channel.
  • the first device may determine the broadcast device that broadcasts the first Bluetooth message through the identifier of the broadcast device carried in the first Bluetooth message.
  • the first Bluetooth message is a message broadcast by the second device, the first device will read the pairing identification bit in the first Bluetooth message.
  • the pairing identification bit in the first Bluetooth message is stored in the first Bluetooth message in plain text.
  • the pairing identification bit in the first Bluetooth message is stored in the first Bluetooth message in the form of cipher text, and when the first device meets the dedicated decoding rules, it can decrypt the first Bluetooth message.
  • the pairing identification bit in the message For example, devices produced by the same manufacturer all obey the same specific decoding rule.
  • the pairing identification bit is used to indicate whether the second device has a pairing relationship with other devices. That is, the pairing identification bit can indicate that the second device has a pairing relationship with other devices, and the pairing identification bit can also indicate that the second device has no pairing relationship with other devices.
  • the first device may perform both step 430 and step 440, which is not limited in this embodiment of the present application.
  • Step 430 when the pairing identification bit in the first Bluetooth message is the first value, the first device displays a connection prompt window corresponding to the second device according to the first Bluetooth message, and the connection prompt window is used to prompt whether it is compatible with The second device makes a Bluetooth connection.
  • the first device when the pairing identification bit is the first value, the first device directly displays the connection prompt window corresponding to the second device according to the first Bluetooth message.
  • the pairing identification bit is the first value
  • Step 440 when the pairing identification bit in the first Bluetooth message is the second value, do not respond to the first Bluetooth message.
  • the first device will not respond to the first Bluetooth message when the pairing identification bit is the second value.
  • the first value and the second value are different values, and the two representations have different meanings.
  • the pairing identification bit when the pairing identification bit is the second value, it indicates that the second device has a pairing relationship with other devices.
  • the first device obtains the first Bluetooth message of the second device by scanning the Bluetooth broadcast channel. Since the first Bluetooth message includes the pairing identification bit, and the pairing The identification bit is used to indicate whether the second device has a pairing relationship with other devices. Therefore, the first device can perform different operations based on the pairing relationship of the second device.
  • the pairing identification bit is the first value
  • a connection prompt window corresponding to the second device is displayed according to the first Bluetooth message, so as to immediately prompt whether to establish a Bluetooth connection with the second device.
  • the pairing identification bit When the pairing identification bit is the second value, it does not respond to the first Bluetooth message, thereby preventing the second device from immediately displaying the connection prompt window in the first device when it has a pairing relationship with other devices, reducing the number of first devices. In the case of being disturbed by a device that does not need to be connected, the anti-interference ability of the first device is improved.
  • FIG. 5 is a flowchart of a method for sending a Bluetooth packet provided by an exemplary embodiment of the present application.
  • the method for sending the Bluetooth message can be applied to the above-mentioned second device.
  • the sending method of bluetooth message comprises:
  • Step 510 enter the bluetooth broadcast state when the trigger condition is met.
  • the second device may be a device that needs to provide auxiliary functions after being connected to the first device, such as a Bluetooth headset or a Bluetooth bracelet. Entering the Bluetooth advertising state from the standby state by the second device requires certain actions by the user. For example, when the trigger condition is met, the second device will enter the Bluetooth broadcasting state.
  • the trigger condition may be that the physical button on the second device receives a specified press, or that the second device collects a specified voice, receives a specified touch command on the touch screen, or collects a specified gesture through a camera.
  • the specific manner of the trigger condition is not limited.
  • Step 520 generating a first bluetooth message, the first bluetooth message carries a pairing flag, and the pairing flag is used to indicate whether the second device has a pairing relationship with other devices.
  • the second device will generate the first Bluetooth message.
  • the broadcast message is used to notify other devices that they can perform Bluetooth connection, so that other devices can establish a Bluetooth connection with the second device according to the message.
  • the first Bluetooth message carries a pairing identifier
  • the pairing identifier indicates whether the second device has a pairing relationship with other devices.
  • the second device can broadcast its historical pairing relationship to the public in the solution provided by this application.
  • Step 530 in the Bluetooth broadcast state, broadcast the first Bluetooth message in the Bluetooth broadcast channel.
  • the second device after the second device generates the first Bluetooth message, it can broadcast the first Bluetooth message in the Bluetooth broadcast channel in the Bluetooth broadcasting state.
  • the second device after the second device broadcasts the first Bluetooth message, it can also resend other Bluetooth messages with the same content as the first Bluetooth message as required, or the second device broadcasts other Bluetooth messages. Examples are not limited to this.
  • the second device can enter the Bluetooth broadcast state when the trigger condition is met, and the second device can generate the first Bluetooth message carrying the pairing flag.
  • the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices. Therefore, the second device in this application can broadcast the pairing relationship between itself and other devices through Bluetooth messages, so that the device that receives the message can choose whether to immediately pop up the connection prompt window based on the pairing flag bit, so as to connect at a low probability. Reduce the interference to other devices in the scene, and quickly pop up the connection question window in the scene with high probability of connection.
  • this application can also complete the Bluetooth connection prompt process with the cooperation of the first device and the second device. Please refer to the following embodiments.
  • FIG. 6 is a flowchart of a method for prompting a Bluetooth connection provided in another exemplary embodiment of the present application.
  • the method for prompting the Bluetooth connection can be completed by cooperation of the first device and the second device.
  • the prompting method of the Bluetooth connection includes:
  • Step 601 in the case that the second device is a Bluetooth headset, the second device receives a wake-up instruction sent by its matching charging case, and enters the Bluetooth broadcasting state.
  • the Bluetooth headset when the Bluetooth headset is placed in the matching charging compartment and the charging compartment is in the closed state, the Bluetooth headset is in the standby state.
  • the Bluetooth headset may be a device equipped with a charging case.
  • the Bluetooth headset When the Bluetooth headset is in the charging compartment and the charging compartment is closed, the Bluetooth headset is in the off state, offline state or standby state.
  • the charging case When the charging case switches from the closed state to the open state, the charging case sends a wake-up command to the Bluetooth headset.
  • the wake-up command can be sent from the charging case to the Bluetooth headset through a wired method, or sent from the charging case to the Bluetooth headset through a wireless method.
  • the wired method may adopt a signal path, and the signal path includes the metal feed point of the charging case and the metal feed point on the Bluetooth headset that is in contact with the metal feed point of the charging case.
  • the wireless method may be that the battery compartment sends the wake-up instruction to the Bluetooth headset through the wireless communication module.
  • Step 602 the second device generates a first Bluetooth packet.
  • step 602 is the same as the execution process of step 520, and will not be repeated here.
  • Step 603 in the Bluetooth broadcast state, the second device periodically broadcasts the Bluetooth message of the second device in the Bluetooth broadcast channel based on the broadcast interval.
  • the first Bluetooth message belongs to the Bluetooth message of the second device. If the second device sequentially broadcasts the first Bluetooth message, the second Bluetooth message and the third Bluetooth message in the Bluetooth broadcast channel, the broadcast interval between the above-mentioned every two Bluetooth messages is the same, so that the Bluetooth message of the second device Messages can be sent periodically.
  • the second device can periodically broadcast Bluetooth packets at a specified broadcast interval.
  • the first Bluetooth packet broadcast by the second device is the first Bluetooth packet.
  • Step 611 the first device scans for Bluetooth broadcast channels.
  • step 611 is the same as the execution process of step 410, and will not be repeated here.
  • Step 612 if the first Bluetooth packet of the second device is scanned, the first device determines the pairing identification bit in the first Bluetooth packet.
  • step 612 may be replaced by step (a1) and step (a2).
  • Step (a1) acquiring the device type of the first device.
  • the first Bluetooth message includes at least two identification bits, and different identification bits correspond to different device types.
  • the device type may include multiple types such as a mobile phone type, a wearable device type, a vehicle terminal type, and a home appliance type. It should be noted that the above-mentioned device types are for illustrative purposes only, and the present application does not limit other possible implementation manners of the device types.
  • Step (a2) determining the identification bit corresponding to the device type of the first device among the at least two identification bits as the pairing identification bit in the first Bluetooth message.
  • q identification bits may be preset in the first Bluetooth packet. For example, if q is 4, then 4 identification bits are preset in the first Bluetooth message, which are the first identification bit, the second identification bit, the third identification bit and the fourth identification bit. Please refer to Table 1. Table 1 shows the value and meaning of each identification bit.
  • the first identification bit is used to indicate whether there is a matching relationship between the second device and other mobile phones;
  • the second identification bit is used to indicate whether there is a matching relationship between the second device and other wearable devices ;
  • the third identification bit is used to indicate whether there is a matching relationship between the second device and other vehicle-mounted terminals;
  • the fourth identification bit is used to indicate whether there is a matching relationship between the second device and other home appliances.
  • step 612 is executed by the first device
  • step 613 or step 614 may be selected to be executed.
  • Step 613 in the case that the pairing identification bit in the first Bluetooth message is the first value, the first device displays a connection prompt window corresponding to the second device according to the first Bluetooth message.
  • the pairing identification bit when the pairing identification bit is the first value, it means that the second device does not have a matching relationship with other devices. Therefore, the first device can directly display the connection prompt window corresponding to the second device according to the first Bluetooth message, so that the user can decide whether to connect the first device and the second device as soon as possible or if the second device needs to perform a Bluetooth connection. .
  • the first value is used to indicate that the second device does not have a pairing relationship with other devices.
  • the first device may display a connection prompt window corresponding to the second device when the received signal strength of the first Bluetooth message is greater than a threshold.
  • step 613 is the same as the execution process of step 430, and will not be repeated here.
  • Step 614 when the pairing identification bit in the first Bluetooth message is the second value, the first device does not respond to the first Bluetooth message.
  • the second value is used to indicate that the second device has a pairing relationship with other devices.
  • step 614 is the same as the execution process of step 440, and will not be repeated here.
  • the first device may further perform step 621, or, the first device may further perform step 631.
  • Step 621 when the pairing identification bit in the first Bluetooth message is the second value, the first device starts a first timer according to the receiving time of the first Bluetooth message.
  • the first device can set the receiving time of the first Bluetooth message as the starting time of the first timer when the pairing identification bit is the second value.
  • Step 622 the first device scans the Bluetooth broadcast channel again to obtain the second Bluetooth packet of the second device.
  • the first device can scan the Bluetooth broadcast channel again, and use the scanned Bluetooth message of the second device as the second Bluetooth message.
  • Step 623 when the pairing identification bit of the second bluetooth message is the second value and the receiving time of the second bluetooth message is earlier than the timeout time of the first timer, the first device does not respond to the second bluetooth message .
  • the first device will read the pairing identification bit of the second Bluetooth message.
  • the pairing identification bit of the second bluetooth message is the second value, and the receiving time of receiving the second bluetooth message is earlier than the timeout time of the first timer, control the first device to continue not responding to the second bluetooth message, So that the first device will not be disturbed by the second bluetooth message.
  • timeout period of the first timer may be a value set manually.
  • values such as 1.5 seconds, 2 seconds, 2.5 seconds or 3 seconds are not limited in this embodiment of the present application.
  • the timeout duration of the first timer may be set correspondingly according to different device types of the second device. For example, the timeout duration of the first timer corresponding to the mobile phone type is 2 seconds, the timeout duration of the first timer corresponding to the wearable device type is 3 seconds, and the timeout duration of the first timer corresponding to the vehicle terminal type is 5 seconds. The timeout duration of the first timer corresponding to the household appliance type is 3 seconds.
  • Step 631 when the pairing identification bit in the first bluetooth message is the second value, the first device starts a first timer according to the receiving time of the first bluetooth message.
  • step 631 may refer to the execution manner of step 621, which will not be repeated here.
  • Step 632 the first device scans the Bluetooth broadcast channel again to obtain the second Bluetooth packet of the second device.
  • step 632 may refer to the execution manner of step 622, which will not be repeated here.
  • Step 633 when the pairing identification bit of the second bluetooth message is the second value and the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, the first device according to the second bluetooth message Display the connection prompt window corresponding to the second device.
  • the first device checks the receiving time of the second Bluetooth message and the timeout of the first timer. In response to the fact that the receiving time of the second Bluetooth message is not earlier than the timeout time of the first timer, it means that the limited duration set by the first timer has ended, and the first device can display the second device's time limit according to the second Bluetooth message The corresponding connection prompt window.
  • the first device is the first mobile phone used by Jack
  • the second device is the TWS headset used by Brown, which is placed in the matching charging box.
  • Brown's mobile phone is a device that has a pairing relationship with the TWS headset. If Jack and Brown are in a coffee shop, they use their mobile phones to check information. If Brown opens the charging compartment where his TWS headset is placed, the TWS headset will broadcast the first Bluetooth message in the Bluetooth broadcast channel, wherein the pairing identification bit in the first Bluetooth message is the second value. At this time, the first mobile phone of Jack as the first device will obtain the first Bluetooth message through scanning, because the pairing identification bit in the first Bluetooth message is the second value. Therefore, Jack's first mobile phone will not respond to the first Bluetooth message.
  • Jack's mobile phone can simultaneously use the moment when the first bluetooth message is received as the starting moment of the first timer, and set the first timer according to 2 seconds. If within the 2 seconds, the TWS headset successfully establishes a Bluetooth connection with Brown's second mobile phone, Jack's first mobile phone will no longer display the connection prompt window. If the TWS headset fails to establish a Bluetooth connection with other devices within the 2 seconds, Jack's first mobile phone will display the connection prompt window corresponding to the second device when the Bluetooth message broadcast by the TWS headset is scanned again.
  • the first device when the first device scans the first Bluetooth message broadcast by the second device, it can perform corresponding operations according to the value of the pairing identification bit in the Bluetooth message.
  • a connection prompt window corresponding to the second device is displayed according to the first Bluetooth message.
  • the first Bluetooth message is not responded to, which reduces disturbance to the first device when the second device connects to the first device with a small probability.
  • the Bluetooth connection prompt method provided in this embodiment can also make the first device receive the pairing identification bit in the first Bluetooth message according to the receiving time Start the first timer, scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device, and do not respond to the second Bluetooth message when the receiving time of the second Bluetooth message is earlier than the timeout time of the first timer. message, so that the first device can pass the timeout period of the first timer to prevent the first device from being interfered by the second Bluetooth message from popping up a connection prompt window by mistake.
  • the Bluetooth connection prompt method provided in this embodiment can also make the first device receive the pairing identification bit in the first Bluetooth message according to the receiving time Start the first timer, scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device, and when the receiving time of the second Bluetooth message is not earlier than the timeout time of the first timer, according to the second Bluetooth
  • the message displays a connection prompt window, so that the first device and the second device can be normally connected by bluetooth under the condition of avoiding disturbance.
  • FIG. 7 is a flowchart of a method for prompting a Bluetooth connection provided in another exemplary embodiment of the present application.
  • the method for prompting the Bluetooth connection can be completed by cooperation of the first device and the second device.
  • the prompting method of the Bluetooth connection includes:
  • Step 711 in the case that the second device is a Bluetooth headset, the second device receives a wake-up instruction sent by its matching charging case, and enters the Bluetooth broadcasting state.
  • the Bluetooth headset when the Bluetooth headset is placed in the matching charging compartment and the charging compartment is in the closed state, the Bluetooth headset is in the standby state.
  • Step 712 the second device generates a first Bluetooth packet.
  • step 712 is the same as the execution process of step 520, and will not be repeated here.
  • Step 713 in the Bluetooth broadcast state, the second device periodically broadcasts the first Bluetooth message in the Bluetooth broadcast channel based on the broadcast interval.
  • step 713 is the same as the execution process of step 530, and will not be repeated here.
  • Step 714 the first device scans for Bluetooth broadcast channels.
  • the first device can scan the Bluetooth broadcast channel for the purpose of obtaining Bluetooth packets.
  • Step 715 if the first Bluetooth packet of the second device is scanned, the first device determines the pairing identification bit in the first Bluetooth packet.
  • the first Bluetooth message includes at least two pairing identification bits, and different pairing identification bits correspond to different device types.
  • the first device can acquire the device type of the first device, and the first device can determine an identification bit corresponding to the device type of the first device among the at least two pairing identification bits as the pairing identification bit.
  • Step 716 When the pairing identification bit in the first Bluetooth message is the first value, the first device displays a connection prompt window corresponding to the second device according to the first Bluetooth message.
  • Step 717 when the pairing identification bit in the first Bluetooth message is the second value, the first device does not respond to the first Bluetooth message.
  • Step 721 when broadcasting the first bluetooth message, the second device starts a second timer, and the pairing identification bit in the first bluetooth message is the second value.
  • a second timer is set in the second device.
  • the second timer is set when the second device sends the first Bluetooth message whose pairing identification bit is the second value.
  • Step 722 In response to the fact that the second timer has not expired, generate a second bluetooth message, the pairing identification bit of the second bluetooth message is the second value; broadcast the second bluetooth message in the bluetooth broadcast channel.
  • Step 723 the first device scans the Bluetooth broadcast channel again to obtain the second Bluetooth packet of the second device.
  • Step 724 in the case that the pairing identification bit of the second Bluetooth message is the first value, the first device displays a connection prompt window corresponding to the second device according to the second Bluetooth message.
  • connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device.
  • the first value is used to indicate that the second device has a pairing relationship with other devices and the second timer expires, and the second timer is started when the second device broadcasts the first Bluetooth message.
  • the first device can display a connection prompt corresponding to the second device when the pairing identification bit of the second Bluetooth message is the first value and the received signal strength of the second Bluetooth message is greater than the threshold window.
  • Step 731 start a second timer when broadcasting the first bluetooth message.
  • Step 732 Generate a third bluetooth message in response to the timeout of the second timer, the pairing identification bit of the third bluetooth message is the first value; broadcast the third bluetooth message in the bluetooth broadcast channel.
  • Step 733 the first device scans the Bluetooth broadcast channel again to obtain the third Bluetooth packet of the second device.
  • Step 734 when the pairing identification bit of the third bluetooth message is the second value, the first device does not respond to the third bluetooth message.
  • the second value indicates that the second device has a pairing relationship with other devices and the second timer has not expired, and the second timer is started when the second device broadcasts the first Bluetooth packet.
  • this application enables the second device to set the second timer according to the pairing identification bit in the first Bluetooth message sent by itself, so that the first device does not need to set the timer, but only according to the The pairing identification bit in the scanned Bluetooth message can determine the next operation.
  • the first device In response to the pairing identification bit obtained by the first device being the second value, the first device does not respond to the Bluetooth message in which the pairing identification bit is located; in response to the pairing identification bit obtained by the first device being the first value, according to The Bluetooth message where the pairing identification bit is located displays a connection prompt window, so that the first device can pass the timeout period of the first timer, and prevent the first device from being interfered by the second Bluetooth message from popping up a connection prompt window by mistake.
  • FIG. 8 is a structural block diagram of a Bluetooth-connected prompting device provided by an exemplary embodiment of the present application.
  • the bluetooth-connected prompting device can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
  • the unit includes:
  • Scanning module 810 for scanning bluetooth broadcast channel
  • the determination module 820 is configured to determine the pairing identification bit in the first Bluetooth message when the first Bluetooth message of the second device is scanned, and the pairing identification bit is used to indicate whether the second device There is already a pairing relationship with other devices;
  • the prompt window display module 830 is configured to display the connection prompt window corresponding to the second device according to the first Bluetooth message when the pairing identification bit in the first Bluetooth message is the first value,
  • the connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device;
  • An operation module 840 configured to not respond to the first Bluetooth message when the pairing identification bit in the first Bluetooth message is the second value.
  • the first value involved in the apparatus is used to indicate that the second device does not have a pairing relationship with other devices; the second value is used to indicate that the second device Already paired with another device.
  • the device further includes a first execution module, configured to, when the pairing identification bit in the first Bluetooth message is a second value, Start the first timer at the moment of receiving the text; scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device; the pairing identification bit in the second Bluetooth message is the second value and the receiving time of the second bluetooth message is earlier than the timeout time of the first timer, do not respond to the second bluetooth message.
  • a first execution module configured to, when the pairing identification bit in the first Bluetooth message is a second value, Start the first timer at the moment of receiving the text; scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device; the pairing identification bit in the second Bluetooth message is the second value and the receiving time of the second bluetooth message is earlier than the timeout time of the first timer, do not respond to the second bluetooth message.
  • the device further includes a second execution module, configured to, when the pairing identification bit in the first Bluetooth message is a second value, Start the first timer at the moment of receiving the text; scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device; the pairing identification bit in the second Bluetooth message is the second When the value is obtained and the receiving time of the second Bluetooth message is not earlier than the timeout time of the first timer, the connection prompt window corresponding to the second device is displayed according to the second Bluetooth message.
  • a second execution module configured to, when the pairing identification bit in the first Bluetooth message is a second value, Start the first timer at the moment of receiving the text; scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device; the pairing identification bit in the second Bluetooth message is the second When the value is obtained and the receiving time of the second Bluetooth message is not earlier than the timeout time of the first timer, the connection prompt window corresponding to the second device is displayed according to the second Bluetooth message.
  • the device further includes a third execution module, configured to scan the Bluetooth broadcast channel again when the pairing identification bit in the first Bluetooth message is the second value , to obtain the second bluetooth message of the second device; when the pairing identification bit of the second bluetooth message is the first value, display the A connection prompt window corresponding to the second device, the connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device; wherein, the first value is used to indicate that the second device has been paired with other devices relationship and the second timer expires, the second timer is started when the second device broadcasts the first Bluetooth message, and the pairing identification bit in the first Bluetooth message is the second value .
  • a third execution module configured to scan the Bluetooth broadcast channel again when the pairing identification bit in the first Bluetooth message is the second value , to obtain the second bluetooth message of the second device; when the pairing identification bit of the second bluetooth message is the first value, display the A connection prompt window corresponding to the second device, the connection prompt window is used to prompt whether to perform a Bluetooth connection with the second device; wherein, the first value is
  • the device further includes a fourth execution module, configured to scan the Bluetooth broadcast channel again when the pairing identification bit in the first Bluetooth message is the second value , to obtain the third Bluetooth message of the second device; when the pairing identification bit of the third Bluetooth message is the second value, do not respond to the third Bluetooth message; wherein , the second value indicates that the second device has a pairing relationship with other devices and the second timer has not timed out, and the second timer is started when the second device broadcasts the first Bluetooth message , the pairing identification bit in the first Bluetooth packet is a second value.
  • the prompt window display module 830 is configured to display a connection prompt window corresponding to the second device when the received signal strength of the first Bluetooth message is greater than a threshold.
  • the first Bluetooth packet in the device includes at least two identification bits, and different identification bits correspond to different device types, and the determining module 820 is configured to obtain The device type of the first device; determining the identification bit corresponding to the device type of the first device among the at least two identification bits as the pairing identification bit in the first Bluetooth message.
  • the first device when the first device scans the first Bluetooth message broadcast by the second device, it can perform corresponding operations according to the value of the pairing identification bit in the Bluetooth message.
  • a connection prompt window corresponding to the second device is displayed according to the first Bluetooth message.
  • the first Bluetooth message is not responded to, which reduces disturbance to the first device when the second device connects to the first device with a small probability.
  • the Bluetooth connection prompting device provided in this embodiment can also make the first device, when the value of the pairing identification bit in the received first Bluetooth message is the second value, according to the receiving time of the first Bluetooth message Start the first timer, scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device, and do not respond to the second Bluetooth message when the receiving time of the second Bluetooth message is earlier than the timeout time of the first timer. message, so that the first device can pass the timeout period of the first timer to prevent the first device from being interfered by the second Bluetooth message from popping up a connection prompt window by mistake.
  • the Bluetooth connection prompting device provided in this embodiment can also make the first device, when the value of the pairing identification bit in the received first Bluetooth message is the second value, according to the receiving time of the first Bluetooth message Start the first timer, scan the Bluetooth broadcast channel again to obtain the second Bluetooth message of the second device, and if the receiving time of the second Bluetooth message is not earlier than the timeout time of the first timer, according to the second Bluetooth
  • the message displays a connection prompt window, so that the first device and the second device can be normally connected by bluetooth under the condition of avoiding disturbance.
  • FIG. 9 is a structural block diagram of a device for sending a Bluetooth message provided by an exemplary embodiment of the present application.
  • the device for sending the bluetooth message can be implemented as all or a part of the terminal through software, hardware or a combination of the two.
  • the unit includes:
  • a state transition module 910 configured to enter the bluetooth broadcast state when the trigger condition is met
  • the message generation module 920 is configured to generate a first Bluetooth message, the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices;
  • the message broadcast module 930 is configured to broadcast the first Bluetooth message in the Bluetooth broadcast channel in the Bluetooth broadcast state.
  • the device further includes a fifth execution module, configured to, when the pairing identification bit in the first Bluetooth message is a second value, broadcast the second When a bluetooth message is received, start a second timer; the second value is used to indicate that the second device has a pairing relationship with other devices; in response to the second timer not overtime, generate a second bluetooth report
  • the pairing identification bit of the second bluetooth message is the second value; the second bluetooth message is broadcast in the bluetooth broadcast channel, and the pairing identification bit in the first bluetooth message is The second value.
  • the device further includes a sixth execution module, configured to, when the pairing identification bit in the first Bluetooth packet is a second value, broadcast the second When a bluetooth message is received, start a second timer; the second value is used to indicate that the second device has a pairing relationship with other devices; in response to the timeout of the second timer, generate a third bluetooth message , the pairing identification bit of the third bluetooth message is the first value; the third bluetooth message is broadcast in the bluetooth broadcast channel, and the pairing identification bit in the first bluetooth message is the first value Two values.
  • a sixth execution module configured to, when the pairing identification bit in the first Bluetooth packet is a second value, broadcast the second When a bluetooth message is received, start a second timer; the second value is used to indicate that the second device has a pairing relationship with other devices; in response to the timeout of the second timer, generate a third bluetooth message , the pairing identification bit of the third bluetooth message is the first value; the third bluetooth message is broadcast in the bluetooth broadcast channel, and the pairing identification bit in the first bluetooth message is the first value
  • the second device involved in the apparatus is at least one of a Bluetooth headset, a Bluetooth bracelet, a Bluetooth watch, a Bluetooth collar, a Bluetooth ring, or Bluetooth glasses.
  • the second device involved in the device is a Bluetooth earphone.
  • the Bluetooth earphone When the Bluetooth earphone is placed in a matching charging bin and the charging bin is in a closed state, the Bluetooth earphone is in In the standby state, the state conversion module 910 is configured to receive a wake-up instruction sent by the charging bin and enter the Bluetooth broadcast state, and the wake-up instruction is when the charging bin changes from the closed state to the open state Generated instructions.
  • this application enables the second device to set the second timer according to the pairing identification bit in the first Bluetooth message sent by itself, so that the first device does not need to set the timer, but only according to the The pairing identification bit in the scanned Bluetooth message can determine the next operation.
  • the first device In response to the pairing identification bit obtained by the first device being the second value, the first device does not respond to the Bluetooth message in which the pairing identification bit is located; in response to the pairing identification bit obtained by the first device being the first value, according to The Bluetooth message where the pairing identification bit is located displays a connection prompt window, so that the first device can pass the timeout period of the first timer, and prevent the first device from being interfered by the second Bluetooth message from popping up a connection prompt window by mistake.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to realize the Bluetooth connection described in the above embodiments Prompt method.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to realize the Bluetooth message described in the above embodiments sending method.
  • the embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the Bluetooth connection prompting method provided by the above-mentioned embodiments.
  • An embodiment of the present application also provides a computer program product, where the computer program product includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method for sending a Bluetooth message provided by each of the foregoing embodiments.
  • the prompting device for Bluetooth connection when the prompting device for Bluetooth connection provided by the above-mentioned embodiment executes the prompting method for Bluetooth connection, it only uses the division of the above-mentioned functional modules for illustration. In practical applications, the above-mentioned functions can be assigned by different The functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the bluetooth connection prompting device and the bluetooth connection prompting method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • the program can be stored in a computer-readable storage medium.
  • the above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

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

Abstract

本申请实施例公开了一种蓝牙连接的提示方法、装置、设备、存储介质及程序产品,属于蓝牙技术领域。第一设备得到第二设备的第一蓝牙报文,由于第一蓝牙报文中包括配对标识位,并且该配对标识位用于指示第二设备是否已与其它设备存在配对关系。因此,第一设备能够基于该第二设备的配对关系进行不同的操作。当配对标识位是第一取值时,根据第一蓝牙报文显示第二设备对应的连接提示窗,从而能够即刻提示是否与第二设备建立蓝牙连接。当配对标识位是第二取值时,不响应第一蓝牙报文,从而避免了第二设备在已与其它设备有配对关系时立刻在第一设备中显示连接提示窗,减少了第一设备被无需连接的设备打扰的情形,提高了第一设备抗干扰能力。

Description

蓝牙连接的提示方法、装置、设备、存储介质及程序产品
本申请要求于2021年07月16日提交的申请号为202110807401.8、发明名称为“蓝牙连接的提示方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及蓝牙技术领域,特别涉及一种蓝牙连接的提示方法、装置、设备、存储介质及程序产品。
背景技术
蓝牙技术作为一种短距离无线通信技术,在通信距离、传输时延和数据量等指标上表现均较为优秀。因此,蓝牙技术通常被选为两个设备之间的短距离无线通信的方式。
相关技术中,用户在日常生活中通常将手机作为主设备。为了蓝牙耳机与手机的使用方便,在蓝牙耳机已与手机配对的情况下,蓝牙耳机在开机后将自动与手机进行蓝牙连接。
发明内容
本申请实施例提供了一种蓝牙连接的提示方法、装置、设备、存储介质及程序产品。所述技术方案如下:
根据本申请的一方面内容,提供了一种蓝牙连接的提示方法,所述方法由第一设备执行,所述方法包括:
扫描蓝牙广播信道;
在扫描到第二设备的第一蓝牙报文的情况下,确定所述第一蓝牙报文中的配对标识位,所述配对标识位用于指示所述第二设备是否已与其它设备存在配对关系;
在所述配对标识位为第一取值的情况下,根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;
在所述第一蓝牙报文中的配对标识位为第二取值的情况下,不响应所述第一蓝牙报文。
根据本申请的另一方面内容,提供了一种蓝牙报文的发送方法,所述方法由第二设备执行,所述方法包括:
在满足触发条件的情况下,进入蓝牙广播状态;
生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示所述第二设备是否已与其它设备存在配对关系;
在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
根据本申请的另一方面内容,提供了一种蓝牙连接的提示装置,所述装置包括:
扫描模块,用于扫描蓝牙广播信道;
确定模块,用于在扫描到第二设备的第一蓝牙报文的情况下,确定所述第一蓝牙报文中的配对标识位,所述配对标识位用于指示所述第二设备是否已与其它设备存在配对关系;
提示窗显示模块,用于在所述配对标识位为第一取值的情况下,根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;
操作模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,不响应所述第一蓝牙报文。
根据本申请的另一方面内容,提供了一种蓝牙报文的发送装置,所述装置包括:
状态转换模块,用于在满足触发条件的情况下,进入蓝牙广播状态;
报文生成模块,用于生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示所述第二设备是否已与其它设备存在配对关系;
报文广播模块,用于在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
根据本申请的另一方面内容,提供了一种设备,所述设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如本申请各个方面提供的蓝牙连接的提示方法。
根据本申请的另一方面内容,提供了一种设备,所述设备包括处理器和存储器,所述存储器中存储有至少一条指令,所述指令由所述处理器加载并执行以实现如本申请各个方面提供的蓝牙报文的发送方法。
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如本申请各个方面提供的蓝牙连接的提示方法。
根据本申请的另一方面内容,提供了一种计算机可读存储介质,所述存储介质中存储有至少一条指令,所述指令由处理器加载并执行以实现如本申请各个方面提供的蓝牙报文的发送方法。
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各种可选实现方式中提供的蓝牙连接的提示方法。
根据本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各种可选实现方式中提供的蓝牙报文的发送方法。
附图说明
图1是本申请一个示例性实施例提供的第一设备的结构框图;
图2是本申请一个示例性实施例提供的第二设备的结构框图;
图3是本申请实施例提供的一种蓝牙连接设备系统的架构图;
图4是本申请一个示例性实施例提供的一种蓝牙连接的提示方法的流程图;
图5是本申请一个示例性实施例提供的一种蓝牙报文的发方法的流程图;
图6是本申请另一个示例性实施例提供的一种蓝牙连接的提示方法流程图;
图7是本申请另一个示例性实施例提供的一种蓝牙连接的提示方法流程图;
图8是本申请一个示例性实施例提供的一种蓝牙连接的提示装置的结构框图;
图9是本申请一个示例性实施例提供的一种蓝牙报文的发送装置的结构框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
需要说明的是,使用个人可识别信息应遵循公认为满足或超过维护用户隐私的行业或政府要求的隐私政策和做法。具体地,个人可识别信息在管理和处理的过程中应当向用户明确说明授权使用的性质,以使无意或未经授权的访问或使用的风险最小化。
本申请实施例提供的蓝牙连接的提示方法可以由第一设备执行,该方法包括:
扫描蓝牙广播信道;
在扫描到第二设备的第一蓝牙报文的情况下,确定第一蓝牙报文中的配对标识位,配对标识位用于指示第二设备是否已与其它设备存在配对关系;
在配对标识位为第一取值的情况下,根据第一蓝牙报文显示第二设备对应的连接提示窗,连接提示窗用于提示是否与第二设备进行蓝牙连接;
在第一蓝牙报文中的配对标识位为第二取值的情况下,不响应第一蓝牙报文。
可选的,第一取值用于指示第二设备未与其它设备存在配对关系;
第二取值用于指示第二设备已与其它设备存在配对关系。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位为第二取值的情况下,根据第一蓝牙报文的接收时刻启动第一定时器;
再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文;
在第二蓝牙报文的配对标识位为第二取值且第二蓝牙报文的接收时刻早于第一定时器的超时时刻的情况下,不响应第二蓝牙报文。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位为第二取值的情况下,根据第一蓝牙报文的接收时刻启动第一定时器;
再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文;
在第二蓝牙报文的配对标识位为第二取值且第二蓝牙报文的接收时刻不早于第一定时器的超时时刻的情况下,根据第二蓝牙报文显示第二设备对应的连接提示窗。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文;
在第二蓝牙报文的配对标识位为第一取值的情况下,根据第二蓝牙报文显示第二设备对应的连接提示窗,连接提示窗用于提示是否与第二设备进行蓝牙连接;
其中,第一取值用于表示第二设备已与其它设备存在配对关系且第二定时器超时,第二定时器是第二设备在广播第一蓝牙报文时启动的。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描蓝牙广播信道,得到第二设备的第三蓝牙报文;
在第三蓝牙报文的配对标识位为第二取值的情况下,不响应第三蓝牙报文;
其中,第二取值表示第二设备已与其它设备存在配对关系且第二定时器未超时,第二定时器是第二设备在广播第一蓝牙报文时启动的。
可选的,根据第一蓝牙报文显示第二设备对应的连接提示窗,包括:
在第一蓝牙报文的接收信号强度大于门限的情况下,显示第二设备对应的连接提示窗。
可选的,第一蓝牙报文中包括至少两个标识位,不同的标识位对应不同的设备类型,确定第一蓝牙报文中的配对标识位,包括:
获取第一设备的设备类型;
将至少两个标识位中与第一设备的设备类型对应的标识位,确定为配对标识位。
本申请实施例提供的蓝牙报文的发送方法可以由第二设备执行,该方法包括:
在满足触发条件的情况下,进入蓝牙广播状态;
生成第一蓝牙报文,第一蓝牙报文携带有配对标志位,配对标志位用于指示第二设备是否已与其它设备存在配对关系;
在蓝牙广播状态下,在蓝牙广播信道中广播第一蓝牙报文。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位是第二取值的情况下,在广播第一蓝牙报文时,启动第二定时器;第二取值用于指示第二设备已与其它设备存在配对关系;
响应于第二定时器未超时,生成第二蓝牙报文,第二蓝牙报文的配对标识位是第二取值;在蓝牙广播信道中广播第二蓝牙报文。
可选的,方法还包括:
在第一蓝牙报文中的配对标识位是第二取值的情况下,在广播第一蓝牙报文时,启动第二定时器;第二取值用于指示第二设备已与其它设备存在配对关系;
响应于第二定时器超时,生成第三蓝牙报文,第三蓝牙报文的配对标识位是第一取值;在蓝牙广播信道中广播第三蓝牙报文。
可选的,第二设备是蓝牙耳机、蓝牙手环、蓝牙手表、蓝牙项圈、蓝牙戒指或蓝牙眼镜中的至少一种。
可选的,第二设备是蓝牙耳机,蓝牙耳机放置在配套的充电仓中且充电仓处于合盖状态时,蓝牙耳机处于待机状态,在满足触发条件的情况下,进入蓝牙广播状态,包括:
接收充电仓发送的唤醒指令,进入蓝牙广播状态,唤醒指令是充电仓从合盖状态变为开盖状态时生成的指令。
为了本申请实施例所示方案易于理解,下面对本申请实施例中出现的若干名词进行介绍。
蓝牙报文:是一种基于蓝牙协议生成的报文。基于用途的不同,蓝牙报文可以分为多个类型。在本申请中,蓝牙报文用于提供连接信息,该连接信息用于连接两个设备。例如,第一设备发送的蓝牙报文,可以用于接收到该蓝牙报文的设备与第一设备建立蓝牙连接。
一种可能的方式中,蓝牙报文可以被第一设备通过广播的方式广播至蓝牙信道。其它设备可以通过扫描的方式,从蓝牙信道中获取该蓝牙报文。
可选的,蓝牙报文可以是第一设备周期性广播的,该周期可以是广播间隔(Advertising interval)。例如广播间隔是0.2秒,则第一设备每隔0.2秒将广播一次蓝牙报文。
在本申请中,蓝牙报文包括第一蓝牙报文、第二蓝牙报文和第三蓝牙报文等。需要说明的是,本申请中的第n蓝牙报文仅为区别不同的蓝牙报文。第n蓝牙报文的含义和上述概念蓝牙报文的含义相同,本处不再赘述。其中,n为正整数。
配对标识位:是设置在蓝牙报文中的一个数据位。在一种可能的实现方式中,该配对标识位既可以复用蓝牙报文中的数据位。在另一种可能的实现方式中,该配对标识位可以是蓝牙报文中新增的数据位。
例如,以蓝牙报文原本中有m个数据位为例进行介绍。一种方式中,在配对标识位复用蓝牙报文中的数据位的情况下,蓝牙报文的数据位的个数可以不变,仍为m个数据位,m为正整数。另一种方式中,在配对标识位不复用蓝牙报文中的数据位的情况下,蓝牙报文的数据位的个数需要新增一位配对标识位,新增配对标识位后的蓝牙报文的数据位的个数是m+1位。
在一种可能的方式中,配对标识位的取值是二值。也即,配对标识位的取值可以是0或1。在本申请的一种可能的实现方式中,配对标识位的取值既可能是第一取值也可能是第二取值。一种可能的赋值方式中,第一取值是0,第二取值是1。在另一种可能的赋值方式中,第一取值是1,第二取值是0。
请参见图1,图1是本申请一个示例性实施例提供的第一设备的结构框图,如图1所示,该第一设备包括处理器120和存储器140,所述存储器140中存储有至少一条指令,所述指令由所述处理器120加载并执行以实现如本申请各个方法实施例所述的蓝牙连接的提示方法。
在本申请中,第一设备100是具备蓝牙功能的电子设备。扫描蓝牙广播信道;在扫描到第二设备的第一蓝牙报文的情况下,确定第一蓝牙报文中的配对标识位,配对标识位用于指示第二设备是否已与其它设备存在配对关系;在配对标识位为第一取值的情况下,根据第一蓝牙报文显示第二设备对应的连接提示窗,连接提示窗用于提示是否与第二设备进行蓝牙连接;在配对标识位为第二取值的情况下,不响应第一蓝牙报文。
处理器120可以包括一个或者多个处理核心。处理器120利用各种接口和线路连接整个第一设备100内的各个部分,通过运行或执行存储在存储器140内的指令、程序、代码集或指令集,以及调用存储在存储器140内的数据,执行第一设备100的各种功能和处理数据。可选的,处理器120可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器120可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器120中,单独通过一块芯片进行实现。
存储器140可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选的,该存储器140包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器140可用于存储指令、程序、代码、代码集或指令集。存储器140可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。
可选地,第一设备可以是智能手机、平板电脑、个人电脑、膝上型电脑、电视、智能眼镜或智能手表等具有控制功能的设备。在一些场景中,第一设备可以称为主设备。
请参见图2,图2是本申请一个示例性实施例提供的第二设备的结构框图,如图2所示,该第二设备包括处理器220和存储器240,所述存储器240中存储有至少一条指令,所述指令由所述处理器220加载并执行以实现如本申请各个方法实施例所述的蓝牙连接的提示方法。
在本申请中,第二设备200是具备蓝牙功能的电子设备。第二设备200在满足触发条件的情况下,进入蓝牙广播状态(Advertiser/advertising);生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示所述第二设备是否与其它设备存在配对关系;在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
处理器220可以包括一个或者多个处理核心。处理器220利用各种接口和线路连接整个第二设备200内的各个部分,通过运行或执行存储在存储器240内的指令、程序、代码集或指令集,以及调用存储在存储器240内的数据,执行第二设备200的各种功能和处理数据。可选的,处理器220可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器220可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器220中,单独通过一块芯片进行实现。
存储器240可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory,ROM)。可选的,该存储器240包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器240可用于存储指令、程序、代码、代码集或指令集。存储器240可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储下面各个方法实施例中涉及到的数据等。
可选地,第二设备可以是蓝牙耳机、蓝牙手环、蓝牙手表、蓝牙项圈、蓝牙戒指或蓝牙 眼镜等具有指定辅助功能的设备。在一些场景中,第一设备可以称为主设备。
其中,蓝牙耳机可以是真无线立体声(True Wireless Stereo,TWS)耳机。该TWS耳机可以基于蓝牙技术与第一设备进行连接。当第二设备是TWS耳机时,TWS耳机既可以是单耳耳机,也可以是包括左耳机和右耳机的一对耳机。TWS耳机可以收纳在充电仓中。当作为蓝牙耳机的TWS耳机放置在配套的充电仓中且充电仓处于合盖状态时,蓝牙耳机处于待机状态(standby)。当充电仓从合盖状态转换为开盖状态时,蓝牙耳机进入广播状态。
需要说明的是,当第二设备是蓝牙手环、蓝牙手表、蓝牙项圈、蓝牙戒指或蓝牙眼镜设备时,第二设备也可以从待机状态切换为广播状态。
请参见图3,图3是本申请实施例提供的一种蓝牙连接设备系统的架构图。在蓝牙连接系统中,包括第一设备310和第二设备320。在一种应用场景中,在第二设备320处于待机状态时,第二设备320不与任何设备进行蓝牙连接。此时,在第二设备320的蓝牙信号覆盖范围内,存在第一设备310。当第二设备320从待机状态切换为广播状态后,本申请应用在第一设备310侧的蓝牙连接的提示方法和应用在第二设备320侧的蓝牙报文的发送方法将各自执行。
请参考图4,图4是本申请一个示例性实施例提供的一种蓝牙连接的提示方法的流程图。该蓝牙连接的提示方法可以由上述所示的第一设备执行。在图4中,蓝牙连接的提示方法包括:
步骤410,扫描蓝牙广播信道。
在本申请实施例中,第一设备能够扫描蓝牙广播信道。需要说明的是,蓝牙广播信道是按照蓝牙协议中的规定指定的信道。也即,蓝牙设备扫描蓝牙广播信号时,将会按照蓝牙协议在指定的蓝牙广播信道中扫描。
步骤420,在扫描到第二设备的第一蓝牙报文的情况下,第一设备确定第一蓝牙报文中的配对标识位,配对标识位用于指示第二设备是否已与其它设备存在配对关系。
在本申请中,第一设备可以周期性扫描蓝牙广播信道。当扫描到第一蓝牙报文时,第一设备可以通过该第一蓝牙报文中携带的广播设备的标识来确定广播该第一蓝牙报文的广播设备。当第一蓝牙报文是第二设备广播的报文时,第一设备将读取第一蓝牙报文中的配对标识位。
一种可能的方式中,第一蓝牙报文中的配对标识位是以明文的形式保存在第一蓝牙报文中。
在另一种可能的方式中,第一蓝牙报文中的配对标识位是以密文的形式保存在第一蓝牙报文中,当第一设备符合专用解码规则时,能够解密该第一蓝牙报文中的配对标识位。例如,同一厂商生产的设备均准守相同的一个专用解码规则。
需要说明的是,配对标识位用于指示第二设备是否已与其它设备存在配对关系。也即,配对标识位能够指示第二设备已与其它设备存在配对关系,以及,配对标识位还能够指示第二设备未与其它设备存在配对关系。
需要说明的是,在执行完成步骤420后,第一设备可以既执行步骤430,也可以执行步骤440,本申请实施例对此不作限定。
步骤430,在第一蓝牙报文中的配对标识位为第一取值的情况下,第一设备根据第一蓝牙报文显示第二设备对应的连接提示窗,连接提示窗用于提示是否与第二设备进行蓝牙连接。
在本申请实施例中,第一设备在配对标识位为第一取值的情况下,直接根据第一蓝牙报文显示第二设备对应的连接提示窗。需要说明的是,在配对标识位为第一取值的情况下,说明没有其它设备与第二设备存在配对关系。因此,第二设备大概率是全新的设备,可以直接显示第二设备对应的连接提示窗,以便用户需要连接第一设备和第二设备时,能够快速在第一设备的显示屏中看到连接提示窗,从而进行后续操作,建立第一设备和第二设备之间的蓝 牙连接。
步骤440,在第一蓝牙报文中的配对标识位为第二取值的情况下,不响应第一蓝牙报文。
在本申请实施例中,第一设备在配对标识位为第二取值的情况下,将不响应第一蓝牙报文。其中,第一取值和第二取值是不同的取值,两个表示的含义不同。在本例中,配对标识位为第二取值时,表示第二设备已与其它设备存在配对关系。
综上所述,本实施例提供的蓝牙连接的提示方法,第一设备通过扫描蓝牙广播信道得到第二设备的第一蓝牙报文,由于第一蓝牙报文中包括配对标识位,并且该配对标识位用于指示第二设备是否已与其它设备存在配对关系。因此,第一设备能够基于该第二设备的配对关系进行不同的操作。当配对标识位是第一取值时,根据第一蓝牙报文显示第二设备对应的连接提示窗,从而能够即刻提示是否与第二设备建立蓝牙连接。当配对标识位是第二取值时,不响应第一蓝牙报文,从而避免了第二设备在已与其它设备有配对关系时立刻在第一设备中显示连接提示窗,减少了第一设备被无需连接的设备打扰的情形,提高了第一设备抗干扰能力。
请参考图5,图5是本申请一个示例性实施例提供的一种蓝牙报文的发方法的流程图。该蓝牙报文的发送方法可以应用在上述所示的第二设备中。在图5中,蓝牙报文的发送方法包括:
步骤510,在满足触发条件的情况下,进入蓝牙广播状态。
在本申请中,第二设备可以是需要连接第一设备后提供辅助功能的设备,例如蓝牙耳机或者蓝牙手环等设备。第二设备从待机状态进入蓝牙广播状态需要用户执行的某些操作。比如,在满足触发条件的情况下,第二设备将进入蓝牙广播状态。
其中,触发条件可以是第二设备上的实体按键收到指定方式的按压,也可以是第二设备采集到指定的语音、触摸屏上接收到指定触控指令或者通过摄像头采集到指定手势,本申请不对触发条件的具体方式进行限定。
步骤520,生成第一蓝牙报文,第一蓝牙报文携带有配对标志位,配对标志位用于指示第二设备是否已与其它设备存在配对关系。
在本申请中,第二设备将生成第一蓝牙报文。其中,该广播报文用于通知其它设备自己可以进行蓝牙连接,便于其它设备根据该报文与第二设备建立蓝牙连接。
需要说明的是,第一蓝牙报文中携带有配对标识,该配对标识位指示第二设备是否已与其它设备存在配对关系。相较于相关技术,第二设备能够在本申请提供的方案中向广播自身的历史配对关系。
步骤530,在蓝牙广播状态下,在蓝牙广播信道中广播第一蓝牙报文。
在本申请中,第二设备在生成第一蓝牙报文后,即可在蓝牙广播状态下,在蓝牙广播信道中广播第一蓝牙报文。可选的,第二设备在广播第一蓝牙报文后,还能够根据需要重发与第一蓝牙报文内容相同的其它蓝牙报文,或者,第二设备广播其它蓝牙报文,本申请实施例对此不作限定。
综上所述,本申请提供的一种蓝牙报文的发送方法,第二设备能够在满足触发条件的情况下,进入蓝牙广播状态,第二设备能够生成携带有配对标志位的第一蓝牙报文,该配对标志位用于指示第二设备是否已与其它设备存在配对关系。因而本申请中的第二设备能够将自身与其它设备之间的配对关系通过蓝牙报文广播,使得接收到报文的设备能够基于配对标志位选择是否立即弹出连接提示窗,从而在低概率连接的场景中降低对其它设备的干扰,并正在高概率连接的场景中迅速弹出连接题述窗。
基于本申请中的图4和图5所示的实施例所公开的方案,本申请还能够在第一设备和第二设备的配合下完成蓝牙连接的提示过程,请参考如下实施例。
请参见图6,图6是本申请另一个示例性实施例提供的一种蓝牙连接的提示方法流程图。 该蓝牙连接的提示方法可以由第一设备和第二设备配合完成。在图6中,该蓝牙连接的提示方法包括:
步骤601,在第二设备是蓝牙耳机的情况下,第二设备接收其配套的充电仓发送的唤醒指令,进入蓝牙广播状态。
其中,蓝牙耳机放置在配套的充电仓中且充电仓处于合盖状态时,蓝牙耳机处于待机状态。
在本申请中,在第二设备是蓝牙耳机的情况下,该蓝牙耳机可以是配套有充电仓的设备。蓝牙耳机在充电仓中且充电仓处于合盖状态时,蓝牙耳机处于关机状态、离线状态或待机状态。当充电仓从合盖状态切换到开盖状态时,充电仓向蓝牙耳机发送唤醒指令。
需要说明的是,唤醒指令既可以是充电仓通过有线的方式发送至蓝牙耳机,也可以是充电仓通过无线的方式发送至蓝牙耳机。其中,有线的方式可以采用信号通路,该信号通路包括充电仓的金属馈点以及与充电仓的金属馈点接触的蓝牙耳机上的金属馈点。无线的方式是可以是电池仓将唤醒指令通过无线通信模块发送至蓝牙耳机。
步骤602,第二设备生成第一蓝牙报文。
在本申请实施例中,步骤602的执行过程和步骤520的执行过程相同,此处不再赘述。
步骤603,在蓝牙广播状态下,第二设备基于广播间隔在蓝牙广播信道中周期性广播第二设备的蓝牙报文。
在本申请中,第一蓝牙报文属于第二设备的蓝牙报文。若第二设备在蓝牙广播信道中依次广播第一蓝牙报文、第二蓝牙报文和第三蓝牙报文,则上述每两个蓝牙报文之间的广播间隔相同,使得第二设备的蓝牙报文能够周期性发送。
在本申请中,第二设备能够以指定的广播间隔周期性广播蓝牙报文。其中,第二设备广播的第一个蓝牙报文为第一蓝牙报文。
步骤611,第一设备扫描蓝牙广播信道。
在本申请实施例中,步骤611的执行过程和步骤410的执行过程相同,此处不再赘述。
步骤612,在扫描到第二设备的第一蓝牙报文的情况下,第一设备确定第一蓝牙报文中的配对标识位。
在本申请实施例中,步骤612可以被步骤(a1)和步骤(a2)所替代。
步骤(a1),获取第一设备的设备类型。
其中,第一蓝牙报文中包括至少两个标识位,不同的标识位对应不同的设备类型。
在本申请实施例中,设备类型可以包括手机类型、可穿戴设备类型、车载终端类型和家电类型等多种类型。需要说明的是,上述设备类型仅为示意性说明,本申请不对设备类型其它可能的实现方式形成限定。
步骤(a2),将至少两个标识位中与第一设备的设备类型对应的标识位,确定为第一蓝牙报文中的配对标识位。
在本申请中,第一蓝牙报文中可以预设q个标识位。例如,q为4,则第一蓝牙报文中预设4位标识位,分别是第一标识位、第二标识位、第三标识位和第四标识位。请参见表一。表一示出了各个标识位的数值及含义。
表一
Figure PCTCN2022097786-appb-000001
根据表一所示的数据,可知第一标识位用于指示第二设备是否与其它手机之间存在匹配关系;第二标识位用于指示第二设备是否与其它可穿戴设备之间存在匹配关系;第三标识位用于指示第二设备是否与其它车载终端之间存在匹配关系;第四标识位用于指示第二设备是否与其它家电之间存在匹配关系。
在第一设备执行完成步骤612后,可以选择执行步骤613或者步骤614。
步骤613,在第一蓝牙报文中的配对标识位为第一取值的情况下,第一设备根据第一蓝牙报文显示第二设备对应的连接提示窗。
在本申请中,配对标识位为第一取值的情况下,说明第二设备中不存在与其它设备的匹配关系。因此,第一设备能够根据第一蓝牙报文直接显示第二设备对应的连接提示窗,从而能够令用户尽快或者第二设备需要进行蓝牙连接并决定是否将第一设备和第二设备进行蓝牙连接。
可选的,第一取值用于指示第二设备未与其它设备存在配对关系。
可选的,第一设备可以在第一蓝牙报文的接收信号强度大于门限的情况下,显示第二设备对应的连接提示窗。
在本申请实施例中,步骤613的执行过程和步骤430的执行过程相同,此处不再赘述。
步骤614,在第一蓝牙报文中的配对标识位为第二取值的情况下,第一设备不响应第一蓝牙报文。
可选的,第二取值用于指示第二设备已与其它设备存在配对关系。
在本申请实施例中,步骤614的执行过程和步骤440的执行过程相同,此处不再赘述。
在第一设备执行完成步骤614后,第一设备还可以执行步骤621,或者,第一设备还可以执行步骤631。
步骤621,在第一蓝牙报文中的配对标识位为第二取值的情况下,第一设备根据第一蓝牙报文的接收时刻启动第一定时器。
在本申请中,第一设备能够在配对标识位为第二取值的情况下,将第一蓝牙报文的接收时刻设置为第一定时器启动时刻。
步骤622,第一设备再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文。
在本申请中,在设置了第一定时器之后,第一设备能够再次扫描蓝牙广播信道,将扫描到的第二设备的蓝牙报文作为第二蓝牙报文。
步骤623,在第二蓝牙报文的配对标识位为第二取值且第二蓝牙报文的接收时刻早于第一定时器的超时时刻的情况下,第一设备不响应第二蓝牙报文。
在本申请中,第一设备将读取第二蓝牙报文的配对标识位。当第二蓝牙报文的配对标识位是第二取值,并且接收该第二蓝牙报文的接收时刻早于第一定时器的超时时刻,控制第一设备继续不响应第二蓝牙报文,使得第一设备不会被第二蓝牙报文打扰。
需要说明的是,第一定时器的超时时长可以是人工设置的数值。例如,1.5秒、2秒、2.5秒或者3秒等数值,本申请实施例对此不作限定。
在另一种可能的实现方式中,第一定时器的超时时长可以根据第二设备的设备类型的不同而相应地设置。例如,手机类型对应的第一定时器的超时时长是2秒,可穿戴设备类型对应的第一定时器的超时时长是3秒,车载终端类型对应的第一定时器的超时时长是5秒,家电类型对应的第一定时器的超时时长是3秒。
步骤631,在第一蓝牙报文中的配对标识位为第二取值的情况下,第一设备根据第一蓝牙报文的接收时刻启动第一定时器。
在本申请中,步骤631的执行方式可以参照步骤621的执行方式,本处对此不作赘述。
步骤632,第一设备再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文。
在本申请中,步骤632的执行方式可以参照步骤622的执行方式,本处对此不做赘述。
步骤633,在第二蓝牙报文的配对标识位为第二取值且第二蓝牙报文的接收时刻不早于 第一定时器的超时时刻的情况下,第一设备根据第二蓝牙报文显示第二设备对应的连接提示窗。
在本申请中,第一设备在第二蓝牙报文的配对标识位是第二取值时,检查第二蓝牙报文的接收时刻与第一定时器的超时时刻。响应于第二蓝牙报文的接收时刻不早于第一定时器的超时时刻,说明第一定时器设定的限定时长已结束,第一设备此时可以根据第二蓝牙报文显示第二设备对应的连接提示窗。
在一种具体的实施场景中。第一设备是杰克使用的第一手机,第二设备是布朗使用的TWS耳机,该TWS耳机放置在配套的充电仓中。布朗的手机是与TWS耳机有配对关系的设备。若杰克和布朗处于一个咖啡厅,两人分别使用各自的手机查看信息。若布朗将自己的TWS耳机所放置的充电仓开盖,则TWS耳机在蓝牙广播信道中广播第一蓝牙报文,其中,第一蓝牙报文中的配对标识位是第二取值。此时,作为第一设备的杰克的第一手机,将通过扫描得到该第一蓝牙报文,由于第一蓝牙报文中的配对标识位是第二取值。因此,杰克的第一手机将不响应第一蓝牙报文。杰克的手机可以同时以接收到第一蓝牙报文的时刻为第一定时器的启动时刻,并按照2秒设置该第一定时器。若在该2秒的时长内,TWS耳机成功与布朗的第二手机建立了蓝牙连接,则杰克的第一手机不会再显示连接提示窗。若在该2秒的时长内,TWS耳机没有成功与其它设备建立蓝牙连接,则杰克的第一手机在再次扫描到TWS耳机广播的蓝牙报文时,显示第二设备对应的连接提示窗。
综上所述,本实施例能够令第一设备扫描到第二设备广播的第一蓝牙报文时,根据蓝牙报文中的配对标识位的取值执行相应的操作。响应于配对标识位的取值为第一取值时,根据第一蓝牙报文显示第二设备对应的连接提示窗。并且,响应于配对标识位的取值为第二取值时,不响应第一蓝牙报文,降低了第二设备在小概率连接第一设备时,对第一设备的打扰。
本实施例提供的蓝牙连接的提示方法,还能够令第一设备在接收到的第一蓝牙报文中的配对标识位的取值是第二取值时,根据第一蓝牙报文的接收时刻启动第一定时器,再次扫描蓝牙广播信道得到第二设备的第二蓝牙报文,在该第二蓝牙报文的接收时刻早于第一定时器的超时时刻的情况下,不响应第二蓝牙报文,使得第一设备能够通过第一定时器的超时时长,避免第一设备受到第二蓝牙报文的干扰误弹出连接提示窗。
本实施例提供的蓝牙连接的提示方法,还能够令第一设备在接收到的第一蓝牙报文中的配对标识位的取值是第二取值时,根据第一蓝牙报文的接收时刻启动第一定时器,再次扫描蓝牙广播信道得到第二设备的第二蓝牙报文,在该第二蓝牙报文的接收时刻不早于第一定时器的超时时刻的情况下,根据第二蓝牙报文显示连接提示窗,从而在避免打扰的情况下,也能够令第一设备和第二设备正常进行蓝牙连接。
请参见图7,图7是本申请另一个示例性实施例提供的一种蓝牙连接的提示方法流程图。该蓝牙连接的提示方法可以由第一设备和第二设备配合完成。在图7中,该蓝牙连接的提示方法包括:
步骤711,在第二设备是蓝牙耳机的情况下,第二设备接收其配套的充电仓发送的唤醒指令,进入蓝牙广播状态。
其中,蓝牙耳机放置在配套的充电仓中且充电仓处于合盖状态时,蓝牙耳机处于待机状态。
步骤712,第二设备生成第一蓝牙报文。
在本申请实施例中,步骤712的执行过程和步骤520的执行过程相同,此处不再赘述。
步骤713,在蓝牙广播状态下,第二设备基于广播间隔在蓝牙广播信道中周期性广播第一蓝牙报文。
在本申请实施例中,步骤713的执行过程和步骤530的执行过程相同,此处不再赘述。
步骤714,第一设备扫描蓝牙广播信道。
在本例中,第一设备能够扫描蓝牙广播信道,目的在于获取蓝牙报文。
步骤715,在扫描到第二设备的第一蓝牙报文的情况下,第一设备确定第一蓝牙报文中的配对标识位。
可选的,第一蓝牙报文中包括至少两个配对标识位,不同的配对标识位对应不同的设备类型。第一设备能够获取第一设备的设备类型,第一设备能够将至少两个配对标识位中与第一设备的设备类型对应的标识位,确定为配对标识位。
步骤716,在第一蓝牙报文中的配对标识位为第一取值的情况下,第一设备根据第一蓝牙报文显示第二设备对应的连接提示窗。
步骤717,在第一蓝牙报文中的配对标识位为第二取值的情况下,第一设备不响应第一蓝牙报文。
步骤721,在广播第一蓝牙报文时,第二设备启动第二定时器,第一蓝牙报文中的配对标识位是第二取值。
在本申请实施例中,第二设备中设置有第二定时器。该第二定时器是在第二设备发送配对标识位是第二取值的第一蓝牙报文时设置的。
步骤722,响应于第二定时器未超时,生成第二蓝牙报文,第二蓝牙报文的配对标识位是第二取值;在蓝牙广播信道中广播第二蓝牙报文。
步骤723,第一设备再次扫描蓝牙广播信道,得到第二设备的第二蓝牙报文。
步骤724,在第二蓝牙报文的配对标识位为第一取值的情况下,第一设备根据第二蓝牙报文显示第二设备对应的连接提示窗。
可选地,连接提示窗用于提示是否与第二设备进行蓝牙连接。在本例中,第一取值用于表示第二设备已与其它设备存在配对关系且第二定时器超时,第二定时器是第二设备在广播第一蓝牙报文时启动的。
可选地,第一设备能够在第二蓝牙报文的配对标识位为第一取值的情况,并且第二蓝牙报文的接收信号强度大于门限的情况下,显示第二设备对应的连接提示窗。
步骤731,在广播第一蓝牙报文时,启动第二定时器。
步骤732,响应于第二定时器超时,生成第三蓝牙报文,第三蓝牙报文的配对标识位是第一取值;在蓝牙广播信道中广播第三蓝牙报文。
步骤733,第一设备再次扫描蓝牙广播信道,得到第二设备的第三蓝牙报文。
步骤734,在第三蓝牙报文的配对标识位为第二取值的情况下,第一设备不响应第三蓝牙报文。
可选地,第二取值表示第二设备已与其它设备存在配对关系且第二定时器未超时,第二定时器是第二设备在广播第一蓝牙报文时启动的。
综上所述,本申请能够令第二设备根据自身所发送的第一蓝牙报文中的配对标识位的情况,来设置第二定时器,使得第一设备无需设置定时器,而是仅根据扫描到的蓝牙报文中的配对标识位,即可确定接下来的操作。响应于第一设备获取到的配对标识位是第二取值,第一设备不响应该配对标识位所在的蓝牙报文;响应于第一设备获取到的配对标识位是第一取值,根据配对标识位所在的蓝牙报文显示连接提示窗,从而使得第一设备能够通过第一定时器的超时时长,避免第一设备受到第二蓝牙报文的干扰误弹出连接提示窗。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图8,图8是本申请一个示例性实施例提供的一种蓝牙连接的提示装置的结构框图。该蓝牙连接的提示装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括:
扫描模块810,用于扫描蓝牙广播信道;
确定模块820,用于在扫描到第二设备的第一蓝牙报文的情况下,确定所述第一蓝牙报文中的配对标识位,所述配对标识位用于指示所述第二设备是否已与其它设备存在配对关系;
提示窗显示模块830,用于在所述第一蓝牙报文中的配对标识位为第一取值的情况下,根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;
操作模块840,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,不响应所述第一蓝牙报文。
在一个可选的实施例中,所述装置涉及的所述第一取值用于指示所述第二设备未与其它设备存在配对关系;所述第二取值用于指示所述第二设备已与其它设备存在配对关系。
在一个可选的实施例中,所述装置还包括第一执行模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,根据所述第一蓝牙报文的接收时刻启动第一定时器;再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;在所述第二蓝牙报文的所述配对标识位为所述第二取值且所述第二蓝牙报文的接收时刻早于所述第一定时器的超时时刻的情况下,不响应所述第二蓝牙报文。
在一个可选的实施例中,所述装置还包括第二执行模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,根据所述第一蓝牙报文的接收时刻启动第一定时器;再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;在所述第二蓝牙报文的所述配对标识位为所述第二取值且所述第二蓝牙报文的接收时刻不早于所述第一定时器的超时时刻的情况下,根据所述第二蓝牙报文显示所述第二设备对应的连接提示窗。
在一个可选的实施例中,所述装置还包括第三执行模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;在所述第二蓝牙报文的所述配对标识位为所述第一取值的情况下,根据所述第二蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;其中,所述第一取值用于表示所述第二设备已与其它设备存在配对关系且第二定时器超时,第二定时器是所述第二设备在广播所述第一蓝牙报文时启动的,所述第一蓝牙报文中的所述配对标识位是第二取值。
在一个可选的实施例中,所述装置还包括第四执行模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描所述蓝牙广播信道,得到所述第二设备的第三蓝牙报文;在所述第三蓝牙报文的所述配对标识位为所述第二取值的情况下,不响应所述第三蓝牙报文;其中,所述第二取值表示所述第二设备已与其它设备存在配对关系且第二定时器未超时,第二定时器是所述第二设备在广播所述第一蓝牙报文时启动的,所述第一蓝牙报文中的所述配对标识位是第二取值。
在一个可选的实施例中,所述提示窗显示模块830,用于在所述第一蓝牙报文的接收信号强度大于门限的情况下,显示所述第二设备对应的连接提示窗。
在一个可选的实施例中,所述装置中的所述第一蓝牙报文中包括至少两个标识位,不同的所述标识位对应不同的设备类型,所述确定模块820,用于获取第一设备的设备类型;将至少两个所述标识位中与所述第一设备的设备类型对应的标识位,确定为所述第一蓝牙报文中的配对标识位。
综上所述,本实施例能够令第一设备扫描到第二设备广播的第一蓝牙报文时,根据蓝牙报文中的配对标识位的取值执行相应的操作。响应于配对标识位的取值为第一取值时,根据第一蓝牙报文显示第二设备对应的连接提示窗。并且,响应于配对标识位的取值为第二取值时,不响应第一蓝牙报文,降低了第二设备在小概率连接第一设备时,对第一设备的打扰。
本实施例提供的蓝牙连接的提示装置,还能够令第一设备在接收到的第一蓝牙报文中的配对标识位的取值是第二取值时,根据第一蓝牙报文的接收时刻启动第一定时器,再次扫描蓝牙广播信道得到第二设备的第二蓝牙报文,在该第二蓝牙报文的接收时刻早于第一定时器 的超时时刻的情况下,不响应第二蓝牙报文,使得第一设备能够通过第一定时器的超时时长,避免第一设备受到第二蓝牙报文的干扰误弹出连接提示窗。
本实施例提供的蓝牙连接的提示装置,还能够令第一设备在接收到的第一蓝牙报文中的配对标识位的取值是第二取值时,根据第一蓝牙报文的接收时刻启动第一定时器,再次扫描蓝牙广播信道得到第二设备的第二蓝牙报文,在该第二蓝牙报文的接收时刻不早于第一定时器的超时时刻的情况下,根据第二蓝牙报文显示连接提示窗,从而在避免打扰的情况下,也能够令第一设备和第二设备正常进行蓝牙连接。
请参考图9,图9是本申请一个示例性实施例提供的一种蓝牙报文的发送装置的结构框图。该蓝牙报文的发送装置可以通过软件、硬件或者两者的结合实现成为终端的全部或一部分。该装置包括:
状态转换模块910,用于在满足触发条件的情况下,进入蓝牙广播状态;
报文生成模块920,用于生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示第二设备是否已与其它设备存在配对关系;
报文广播模块930,用于在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
在一个可选的实施例中,所述装置还包括第五执行模块,用于在所述第一蓝牙报文中的所述配对标识位是第二取值的情况下,在广播所述第一蓝牙报文时,启动第二定时器;所述第二取值用于指示所述第二设备已与其它设备存在配对关系;响应于所述第二定时器未超时,生成第二蓝牙报文,所述第二蓝牙报文的所述配对标识位是第二取值;在所述蓝牙广播信道中广播所述第二蓝牙报文,第一蓝牙报文中的所述配对标识位是第二取值。
在一个可选的实施例中,所述装置还包括第六执行模块,用于在所述第一蓝牙报文中的所述配对标识位是第二取值的情况下,在广播所述第一蓝牙报文时,启动第二定时器;所述第二取值用于指示所述第二设备已与其它设备存在配对关系;响应于所述第二定时器超时,生成第三蓝牙报文,所述第三蓝牙报文的所述配对标识位是第一取值;在所述蓝牙广播信道中广播所述第三蓝牙报文,第一蓝牙报文中的所述配对标识位是第二取值。
在一个可选的实施例中,所述装置涉及的所述第二设备是蓝牙耳机、蓝牙手环、蓝牙手表、蓝牙项圈、蓝牙戒指或蓝牙眼镜中的至少一种。
在一个可选的实施例中,所述装置涉及的所述第二设备是蓝牙耳机,所述蓝牙耳机放置在配套的充电仓中且所述充电仓处于合盖状态时,所述蓝牙耳机处于待机状态,所述状态转换模块910,用于接收所述充电仓发送的唤醒指令,进入所述蓝牙广播状态,所述唤醒指令是所述充电仓从所述合盖状态变为开盖状态时生成的指令。
综上所述,本申请能够令第二设备根据自身所发送的第一蓝牙报文中的配对标识位的情况,来设置第二定时器,使得第一设备无需设置定时器,而是仅根据扫描到的蓝牙报文中的配对标识位,即可确定接下来的操作。响应于第一设备获取到的配对标识位是第二取值,第一设备不响应该配对标识位所在的蓝牙报文;响应于第一设备获取到的配对标识位是第一取值,根据配对标识位所在的蓝牙报文显示连接提示窗,从而使得第一设备能够通过第一定时器的超时时长,避免第一设备受到第二蓝牙报文的干扰误弹出连接提示窗。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的蓝牙连接的提示方法。
本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有至少一条指令,所述至少一条指令由所述处理器加载并执行以实现如上各个实施例所述的蓝牙报文的发送方法。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计 算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各个实施例提供的蓝牙连接的提示方法。
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述各个实施例提供的蓝牙报文的发送方法。
需要说明的是:上述实施例提供的蓝牙连接的提示装置在执行蓝牙连接的提示方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的蓝牙连接的提示装置与蓝牙连接的提示方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。

Claims (20)

  1. 一种蓝牙连接的提示方法,所述方法由第一设备执行,所述方法包括:
    扫描蓝牙广播信道;
    在扫描到第二设备的第一蓝牙报文的情况下,确定所述第一蓝牙报文中的配对标识位,所述配对标识位用于指示所述第二设备是否已与其它设备存在配对关系;
    在所述第一蓝牙报文中的配对标识位为第一取值的情况下,根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;
    在所述第一蓝牙报文中的配对标识位为第二取值的情况下,不响应所述第一蓝牙报文。
  2. 根据权利要求1所述的方法,
    所述第一取值用于指示所述第二设备未与其它设备存在配对关系;
    所述第二取值用于指示所述第二设备已与其它设备存在配对关系。
  3. 根据权利要求1或2所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的配对标识位为第二取值的情况下,根据所述第一蓝牙报文的接收时刻启动第一定时器;
    再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;
    在所述第二蓝牙报文的所述配对标识位为所述第二取值且所述第二蓝牙报文的接收时刻早于所述第一定时器的超时时刻的情况下,不响应所述第二蓝牙报文。
  4. 根据权利要求1或2所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的配对标识位为第二取值的情况下,根据所述第一蓝牙报文的接收时刻启动第一定时器;
    再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;
    在所述第二蓝牙报文的所述配对标识位为所述第二取值且所述第二蓝牙报文的接收时刻不早于所述第一定时器的超时时刻的情况下,根据所述第二蓝牙报文显示所述第二设备对应的连接提示窗。
  5. 根据权利要求1所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描所述蓝牙广播信道,得到所述第二设备的第二蓝牙报文;
    在所述第二蓝牙报文的所述配对标识位为所述第一取值的情况下,根据所述第二蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所述第二设备进行蓝牙连接;
    其中,所述第一取值用于表示所述第二设备已与其它设备存在配对关系且第二定时器超时,第二定时器是所述第二设备在广播所述第一蓝牙报文时启动的。
  6. 根据权利要求1所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的配对标识位为第二取值的情况下,再次扫描所述蓝牙广播信道,得到所述第二设备的第三蓝牙报文;
    在所述第三蓝牙报文的所述配对标识位为所述第二取值的情况下,不响应所述第三蓝牙报文;
    其中,所述第二取值表示所述第二设备已与其它设备存在配对关系且第二定时器未超时, 第二定时器是所述第二设备在广播所述第一蓝牙报文时启动的。
  7. 根据权利要求1至6任一所述的方法,所述根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,包括:
    在所述第一蓝牙报文的接收信号强度大于门限的情况下,显示所述第二设备对应的连接提示窗。
  8. 根据权利要求1至6任一所述的方法,所述第一蓝牙报文中包括至少两个标识位,不同的所述标识位对应不同的设备类型,所述确定所述第一蓝牙报文中的配对标识位,包括:
    获取第一设备的设备类型;
    将至少两个所述标识位中与所述第一设备的设备类型对应的标识位,确定为所述第一蓝牙报文中的配对标识位。
  9. 一种蓝牙报文的发送方法,所述方法由第二设备执行,所述方法包括:
    在满足触发条件的情况下,进入蓝牙广播状态;
    生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示所述第二设备是否已与其它设备存在配对关系;
    在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
  10. 根据权利要求9所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的所述配对标识位是第二取值的情况下,在广播所述第一蓝牙报文时,启动第二定时器;所述第二取值用于指示所述第二设备已与其它设备存在配对关系;
    响应于所述第二定时器未超时,生成第二蓝牙报文,所述第二蓝牙报文的所述配对标识位是第二取值;在所述蓝牙广播信道中广播所述第二蓝牙报文。
  11. 根据权利要求9所述的方法,所述方法还包括:
    在所述第一蓝牙报文中的所述配对标识位是第二取值的情况下,在广播所述第一蓝牙报文时,启动第二定时器;所述第二取值用于指示所述第二设备已与其它设备存在配对关系;
    响应于所述第二定时器超时,生成第三蓝牙报文,所述第三蓝牙报文的所述配对标识位是第一取值;在所述蓝牙广播信道中广播所述第三蓝牙报文。
  12. 根据权利要求9所述的方法,所述第二设备是蓝牙耳机、蓝牙手环、蓝牙手表、蓝牙项圈、蓝牙戒指或蓝牙眼镜中的至少一种。
  13. 根据权利要求12所述的方法,所述第二设备是蓝牙耳机,所述蓝牙耳机放置在配套的充电仓中且所述充电仓处于合盖状态时,所述蓝牙耳机处于待机状态,所述在满足触发条件的情况下,进入蓝牙广播状态,包括:
    接收所述充电仓发送的唤醒指令,进入所述蓝牙广播状态,所述唤醒指令是所述充电仓从所述合盖状态变为开盖状态时生成的指令。
  14. 一种蓝牙连接的提示装置,所述装置包括:
    扫描模块,用于扫描蓝牙广播信道;
    确定模块,用于在扫描到第二设备的第一蓝牙报文的情况下,确定所述第一蓝牙报文中的配对标识位,所述配对标识位用于指示所述第二设备是否已与其它设备存在配对关系;
    提示窗显示模块,用于在所述第一蓝牙报文中的配对标识位为第一取值的情况下,根据所述第一蓝牙报文显示所述第二设备对应的连接提示窗,所述连接提示窗用于提示是否与所 述第二设备进行蓝牙连接;
    操作模块,用于在所述第一蓝牙报文中的配对标识位为第二取值的情况下,不响应所述第一蓝牙报文。
  15. 一种蓝牙报文的发送装置,所述装置包括:
    状态转换模块,用于在满足触发条件的情况下,进入蓝牙广播状态;
    报文生成模块,用于生成第一蓝牙报文,所述第一蓝牙报文携带有配对标志位,所述配对标志位用于指示第二设备是否已与其它设备存在配对关系;
    报文广播模块,用于在所述蓝牙广播状态下,在蓝牙广播信道中广播所述第一蓝牙报文。
  16. 一种第一设备,所述第一设备包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如权利要求1至8任一所述的蓝牙连接的提示方法。
  17. 一种第二设备,所述第二设备包括处理器、和与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如权利要求9至13任一所述的蓝牙报文的发送方法。
  18. 一种计算机可读存储介质,所述存储介质中存储有程序指令,所述程序指令被处理器执行时实现如权利要求1至8任一所述的蓝牙连接的提示方法。
  19. 一种计算机可读存储介质,所述存储介质中存储有程序指令,所述程序指令被处理器执行时实现如权利要求9至13任一所述的蓝牙报文的发送方法。
  20. 一种计算机程序产品,所述计算机程序产品包括计算机指令,所述计算机指令存储在计算机可读存储介质中;所述计算机指令由计算机设备的处理器读取并执行,以使得所述计算机设备实现如权利要求1至8任一所述的蓝牙连接的提示方法,或者,实现如权利要求9至13任一所述的蓝牙报文的发送方法。
PCT/CN2022/097786 2021-07-16 2022-06-09 蓝牙连接的提示方法、装置、设备、存储介质及程序产品 WO2023284454A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110807401.8 2021-07-16
CN202110807401.8A CN113518336B (zh) 2021-07-16 2021-07-16 蓝牙连接的提示方法、装置、终端及存储介质

Publications (1)

Publication Number Publication Date
WO2023284454A1 true WO2023284454A1 (zh) 2023-01-19

Family

ID=78067724

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097786 WO2023284454A1 (zh) 2021-07-16 2022-06-09 蓝牙连接的提示方法、装置、设备、存储介质及程序产品

Country Status (2)

Country Link
CN (1) CN113518336B (zh)
WO (1) WO2023284454A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113518336B (zh) * 2021-07-16 2024-06-21 Oppo广东移动通信有限公司 蓝牙连接的提示方法、装置、终端及存储介质
CN113973290B (zh) * 2021-10-27 2024-04-19 深圳市芯中芯科技有限公司 一种蓝牙耳机快速连接的方法
CN114500730B (zh) * 2022-02-28 2023-08-29 歌尔股份有限公司 弹窗功能控制方法、设备及计算机可读存储介质
CN117060949A (zh) * 2022-05-07 2023-11-14 Oppo广东移动通信有限公司 信号发送方法及装置、组合识别方法及装置、电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140378056A1 (en) * 2013-06-21 2014-12-25 Bose Corporation Low energy wireless proximity pairing
CN111818499A (zh) * 2020-07-27 2020-10-23 深圳市千分一智能技术有限公司 快速配对方法、装置、设备及计算机可读存储介质
CN112669585A (zh) * 2020-12-15 2021-04-16 广州极飞科技有限公司 用于设备配对的方法、处理器、移动终端及服务器
CN112911556A (zh) * 2016-06-27 2021-06-04 华为技术有限公司 用于双模蓝牙设备之间建立经典蓝牙连接的方法和双模蓝牙设备
CN113518336A (zh) * 2021-07-16 2021-10-19 Oppo广东移动通信有限公司 蓝牙连接的提示方法、装置、终端及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106792448A (zh) * 2016-12-14 2017-05-31 北京小米移动软件有限公司 蓝牙连接方法和装置、系统
CN108650668B (zh) * 2018-05-17 2020-02-07 歌尔科技有限公司 连接请求处理方法、蓝牙耳机及穿戴设备
CN109345813B (zh) * 2018-11-30 2021-06-11 深圳创维数字技术有限公司 播放设备与蓝牙遥控器的配对方法、设备及可读存储介质
CN112073955B (zh) * 2019-06-10 2022-03-15 海信视像科技股份有限公司 显示设备及蓝牙设备扫描方法
CN111464987B (zh) * 2020-03-11 2022-07-26 华为技术有限公司 一种显示蓝牙设备标识的方法及电子设备
CN112333332B (zh) * 2020-10-27 2021-05-28 维沃移动通信有限公司 提示信息显示方法、装置及电子设备
CN113115294B (zh) * 2021-04-22 2022-05-03 荣耀终端有限公司 一种手写笔连接方法及蓝牙系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140378056A1 (en) * 2013-06-21 2014-12-25 Bose Corporation Low energy wireless proximity pairing
CN112911556A (zh) * 2016-06-27 2021-06-04 华为技术有限公司 用于双模蓝牙设备之间建立经典蓝牙连接的方法和双模蓝牙设备
CN111818499A (zh) * 2020-07-27 2020-10-23 深圳市千分一智能技术有限公司 快速配对方法、装置、设备及计算机可读存储介质
CN112669585A (zh) * 2020-12-15 2021-04-16 广州极飞科技有限公司 用于设备配对的方法、处理器、移动终端及服务器
CN113518336A (zh) * 2021-07-16 2021-10-19 Oppo广东移动通信有限公司 蓝牙连接的提示方法、装置、终端及存储介质

Also Published As

Publication number Publication date
CN113518336B (zh) 2024-06-21
CN113518336A (zh) 2021-10-19

Similar Documents

Publication Publication Date Title
WO2023284454A1 (zh) 蓝牙连接的提示方法、装置、设备、存储介质及程序产品
US11418388B2 (en) Method for network configuration, and electronic device
US12069551B2 (en) Service connection establishment method, Bluetooth master device, chip, and Bluetooth system
US10681200B2 (en) Message processing method and system, and related device
CN110933653A (zh) 消息传输方法、装置、终端及存储介质
CN111132111B (zh) 一种基于ble的音频共享方法、系统及计算机可读存储介质
US20150271625A1 (en) Handling packet data units
US10827455B1 (en) Method and apparatus for sending a notification to a short-range wireless communication audio output device
CN111629366B (zh) 蓝牙设备间的交互方法及装置、存储介质和电子设备
CN113784001B (zh) 音频数据播放方法、装置、电子设备及存储介质
US20160157206A1 (en) Information notification method and instant notification device
CN104333643A (zh) 添加联系人的方法、系统及终端
CN114786139A (zh) 连接建立方法、装置、设备、存储介质及程序产品
CN112040057B (zh) 设备控制方法、装置、电子设备、控制系统及存储介质
CN111615219B (zh) 一种pc5链路建立方法、设备及系统
CN115278624A (zh) 信息更新方法及装置、音频共享方法及系统、电子设备
CN114500730A (zh) 弹窗功能控制方法、设备及计算机可读存储介质
CN113545133B (zh) 初始接入方法、初始接入装置及存储介质
CN115665671A (zh) 音频数据的共享方法、装置、电子设备以及存储介质
CN111093250B (zh) 网络扫描方法、装置、终端及存储介质
CN115412387A (zh) 一种音频播放方法、系统及电子设备
CN113170474A (zh) 资源配置方法、装置、终端设备、接入网设备及存储介质
WO2022206898A1 (zh) 寻呼方法、装置、终端及网络侧设备
US20240267885A1 (en) Paging indication method and apparatus, and user equipment, access network device and storage medium
WO2023279928A1 (zh) 信号传输方法及信息提示方法、装置、电子设备

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: 22841094

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: 22841094

Country of ref document: EP

Kind code of ref document: A1