WO2023225869A1 - 蓝牙设备控制方法、装置、设备及存储介质 - Google Patents
蓝牙设备控制方法、装置、设备及存储介质 Download PDFInfo
- Publication number
- WO2023225869A1 WO2023225869A1 PCT/CN2022/094787 CN2022094787W WO2023225869A1 WO 2023225869 A1 WO2023225869 A1 WO 2023225869A1 CN 2022094787 W CN2022094787 W CN 2022094787W WO 2023225869 A1 WO2023225869 A1 WO 2023225869A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- connection
- terminal device
- bluetooth
- server
- information
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 76
- 230000004044 response Effects 0.000 claims abstract description 148
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012790 confirmation Methods 0.000 claims description 7
- 238000012545 processing Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 14
- 238000005516 engineering process Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 10
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/16—Performing reselection for specific purposes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
Definitions
- the present disclosure relates to the field of terminal technology, and in particular, to a Bluetooth device control method, device, equipment and storage medium.
- Bluetooth headsets With the development of terminal technology and Bluetooth technology, more and more Bluetooth devices, such as Bluetooth headsets, appear in people's lives.
- a terminal device such as a smartphone
- the Bluetooth device can assume the role of audio input and output during the use of the terminal device.
- a Bluetooth headset can only be connected to one device at the same time.
- the user's Bluetooth headset is connected to the tablet, if the user's mobile phone receives a call and the user wants to use the Bluetooth headset to answer the call, the user needs to manually disconnect the Bluetooth headset from the tablet and then establish a connection with the mobile phone. , the operation process is more cumbersome and will consume more time of the user, thus affecting the user experience.
- embodiments of the present disclosure provide a Bluetooth device control method, device, equipment and storage medium to solve the defects in the related technology.
- the first control instruction includes information sent by the server under a first set condition
- the third A set condition includes receiving a Bluetooth information acquisition request sent by the second terminal device after having second audio data to be played for obtaining connection information of the Bluetooth device;
- the first setting condition further includes detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are in the same local area network.
- connection information of the Bluetooth device is sent to the server.
- the method further includes:
- the second setting condition includes receiving second notification information sent by the second terminal device to indicate that a second connection has been disconnected.
- the second connection is between the second terminal device and the Bluetooth device. connection established.
- re-establishing the first connection with the Bluetooth device in response to receiving the second control instruction sent by the server, re-establishing the first connection with the Bluetooth device includes:
- the first connection is re-established with the Bluetooth device.
- a Bluetooth device control method is provided, applied to a second terminal device, and the method includes:
- connection information includes the response of the server to receiving the third
- the connection information includes the response of the server to receiving the third
- the information sent by the first notification information sent by a terminal device is a device logged in with the same account as the second terminal device
- the first notification information includes the first terminal device’s response to receiving to the first control instruction and disconnect the first connection established with the Bluetooth device and send information to the server, where the first control instruction includes information sent by the server under the first setting condition, so
- the first setting condition includes receiving the Bluetooth information acquisition request;
- the second audio data is sent to the Bluetooth device for playing.
- the first setting condition further includes detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the method further includes:
- second notification information indicating that the second connection has been disconnected is sent to the server.
- a Bluetooth device control method is provided, which is applied to the server.
- the method includes:
- the first setting condition includes receiving a Bluetooth information acquisition request for obtaining connection information of the Bluetooth device sent by the second terminal device after having the second audio data to be played;
- the connection information includes information sent by the first terminal device to the server in response to establishing the first connection.
- the connection information is used for the second terminal device to establish a second connection with the Bluetooth device, and to send the second audio data to the Bluetooth device for playback based on the second connection.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are in the same local area network.
- the method further includes:
- the second control instruction is used to Control the first terminal device to re-establish the first connection with the Bluetooth device.
- a Bluetooth device control device is provided, applied to a first terminal device, and the device includes:
- a first connection disconnection module configured to disconnect the first pre-established connection with the Bluetooth device in response to receiving a first control instruction sent by the server, where the first control instruction includes the first setting of the server.
- Information sent under conditions, the first set condition includes receiving a Bluetooth information acquisition request for obtaining connection information of the Bluetooth device sent by the second terminal device after having the second audio data to be played;
- a first notification sending module configured to send first notification information indicating that the first connection has been disconnected to the server in response to detecting that the first connection has been disconnected, so that the server will The connection information is sent to the second terminal device.
- the first setting condition further includes detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are in the same local area network.
- the device further includes:
- a first connection establishment module configured to establish a first connection with the Bluetooth device in response to receiving a control instruction for connecting to the Bluetooth device
- a connection information sending module configured to send connection information of the Bluetooth device to the server in response to the establishment of the first connection.
- the device further includes:
- a first connection reestablishment module configured to re-establish the first connection with the Bluetooth device in response to receiving a second control instruction sent by the server, where the second control instruction includes the second control instruction sent by the server.
- Information sent under set conditions, the second set conditions include receiving second notification information sent by the second terminal device to indicate that the second connection has been disconnected, the second connection is the third The connection established between the second terminal device and the Bluetooth device.
- the first connection reestablishment module includes:
- a query information generation unit configured to generate query information for determining whether to establish a first connection with the Bluetooth device in response to receiving the second control instruction sent by the server;
- a first connection reestablishment unit configured to re-establish the first connection with the Bluetooth device in response to receiving a confirmation instruction based on the query information.
- a Bluetooth device control device is provided, applied to a second terminal device, and the device includes:
- An acquisition request sending module configured to send a Bluetooth information acquisition request to the server in response to detecting that the second terminal device has second audio data to be played;
- a second connection establishment module configured to respond to receiving the connection information of the Bluetooth device returned by the server based on the acquisition request, and establish a second connection with the Bluetooth device based on the connection information, where the connection information includes the The information sent by the server in response to receiving the first notification information sent by the first terminal device, the first terminal device being a device logged in with the same account as the second terminal device, the first notification information including the Information sent by the first terminal device to the server in response to receiving a first control instruction and disconnecting the first connection established with the Bluetooth device, where the first control instruction includes the server sending a message to the server on the first device.
- Information sent under certain conditions, the first setting condition includes receiving the Bluetooth information acquisition request;
- a second audio sending module configured to send the second audio data to the Bluetooth device for playing based on the second connection.
- the first setting condition further includes detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are in the same local area network.
- the device further includes:
- a second connection disconnection module configured to disconnect the second connection in response to detecting that the second audio data has been played
- a second notification sending module is configured to send second notification information indicating that the second connection has been disconnected to the server in response to detecting that the second connection has been disconnected.
- a Bluetooth device control device which is applied to the server.
- the device includes:
- a first instruction sending module configured to send a first control instruction to the first terminal device in response to detecting that the first set condition is currently met, the first control instruction being used to control the first terminal device to disconnect A first connection with a Bluetooth device, the first setting condition includes receiving a Bluetooth information acquisition request sent by the second terminal device after having second audio data to be played for obtaining connection information of the Bluetooth device;
- a connection information sending module configured to send the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving the first notification information sent by the first terminal device, the first notification
- the information includes information sent by the first terminal device to the server in response to detecting that the first connection has been disconnected, and the connection information includes information sent by the first terminal device to the server in response to the establishment of the first connection.
- the information sent by the server, the connection information is used for the second terminal device to establish a second connection with the Bluetooth device, and send the second audio data to the Bluetooth device based on the second connection. Play.
- the first setting condition further includes detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition further includes detecting that the first terminal device and the second terminal device are in the same local area network.
- the device further includes:
- a second instruction sending module configured to send a second control instruction to the first terminal device in response to receiving the second notification information sent by the second terminal device indicating that the second connection has been disconnected,
- the second control instruction is used to control the first terminal device to re-establish the first connection with the Bluetooth device.
- a terminal device where the device includes:
- the processor is configured to, when executing the computer program, implement:
- the first control instruction includes information sent by the server under a first set condition
- the third A set condition includes receiving a Bluetooth information acquisition request sent by the second terminal device after having second audio data to be played for obtaining connection information of the Bluetooth device;
- a terminal device where the device includes:
- the processor is configured to, when executing the computer program, implement:
- the connection information includes the response of the server to receiving the third Information sent by the first notification information sent by a terminal device
- the first notification information includes the first terminal device sending a message to the first terminal device in response to receiving the first control instruction and disconnecting the first connection established with the Bluetooth device.
- the information sent by the server, the first control instruction includes the information sent by the server under a first setting condition, the first setting condition includes receiving the Bluetooth information acquisition request;
- the second audio data is sent to the Bluetooth device for playing.
- a server includes:
- the first setting condition includes receiving a Bluetooth information acquisition request for obtaining connection information of the Bluetooth device sent by the second terminal device after having the second audio data to be played;
- the connection information includes information sent by the first terminal device to the server in response to establishing the first connection.
- the connection information is used for the second terminal device to establish a second connection with the Bluetooth device, and to send the second audio data to the Bluetooth device for playback based on the second connection.
- a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, any one of the Bluetooth device control methods described above is implemented.
- the present disclosure can prevent the user from manually switching the Bluetooth device from connecting with the first terminal device to connecting with the second terminal device, thereby improving the automation level of Bluetooth device connection switching, saving the user's time, and thereby improving the user experience.
- Figure 1 is a flow chart of a Bluetooth device control method according to an exemplary embodiment of the present disclosure
- Figure 2 is a flow chart illustrating how to send connection information of the Bluetooth device to the server according to an exemplary embodiment of the present disclosure
- Figure 3 is a flow chart of a Bluetooth device control method according to yet another exemplary embodiment of the present disclosure.
- Figure 4 is a flowchart showing how to re-establish the first connection with the Bluetooth device according to an exemplary embodiment of the present disclosure
- Figure 5 is a flow chart of a Bluetooth device control method according to an exemplary embodiment of the present disclosure
- Figure 6 is a flow chart of a Bluetooth device control method according to yet another exemplary embodiment of the present disclosure.
- Figure 7 is a flow chart of a Bluetooth device control method according to an exemplary embodiment of the present disclosure.
- Figure 8 is a flow chart of a Bluetooth device control method according to yet another exemplary embodiment of the present disclosure.
- FIG. 9 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- FIG. 10 is a block diagram of yet another Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- FIG 11 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- Figure 12 is a block diagram of yet another Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- Figure 13 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- Figure 14 is a block diagram of yet another Bluetooth device control device according to an exemplary embodiment of the present disclosure.
- FIG. 15 is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
- FIG. 1 is a flow chart of a Bluetooth device control method according to an exemplary embodiment of the present disclosure; the method of this embodiment can be applied to a first terminal device with a data processing function (such as a smart phone, a tablet computer, a smart phone speakers and desktop computers, etc.). As shown in Figure 1, the method includes the following steps S101-S102:
- step S101 in response to receiving the first control instruction sent by the server, disconnect the first connection pre-established with the Bluetooth device;
- step S102 in response to detecting that the first connection has been disconnected, first notification information indicating that the first connection has been disconnected is sent to the server so that the server The information is sent to the second terminal device.
- the first terminal device may disconnect the first pre-established connection with the Bluetooth device in response to receiving the first control instruction sent by the server, wherein the first control instruction includes the first control instruction sent by the server.
- Information sent under set conditions, the first set condition includes receiving a Bluetooth information acquisition request sent by the second terminal device after having second audio data to be played for obtaining connection information of the Bluetooth device;
- the first terminal device may, in response to detecting that the first connection has been disconnected, send first notification information indicating that the first connection has been disconnected to the server, so that the server sends the The connection information is sent to the second terminal device.
- the second terminal device when it detects that it has second audio data to be played, it can send a Bluetooth information acquisition request to the server;
- the server may send a first control instruction to the first terminal device to control the first terminal device to disconnect the first connection with the Bluetooth device.
- the first setting condition includes receiving a Bluetooth information acquisition request for acquiring connection information of the Bluetooth device sent by the second terminal device after having second audio data to be played;
- the first terminal device When the first terminal device detects that it has disconnected the first connection, it may send first notification information indicating that the first connection has been disconnected to the server;
- the server may, in response to receiving the first notification information, send the pre-received connection information of the Bluetooth device to the second terminal device, so that the second terminal device can communicate with the Bluetooth device based on the connection information.
- the device establishes a second connection, and sends the second audio data to the Bluetooth device for playing based on the second connection.
- connection information of the Bluetooth device may include device information of the Bluetooth device, such as at least one of the device type, device name, Bluetooth address, and Bluetooth signal strength of the Bluetooth device.
- the above-mentioned first setting condition may further include detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are in the same local area network.
- the method of this embodiment disconnects the first pre-established connection with the Bluetooth device in response to receiving the first control instruction sent by the server, and in response to detecting that the first connection has been disconnected, Sending the first notification information indicating that the first connection has been disconnected to the server may enable the subsequent server to send the pre-received connection information of the Bluetooth device to the second server based on the first notification information.
- the terminal device can further establish a second connection between the second terminal device and the Bluetooth device, and send the second audio data to the Bluetooth device for playback based on the second connection, which can improve the automation level of Bluetooth device connection switching. , saving users’ time and thus improving user experience.
- Figure 2 is a flow chart showing how to send the connection information of the Bluetooth device to the server according to an exemplary embodiment of the present disclosure; based on the above embodiment shown in Figure 1, this embodiment also includes the following: Steps S201-S202 send the connection information of the Bluetooth device to the server:
- step S201 in response to receiving a control instruction for connecting to a Bluetooth device, establishing a first connection with the Bluetooth device;
- step S202 in response to the establishment of the first connection, the connection information of the Bluetooth device is sent to the server.
- the first terminal device may establish a first connection with the Bluetooth device in response to receiving a control instruction for connecting to the Bluetooth device, and may further respond to the establishment of the first connection by sending a request to the service.
- the terminal sends the connection information of the Bluetooth device.
- the connection information of the Bluetooth device may include device information of the Bluetooth device, such as at least one of the device type, device name, Bluetooth address, and Bluetooth signal strength of the Bluetooth device. It can be understood that after the first connection is established, the first terminal device can send its first audio data currently to be played to the Bluetooth device for playing based on the first connection.
- the method of this embodiment establishes a first connection with the Bluetooth device in response to receiving a control instruction for connecting to the Bluetooth device, and in response to the establishment of the first connection, sends a request to the service
- the terminal sends the connection information of the Bluetooth device, which can realize that when the server receives the first notification information sent by the first terminal device, it can send the connection information of the Bluetooth device to the second terminal device for use.
- the second terminal device establishes a second connection with the Bluetooth device, and sends the second audio data to the Bluetooth device for playback based on the second connection, which can avoid the user from manually connecting the Bluetooth device to the first
- the terminal device connection is switched to a connection with the second terminal device, thereby improving the automation level of Bluetooth device connection switching, saving the user's time, and thus improving the user experience.
- FIG 3 is a flow chart of a Bluetooth device control method according to another exemplary embodiment of the present disclosure; the method of this embodiment can be applied to a first terminal device with a data processing function (such as a smart phone, a tablet computer, smart speakers and desktop computers, etc.). As shown in Figure 3, the method includes the following steps S301-S303:
- step S301 in response to receiving the first control instruction sent by the server, disconnect the first connection pre-established with the Bluetooth device;
- step S302 in response to detecting that the first connection has been disconnected, first notification information indicating that the first connection has been disconnected is sent to the server so that the server The information is sent to the second terminal device;
- steps S301-S302 please refer to steps S101-S102 in the embodiment shown in FIG. 1, and will not be described again here.
- step S303 in response to receiving the second control instruction sent by the server, the first connection is re-established with the Bluetooth device.
- the second control instruction includes information sent by the server under a second setting condition
- the second setting condition includes receiving a message sent by the second terminal device to indicate that the second connection has been disconnected.
- the second notification information is opened, and the second connection is a connection established between the second terminal device and the Bluetooth device.
- the server may send a first control instruction to the first terminal device to control the first terminal device to disconnect the first connection with the Bluetooth device;
- the first terminal device When the first terminal device detects that it has disconnected the first connection, it may send first notification information indicating that the first connection has been disconnected to the server;
- the server may, in response to receiving the first notification information, send the pre-received connection information of the Bluetooth device to the second terminal device, so that the second terminal device can communicate with the Bluetooth device based on the connection information.
- the device establishes a second connection, and sends the second audio data to the Bluetooth device for playback based on the second connection;
- the second terminal device when the second terminal device detects that the second audio data has been played, it can disconnect the second connection, and when it detects that it has disconnected the second connection, it sends a message to the server for Second notification information indicating that the second connection has been disconnected.
- the server may send a second control instruction to the first terminal device when receiving the second notification information
- the first terminal device After the first terminal device receives the above-mentioned second control instruction, it can re-establish the first connection with the Bluetooth device, that is, when the second terminal device disconnects the second connection, it can automatically restore the first terminal device.
- the first connection with the Bluetooth device does not require the user to manually switch the Bluetooth device from connecting with the second terminal device to connecting with the first terminal device.
- Figure 4 is a flow chart showing how to re-establish the first connection with the Bluetooth device according to an exemplary embodiment of the present disclosure; this embodiment is based on the above embodiment and shows how to re-establish the first connection with the Bluetooth device.
- the first connection is taken as an example for illustrative description.
- the step S303 described above, in response to receiving the second control instruction sent by the server, re-establishing the first connection with the Bluetooth device may include the following steps S401-S402:
- step S401 in response to receiving the second control instruction sent by the server, generate query information for determining whether to establish a first connection with the Bluetooth device;
- step S402 in response to receiving a confirmation instruction based on the query information, the first connection is re-established with the Bluetooth device.
- the first terminal device after receiving the above-mentioned second control instruction, can generate query information for determining whether to establish a first connection with the Bluetooth device, and can then respond to receiving a confirmation based on the query information. Instruction to re-establish the first connection with the Bluetooth device.
- the form of the above query information can be set based on actual business needs, such as setting the query information in the form of a pop-up window, which is not limited in this embodiment.
- the first terminal device After the first terminal device generates inquiry information for determining whether to establish a first connection with the Bluetooth device, if a confirmation instruction input by the user based on the inquiry information is received (that is, for confirming re-establishment of the first connection), (a connection instruction), the first connection can be re-established with the Bluetooth device. In this way, the first connection between the first terminal device and the Bluetooth device can be automatically restored without the user having to manually switch the Bluetooth device from connecting with the second terminal device to connecting with the first terminal device.
- FIG. 5 is a flow chart of a Bluetooth device control method according to an exemplary embodiment of the present disclosure; the method of this embodiment can be applied to a second terminal device with data processing function (such as a smart phone, a tablet computer, a smart phone speakers and desktop computers, etc.). As shown in Figure 5, the method includes the following steps S501-S503:
- step S501 in response to detecting that the second terminal device has second audio data to be played, a Bluetooth information acquisition request is sent to the server;
- step S502 in response to receiving the connection information of the Bluetooth device returned by the server based on the acquisition request, establish a second connection with the Bluetooth device based on the connection information;
- step S503 based on the second connection, the second audio data is sent to the Bluetooth device for playing.
- the second terminal device may send a Bluetooth information acquisition request to the server in response to detecting that the second terminal device has second audio data to be played, and then when receiving the Bluetooth information acquisition request from the server based on the acquisition
- a second connection may be established with the Bluetooth device based on the connection information, wherein the connection information includes the server's response to receiving the first notification sent by the first terminal device.
- the information sent by the information, the first terminal device is a device logged in with the same account as the second terminal device, and the first notification information includes the first terminal device disconnecting in response to receiving the first control instruction.
- the first connection established with the Bluetooth device sends information to the server.
- the first control instruction includes information sent by the server under a first setting condition.
- the first setting condition includes receiving to the Bluetooth information acquisition request; based on this, the second terminal device can send the second audio data to the Bluetooth device for playing based on the second connection.
- the first terminal device may establish a first connection with the Bluetooth device, and may respond to the establishment of the first connection by sending a request to the server. Send connection information of the Bluetooth device;
- the second terminal device when it detects that it has second audio data to be played, it can send a Bluetooth information acquisition request to the server;
- the server may send a first control instruction to the first terminal device to control the first terminal device to disconnect the first connection with the Bluetooth device;
- the first terminal device When the first terminal device detects that it has disconnected the first connection, it may send first notification information indicating that the first connection has been disconnected to the server;
- the server may, in response to receiving the first notification information, send the pre-received connection information of the Bluetooth device to the second terminal device;
- the second terminal device After the second terminal device receives the above connection information, it can establish a second connection with the Bluetooth device based on the connection information, and send the second audio data to the Bluetooth device for playing based on the second connection.
- connection information of the Bluetooth device may include device information of the Bluetooth device, such as at least one of the device type, device name, Bluetooth address, and Bluetooth signal strength of the Bluetooth device.
- the above-mentioned first setting condition may further include detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are in the same local area network.
- the second terminal device when it sends a Bluetooth information acquisition request to the server, it may also send at least the current location information, the current login account and the current local area network information of the second terminal device to the server.
- One such as IP address and subnet mask, etc.
- the server may also send at least the current location information, the current login account and the current local area network information of the second terminal device to the server.
- One such as IP address and subnet mask, etc.
- the method of this embodiment sends a Bluetooth information acquisition request to the server in response to detecting that the second terminal device has second audio data to be played, and responds to receiving that the server based on the Obtain the connection information of the Bluetooth device returned by the request, establish a second connection with the Bluetooth device based on the connection information, and then send the second audio data to the Bluetooth device for playback based on the second connection, It can avoid the user from manually switching the Bluetooth device from connecting with the first terminal device to connecting with the second terminal device, thereby improving the automation level of Bluetooth device connection switching, saving the user's time, and thus improving the user experience.
- FIG. 6 is a flow chart of a Bluetooth device control method according to another exemplary embodiment of the present disclosure; the method of this embodiment can be applied to a second terminal device with a data processing function (such as a smart phone, a tablet computer, smart speakers and desktop computers, etc.). As shown in Figure 6, the method includes the following steps S601-S605:
- step S601 in response to detecting that the second terminal device has second audio data to be played, a Bluetooth information acquisition request is sent to the server;
- step S602 in response to receiving the connection information of the Bluetooth device returned by the server based on the acquisition request, establishing a second connection with the Bluetooth device based on the connection information;
- step S603 based on the second connection, the second audio data is sent to the Bluetooth device for playing.
- steps S601-S603 please refer to steps S501-S503 in the embodiment shown in FIG. 5, and will not be described again here.
- step S604 in response to detecting that the second audio data has been played, disconnect the second connection;
- step S605 in response to detecting that the second connection has been disconnected, second notification information indicating that the second connection has been disconnected is sent to the server.
- the second terminal device when the second terminal device establishes a second connection with the Bluetooth device based on the connection information of the Bluetooth device sent by the server, and sends the second audio data to the Bluetooth device based on the second connection.
- the Bluetooth device plays, if it detects that the second audio data has been played, it can disconnect the second connection, and then when it detects that it has disconnected the second connection, it can send a message to the server for Second notification information indicating that the second connection has been disconnected.
- the server may send a second control instruction to the first terminal device to control the first terminal device to re-establish the first connection with the Bluetooth device.
- connection that is, when the second terminal device disconnects the second connection, the first connection between the first terminal device and the Bluetooth device can be automatically restored without the user having to manually connect the Bluetooth device to the second terminal device. Switch to connect to the first terminal device.
- Figure 7 is a flow chart of a Bluetooth device control method according to an exemplary embodiment; the method of this embodiment can be applied to servers such as local servers and cloud servers with data processing functions, and the server can be deployed in a One electronic device or a device cluster composed of multiple electronic devices.
- step S701 in response to detecting that the first setting condition is currently met, send a first control instruction to the first terminal device;
- step S702 in response to receiving the first notification information sent by the first terminal device, the pre-received connection information of the Bluetooth device is sent to the second terminal device.
- the server may send a first control instruction to the first terminal device in response to detecting that the first set condition is currently met, where the first control instruction is used to control the first terminal device.
- the first setting condition includes receiving the Bluetooth information acquisition sent by the second terminal device after having the second audio data to be played for obtaining the connection information of the Bluetooth device. ask.
- the server may send the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving the first notification information sent by the first terminal device, wherein the first notification
- the information includes information sent by the first terminal device to the server in response to detecting that the first connection has been disconnected, and the connection information includes information sent by the first terminal device to the server in response to the establishment of the first connection.
- the information sent by the server the connection information is used for the second terminal device to establish a second connection with the Bluetooth device, and send the second audio data to the Bluetooth device based on the second connection. Play.
- the first terminal device may establish a first connection with the Bluetooth device, and may respond to the establishment of the first connection by sending a request to the server. Send connection information of the Bluetooth device;
- the second terminal device when it detects that it has second audio data to be played, it can send a Bluetooth information acquisition request to the server;
- the server may send a first control instruction to the first terminal device to control the first terminal device to disconnect the first connection with the Bluetooth device, so
- the first setting condition includes receiving a Bluetooth information acquisition request for obtaining connection information of the Bluetooth device sent by the second terminal device after having the second audio data to be played;
- the first terminal device When the first terminal device detects that it has disconnected the first connection, it may send first notification information indicating that the first connection has been disconnected to the server;
- the server may, in response to receiving the first notification information, send the pre-received connection information of the Bluetooth device to the second terminal device, so that the second terminal device can communicate with the Bluetooth device based on the connection information.
- the device establishes a second connection, and sends the second audio data to the Bluetooth device for playing based on the second connection.
- connection information of the Bluetooth device may include device information of the Bluetooth device, such as at least one of the device type, device name, Bluetooth address, and Bluetooth signal strength of the Bluetooth device.
- the above-mentioned first setting condition may further include detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are in the same local area network.
- the device-related information of the second terminal device (such as the current location information of the second terminal device, the current login information) can be obtained from the acquisition request. Account number and at least one of the current local area network information, etc.), and detect device-related information of the first terminal device (such as at least one of the first terminal device's current location information, current login account, and current local area network information, etc. ), and then compare the device-related information of the first terminal device and the second terminal device, and then determine that the first setting condition is currently met when at least one of the following (1) to (3) is detected:
- the distance between the first terminal device and the second terminal device is less than or equal to the preset distance threshold; (2) The first terminal device and the second terminal device log in to the same account; (3) ) The first terminal device and the second terminal device are in the same local area network.
- the above-mentioned method of determining the distance between the second terminal device and the first terminal device can refer to any distance determination method in the related art, such as obtaining the distance between the second terminal device and the first terminal device based on the global positioning system GPS or a local area network.
- the distance between the first terminal devices and the obtained results are applicable to this embodiment.
- the method of this embodiment sends a first control instruction to the first terminal device in response to detecting that the first setting condition is currently met, and further responds to receiving the first control instruction sent by the first terminal device.
- a notification message sending the pre-received connection information of the Bluetooth device to the second terminal device, so that the second terminal device can establish a second connection with the Bluetooth device, and based on the second connection, the The second audio data is sent to the Bluetooth device for playback, which can realize that when the second terminal device detects that there is second audio data to be played, the first terminal device is controlled to disconnect the first connection with the Bluetooth device for use.
- the second terminal device establishes a second connection with the Bluetooth device and sends the second audio data to the Bluetooth device for playback based on the second connection, which can avoid the user from manually connecting the Bluetooth device to the first terminal.
- the device connection is switched to a connection with the second terminal device, thereby improving the automation level of Bluetooth device connection switching, saving the user's time, and thereby improving the user's experience.
- Figure 8 is a flow chart of a Bluetooth device control method according to another exemplary embodiment of the present disclosure; the method of this embodiment can be applied to servers such as local servers and cloud servers with data processing functions, and the server can Deployed in one electronic device or a device cluster composed of multiple electronic devices.
- the method includes the following steps S801-S803:
- step S801 in response to detecting that the first set condition is currently met, send a first control instruction to the first terminal device;
- step S802 in response to receiving the first notification information sent by the first terminal device, the previously received connection information of the Bluetooth device is sent to the second terminal device.
- steps S801-S802 please refer to steps S701-S702 in the embodiment shown in FIG. 7, and will not be described again here.
- step S803 in response to receiving the second notification information sent by the second terminal device to indicate that the second connection has been disconnected, a second control instruction is sent to the first terminal device.
- the second control instruction is used to control the first terminal device to re-establish the first connection with the Bluetooth device.
- the second terminal device when the second terminal device establishes a second connection with the Bluetooth device based on the connection information of the Bluetooth device sent by the server, and sends the second audio data to the Bluetooth device based on the second connection.
- the Bluetooth device plays, if it detects that the second audio data has been played, it can disconnect the second connection, and when it detects that it has disconnected the second connection, it sends a message to the server to indicate Second notification information that the second connection has been disconnected.
- the server may send a second control instruction to the first terminal device to control the first terminal device to re-establish the first connection with the Bluetooth device.
- connection that is, when the second terminal device disconnects the second connection, the first connection between the first terminal device and the Bluetooth device can be automatically restored without the user having to manually connect the Bluetooth device to the second terminal device. Switch to connect to the first terminal device.
- FIG. 9 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to a first terminal device with a data processing function (such as a smart phone, a tablet computer, a smart speaker) and desktop computers, etc.).
- the device includes: a first connection disconnection module 110 and a first notification sending module 120, wherein:
- the first connection disconnection module 110 is configured to disconnect the first pre-established connection with the Bluetooth device in response to receiving a first control instruction sent by the server.
- the first control instruction includes the first control instruction sent by the server on the first device.
- Information sent under certain conditions, the first setting condition includes receiving a Bluetooth information acquisition request for obtaining connection information of the Bluetooth device sent by the second terminal device after having the second audio data to be played;
- the first notification sending module 120 is configured to, in response to detecting that the first connection has been disconnected, send first notification information indicating that the first connection has been disconnected to the server, so that the server Send the connection information to the second terminal device.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition may also include detecting that the first terminal device and the second terminal device are in the same local area network.
- the device of this embodiment disconnects the first pre-established connection with the Bluetooth device in response to receiving the first control instruction sent by the server, and in response to detecting that the first connection has been disconnected, Sending the first notification information indicating that the first connection has been disconnected to the server may enable the subsequent server to send the pre-received connection information of the Bluetooth device to the second server based on the first notification information.
- the terminal device can further establish a second connection between the second terminal device and the Bluetooth device, and send the second audio data to the Bluetooth device for playback based on the second connection, which can improve the automation level of Bluetooth device connection switching. , saving users’ time and thus improving user experience.
- FIG. 10 is a block diagram of another Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to a first terminal device with a data processing function (such as a smart phone, a tablet computer, a smart phone speakers and desktop computers, etc.).
- the first connection disconnection module 210 and the first notification sending module 220 have the same functions as the first connection disconnection module 110 and the first notification sending module 120 in the embodiment shown in FIG. 9 , and will not be described again here.
- the above device may also include:
- the first connection establishment module 230 is configured to establish a first connection with the Bluetooth device in response to receiving a control instruction for connecting to the Bluetooth device;
- the connection information sending module 240 is configured to send the connection information of the Bluetooth device to the server in response to the establishment of the first connection.
- the first connection reestablishment module 250 may include:
- the query information generation unit 251 is configured to generate query information for determining whether to establish a first connection with the Bluetooth device in response to receiving the second control instruction sent by the server;
- the first connection reestablishment unit 252 is configured to re-establish the first connection with the Bluetooth device in response to receiving a confirmation instruction based on the query information.
- FIG 11 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to second terminal devices with data processing functions (such as smart phones, tablets, smart speakers and desktop computers, etc.).
- the device includes: an acquisition request sending module 310, a second connection establishment module 320 and a second audio sending module 330, wherein:
- the acquisition request sending module 310 is configured to send a Bluetooth information acquisition request to the server in response to detecting that the second terminal device has second audio data to be played;
- the second connection establishment module 320 is configured to respond to receiving the connection information of the Bluetooth device returned by the server based on the acquisition request, and establish a second connection with the Bluetooth device based on the connection information, where the connection information includes The information sent by the server in response to receiving the first notification information sent by the first terminal device.
- the first terminal device is a device logged in with the same account as the second terminal device.
- the first notification information includes The first terminal device sends information to the server in response to receiving a first control instruction and disconnecting the first connection established with the Bluetooth device, and the first control instruction includes the server in the first Information sent under set conditions, the first set condition includes receiving the Bluetooth information acquisition request;
- the second audio sending module 330 is configured to send the second audio data to the Bluetooth device for playing based on the second connection.
- the first setting condition may further include detecting that the distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are in the same local area network.
- FIG. 12 is a block diagram of another Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to a second terminal device with a data processing function (such as a smart phone, a tablet computer, a smart phone speakers and desktop computers, etc.).
- a data processing function such as a smart phone, a tablet computer, a smart phone speakers and desktop computers, etc.
- the acquisition request sending module 410, the second connection establishment module 420 and the second audio sending module 430 are the same as the acquisition request sending module 310, the second connection establishment module 320 and the second audio sending module 330 in the embodiment shown in FIG. 11
- the functions are the same and will not be described again here.
- the above device may also include:
- the second connection disconnection module 440 is configured to disconnect the second connection in response to detecting that the second audio data has been played
- the second notification sending module 450 is configured to send second notification information indicating that the second connection has been disconnected to the server in response to detecting that the second connection has been disconnected.
- FIG 13 is a block diagram of a Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to servers such as local servers and cloud servers with data processing functions, and the server can be deployed on One electronic device or a device cluster composed of multiple electronic devices.
- the device includes: a first instruction sending module 510 and a connection information sending module 520, wherein:
- the first instruction sending module 510 is configured to send a first control instruction to the first terminal device in response to detecting that the first setting condition is currently met.
- the first control instruction is used to control the first terminal device to disconnect. Opening a first connection with a Bluetooth device, the first setting condition includes receiving a Bluetooth information acquisition request sent by the second terminal device after having second audio data to be played for obtaining connection information of the Bluetooth device. ;
- the connection information sending module 520 is configured to send the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving the first notification information sent by the first terminal device.
- the notification information includes information sent by the first terminal device to the server in response to detecting that the first connection has been disconnected, and the connection information includes information sent by the first terminal device in response to the establishment of the first connection.
- Information sent to the server, the connection information is used for the second terminal device to establish a second connection with the Bluetooth device, and send the second audio data to the Bluetooth device based on the second connection. to play.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are logged into the same account.
- the first setting condition may further include detecting that the first terminal device and the second terminal device are in the same local area network.
- the second terminal device establishes a second connection with the Bluetooth device and sends the second audio data to the Bluetooth device for playback based on the second connection, which can avoid the user from manually connecting the Bluetooth device to the first terminal.
- the device connection is switched to a connection with the second terminal device, thereby improving the automation level of Bluetooth device connection switching, saving the user's time, and thereby improving the user's experience.
- Figure 14 is a block diagram of another Bluetooth device control device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be applied to servers such as local servers and cloud servers with data processing functions, and the server can be deployed In an electronic device or a device cluster composed of multiple electronic devices.
- the first instruction sending module 610 and the connection information sending module 620 have the same functions as the first instruction sending module 510 and the connection information sending module 520 in the embodiment shown in FIG. 10 , and will not be described again here.
- the second instruction sending module 630 is configured to send a second control instruction to the first terminal device in response to receiving the second notification information sent by the second terminal device indicating that the second connection has been disconnected. , the second control instruction is used to control the first terminal device to re-establish the first connection with the Bluetooth device.
- device 900 may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and communications component 916.
- a processing component 902 a memory 904
- a power supply component 906 a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and communications component 916.
- I/O input/output
- Processing component 902 generally controls the overall operations of device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
- the processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method.
- processing component 902 may include one or more modules that facilitate interaction between processing component 902 and other components.
- processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.
- Memory 904 is configured to store various types of data to support operations at device 900 . Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, etc.
- Memory 904 may be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EEPROM), Programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
- SRAM static random access memory
- EEPROM electrically erasable programmable read-only memory
- EEPROM erasable programmable read-only memory
- EPROM Programmable read-only memory
- PROM programmable read-only memory
- ROM read-only memory
- magnetic memory flash memory, magnetic or optical disk.
- Power supply component 906 provides power to the various components of device 900 .
- Power supply components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 900 .
- Multimedia component 908 includes a screen that provides an output interface between the device 900 and the user.
- the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
- the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide action.
- multimedia component 908 includes a front-facing camera and/or a rear-facing camera.
- Audio component 910 is configured to output and/or input audio signals.
- audio component 910 includes a microphone (MIC) configured to receive external audio signals when device 900 is in operating modes, such as call mode, recording mode, and speech recognition mode. The received audio signals may be further stored in memory 904 or sent via communications component 916 .
- audio component 910 also includes a speaker for outputting audio signals.
- the I/O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which may be a keyboard, a click wheel, a button, etc. These buttons may include, but are not limited to: Home button, Volume buttons, Start button, and Lock button.
- Sensor component 914 includes one or more sensors that provide various aspects of status assessment for device 900 .
- the sensor component 914 can detect the open/closed state of the device 900, the relative positioning of components, such as the display and keypad of the device 900, and the sensor component 914 can also detect a change in position of the device 900 or a component of the device 900. , the presence or absence of user contact with device 900 , device 900 orientation or acceleration/deceleration and temperature changes of device 900 .
- Sensor assembly 914 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
- Sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
- the sensor component 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
- Communication component 916 is configured to facilitate wired or wireless communications between device 900 and other devices.
- the device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof.
- the communication component 916 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
- the communications component 916 also includes a near field communications (NFC) module to facilitate short-range communications.
- NFC near field communications
- the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
- RFID radio frequency identification
- IrDA infrared data association
- UWB ultra-wideband
- Bluetooth Bluetooth
- device 900 may be configured by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above method.
- ASICs application specific integrated circuits
- DSPs digital signal processors
- DSPDs digital signal processing devices
- PLDs programmable logic devices
- FPGA field programmable Gate array
- controller microcontroller, microprocessor or other electronic component implementation for performing the above method.
- a non-transitory computer-readable storage medium including instructions such as a memory 904 including instructions, which are executable by the processor 920 of the device 900 to complete the above method is also provided.
- the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本公开是关于一种蓝牙设备控制方法、装置、设备及存储介质,该方法包括:响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接(S101);响应于检测到已断开第一连接,向服务端发送用于表示第一连接已断开的第一通知信息,以便服务端将连接信息发送至第二终端设备蓝牙信息获取请求(S102)。本公开可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
Description
本公开涉及终端技术领域,尤其涉及一种蓝牙设备控制方法、装置、设备及存储介质。
随着终端技术和蓝牙技术的发展,越来越多的蓝牙设备,如蓝牙耳机等出现在人们的生活之中。通过与智能手机等终端设备建立蓝牙连接,蓝牙设备可在终端设备的使用过程中承担音频输入输出的作用。
相关技术中,蓝牙耳机在同一时间仅能与一个设备进行连接。在用户的蓝牙耳机已与平板电脑连接的情况下,如果用户的手机来电,且用户想使用蓝牙耳机接听电话,就需要通过手动方式将蓝牙耳机与平板电脑的连接断开,再与手机建立连接,操作过程较为繁琐,会耗费用户较多时间,进而影响用户的使用体验。
发明内容
为克服相关技术中存在的问题,本公开实施例提供一种蓝牙设备控制方法、装置、设备及存储介质,用以解决相关技术中的缺陷。
根据本公开实施例的第一方面,提供一种蓝牙设备控制方法,应用于第一终端设备,所述方法包括:
响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述方法还包括:
响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接;
响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。
在一些实施例中,所述方法还包括:
响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,所述第二控制指令包括所述服务端在第二设定条件下发送的信息,所述第二设定条件包括接收到所述第二终端设备发送的用于表示第二连接已断开的第二通知信息,所述第二连接为所述第二终端设备与所述蓝牙设备建立的连接。
在一些实施例中,所述响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,包括:
响应于接收到所述服务端发送的第二控制指令,生成用于确定是否与所述蓝牙设备建立第一连接的询问信息;
响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
根据本公开实施例的第二方面,提供一种蓝牙设备控制方法,应用于第二终端设备,所述方法包括:
响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一终端设备为与所述第二终端设备登录同一账号的设备,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;
基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述方法还包括:
响应于检测到所述第二音频数据已播放完毕,断开所述第二连接;
响应于检测到已断开所述第二连接,向所述服务端发送用于表示所述第二连接已断开的第二通知信息。
根据本公开实施例的第三方面,提供一种蓝牙设备控制方法,应用于服务端,所述方法包括:
响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述方法还包括:
响应于接收到所述第二终端设备发送的用于表示所述第二连接已断开的第二通知信息,向所述第一终端设备发送第二控制指令,所述第二控制指令用于控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接。
根据本公开实施例的第四方面,提供一种蓝牙设备控制装置,应用于第一终端设备,所述装置包括:
第一连接断开模块,用于响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
第一通知发送模块,用于响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述装置还包括:
第一连接建立模块,用于响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接;
连接信息发送模块,用于响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。
在一些实施例中,所述装置还包括:
第一连接重建模块,用于响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,所述第二控制指令包括所述服务端在第二设定条件下发送的信息,所述第二设定条件包括接收到所述第二终端设备发送的用于表示第二连接已断开的第二通知信息,所述第二连接为所述第二终端设备与所述蓝牙设备建立的连接。
在一些实施例中,所述第一连接重建模块,包括:
询问信息生成单元,用于响应于接收到所述服务端发送的第二控制指令,生成用于确定是否与所述蓝牙设备建立第一连接的询问信息;
第一连接重建单元,用于响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
根据本公开实施例的第五方面,提供一种蓝牙设备控制装置,应用于第二终端设备,所述装置包括:
获取请求发送模块,用于响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
第二连接建立模块,用于响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一终端设备为与所述第二终端设备登录同一账号的设备,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;
第二音频发送模块,用于基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述装置还包括:
第二连接断开模块,用于响应于检测到所述第二音频数据已播放完毕,断开所述第二连接;
第二通知发送模块,用于响应于检测到已断开所述第二连接,向所述服务端发送用于表示所述第二连接已断开的第二通知信息。
根据本公开实施例的第六方面,提供一种蓝牙设备控制装置,应用于服务端,所述装置包括:
第一指令发送模块,用于响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
连接信息发送模块,用于响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在一些实施例中,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,所述装置还包括:
第二指令发送模块,用于响应于接收到所述第二终端设备发送的用于表示所述第二连接已断开的第二通知信息,向所述第一终端设备发送第二控制指令,所述第二控制指令用于控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接。
根据本公开实施例的第七方面,提供一种终端设备,所述设备包括:
处理器以及用于存储计算机程序的存储器;
其中,所述处理器被配置为在执行所述计算机程序时,实现:
响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
根据本公开实施例的第八方面,提供一种终端设备,所述设备包括:
处理器以及用于存储计算机程序的存储器;
其中,所述处理器被配置为在执行所述计算机程序时,实现:
响应于检测到当前终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;
基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
根据本公开实施例的第九方面,提供一种服务端,所述服务端包括:
处理器以及用于存储计算机程序的存储器;
其中,所述处理器被配置为在执行所述计算机程序时,实现:
响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
根据本公开实施例的第十方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述任一项所述的蓝牙设备控制方法。
本公开的实施例提供的技术方案可以包括以下有益效果:
本公开可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1是根据本公开一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图2是根据本公开一示例性实施例示出的如何向所述服务端发送所述蓝牙设备的连接信息的流程图;
图3是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图4是根据本公开一示例性实施例示出的如何重新与所述蓝牙设备建立所述第一连接的流程图;
图5是根据本公开一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图6是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图7是根据本公开一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图8是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;
图9是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;
图10是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;
图11是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;
图12是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;
图13是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;
图14是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;
图15是根据本公开一示例性实施例示出的一种电子设备的框图。
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施例并不代表与本公开相一致的所有实施例。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据本公开一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的第一终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图1所示,该方法包括以下步骤S101-S102:
在步骤S101中,响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接;
在步骤S102中,响应于检测到已断开所述第一连接,向所述服务端发送用于表 示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
本实施例中,第一终端设备可以响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,其中,该第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;进而,第一终端设备可以响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
举例来说,当第二终端设备检测到自身具有待播放的第二音频数据时,可以向服务端发送蓝牙信息获取请求;
进一步地,服务端可以当检测到当前满足第一设定条件时向所述第一终端设备发送第一控制指令,以控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
当第一终端设备检测到自身已断开所述第一连接,可以向所述服务端发送用于表示所述第一连接已断开的第一通知信息;
进而,服务端可以响应于接收到该第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,以供第二终端设备基于该连接信息与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
示例性地,上述蓝牙设备的连接信息可以包括该蓝牙设备的设备信息,如该蓝牙设备的设备类型、设备名称、蓝牙地址以及蓝牙信号强度中的至少一项。
在一些实施例中,上述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
由上述描述可知,本实施例的方法通过响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,并响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,可以实现后续服务端基于该第一通知信息将预先接收到的所述蓝牙设备的连接信息发送至第二终端设备,进而可以实现第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图2是根据本公开一示例性实施例示出的如何向所述服务端发送所述蓝牙设备的连接信息的流程图;本实施例在上述图1所示实施例的基础上,还包括基于以下步骤S201-S202向所述服务端发送所述蓝牙设备的连接信息:
在步骤S201中,响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接;
在步骤S202中,响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。
本实施例中,第一终端设备可以响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接,进而可以响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。举例来说,上述蓝牙设备的连接信息可以包括该蓝牙设备的设备信息,如该蓝牙设备的设备类型、设备名称、蓝牙地址以及蓝牙信号强度中的至少一项。可以理解的是,当建立第一连接后,第一终端设备可以基于所述第一连接,将自身当前待播放的第一音频数据发送至所述蓝牙设备进行播放。
由上述描述可知,本实施例的方法通过响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接,并响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息,可以实现后续当服务端接收到所述第一终端设备发送的第一通知信息时,将该蓝牙设备的连接信息发送至所述第二终端设备,以供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,因而可以提高蓝牙设备连接切换的自动化水平,节省用户的时间,从而可以提升用户的使用体验。
图3是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的第一终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图3所示,该方法包括以下步骤S301-S303:
在步骤S301中,响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接;
在步骤S302中,响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备;
其中,步骤S301-S302的相关解释和说明可以参见上述图1所示实施例中的步骤S101-S102,在此不进行赘述。
在步骤S303中,响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接。
其中,所述第二控制指令包括所述服务端在第二设定条件下发送的信息,所述第二设定条件包括接收到所述第二终端设备发送的用于表示第二连接已断开的第 二通知信息,所述第二连接为所述第二终端设备与所述蓝牙设备建立的连接。
举例来说,服务端可以在判断出当前满足第一设定条件时,向所述第一终端设备发送第一控制指令,以控制所述第一终端设备断开与蓝牙设备的第一连接;
当第一终端设备检测到自身已断开所述第一连接,可以向所述服务端发送用于表示所述第一连接已断开的第一通知信息;
进而,服务端可以响应于接收到该第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,以供第二终端设备基于该连接信息与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放;
进一步地,当第二终端设备检测到所述第二音频数据已播放完毕,可以断开所述第二连接,以及在检测到自身已断开所述第二连接时,向服务端发送用于表示所述第二连接已断开的第二通知信息。
在此基础上,服务端可以当接收到该第二通知信息时,向所述第一终端设备发送第二控制指令;
当第一终端设备接收到上述第二控制指令后,可以重新与所述蓝牙设备建立所述第一连接,即当第二终端设备断开所述第二连接时,可自动恢复第一终端设备与蓝牙设备之间的第一连接,而无需用户通过手动方式将蓝牙设备由与第二终端设备连接切换成与第一终端设备连接。
图4是根据本公开一示例性实施例示出的如何重新与所述蓝牙设备建立所述第一连接的流程图;本实施例在上述实施例的基础上以如何重新与所述蓝牙设备建立所述第一连接为例进行示例性说明。如图4所示,上述步骤S303所述的响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,可以包括以下步骤S401-S402:
在步骤S401中,响应于接收到所述服务端发送的第二控制指令,生成用于确定是否与所述蓝牙设备建立第一连接的询问信息;
在步骤S402中,响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
本实施例中,当第一终端设备接收到上述第二控制指令后,可以生成用于确定是否与所述蓝牙设备建立第一连接的询问信息,进而可以响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
值得说明的是,上述询问信息的形式可以基于实际业务需要进行设置,如设置为弹窗形式的询问信息,本实施例对此不进行限定。
举例来说,当第一终端设备生成用于确定是否与所述蓝牙设备建立第一连接的询问信息后,若接收到用户基于所述询问信息输入的确认指令(即,用于确认重新建立第一连接的指令),则可以重新与所述蓝牙设备建立所述第一连接。如此,即可可自动恢复第一终端设备与蓝牙设备之间的第一连接,而无需用户通过手动 方式将蓝牙设备由与第二终端设备连接切换成与第一终端设备连接。
图5是根据本公开一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的第二终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图5所示,该方法包括以下步骤S501-S503:
在步骤S501中,响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
在步骤S502中,响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接;
在步骤S503中,基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
本实施例中,第二终端设备可以响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求,进而当接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息时,可以基于所述连接信息与所述蓝牙设备建立第二连接,其中,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一终端设备为与所述第二终端设备登录同一账号的设备,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;在此基础上,第二终端设备可以基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
举例来说,当第一终端设备接收到用于与蓝牙设备连接的控制指令时,可以与所述蓝牙设备建立第一连接,进而可以响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息;
在此基础上,当第二终端设备检测到自身具有待播放的第二音频数据时,可以向服务端发送蓝牙信息获取请求;
进一步地,服务端可以当判断出当前满足第一设定条件时,向所述第一终端设备发送第一控制指令,以控制所述第一终端设备断开与蓝牙设备的第一连接;
当第一终端设备检测到自身已断开所述第一连接,可以向所述服务端发送用于表示所述第一连接已断开的第一通知信息;
进而,服务端可以响应于接收到该第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备;
当第二终端设备接收到上述连接信息后,可以基于该连接信息与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
示例性地,上述蓝牙设备的连接信息可以包括该蓝牙设备的设备信息,如该蓝牙设备的设备类型、设备名称、蓝牙地址以及蓝牙信号强度中的至少一项。
在一些实施例中,上述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
在一些实施例中,第二终端设备向所述服务端发送蓝牙信息获取请求时,还可以向所述服务端发送第二终端设备的当前位置信息、当前登录账号以及当前所在局域网信息中的至少一种(如,IP地址和子网掩码等),以供服务端基于该信息以及第一终端设备的设备相关信息判断当前是否满足第一设定条件。
由上述描述可知,本实施例的方法通过响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求,并响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,进而基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放,可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图6是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的第二终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图6所示,该方法包括以下步骤S601-S605:
在步骤S601中,响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
在步骤S602中,响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接;
在步骤S603中,基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
其中,步骤S601-S603的相关解释和说明可以参见上述图5所示实施例中的步骤S501-S503,在此不进行赘述。
在步骤S604中,响应于检测到所述第二音频数据已播放完毕,断开所述第二连接;
在步骤S605中,响应于检测到已断开所述第二连接,向所述服务端发送用于表示所述第二连接已断开的第二通知信息。
举例来说,当第二终端设备基于服务端发送的所述蓝牙设备的连接信息与所述蓝牙设备建立第二连接,并基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放后,如果检测到所述第二音频数据已播放完毕,可以断开所述 第二连接,进而可以在检测到自身已断开所述第二连接时,向服务端发送用于表示所述第二连接已断开的第二通知信息。在此基础上,服务端可以当接收到该第二通知信息时,向所述第一终端设备发送第二控制指令,以控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接,即当第二终端设备断开所述第二连接时,可自动恢复第一终端设备与蓝牙设备之间的第一连接,而无需用户通过手动方式将蓝牙设备由与第二终端设备连接切换成与第一终端设备连接。
图7是根据一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的本地服务器和云服务器等服务端,该服务端可以部署在一台电子设备或多台电子设备组成的设备集群中。
如图7所示,该方法包括以下步骤S701-S702:
在步骤S701中,响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令;
在步骤S702中,响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备。
本实施例中,服务端可以响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,其中,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求。进而,服务端可以响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,其中,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
举例来说,当第一终端设备接收到用于与蓝牙设备连接的控制指令时,可以与所述蓝牙设备建立第一连接,进而可以响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息;
在此基础上,当第二终端设备检测到自身具有待播放的第二音频数据时,可以向服务端发送蓝牙信息获取请求;
进一步地,服务端可以当检测到当前满足第一设定条件时,向所述第一终端设备发送第一控制指令,以控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
当第一终端设备检测到自身已断开所述第一连接,可以向所述服务端发送用于表示所述第一连接已断开的第一通知信息;
进而,服务端可以响应于接收到该第一通知信息,将预先接收到的所述蓝牙设 备的连接信息发送至所述第二终端设备,以供第二终端设备基于该连接信息与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
示例性地,上述蓝牙设备的连接信息可以包括该蓝牙设备的设备信息,如该蓝牙设备的设备类型、设备名称、蓝牙地址以及蓝牙信号强度中的至少一项。
在一些实施例中,上述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
示例性地,当服务端接收到第二终端设备发送的蓝牙信息获取请求后,可以从该获取请求中获取第二终端设备的设备相关信息(如,第二终端设备的当前位置信息、当前登录账号以及当前所在局域网信息中的至少一种等),并检测第一终端设备的设备相关信息(如,第一终端设备的当前位置信息、当前登录账号以及当前所在局域网信息中的至少一种等),然后将第一终端设备与第二终端设备的设备相关信息进行比对,进而可以当检测到以下(1)~(3)中至少一项时,判断当前满足第一设定条件:
(1)所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值;(2)所述第一终端设备与所述第二终端设备登录同一账号;(3)所述第一终端设备与所述第二终端设备在同一局域网内。
可以理解的是,上述确定所述第二终端设备与第一终端设备之间的距离的方式,可以参见相关技术中的任意距离确定方式,如基于全球定位***GPS或者局域网获取第二终端设备与第一终端设备之间的距离,所得结果均适用于本实施例。
由上述描述可知,本实施例的方法通过响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,进而响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,以供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以实现当第二终端设备检测到具有待播放的第二音频数据时,控制第一终端设备断开与蓝牙设备的第一连接,以供所述第二终端设备与所述蓝牙设备建立第二连接并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图8是根据本公开又一示例性实施例示出的一种蓝牙设备控制方法的流程图;本实施例的方法可以应用于具有数据处理功能的本地服务器和云服务器等服务端,该服务端可以部署在一台电子设备或多台电子设备组成的设备集群中。
如图8所示,该方法包括以下步骤S801-S803:
在步骤S801中,响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令;
在步骤S802中,响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备。
其中,步骤S801-S802的相关解释和说明可以参见上述图7所示实施例中的步骤S701-S702,在此不进行赘述。
在步骤S803中,响应于接收到所述第二终端设备发送的用于表示所述第二连接已断开的第二通知信息,向所述第一终端设备发送第二控制指令。
其中,所述第二控制指令用于控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接。
举例来说,当第二终端设备基于服务端发送的所述蓝牙设备的连接信息与所述蓝牙设备建立第二连接,并基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放后,如果检测到所述第二音频数据已播放完毕,可以断开所述第二连接,以及在检测到自身已断开所述第二连接时,向服务端发送用于表示所述第二连接已断开的第二通知信息。在此基础上,服务端可以当接收到该第二通知信息时,向所述第一终端设备发送第二控制指令,以控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接,即当第二终端设备断开所述第二连接时,可自动恢复第一终端设备与蓝牙设备之间的第一连接,而无需用户通过手动方式将蓝牙设备由与第二终端设备连接切换成与第一终端设备连接。
图9是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;本实施例的装置可以应用于具有数据处理功能的第一终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图9所示,该装置包括:第一连接断开模块110和第一通知发送模块120,其中:
第一连接断开模块110,用于响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
第一通知发送模块120,用于响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
在一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与 所述第二终端设备在同一局域网内。
由上述描述可知,本实施例的装置通过响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,并响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,可以实现后续服务端基于该第一通知信息将预先接收到的所述蓝牙设备的连接信息发送至第二终端设备,进而可以实现第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图10是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;本实施例的装置可以应用于具有数据处理功能的第一终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。其中,第一连接断开模块210和第一通知发送模块220与前述图9所示实施例中的第一连接断开模块110和第一通知发送模块120的功能相同,在此不进行赘述。
如图10所示,上述装置还可以包括:
第一连接建立模块230,用于响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接;
连接信息发送模块240,用于响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。
在一些实施例中,上述装置还可以包括:
第一连接重建模块250,用于响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,所述第二控制指令包括所述服务端在第二设定条件下发送的信息,所述第二设定条件包括接收到所述第二终端设备发送的用于表示第二连接已断开的第二通知信息,所述第二连接为所述第二终端设备与所述蓝牙设备建立的连接。
在一些实施例中,第一连接重建模块250,可以包括:
询问信息生成单元251,用于响应于接收到所述服务端发送的第二控制指令,生成用于确定是否与所述蓝牙设备建立第一连接的询问信息;
第一连接重建单元252,用于响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
图11是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;本实施例的装置可以应用于具有数据处理功能的第二终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。如图11所示,该装置包括:获取请求发送模块310、第二连接建立模块320以及第二音频发送模块330,其中:
获取请求发送模块310,用于响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;
第二连接建立模块320,用于响应于接收到所述服务端基于所述获取请求返回的 蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一终端设备为与所述第二终端设备登录同一账号的设备,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;
第二音频发送模块330,用于基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
由上述描述可知,本实施例的装置通过响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求,并响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,进而基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放,可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图12是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;本实施例的装置可以应用于具有数据处理功能的第二终端设备(如,智能手机、平板电脑、智能音箱以及台式计算机等)。其中,获取请求发送模块410、第二连接建立模块420以及第二音频发送模块430与前述图11所示实施例中的获取请求发送模块310、第二连接建立模块320以及第二音频发送模块330的功能相同,在此不进行赘述。
如图12所示,上述装置还可以包括:
第二连接断开模块440,用于响应于检测到所述第二音频数据已播放完毕,断开所述第二连接;
第二通知发送模块450,用于响应于检测到已断开所述第二连接,向所述服务端发送用于表示所述第二连接已断开的第二通知信息。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图13是根据本公开一示例性实施例示出的一种蓝牙设备控制装置的框图;本实 施例的装置可以应用于具有数据处理功能的本地服务器和云服务器等服务端,该服务端可以部署在一台电子设备或多台电子设备组成的设备集群中。如图10所示,该装置包括:第一指令发送模块510以及连接信息发送模块520,其中:
第一指令发送模块510,用于响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;
连接信息发送模块520,用于响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
在一些实施例中,上述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
在另一些实施例中,所述第一设定条件还可以包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
由上述描述可知,本实施例的装置通过响应于检测到当前满足第一设定条件,向所述第一终端设备发送第一控制指令,进而响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,以供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以实现当第二终端设备检测到具有待播放的第二音频数据时,控制第一终端设备断开与蓝牙设备的第一连接,以供所述第二终端设备与所述蓝牙设备建立第二连接并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放,可以避免用户通过手动方式将蓝牙设备由与第一终端设备连接切换成与第二终端设备连接,从而提高蓝牙设备连接切换的自动化水平,节省用户的时间,进而可以提升用户的使用体验。
图14是根据本公开一示例性实施例示出的又一种蓝牙设备控制装置的框图;本实施例的装置可以应用于具有数据处理功能的本地服务器和云服务器等服务端,该服务端可以部署在一台电子设备或多台电子设备组成的设备集群中。其中,第一指令发送模块610以及连接信息发送模块620与前述图10所示实施例中的第一指令发送模块510以及连接信息发送模块520的功能相同,在此不进行赘述。
如图14所示,上述装置还可以包括:
第二指令发送模块630,用于响应于接收到所述第二终端设备发送的用于表示所述第二连接已断开的第二通知信息,向所述第一终端设备发送第二控制指令,所述第二控制指令用于控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接。
图15是根据一示例性实施例示出的一种电子设备的框图,其中电子设备可以为终端设备,或者可以为本地服务器和云服务器等服务端,该服务端可以部署在一台电子设备或多台电子设备组成的设备集群中。例如,设备900可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图15,设备900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)的接口912,传感器组件914,以及通信组件916。
处理组件902通常控制设备900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件902可以包括一个或多个处理器920来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理组件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。
存储器904被配置为存储各种类型的数据以支持在设备900的操作。这些数据的示例包括用于在设备900上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件906为设备900的各种组件提供电力。电源组件906可以包括电源管理***,一个或多个电源,及其他与为设备900生成、管理和分配电力相关联的组件。
多媒体组件908包括在所述设备900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当设备900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个 麦克风(MIC),当设备900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。
I/O接口912为处理组件902和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件914包括一个或多个传感器,用于为设备900提供各个方面的状态评估。例如,传感器组件914可以检测到设备900的打开/关闭状态,组件的相对定位,例如所述组件为设备900的显示器和小键盘,传感器组件914还可以检测设备900或设备900一个组件的位置改变,用户与设备900接触的存在或不存在,设备900方位或加速/减速和设备900的温度变化。传感器组件914还可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件916被配置为便于设备900和其他设备之间有线或无线方式的通信。设备900可以接入基于通信标准的无线网络,如WiFi,2G或3G,4G或5G或它们的组合。在一个示例性实施例中,通信组件916经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件916还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,设备900可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子组件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由设备900的处理器920执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要 求来限制。
Claims (24)
- 一种蓝牙设备控制方法,其特征在于,应用于第一终端设备,所述方法包括:响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
- 根据权利要求1所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
- 根据权利要求1所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
- 根据权利要求1所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:响应于接收到用于与蓝牙设备连接的控制指令,与所述蓝牙设备建立第一连接;响应于已建立所述第一连接,向所述服务端发送所述蓝牙设备的连接信息。
- 根据权利要求1~5任一项所述的方法,其特征在于,所述方法还包括:响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,所述第二控制指令包括所述服务端在第二设定条件下发送的信息,所述第二设定条件包括接收到所述第二终端设备发送的用于表示第二连接已断开的第二通知信息,所述第二连接为所述第二终端设备与所述蓝牙设备建立的连接。
- 根据权利要求6所述的方法,其特征在于,所述响应于接收到所述服务端发送的第二控制指令,重新与所述蓝牙设备建立所述第一连接,包括:响应于接收到所述服务端发送的第二控制指令,生成用于确定是否与所述蓝牙设备建立第一连接的询问信息;响应于基于所述询问信息接收到确认指令,重新与所述蓝牙设备建立所述第一连接。
- 一种蓝牙设备控制方法,其特征在于,应用于第二终端设备,所述方法包括:响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
- 根据权利要求8所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
- 根据权利要求8所述的方法,其特征在于,所述第一设定条件还包括检测到所 述第一终端设备与所述第二终端设备登录同一账号。
- 根据权利要求8所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
- 根据权利要求8所述的方法,其特征在于,所述方法还包括:响应于检测到所述第二音频数据已播放完毕,断开所述第二连接;响应于检测到已断开所述第二连接,向所述服务端发送用于表示所述第二连接已断开的第二通知信息。
- 一种蓝牙设备控制方法,其特征在于,应用于服务端,所述方法包括:响应于检测到当前满足第一设定条件,向第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
- 根据权利要求13所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备之间的距离小于或等于预设距离阈值。
- 根据权利要求13所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备登录同一账号。
- 根据权利要求13所述的方法,其特征在于,所述第一设定条件还包括检测到所述第一终端设备与所述第二终端设备在同一局域网内。
- 根据权利要求13所述的方法,其特征在于,所述方法还包括:响应于接收到所述第二终端设备发送的用于表示所述第二连接已断开的第二通知信息,向所述第一终端设备发送第二控制指令,所述第二控制指令用于控制所述第一终端设备重新与所述蓝牙设备建立所述第一连接。
- 一种蓝牙设备控制装置,其特征在于,应用于第一终端设备,所述装置包括:第一连接断开模块,用于响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;第一通知发送模块,用于响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
- 一种蓝牙设备控制装置,其特征在于,应用于第二终端设备,所述装置包括:获取请求发送模块,用于响应于检测到所述第二终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;第二连接建立模块,用于响应于接收到所述服务端基于所述获取请求返回的蓝牙设 备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一终端设备为与所述第二终端设备登录同一账号的设备,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;第二音频发送模块,用于基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
- 一种蓝牙设备控制装置,其特征在于,应用于服务端,所述装置包括:第一指令发送模块,用于响应于检测到当前满足第一设定条件,向第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;连接信息发送模块,用于响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
- 一种终端设备,其特征在于,所述设备包括:处理器以及用于存储计算机程序的存储器;其中,所述处理器被配置为在执行所述计算机程序时,实现:响应于接收到服务端发送的第一控制指令,断开与蓝牙设备预先建立的第一连接,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;响应于检测到已断开所述第一连接,向所述服务端发送用于表示所述第一连接已断开的第一通知信息,以便所述服务端将所述连接信息发送至所述第二终端设备。
- 一种终端设备,其特征在于,所述设备包括:处理器以及用于存储计算机程序的存储器;其中,所述处理器被配置为在执行所述计算机程序时,实现:响应于检测到当前终端设备具有待播放的第二音频数据,向服务端发送蓝牙信息获取请求;响应于接收到所述服务端基于所述获取请求返回的蓝牙设备的连接信息,基于所述连接信息与所述蓝牙设备建立第二连接,所述连接信息包括所述服务端响应于接收到第一终端设备发送的第一通知信息所发送的信息,所述第一通知信息包括所述第一终端设备响应于接收到第一控制指令并断开与所述蓝牙设备建立的第一连接向所述服务端发送的信息,所述第一控制指令包括所述服务端在第一设定条件下发送的信息,所述第一设定条件包括接收到所述蓝牙信息获取请求;基于所述第二连接,将所述第二音频数据发送至所述蓝牙设备进行播放。
- 一种服务端,其特征在于,所述服务端包括:处理器以及用于存储计算机程序的存储器;其中,所述处理器被配置为在执行所述计算机程序时,实现:响应于检测到当前满足第一设定条件,向第一终端设备发送第一控制指令,所述第一控制指令用于控制所述第一终端设备断开与蓝牙设备的第一连接,所述第一设定条件包括接收到第二终端设备在具有待播放的第二音频数据后发送的用于获取所述蓝牙设备的连接信息的蓝牙信息获取请求;响应于接收到所述第一终端设备发送的第一通知信息,将预先接收到的所述蓝牙设备的连接信息发送至所述第二终端设备,所述第一通知信息包括所述第一终端设备响应于检测到已断开所述第一连接向所述服务端发送的信息,所述连接信息包括所述第一终端设备响应于已建立所述第一连接向所述服务端发送的信息,所述连接信息用于供所述第二终端设备与所述蓝牙设备建立第二连接,并基于第二连接将所述第二音频数据发送至所述蓝牙设备进行播放。
- 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现上述权利要求1~17任一项所述的蓝牙设备控制方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/094787 WO2023225869A1 (zh) | 2022-05-24 | 2022-05-24 | 蓝牙设备控制方法、装置、设备及存储介质 |
CN202280004384.7A CN117652166A (zh) | 2022-05-24 | 2022-05-24 | 蓝牙设备控制方法、装置、设备及存储介质 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/094787 WO2023225869A1 (zh) | 2022-05-24 | 2022-05-24 | 蓝牙设备控制方法、装置、设备及存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023225869A1 true WO2023225869A1 (zh) | 2023-11-30 |
Family
ID=88918212
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/094787 WO2023225869A1 (zh) | 2022-05-24 | 2022-05-24 | 蓝牙设备控制方法、装置、设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117652166A (zh) |
WO (1) | WO2023225869A1 (zh) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040063452A1 (en) * | 2002-09-27 | 2004-04-01 | Kabushiki Kaisha Toshiba | Electronic apparatus and method of switching connection destination of the same |
CN111818503A (zh) * | 2020-09-08 | 2020-10-23 | 深圳市汇顶科技股份有限公司 | 语音通话方法、***、芯片、电子设备及存储介质 |
CN112004173A (zh) * | 2020-08-27 | 2020-11-27 | 努比亚技术有限公司 | 蓝牙耳机的切换方法、移动终端及计算机可读存储介质 |
CN113382397A (zh) * | 2019-04-18 | 2021-09-10 | 华为技术有限公司 | 一种蓝牙连接方法、设备及*** |
CN113573172A (zh) * | 2021-07-28 | 2021-10-29 | 江苏紫米电子技术有限公司 | 双设备音频播放方法、装置、电子设备及存储介质 |
CN114125803A (zh) * | 2021-11-30 | 2022-03-01 | Oppo广东移动通信有限公司 | 设备连接切换方法、装置、电子设备和计算机可读存储介质 |
CN114173321A (zh) * | 2020-09-10 | 2022-03-11 | 华为技术有限公司 | 设备通信连接建立方法及设备通信*** |
-
2022
- 2022-05-24 CN CN202280004384.7A patent/CN117652166A/zh active Pending
- 2022-05-24 WO PCT/CN2022/094787 patent/WO2023225869A1/zh active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040063452A1 (en) * | 2002-09-27 | 2004-04-01 | Kabushiki Kaisha Toshiba | Electronic apparatus and method of switching connection destination of the same |
CN113382397A (zh) * | 2019-04-18 | 2021-09-10 | 华为技术有限公司 | 一种蓝牙连接方法、设备及*** |
CN112004173A (zh) * | 2020-08-27 | 2020-11-27 | 努比亚技术有限公司 | 蓝牙耳机的切换方法、移动终端及计算机可读存储介质 |
CN111818503A (zh) * | 2020-09-08 | 2020-10-23 | 深圳市汇顶科技股份有限公司 | 语音通话方法、***、芯片、电子设备及存储介质 |
CN114173321A (zh) * | 2020-09-10 | 2022-03-11 | 华为技术有限公司 | 设备通信连接建立方法及设备通信*** |
CN113573172A (zh) * | 2021-07-28 | 2021-10-29 | 江苏紫米电子技术有限公司 | 双设备音频播放方法、装置、电子设备及存储介质 |
CN114125803A (zh) * | 2021-11-30 | 2022-03-01 | Oppo广东移动通信有限公司 | 设备连接切换方法、装置、电子设备和计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN117652166A (zh) | 2024-03-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016192323A1 (zh) | 视频通信方法及装置 | |
RU2637470C2 (ru) | Способ и устройство для обнаружения интеллектуального устройства | |
JP6251352B2 (ja) | 話中回線を処理する方法、装置、およびシステム | |
EP2985989A1 (en) | Method and device for acquiring multimedia data stream | |
WO2017016057A1 (zh) | 智能设备接入路由器的方法、装置以及*** | |
US10439660B2 (en) | Method and device for adjusting frequencies of intercom apparatuses | |
EP3462367B1 (en) | Method and apparatus for displaying application interface | |
CN105578391B (zh) | 信息处理方法、装置、***及终端设备 | |
WO2017008400A1 (zh) | 控制智能设备的方法及装置 | |
WO2022021017A1 (zh) | 能力上报方法和装置、能力确定方法和装置 | |
CN105407021A (zh) | 音量调节方法及装置 | |
CN105227426B (zh) | 一种应用界面切换方法、装置及终端设备 | |
CN106550482B (zh) | 通信连接建立方法及装置、电子设备 | |
CN107277422B (zh) | 视频通话方法、装置及*** | |
WO2022120540A1 (zh) | 连接建立方法和装置 | |
WO2023225869A1 (zh) | 蓝牙设备控制方法、装置、设备及存储介质 | |
WO2022052070A1 (zh) | 连接控制方法、连接控制装置 | |
CN107039054B (zh) | 录音方法及装置 | |
US11678391B2 (en) | Communication methods and electronic devices | |
WO2022174393A1 (zh) | 能力交互方法和装置、交互触发方法和装置 | |
CN114268691A (zh) | 通话方法、装置、终端设备及可读存储介质 | |
CN105100135A (zh) | 一种设置网络共享的方法及装置 | |
CN114615647A (zh) | 通话控制方法、装置及存储介质 | |
WO2023240631A1 (zh) | 设备控制方法、装置和存储介质 | |
WO2024020808A1 (zh) | 非激活态组播业务接收、配置指示信息发送方法和装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 202280004384.7 Country of ref document: CN |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22943075 Country of ref document: EP Kind code of ref document: A1 |