CN113556830A - Device connection method, device and wireless earphone - Google Patents

Device connection method, device and wireless earphone Download PDF

Info

Publication number
CN113556830A
CN113556830A CN202110528217.XA CN202110528217A CN113556830A CN 113556830 A CN113556830 A CN 113556830A CN 202110528217 A CN202110528217 A CN 202110528217A CN 113556830 A CN113556830 A CN 113556830A
Authority
CN
China
Prior art keywords
equipment
priority
connection
monitoring
connecting equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110528217.XA
Other languages
Chinese (zh)
Inventor
徐拥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huijun Technology Co ltd
Original Assignee
Beijing Huijun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huijun Technology Co ltd filed Critical Beijing Huijun Technology Co ltd
Priority to CN202110528217.XA priority Critical patent/CN113556830A/en
Publication of CN113556830A publication Critical patent/CN113556830A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/0215Traffic management, e.g. flow control or congestion control based on user or device properties, e.g. MTC-capable devices
    • 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/14Direct-mode setup

Abstract

The application provides a device connection method, a device and a wireless earphone, wherein the method comprises the following steps: the method comprises the steps of connecting with the connecting equipment according to a pairing request sent by the connecting equipment, obtaining the priority of the connecting equipment, monitoring the connecting equipment, obtaining the monitoring result of the connecting equipment, and determining target equipment in the connecting equipment according to the priority and the monitoring result of the connecting equipment. According to the technical scheme, the wireless earphone is connected with the plurality of connecting devices, the priority of each connecting device is determined, each connecting device is monitored, one target device is selected from each connecting device according to the monitoring result and the priority, the sound information of the target device is output, the target device can be automatically switched, manual and frequent switching of a user is not needed, and the switching efficiency is improved.

Description

Device connection method, device and wireless earphone
Technical Field
The present application relates to the field of wireless headset technologies, and in particular, to a device connection method, apparatus, device, and wireless headset.
Background
With the development of wireless communication technology and the popularization of electronic equipment, terminal equipment such as mobile phones, computers, multimedia players and the like are all configured with a bluetooth function, and after the terminal equipment starts the bluetooth function, a wireless earphone can be connected with the terminal equipment through bluetooth broadcast to realize the transmission of sound information.
In the prior art, when the wireless headset is connected with the terminal device, the terminal device is required to start a bluetooth function, the wireless headset is searched for identification and pairing, and when the wireless headset is firstly paired, the user needs to perform secondary confirmation. The terminal equipment can transmit the sound information to the wireless earphone, and the wireless earphone plays the sound.
However, the wireless headset and the terminal device in the prior art adopt point-to-point connection, that is, one wireless headset can only communicate with one paired terminal device, and when a user needs to use another terminal device, the wireless headset needs to be switched to be connected with another terminal device, so that the user needs to frequently perform manual switching, and the switching efficiency is low.
Disclosure of Invention
The application provides a device connection method, a device, equipment and a wireless earphone, which are used for solving the problems that the conventional wireless earphone needs manual frequent switching by a user and the switching efficiency is low.
In a first aspect, an embodiment of the present application provides a device connection method, which is applied to a wireless headset, and includes:
according to a pairing request sent by a connecting device, connecting with the connecting device to obtain the priority of the connecting device, wherein the number of the connecting devices is two or more;
monitoring the connecting equipment to obtain a monitoring result of the connecting equipment, wherein the monitoring result is used for indicating whether the connecting equipment transmits sound information to the wireless earphone;
and determining target equipment in the connecting equipment according to the priority and the monitoring result of the connecting equipment, wherein the target equipment is used for indicating the wireless earphone to output the sound information transmitted by the target equipment.
In a possible design of the first aspect, the determining, in the connection device, a target device according to the priority and a listening result of the connection device includes:
determining whether a first connection device for transmitting sound information to the wireless earphone exists in the connection device according to the monitoring result of the connection device;
if first connecting equipment for transmitting sound information to the wireless earphone exists, acquiring the number of the first connecting equipment;
determining target equipment in the first connecting equipment according to the priority and the number of the first connecting equipment;
and if the first connecting equipment for transmitting the sound information to the wireless earphone does not exist, determining the target equipment in the connecting equipment according to the priority.
In another possible design of the first aspect, the determining a target device from the first connection devices according to the priority and the number of first connection devices includes:
comparing the number of the first connecting devices with a preset value;
if the number of the first connecting equipment exceeds a preset value, acquiring the priority of the first connecting equipment;
and determining the target equipment in the first connecting equipment according to the priority of the first connecting equipment.
In yet another possible design of the first aspect, after comparing the number of the first connection devices with a preset value, the method further includes:
and if the number of the first connecting equipment is equal to the preset value, determining that the first connecting equipment is the target equipment.
In another possible design of the first aspect, the monitoring the connection device and obtaining the monitoring result of the connection device includes:
setting corresponding monitoring events for each connecting device connected with the wireless earphone;
and monitoring a transmission channel of each connecting device by using the monitoring event to obtain a monitoring result corresponding to each connecting device, wherein the transmission channel is used for the connecting device to transmit sound information to the wireless earphone.
In another possible design of the first aspect, after the monitoring the transmission channel of each connection device by using the monitoring event and obtaining the monitoring result corresponding to each connection device, the method further includes:
detecting a connection state of the connection device and the wireless headset;
and if the disconnection between the connecting equipment and the wireless earphone is detected, eliminating the monitoring event corresponding to the connecting equipment.
In yet another possible design of the first aspect, the connecting to the connection device according to a pairing request sent by the connection device to obtain the priority of the connection device includes:
outputting a priority confirmation prompt to the connecting equipment according to a pairing request sent by the connecting equipment, wherein the priority confirmation prompt is used for indicating a user to determine the priority of the connecting equipment;
and acquiring priority confirmation information sent by the connecting equipment according to the priority confirmation prompt, and determining the priority of the connecting equipment according to the priority confirmation information.
In yet another possible design of the first aspect, after obtaining the priority of the connection device, the method further includes:
and storing the priority of the connected equipment to a preset storage area.
In another possible design of the first aspect, the obtaining priority confirmation information sent by the connection device according to the priority confirmation prompt, and determining the priority of the connection device according to the priority confirmation information includes:
acquiring priority confirmation information of each connecting device, and comparing the priority confirmation information of each connecting device;
and if the priority confirmation information of the connected equipment is the same, outputting a confirmation failure prompt to the connected equipment, wherein the confirmation failure prompt is used for indicating a user to re-determine the priority of each connected equipment.
In yet another possible design of the first aspect, the connecting with the connection device according to a pairing request issued by the connection device includes:
and acquiring a pairing request sent by the connecting equipment, and connecting the pairing request with the connecting equipment by using a preset connection protocol.
In a second aspect, an embodiment of the present application provides an apparatus connecting device, including:
the device comprises a connection module, a priority module and a priority module, wherein the connection module is used for connecting with connection equipment according to a pairing request sent by the connection equipment and acquiring the priority of the connection equipment, and the number of the connection equipment is two or more;
the monitoring module is used for monitoring the connecting equipment and acquiring a monitoring result of the connecting equipment, wherein the monitoring result is used for indicating whether the connecting equipment transmits sound information to the wireless earphone;
and the determining module is used for determining target equipment in the connecting equipment according to the priority and the monitoring result of the connecting equipment, and the target equipment is used for indicating the wireless earphone to output the sound information transmitted by the target equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and at least one processor;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory, causing the at least one processor to perform the method as described above.
In a fourth aspect, embodiments of the present application provide a wireless headset that establishes a connection with two or more connection devices.
In a fifth aspect, the present application provides a readable storage medium, in which computer instructions are stored, and when executed by a processor, the computer instructions are used to implement the method as described above.
In a sixth aspect, the present application provides a program product including a computer program/instructions, which when executed by a processor, implement the method as described above.
According to the device connection method, the device, the equipment and the wireless earphone, the wireless earphone is connected with the plurality of connecting devices, the priority of each connecting device is determined, each connecting device is monitored, one target device is selected from each connecting device according to the monitoring result and the priority, the sound information of the target device is output, the target device can be automatically switched, manual and frequent switching of a user is not needed, and the switching efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application;
fig. 1 is a schematic view of an application scenario of a device connection method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a first embodiment of a device connection method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a second embodiment of a device connection method provided in the embodiment of the present application;
fig. 4 is a schematic structural diagram of an apparatus connecting device according to an embodiment of the present application;
fig. 5 is a schematic frame diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic view of an application scenario of the device connection method provided in the embodiment of the present application, as shown in fig. 1, when a user uses a wireless headset, the bluetooth function of a terminal device such as a mobile phone 10, a computer 11, and a tablet computer 12 may be turned on, and a nearby wireless headset 13 is searched by using a bluetooth broadcast technology, for example, when the mobile phone 10 searches for the nearby wireless headset 13, the mobile phone 10 may pop up a prompt box to remind the user, and the user may operate the prompt box on the mobile phone 10 to confirm that the mobile phone 10 is paired with the wireless headset 13 to establish a communication connection, and then sound information that the mobile phone 10 needs to play may be transmitted to the wireless headset 13.
In practical applications, when a user wants to use the computer 11 to connect the computer 11 and the wireless headset 13, since the mobile phone 10 and the wireless headset 13 are connected before, the user needs to disconnect the connection between the mobile phone 10 and the wireless headset 13 first, and then repeat the above-mentioned pairing connection operation on the computer 11, if the user needs to frequently switch the used devices, for example, switching from the mobile phone 10 to the computer 11, switching from the computer 11 to the tablet computer 12, and the like, the user needs to manually perform the above-mentioned operation, which is very troublesome to switch, and inefficient, and affects the normal use of the user.
In view of the above problems, embodiments of the present application provide a device connection method, apparatus, device, and wireless headset, in which a wireless headset is connected to a plurality of connection devices and monitors the plurality of connection devices, and when a connection device transmits sound information to the wireless headset, the wireless headset selects a target device from the connection devices according to the number and priority of the connection devices transmitting sound information and outputs the sound information transmitted by the target device, so that when a user frequently switches devices used, the wireless headset can automatically select the target device from the connection devices and output the sound information transmitted by the target device, and the user does not need to perform manual operation, thereby improving switching efficiency.
The technical solution of the present application will be described in detail below with reference to specific examples. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a flowchart illustrating a first embodiment of a device connection method provided in this application, where the method may be applied to a wireless headset, and may also be applied to other sound players with wireless communication, as shown in fig. 2, the method may include the following steps:
s201, according to the pairing request sent by the connection equipment, the connection equipment is connected, and the priority of the connection equipment is obtained.
Wherein the number of the connecting devices is two or more. Illustratively, the three connection devices in the embodiment of the application may specifically include a computer, a tablet computer, and a mobile phone, the number of the wireless earphones is one, and specifically includes a left-ear earphone and a right-ear earphone, and all the three connection devices may be connected to one wireless earphone at the same time.
In this embodiment, the computer, the tablet computer and the mobile phone can search through bluetooth, initiate a pairing request to a nearby wireless headset for pairing, and pop up a prompt box to prompt a user to confirm pairing and establish connection with the wireless headset. The wireless earphone can be simultaneously connected with three connecting devices, namely a computer, a tablet personal computer and a mobile phone.
Illustratively, the wireless headset may be a bluetooth wireless headset that establishes a connection with a computer, a tablet computer, and a mobile phone by using a bluetooth headset Profile (HSP) protocol, performs data transmission with the computer, the tablet computer, and the mobile phone by using an RFCOMM protocol, and may transmit voice information to the bluetooth wireless headset.
When the computer, the tablet computer and the mobile phone are connected with the wireless earphone in a matching mode, the display interfaces of the computer, the tablet computer and the mobile phone can pop up an information input box, priority information is input by a user, and priorities are configured for the computer, the tablet computer and the mobile phone respectively, for example, the priority of the computer is configured to be 1, the priority of the tablet computer is configured to be 2, and the priority of the mobile phone is configured to be 3.
S202, monitoring the connecting equipment and obtaining the monitoring result of the connecting equipment.
And the monitoring result is used for indicating whether the connecting equipment transmits the sound information to the wireless earphone. Specifically, the monitoring result specifically refers to whether each connection device has transmitted sound to the wireless headset at the same time, and exemplarily includes two results of transmitting sound to the wireless headset and not transmitting sound to the wireless headset.
In this embodiment, after the connection device is connected to the wireless headset, the wireless headset may listen to each connection device to determine whether any of the connection devices transmits sound information to the wireless headset. For example, a monitoring program may be set for each connection device to monitor whether each connection device transmits sound information to the wireless headset.
S203, determining the target equipment in the connection equipment according to the priority and the monitoring result of the connection equipment.
The target device is used for instructing the wireless earphone to output sound information transmitted by the target device.
In this embodiment, after the target device is determined, if the target device transmits the sound information to the wireless headset, the wireless headset preferentially plays the sound information transmitted by the target device.
For example, it may be determined whether a connection device transmits sound information to the wireless headset at the same time according to the monitoring result of each connection device, and if so, which connection device is the target device may be determined according to the priority of each connection device.
Illustratively, if the connection device comprises a computer, a tablet computer and a mobile phone, the priority of the computer is 1, the priority of the tablet computer is 2, and the priority of the mobile phone is 3, when the computer and the mobile phone transmit the sound information to the wireless headset at the same time, the wireless headset outputs the sound information transmitted by the computer because the priority of the computer is higher than that of the mobile phone.
According to the embodiment of the application, the wireless earphones are connected with the plurality of connecting devices, the priority is configured for each connecting device, when the connecting devices transmit sound to the wireless earphones, the wireless earphones can be automatically switched frequently among the connecting devices according to the priority of the connecting devices, sound information of target devices is output, manual operation of users is not needed, switching efficiency is improved, and the wireless earphones are convenient to use for the users.
For example, on the basis of the above embodiments, in some embodiments, the step S203 may specifically be implemented by the following steps:
determining whether a first connecting device for transmitting sound information to the wireless earphone exists in the connecting device according to the monitoring result of the connecting device;
if first connecting equipment for transmitting sound information to the wireless earphone exists, acquiring the number of the first connecting equipment;
determining target equipment in the first connecting equipment according to the priority and the number of the first connecting equipment;
and if the first connecting equipment for transmitting the sound information to the wireless earphone does not exist, determining the target equipment in the connecting equipment according to the priority.
Specifically, when no connecting device transmits sound information to the wireless headset, the highest priority device is selected from the connecting devices as the target device directly according to the priority of each connecting device, when a connecting device transmits sound information to the wireless headset, the connecting devices which transmit sound information to the wireless headset are judged as first connecting devices, and the target device is determined from the first connecting devices according to the priority of the first connecting devices.
For example, taking the connection device including the computer, the tablet pc, and the mobile phone as described above as an example, if none of the computer, the tablet pc, and the mobile phone transmits sound to the wireless headset, the computer with the highest priority is selected as the target device, and sound information transmitted by the computer is output, and if both the computer and the mobile phone transmit sound information to the wireless headset, one of the computer and the mobile phone with the highest priority may be selected as the target device, and sound information of the target device may be output.
Illustratively, the sound information may be audiovisual sound information of the connected device.
According to the embodiment of the application, the monitoring result of each connecting device is obtained by monitoring each connecting device, the target device can be determined from each connecting device by utilizing the accurate monitoring result, the identification accuracy of the target device is improved, and effective data transmission between the target device and the wireless earphone is guaranteed.
For example, on the basis of the foregoing embodiments, in some embodiments, the step "determining the target device from the first connection devices according to the priority and the number of the first connection devices" may specifically be implemented by:
comparing the number of the first connecting devices with a preset value;
if the number of the first connecting equipment exceeds a preset value, acquiring the priority of the first connecting equipment;
determining the target device in the first connection device according to the priority of the first connection device.
Specifically, the preset value may be 1, and when the number of the first connection devices exceeds 1, one of the two or more first connection devices is selected as the target device according to the priority.
Illustratively, when both the computer and the mobile phone transmit voice information to the wireless headset, the computer with the high priority is selected as the target device.
According to the embodiment of the application, the number of the first connecting devices is compared with the preset value, when the number of the first connecting devices exceeds the preset value, the wireless earphone can accurately determine the target device from the first connecting devices according to the priority, and is switched to perform data transmission with the target device, so that the situation that the wireless earphone outputs the sound information transmitted by other first connecting devices to cause confusion of the sound information is avoided.
Optionally, on the basis of the foregoing embodiment, in some embodiments, if the number of the first connection devices is equal to a preset value, it is determined that the first connection device is the target device.
Specifically, when the number of the first connection devices is 1 and is equal to a preset value, the first connection devices are directly used as target devices.
For example, in the case that the connection device includes the computer, the tablet pc and the mobile phone, if neither the computer nor the tablet pc transmits the audio information to the wireless headset, but the mobile phone transmits the audio information to the wireless headset, the mobile phone is taken as the target device, and the wireless headset outputs the audio information transmitted by the mobile phone.
According to the embodiment of the application, the number of the first connecting devices is confirmed, when the number of the first connecting devices is 1, the first connecting devices are directly determined to be the target devices, the sound information transmitted by the target devices is output by the wireless earphone, and omission of the sound information transmitted by the connecting devices is avoided.
For example, in some embodiments, the step S202 may be specifically implemented by the following steps:
respectively setting corresponding monitoring events for each connecting device connected with the wireless earphone;
and monitoring the transmission channel of each connecting device by using the monitoring event to obtain a monitoring result corresponding to each connecting device.
The transmission channel is used for connecting the equipment to transmit sound information to the wireless earphone.
In this embodiment, after each connection device is connected to the wireless headset, a transmission channel is established between each connection device and the wireless headset, and the transmission channel of each connection device can be monitored by setting a monitoring event.
Illustratively, the WATCH event may be set for each device, and whether each connected device has the sound information to transmit to the wireless headset may be monitored.
The embodiment of the application monitors the transmission channel of each connecting device by setting the monitoring time, so that the wireless earphone can determine whether a plurality of connecting devices transmit the sound information at the same time, and each connecting device can transmit the sound information to the wireless earphone at the same time without omission of the sound information.
Illustratively, on the basis of the above embodiments, in some embodiments, the above device connection method further includes the following steps:
detecting the connection state of the connection equipment and the wireless earphone;
and if the disconnection between the connecting equipment and the wireless earphone is detected, eliminating the monitoring event corresponding to the connecting equipment.
In this embodiment, the connection status includes two statuses, i.e., a disconnection status and a successful connection status, for example, after the computer is connected to the wireless headset, a monitoring event may be configured for the computer to monitor whether the computer transmits the sound information to the wireless headset, and after the computer is disconnected from the wireless headset, the monitoring event is eliminated, and the computer is not monitored.
According to the embodiment of the application, the existence period of the monitoring event is set, when the connecting equipment is disconnected with the wireless earphone, the monitoring event is directly eliminated, the monitoring result is prevented from being mistaken due to the fact that the monitoring event continues to monitor, and the monitoring accuracy is improved.
For example, in some embodiments, the step S201 may be specifically implemented by the following steps:
outputting a priority confirmation prompt to the connecting equipment according to a pairing request sent by the connecting equipment;
and acquiring priority confirmation information sent by the connecting equipment according to the priority confirmation prompt, and determining the priority of the connecting equipment according to the priority confirmation information.
Wherein the priority confirmation prompt is used to instruct the user to determine the priority of the connected device.
In this embodiment, the pairing request may include an identification code of the connection device, for example, when the mobile phone issues the pairing request to pair and connect with the wireless headset, a message prompt box may pop up on the mobile phone, a priority confirmation prompt is displayed in the message prompt box, and an input area for the user to input the priority is displayed in the message prompt box, and the user may input the priority confirmation information in the input area to configure the priority of the mobile phone.
For example, when the computer is connected to the wireless headset, the user may configure the computer with a priority of 1, when the tablet computer is connected to the wireless headset, the user may configure the tablet computer with a priority of 2, and when the mobile phone is connected to the wireless headset, the user may configure the mobile phone with a priority of 3, where the priority of the computer is higher than that of the tablet computer, and the priority of the tablet computer is higher than that of the mobile phone.
According to the embodiment of the application, the priority confirmation prompt is output to the connecting equipment, so that when a user uses the connecting equipment to establish connection with the wireless earphone, the corresponding priority can be configured for the connecting equipment, after the priority is configured, when the user needs to switch the connecting equipment subsequently, the wireless earphone can directly perform data transmission with the target equipment according to the configured priority, the user does not need to perform manual switching operation, and the switching efficiency of the connecting equipment is improved.
For example, on the basis of the above embodiments, in some embodiments, the device connection method may further include the following steps:
and storing the priority of the connected equipment into a preset storage area.
In this embodiment, the wireless headset may be configured with a memory, the memory may store priority information of each connected device, and for example, the identification code and the priority of each connected device may be converted into a key value pair and stored in a preset storage area of the memory.
For example, when the user needs to modify the priority of each connected device, the priority information of each connected device may be called from the preset storage area, and the priority of each connected device may be modified.
According to the embodiment of the application, the priorities are stored in the preset storage area of the wireless earphone, so that the subsequent management and maintenance of the priorities of the connecting devices are facilitated.
For example, on the basis of the foregoing embodiments, in some embodiments, the aforementioned "acquiring priority confirmation information sent by the connection device according to the priority confirmation prompt, and determining the priority of the connection device according to the priority confirmation information" may be implemented by:
acquiring priority confirmation information of each connecting device, and comparing the priority confirmation information of each connecting device;
and if the priority confirmation information of the connected equipment is the same, outputting a confirmation failure prompt to the connected equipment.
Wherein the confirmation failure prompt is used to instruct the user to re-prioritize the respective connected devices.
In this embodiment, the priority of each connection device may be unique, that is, when the priority of one connection device is 1, the priority of the other connection devices cannot be configured to be 1. If the priority of two or more than two connecting devices is the same when the user configures the priority for each connecting device, the wireless earphone can prompt the user.
For example, when the user configures the computer with the priority level 1, if the user continues to configure the mobile phone with the priority level 1, the wireless headset may output a confirmation failure prompt to the mobile phone at this time, and prompt the user to re-determine the priority level of the mobile phone.
According to the embodiment of the application, by comparing the priority of each connecting device, when the connecting devices with the same priority exist, the user can be prompted to reconfigure the priority of the connecting device, the problem that the wireless earphone cannot select the target device to output the sound information when the connecting devices with the same priority transmit the sound information to the wireless earphone is avoided, and the working reliability of the wireless earphone is improved.
For example, on the basis of the foregoing embodiments, in some embodiments, the step S201 of "connecting with the connection device according to the pairing request sent by the connection device" may specifically include the following steps:
and acquiring a pairing request sent by the connecting equipment, and connecting the pairing request with the connecting equipment by using a preset connection protocol.
In this embodiment, the preset connection protocol may be an HSP protocol, for example, when the connection device is a mobile phone, basic functions required for communication between the mobile phone and the wireless headset, such as call answering, call hanging up, volume adjustment, etc., may be implemented through the HSP protocol.
For example, after each connection device establishes a connection with the wireless headset through the HSP protocol, each connection device may implement data transmission with the wireless headset through the RFCOMM protocol.
According to the embodiment of the application, the wireless earphone can be connected with the plurality of connecting devices at the same time by using the preset connection protocol, so that each connecting device can transmit the sound information to the wireless earphone at the same time.
Fig. 3 is a schematic flowchart of a second embodiment of an apparatus connection method provided in an embodiment of the present application, and as shown in fig. 3, the connection apparatus includes a computer, a mobile phone, and a tablet computer, and the apparatus connection method includes the following steps:
and S301, establishing connection with the connection equipment respectively.
Specifically, the wireless headset can be paired with a computer, a mobile phone and a tablet personal computer simultaneously through a Bluetooth broadcasting technology, and connection is established to realize data communication.
S302, whether the sound information is transmitted to the wireless earphone or not is detected.
Specifically, the wireless headset monitors the computer, the mobile phone and the tablet computer by setting a monitoring event, and determines whether the computer, the mobile phone and the tablet computer transmit sound information to the wireless headset.
And S303, if the sound is not detected, connecting with the connecting equipment with the highest priority.
Specifically, the computer, the mobile phone, and the tablet computer may be configured with corresponding priorities, for example, a highest first priority may be configured for the computer, a second priority may be configured for the mobile phone, and a lowest third priority may be configured for the tablet computer.
When the computer, the mobile phone and the tablet computer do not transmit the sound information to the wireless earphone, the wireless earphone directly transmits data with the computer with the highest priority.
Optionally, if the subsequent wireless headset detects that the mobile phone or the tablet computer transmits the sound to the wireless headset, the wireless headset performs data transmission with the mobile phone or the tablet computer, and outputs the sound information transmitted by the mobile phone or the tablet computer.
Optionally, if the subsequent wireless headset detects that the mobile phone and the tablet computer transmit sound to the wireless headset at the same time, the wireless headset selects the mobile phone with a higher priority as the target device according to the priorities of the mobile phone and the tablet computer, performs data transmission with the mobile phone, and outputs sound information transmitted by the mobile phone.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of an apparatus connecting device provided in an embodiment of the present application, and as shown in fig. 4, the apparatus connecting device may be integrated in a wireless headset, or may be independent of the wireless headset and cooperate with the wireless headset to implement the technical solution of the present application. As shown in fig. 4, the device connection apparatus may include a connection module 41, a listening module 42, and a determination module 43.
The connection module 41 is configured to connect with a connection device according to a pairing request sent by the connection device, and acquire a priority of the connection device. And the monitoring module 42 is configured to monitor the connection device and obtain a monitoring result of the connection device. And a determining module 43, configured to determine the target device in the connection device according to the priority and the monitoring result of the connection device.
The monitoring result is used for indicating whether the connecting equipment transmits sound information to the wireless earphone, and the target equipment is used for indicating the wireless earphone to output the sound information transmitted by the target equipment.
For example, in some embodiments, the determining module 43 may be specifically configured to:
determining whether a first connecting device for transmitting sound information to the wireless earphone exists in the connecting device according to the monitoring result of the connecting device;
if first connecting equipment for transmitting sound information to the wireless earphone exists, acquiring the number of the first connecting equipment;
determining target equipment in the first connecting equipment according to the priority and the number of the first connecting equipment;
and if the first connecting equipment for transmitting the sound information to the wireless earphone does not exist, determining the target equipment in the connecting equipment according to the priority.
Optionally, in some embodiments, the determining module 43 may be specifically configured to:
comparing the number of the first connecting devices with a preset value;
if the number of the first connecting equipment exceeds a preset value, acquiring the priority of the first connecting equipment;
determining the target device in the first connection device according to the priority of the first connection device.
Optionally, in some embodiments, the device connecting apparatus further includes a comparison module, configured to:
and if the number of the first connecting equipment is equal to the preset value, determining that the first connecting equipment is the target equipment.
In some embodiments, the monitoring module 42 may be specifically configured to:
respectively setting corresponding monitoring events for each connecting device connected with the wireless earphone;
and monitoring the transmission channel of each connecting device by utilizing the monitoring event to obtain a monitoring result corresponding to each connecting device, wherein the transmission channel is used for the connecting device to transmit the sound information to the wireless earphone.
Optionally, in some embodiments, the device connecting apparatus further includes a removing module, configured to:
detecting the connection state of the connection equipment and the wireless earphone;
and if the disconnection between the connecting equipment and the wireless earphone is detected, eliminating the monitoring event corresponding to the connecting equipment.
Optionally, in some embodiments, the connection module 41 may be specifically configured to:
outputting a priority confirmation prompt to the connecting equipment according to a pairing request sent by the connecting equipment, wherein the priority confirmation prompt is used for indicating a user to determine the priority of the connecting equipment;
and acquiring priority confirmation information sent by the connecting equipment according to the priority confirmation prompt, and determining the priority of the connecting equipment according to the priority confirmation information.
In some embodiments, the device connecting apparatus further includes a storage module configured to:
and storing the priority of the connected equipment into a preset storage area.
Optionally, in some embodiments, the connection module 41 may be specifically configured to:
acquiring priority confirmation information of each connecting device, and comparing the priority confirmation information of each connecting device;
and if the priority confirmation information of the connected equipment is the same, outputting a confirmation failure prompt to the connected equipment.
Wherein the confirmation failure prompt is used to instruct the user to re-prioritize the respective connected devices.
Optionally, in some embodiments, the connection module 41 may be specifically configured to:
and acquiring a pairing request sent by the connecting equipment, and connecting the pairing request with the connecting equipment by using a preset connection protocol.
The apparatus provided in the embodiment of the present application may be used to execute the method in the embodiments shown in fig. 2 to fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the determining module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the determining module is called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when some of the above modules are implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can call program code. As another example, these modules may be integrated together, implemented in the form of a system-on-a-chip (SOC).
Fig. 5 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 5, the electronic device 50 may be applied to a wireless headset and includes a memory 51 and at least one processor 52. Wherein the processor 52 communicates with the memory 51 via the bus 53, and the electronic device further comprises a communication interface 54, wherein the communication interface 54 is used for communicating with external devices.
Wherein the memory 51 stores computer execution instructions;
the at least one processor 52 invokes computer-executable instructions from the memory 51 and executes the computer-executable instructions, causing the at least one processor 52 to implement the method described above.
Illustratively, the memory 51 may comprise high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
Alternatively, processor 52 may be a central processing unit, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present invention.
The embodiment of the application also provides a wireless earphone which can be connected with two or more than two connecting devices.
Illustratively, the connection device may be a cell phone, a computer, and a tablet.
Illustratively, the wireless headset may be connected to each connection device through the HSP protocol, and data transmission between each connection device and the wireless headset is realized through the RFCOMM protocol.
In this embodiment, when no connected device transmits the sound information to the wireless headset, the wireless headset may select the device with the highest priority as the target device according to the priority configured for each connected device, and perform data transmission with the target device.
When a connecting device transmits sound information to the wireless headset, if the number of the connecting devices transmitting the sound information is only one, the wireless headset selects the connecting device as a target device to perform data transmission with the target device, and exemplarily, the sound information transmitted by the target device can be output.
If the number of the connecting devices for transmitting the sound information is two or more, the wireless earphone selects the device with the highest priority as the target device according to the priorities configured by the connecting devices.
For example, the priority of the connection device may be configured by the user according to actual conditions, and for example, taking one mobile phone, one computer and one tablet computer as an example, and three connection devices in total, the user may configure the highest priority of the mobile phone, the next priority of the computer and the lowest priority of the tablet computer according to the needs of the user, for example, the frequency of using the mobile phone by the user is more frequent.
The present embodiment also provides a readable storage medium, in which computer instructions are stored, and when at least one processor of the electronic device executes the computer instructions, the electronic device executes the device-based connection method provided in the foregoing various embodiments.
The present embodiments also provide a program product comprising a computer program/instructions, which may be stored in a readable storage medium. The computer program/instructions may be read from a readable storage medium by at least one processor of the electronic device, and the execution of the computer program/instructions by the at least one processor causes the electronic device to implement the device connection method provided by the above-described embodiments.
In the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone, wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship; in the formula, the character "/" indicates that the preceding and following related objects are in a relationship of "division". "at least one of the following" or similar expressions refer to any combination of these items, including any combination of the singular or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for convenience of description and distinction and are not intended to limit the scope of the embodiments of the present application. In the embodiment of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (15)

1. A device connection method is applied to a wireless headset and comprises the following steps:
according to a pairing request sent by a connecting device, connecting with the connecting device to obtain the priority of the connecting device, wherein the number of the connecting devices is two or more;
monitoring the connecting equipment to obtain a monitoring result of the connecting equipment, wherein the monitoring result is used for indicating whether the connecting equipment transmits sound information to the wireless earphone;
and determining target equipment in the connecting equipment according to the priority and the monitoring result of the connecting equipment, wherein the target equipment is used for indicating the wireless earphone to output the sound information transmitted by the target equipment.
2. The method of claim 1, wherein the determining a target device in the connection device according to the priority and the listening result of the connection device comprises:
determining whether a first connection device for transmitting sound information to the wireless earphone exists in the connection device according to the monitoring result of the connection device;
if first connecting equipment for transmitting sound information to the wireless earphone exists, acquiring the number of the first connecting equipment;
determining target equipment in the first connecting equipment according to the priority and the number of the first connecting equipment;
and if the first connecting equipment for transmitting the sound information to the wireless earphone does not exist, determining the target equipment in the connecting equipment according to the priority.
3. The method of claim 2, wherein determining the target device from the first connection devices according to the priority and the number of first connection devices comprises:
comparing the number of the first connecting devices with a preset value;
if the number of the first connecting equipment exceeds a preset value, acquiring the priority of the first connecting equipment;
and determining the target equipment in the first connecting equipment according to the priority of the first connecting equipment.
4. The method of claim 3, wherein after comparing the number of the first connected devices with a preset value, further comprising:
and if the number of the first connecting equipment is equal to the preset value, determining that the first connecting equipment is the target equipment.
5. The method according to claim 1, wherein the monitoring the connected device and obtaining the monitoring result of the connected device comprises:
setting corresponding monitoring events for each connecting device connected with the wireless earphone;
and monitoring a transmission channel of each connecting device by using the monitoring event to obtain a monitoring result corresponding to each connecting device, wherein the transmission channel is used for the connecting device to transmit sound information to the wireless earphone.
6. The method according to claim 5, wherein the monitoring the transmission channel of each connection device by using the monitoring event to obtain the monitoring result corresponding to each connection device further comprises:
detecting a connection state of the connection device and the wireless headset;
and if the disconnection between the connecting equipment and the wireless earphone is detected, eliminating the monitoring event corresponding to the connecting equipment.
7. The method according to claim 1, wherein the connecting with the connecting device according to the pairing request sent by the connecting device to obtain the priority of the connecting device comprises:
outputting a priority confirmation prompt to the connecting equipment according to a pairing request sent by the connecting equipment, wherein the priority confirmation prompt is used for indicating a user to determine the priority of the connecting equipment;
and acquiring priority confirmation information sent by the connecting equipment according to the priority confirmation prompt, and determining the priority of the connecting equipment according to the priority confirmation information.
8. The method of claim 7, wherein after obtaining the priority of the connected device, further comprising:
and storing the priority of the connected equipment to a preset storage area.
9. The method according to claim 7, wherein the obtaining priority confirmation information sent by the connection device according to the priority confirmation prompt and determining the priority of the connection device according to the priority confirmation information comprises:
acquiring priority confirmation information of each connecting device, and comparing the priority confirmation information of each connecting device;
and if the priority confirmation information of the connected equipment is the same, outputting a confirmation failure prompt to the connected equipment, wherein the confirmation failure prompt is used for indicating a user to re-determine the priority of each connected equipment.
10. The method according to claim 1, wherein the connecting with the connection device according to the pairing request sent by the connection device comprises:
and acquiring a pairing request sent by the connecting equipment, and connecting the pairing request with the connecting equipment by using a preset connection protocol.
11. An apparatus connecting device, comprising:
the device comprises a connection module, a priority module and a priority module, wherein the connection module is used for connecting with connection equipment according to a pairing request sent by the connection equipment and acquiring the priority of the connection equipment, and the number of the connection equipment is two or more;
the monitoring module is used for monitoring the connecting equipment and acquiring a monitoring result of the connecting equipment, wherein the monitoring result is used for indicating whether the connecting equipment transmits sound information to the wireless earphone;
and the determining module is used for determining target equipment in the connecting equipment according to the priority and the monitoring result of the connecting equipment, wherein the target equipment is used for indicating the wireless earphone to output the sound information transmitted by the target equipment.
12. An electronic device comprising a memory and at least one processor;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the method of any one of claims 1-11.
13. A wireless headset, wherein the wireless headset establishes a connection with two or more connection devices.
14. A readable storage medium having stored therein computer instructions, which when executed by a processor, are adapted to implement the method of any one of claims 1-11.
15. A program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the method of any of claims 1-11.
CN202110528217.XA 2021-05-14 2021-05-14 Device connection method, device and wireless earphone Pending CN113556830A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110528217.XA CN113556830A (en) 2021-05-14 2021-05-14 Device connection method, device and wireless earphone

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110528217.XA CN113556830A (en) 2021-05-14 2021-05-14 Device connection method, device and wireless earphone

Publications (1)

Publication Number Publication Date
CN113556830A true CN113556830A (en) 2021-10-26

Family

ID=78101825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110528217.XA Pending CN113556830A (en) 2021-05-14 2021-05-14 Device connection method, device and wireless earphone

Country Status (1)

Country Link
CN (1) CN113556830A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752029A (en) * 2011-04-18 2012-10-24 中兴通讯股份有限公司 Method for matching Bluetooth accessory with Bluetooth devices and Bluetooth accessory
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
US20190215597A1 (en) * 2016-06-24 2019-07-11 Dolby Laboratories Licensing Corporation Wireless Audio Source Switching
CN110191442A (en) * 2019-04-18 2019-08-30 华为技术有限公司 A kind of Bluetooth connecting method, equipment and system
CN111372159A (en) * 2020-03-17 2020-07-03 维沃移动通信有限公司 Earphone play control method and earphone
CN112040465A (en) * 2020-08-19 2020-12-04 泰州德川绿化养护有限公司 Bluetooth sound box connection switching method, Bluetooth sound box, terminal device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752029A (en) * 2011-04-18 2012-10-24 中兴通讯股份有限公司 Method for matching Bluetooth accessory with Bluetooth devices and Bluetooth accessory
US20190215597A1 (en) * 2016-06-24 2019-07-11 Dolby Laboratories Licensing Corporation Wireless Audio Source Switching
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
CN110191442A (en) * 2019-04-18 2019-08-30 华为技术有限公司 A kind of Bluetooth connecting method, equipment and system
CN111372159A (en) * 2020-03-17 2020-07-03 维沃移动通信有限公司 Earphone play control method and earphone
CN112040465A (en) * 2020-08-19 2020-12-04 泰州德川绿化养护有限公司 Bluetooth sound box connection switching method, Bluetooth sound box, terminal device and system

Similar Documents

Publication Publication Date Title
CN110168942B (en) Method, terminal, system and storage medium for selecting Bluetooth device
CN111200769B (en) Communication method for Bluetooth headset device and Bluetooth headset device
EP3629562A1 (en) Data transmitting method and system
EP3547727A1 (en) Bluetooth connection method, device and smart terminal
US9106553B2 (en) System and method for sharing resources and interfaces amongst connected computing devices
EP2701313A1 (en) Method for pairing bluetooth accessory with bluetooth device, and bluetooth accessory
US20100048133A1 (en) Audio data flow input/output method and system
CN110650408B (en) Earphone, anti-lost method, anti-lost system and computer readable storage medium
US10820087B2 (en) Wireless audio source switching
CN108738008B (en) Bluetooth pairing method and system
US11368777B2 (en) Method and system for upgrading program of TWS headset, and TWS headset
EP3537734A1 (en) Method, apparatus, system, and device for connecting bluetooth device
US20220322059A1 (en) Bluetooth data transmission method and apparatus, terminal and storage medium
CN110191389B (en) Multi-point connection method and device of wireless headset, Bluetooth headset and TWS headset
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN113038316A (en) Earphone control method and device, Bluetooth earphone and storage medium
CN113906773A (en) Channel selection method and device of low-power-consumption Bluetooth device
US20190007764A1 (en) Head-mounted display device and head-mounted display system
CN114040373A (en) Audio service processing method and device, electronic equipment and storage medium
CN111954123B (en) Method, system, medium, and wireless audio device for information synchronization of wireless audio devices
CN111182597B (en) Processing method and device
CN116074679B (en) Method, device, equipment and storage medium for determining left and right states of intelligent earphone
WO2023103732A1 (en) State control method and apparatus for earphone device, earphone device and storage medium
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
CN113556830A (en) Device connection method, device and wireless earphone

Legal Events

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