CN117652166A - Bluetooth equipment control method, device, equipment and storage medium - Google Patents

Bluetooth equipment control method, device, equipment and storage medium Download PDF

Info

Publication number
CN117652166A
CN117652166A CN202280004384.7A CN202280004384A CN117652166A CN 117652166 A CN117652166 A CN 117652166A CN 202280004384 A CN202280004384 A CN 202280004384A CN 117652166 A CN117652166 A CN 117652166A
Authority
CN
China
Prior art keywords
connection
bluetooth
terminal device
information
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202280004384.7A
Other languages
Chinese (zh)
Inventor
彭聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Publication of CN117652166A publication Critical patent/CN117652166A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/16Performing reselection for specific purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

The disclosure relates to a Bluetooth device control method, a device and a storage medium, wherein the method comprises the following steps: in response to receiving a first control instruction sent by the server, disconnecting a first connection pre-established with the Bluetooth device (S101); in response to detecting that the first connection has been disconnected, first notification information indicating that the first connection has been disconnected is transmitted to the server so that the server transmits the connection information to the second terminal device bluetooth information acquisition request (S102). According to the Bluetooth device connection switching method and device, the Bluetooth device can be prevented from being switched into the connection with the second terminal device by being connected with the first terminal device in a manual mode, so that the automation level of the Bluetooth device connection switching is improved, the time of a user is saved, and the use experience of the user can be improved.

Description

Bluetooth equipment control method, device, equipment and storage medium Technical Field
The disclosure relates to the technical field of terminals, and in particular relates to a Bluetooth device control method, a device, equipment and a storage medium.
Background
With the development of terminal technology and bluetooth technology, more and more bluetooth devices, such as bluetooth headset, are in the life of people. Bluetooth connection is established with terminal equipment such as a smart phone, and the Bluetooth equipment can play a role in audio input and output in the use process of the terminal equipment.
In the related art, a bluetooth headset can be connected to only one device at a time. Under the condition that the Bluetooth headset of the user is connected with the tablet personal computer, if the user calls the mobile phone and the user wants to answer the call by using the Bluetooth headset, the Bluetooth headset is disconnected from the tablet personal computer in a manual mode, then the connection is established with the mobile phone, the operation process is complicated, more time of the user can be consumed, and the use experience of the user is further affected.
Disclosure of Invention
To overcome the problems in the related art, embodiments of the present disclosure provide a method, an apparatus, a device, and a storage medium for controlling a bluetooth device, which are used to solve the drawbacks in the related art.
According to a first aspect of an embodiment of the present disclosure, there is provided a bluetooth device control method, applied to a first terminal device, the method including:
in response to receiving a first control instruction sent by a server, disconnecting a first connection pre-established with a Bluetooth device, wherein the first control instruction comprises information sent by the server under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request for acquiring connection information of the Bluetooth device, which is sent by a second terminal device after receiving second audio data to be played;
And in response to detecting that the first connection is disconnected, sending first notification information for indicating that the first connection is disconnected to the server side, so that the server side sends the connection information to the second terminal device.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the method further comprises:
in response to receiving a control instruction for connecting with a Bluetooth device, establishing a first connection with the Bluetooth device;
and transmitting connection information of the Bluetooth equipment to the server in response to the established first connection.
In some embodiments, the method further comprises:
and in response to receiving a second control instruction sent by the server, re-establishing the first connection with the Bluetooth device, wherein the second control instruction comprises information sent by the server under a second setting condition, the second setting condition comprises receiving second notification information sent by the second terminal device and used for indicating that the second connection is disconnected, and the second connection is established between the second terminal device and the Bluetooth device.
In some embodiments, the responding to the second control instruction sent by the server side to reestablish the first connection with the bluetooth device includes:
generating inquiry information for determining whether to establish a first connection with the Bluetooth equipment or not in response to receiving a second control instruction sent by the server;
and re-establishing the first connection with the Bluetooth device in response to receiving a confirmation instruction based on the inquiry information.
According to a second aspect of the embodiments of the present disclosure, there is provided a bluetooth device control method applied to a second terminal device, the method including:
in response to detecting that the second terminal equipment has second audio data to be played, sending a Bluetooth information acquisition request to a server;
in response to receiving connection information of Bluetooth equipment returned by the server based on the acquisition request, establishing second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the server in response to receiving first notification information sent by first terminal equipment, the first terminal equipment is equipment logging in the same account as the second terminal equipment, the first notification information comprises information sent by the first terminal equipment to the server in response to receiving a first control instruction and disconnecting a first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the server under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
And based on the second connection, sending the second audio data to the Bluetooth device for playing.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the method further comprises:
in response to detecting that the second audio data has been played, disconnecting the second connection;
and in response to detecting that the second connection is disconnected, sending second notification information for indicating that the second connection is disconnected to the service end.
According to a third aspect of the embodiments of the present disclosure, there is provided a bluetooth device control method, applied to a server, the method including:
in response to detecting that a first setting condition is currently met, a first control instruction is sent to the first terminal device, wherein the first control instruction is used for controlling the first terminal device to disconnect a first connection with Bluetooth equipment, and the first setting condition comprises a Bluetooth information acquisition request which is sent by the second terminal device after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
And transmitting the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving first notification information transmitted by the first terminal device, wherein the first notification information comprises information transmitted by the first terminal device to the server in response to detecting that the first connection is disconnected, the connection information comprises information transmitted by the first terminal device to the server in response to establishing the first connection, and the connection information is used for enabling the second terminal device to establish a second connection with the Bluetooth device and transmitting the second audio data to the Bluetooth device for playing based on the second connection.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the method further comprises:
and responding to receiving second notification information which is sent by the second terminal equipment and used for indicating that the second connection is disconnected, sending a second control instruction to the first terminal equipment, wherein the second control instruction is used for controlling the first terminal equipment to reestablish the first connection with the Bluetooth equipment.
According to a fourth aspect of embodiments of the present disclosure, there is provided a bluetooth device control apparatus applied to a first terminal device, the apparatus including:
the first connection disconnection module is used for responding to a first control instruction sent by the server side, disconnecting a first connection pre-established with the Bluetooth equipment, wherein the first control instruction comprises information sent by the server side under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request which is sent by the second terminal equipment after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
and the first notification sending module is used for sending first notification information for indicating that the first connection is disconnected to the server side in response to the detection that the first connection is disconnected, so that the server side sends the connection information to the second terminal equipment.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the apparatus further comprises:
the first connection establishment module is used for establishing a first connection with the Bluetooth equipment in response to receiving a control instruction for connecting with the Bluetooth equipment;
and the connection information sending module is used for responding to the established first connection and sending the connection information of the Bluetooth equipment to the server.
In some embodiments, the apparatus further comprises:
the first connection reestablishing module is configured to reestablish 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 information sent by the server under a second setting condition, and the second setting condition includes receiving second notification information sent by the second terminal device and used to indicate that the second connection is disconnected, and the second connection is a connection established between the second terminal device and the bluetooth device.
In some embodiments, the first connection reconstruction module includes:
the inquiry information generating unit is used for responding to the second control instruction sent by the server side and generating inquiry information for determining whether to establish a first connection with the Bluetooth equipment;
and the first connection reestablishing unit is used for reestablishing the first connection with the Bluetooth equipment in response to receiving a confirmation instruction based on the inquiry information.
According to a fifth aspect of embodiments of the present disclosure, there is provided a bluetooth device control apparatus applied to a second terminal device, the apparatus including:
the acquisition request sending module is used for sending a Bluetooth information acquisition request to a server in response to the detection that the second terminal equipment has second audio data to be played;
the second connection establishing module is used for responding to receiving connection information of the Bluetooth equipment returned by the service end based on the acquisition request, establishing second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the service end in response to receiving first notification information sent by first terminal equipment, the first terminal equipment is equipment logging in the same account with the second terminal equipment, the first notification information comprises information sent by the first terminal equipment to the service end in response to receiving a first control instruction and disconnecting a first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the service end under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
And the second audio sending module is used for sending the second audio data to the Bluetooth equipment for playing based on the second connection.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the apparatus further comprises:
the second connection disconnection module is used for responding to the fact that the second audio data are completely played, and disconnecting the second connection;
and the second notification sending module is used for sending second notification information used for indicating that the second connection is disconnected to the service end in response to the fact that the second connection is disconnected.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a bluetooth device control apparatus, applied to a server, the apparatus including:
A first instruction sending module, configured to send a first control instruction to the first terminal device in response to detecting that a first setting condition is currently met, where the first control instruction is used to control the first terminal device to disconnect a first connection with a bluetooth device, and the first setting condition includes a bluetooth information obtaining request sent by a second terminal device after receiving second audio data to be played and used to obtain connection information of the bluetooth device;
the connection information sending module is used for responding to the first notification information sent by the first terminal equipment, sending the pre-received connection information of the Bluetooth equipment to the second terminal equipment, wherein the first notification information comprises information sent by the first terminal equipment to the server in response to the fact that the first connection is disconnected, the connection information comprises information sent by the first terminal equipment to the server in response to the fact that the first connection is established, and the connection information is used for enabling the second terminal equipment to establish a second connection with the Bluetooth equipment and sending the second audio data to the Bluetooth equipment for playing based on the second connection.
In some embodiments, the first setting condition further includes detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In some embodiments, the first setting condition further includes detecting that the first terminal device is logged in to the same account as the second terminal device.
In some embodiments, the first setting condition further includes detecting that the first terminal device and the second terminal device are within the same local area network.
In some embodiments, the apparatus further comprises:
and the second instruction sending module is used for responding to the received second notification information which is sent by the second terminal equipment and used for indicating that the second connection is disconnected, sending a second control instruction to the first terminal equipment, wherein the second control instruction is used for controlling the first terminal equipment to reestablish the first connection with the Bluetooth equipment.
According to a seventh aspect of embodiments of the present disclosure, there is provided a terminal device, the device comprising:
a processor and a memory for storing a computer program;
wherein the processor is configured to implement, when executing the computer program:
In response to receiving a first control instruction sent by a server, disconnecting a first connection pre-established with a Bluetooth device, wherein the first control instruction comprises information sent by the server under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request for acquiring connection information of the Bluetooth device, which is sent by a second terminal device after receiving second audio data to be played;
and in response to detecting that the first connection is disconnected, sending first notification information for indicating that the first connection is disconnected to the server side, so that the server side sends the connection information to the second terminal device.
According to an eighth aspect of embodiments of the present disclosure, there is provided a terminal device, the device comprising:
a processor and a memory for storing a computer program;
wherein the processor is configured to implement, when executing the computer program:
in response to detecting that the current terminal equipment has second audio data to be played, sending a Bluetooth information acquisition request to a server;
in response to receiving connection information of Bluetooth equipment returned by the server based on the acquisition request, establishing a second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the server in response to receiving first notification information sent by first terminal equipment, the first notification information comprises information sent by the first terminal equipment to the server in response to receiving a first control instruction and disconnecting the first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the server under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
And based on the second connection, sending the second audio data to the Bluetooth device for playing.
According to a ninth aspect of the embodiments of the present disclosure, there is provided a server, including:
a processor and a memory for storing a computer program;
wherein the processor is configured to implement, when executing the computer program:
in response to detecting that a first setting condition is currently met, a first control instruction is sent to the first terminal device, wherein the first control instruction is used for controlling the first terminal device to disconnect a first connection with Bluetooth equipment, and the first setting condition comprises a Bluetooth information acquisition request which is sent by the second terminal device after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
and transmitting the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving first notification information transmitted by the first terminal device, wherein the first notification information comprises information transmitted by the first terminal device to the server in response to detecting that the first connection is disconnected, the connection information comprises information transmitted by the first terminal device to the server in response to establishing the first connection, and the connection information is used for enabling the second terminal device to establish a second connection with the Bluetooth device and transmitting the second audio data to the Bluetooth device for playing based on the second connection.
According to a tenth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the bluetooth device control method of any one of the above.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the Bluetooth device connection switching method and device, the Bluetooth device can be prevented from being switched into the connection with the second terminal device by being connected with the first terminal device in a manual mode, so that the automation level of the Bluetooth device connection switching is improved, the time of a user is saved, and the use experience of the user can be improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment of the present disclosure;
fig. 2 is a flowchart showing how to transmit connection information of the bluetooth device to the server according to an exemplary embodiment of the present disclosure;
Fig. 3 is a flowchart illustrating a bluetooth device control method according to yet another exemplary embodiment of the present disclosure;
fig. 4 is a flow chart illustrating how to reestablish the first connection with the bluetooth device according to an exemplary embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment of the present disclosure;
fig. 6 is a flowchart illustrating a bluetooth device control method according to yet another exemplary embodiment of the present disclosure;
fig. 7 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment of the present disclosure;
fig. 8 is a flowchart illustrating 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 apparatus according to an exemplary embodiment of the present disclosure;
fig. 10 is a block diagram of yet another bluetooth device control apparatus according to an exemplary embodiment of the present disclosure;
fig. 11 is a block diagram of a bluetooth device control apparatus according to an exemplary embodiment of the present disclosure;
fig. 12 is a block diagram of yet another bluetooth device control apparatus according to an exemplary embodiment of the present disclosure;
fig. 13 is a block diagram of a bluetooth device control apparatus according to an exemplary embodiment of the present disclosure;
Fig. 14 is a block diagram of yet another bluetooth device control apparatus 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.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Fig. 1 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment of the present disclosure; the method of the embodiment can be applied to a first terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 1, the method includes the following steps S101-S102:
in step S101, in response to receiving a first control instruction sent by the server, disconnecting a first connection pre-established with the bluetooth device;
In 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 side, so that the server side sends the connection information to the second terminal device.
In this embodiment, the first terminal device may disconnect a first connection pre-established with the bluetooth device in response to receiving a first control instruction sent by the server, where the first control instruction includes information sent by the server under a first setting condition, and the first setting condition includes a bluetooth information acquisition request sent by the second terminal device after receiving second audio data to be played to acquire connection information of the bluetooth device; further, the first terminal device may send, in response to detecting that the first connection has been disconnected, first notification information indicating that the first connection has been disconnected to the server side, so that the server side sends the connection information to the second terminal device.
For example, when the second terminal device detects that the second terminal device itself has second audio data to be played, a bluetooth information obtaining request may be sent to the server;
Further, the server may send a first control instruction to the first terminal device when detecting that a first setting condition is currently met, so as to control the first terminal device to disconnect a first connection with a bluetooth device, where the first setting condition includes a bluetooth information obtaining request sent by a second terminal device after receiving second audio data to be played, where the bluetooth information obtaining request is used to obtain connection information of the bluetooth device;
when the first terminal equipment detects that the first connection is disconnected, first notification information for indicating that the first connection is disconnected can be sent to the server;
furthermore, the server may send, in response to receiving the first notification information, the previously received connection information of the bluetooth device to the second terminal device, so that the second terminal device establishes a second connection with the bluetooth device based on the connection information, and sends, based on the second connection, the second audio data to the bluetooth device for playing.
For example, the connection information of the bluetooth device may include device information of the bluetooth device, such as at least one of a device type, a device name, a bluetooth address, and bluetooth signal strength of the bluetooth device.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
As can be seen from the foregoing description, in the method of this embodiment, in response to receiving the first control instruction sent by the server, the first connection pre-established with the bluetooth device is disconnected, and in response to detecting that the first connection has been disconnected, first notification information for indicating that the first connection has been disconnected is sent to the server, so that the subsequent server can send, based on the first notification information, the pre-received connection information of the bluetooth device to the second terminal device, and further, the second terminal device and the bluetooth device can be implemented to establish a second connection, and based on the second connection, the second audio data is sent to the bluetooth device to play, so that an automation level of connection switching of the bluetooth device can be improved, a user time can be saved, and further, a user experience can be improved.
Fig. 2 is a flowchart showing how to transmit connection information of the bluetooth device to the server according to an exemplary embodiment of the present disclosure; the embodiment further includes, based on the embodiment shown in fig. 1, sending connection information of the bluetooth device to the server based on the following steps S201 to S202:
in step S201, in response to receiving a control instruction for connection with a bluetooth device, establishing a first connection with the bluetooth device;
in step S202, in response to the first connection being established, connection information of the bluetooth device is sent to the server.
In this embodiment, the first terminal device may establish a first connection with the bluetooth device in response to receiving a control instruction for connecting with the bluetooth device, and may further send connection information of the bluetooth device to the server in response to having established the first connection. For example, the connection information of the bluetooth device may include device information of the bluetooth device, such as at least one of a device type, a device name, a bluetooth address, and a bluetooth signal strength of the bluetooth device. It can be understood that, after the first connection is established, the first terminal device may send, based on the first connection, the first audio data to be played currently by itself to the bluetooth device for playing.
As can be seen from the foregoing description, in the method of this embodiment, by establishing a first connection with a bluetooth device in response to receiving a control instruction for connecting with the bluetooth device, and transmitting connection information of the bluetooth device to the server in response to having established the first connection, it is possible to implement that, when the server receives first notification information transmitted by the first terminal device, the connection information of the bluetooth device is transmitted to the second terminal device, so that the second terminal device establishes a second connection with the bluetooth device, and the second audio data is transmitted to the bluetooth device for playing based on the second connection, so that a user can be prevented from switching the connection of the bluetooth device with the first terminal device to the connection with the second terminal device in a manual manner, thereby improving the automation level of connection switching of the bluetooth device, saving the time of the user, and improving the use experience of the user.
Fig. 3 is a flowchart illustrating a bluetooth device control method according to yet another exemplary embodiment of the present disclosure; the method of the embodiment can be applied to a first terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 3, the method includes the following steps S301 to S303:
In step S301, in response to receiving a first control instruction sent by the server, disconnecting a first connection pre-established with the bluetooth device;
in 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 side, so that the server side sends the connection information to the second terminal device;
the explanation and explanation of the steps S301 to S302 may be referred to the steps S101 to S102 in the embodiment shown in fig. 1, which are not described herein.
In step S303, in response to receiving the second control instruction sent by the server, the first connection is reestablished with the bluetooth device.
The second control instruction comprises information sent by the server under a second setting condition, the second setting condition comprises receiving second notification information sent by the second terminal equipment and used for indicating that second connection is disconnected, and the second connection is established between the second terminal equipment and the Bluetooth equipment.
For example, when it is determined that the first setting condition is currently met, the server may send a first control instruction to the first terminal device to control the first terminal device to disconnect from the first connection with the bluetooth device;
When the first terminal equipment detects that the first connection is disconnected, first notification information for indicating that the first connection is disconnected can be sent to the server;
further, the server may send, in response to receiving the first notification information, the previously received connection information of the bluetooth device to the second terminal device, so that the second terminal device establishes a second connection with the bluetooth device based on the connection information, and sends, based on the second connection, the second audio data to the bluetooth device for playing;
further, when the second terminal device detects that the second audio data is played, the second connection can be disconnected, and when the second terminal device detects that the second connection is disconnected, second notification information for indicating that the second connection is disconnected is sent to the server.
On the basis, the server side can send a second control instruction to the first terminal equipment when receiving the second notification information;
when the first terminal device receives the second control instruction, the first connection with the Bluetooth device can be established again, namely, when the second terminal device is disconnected from the second connection, the first connection between the first terminal device and the Bluetooth device can be automatically restored, and the Bluetooth device is not required to be manually switched from being connected with the second terminal device to being connected with the first terminal device by a user.
Fig. 4 is a flow chart illustrating how to reestablish the first connection with the bluetooth device according to an exemplary embodiment of the present disclosure; the present embodiment will be exemplarily described on the basis of the above embodiments taking as an example how to reestablish the first connection with the bluetooth device. As shown in fig. 4, in response to receiving the second control instruction sent by the server in step S303, the method of reestablishing the first connection with the bluetooth device may include the following steps S401 to S402:
in step S401, in response to receiving the second control instruction sent by the server, query information for determining whether to establish a first connection with the bluetooth device is generated;
in step S402, the first connection is re-established with the bluetooth device in response to receiving a confirmation instruction based on the inquiry information.
In this embodiment, after the first terminal device receives the second control instruction, query information for determining whether to establish a first connection with the bluetooth device may be generated, and further, the first connection may be established with the bluetooth device again in response to receiving a confirmation instruction based on the query information.
It should be noted that, the form of the query information may be set based on actual service needs, for example, the query information is set in a popup form, which is not limited in this embodiment.
For example, after the first terminal device generates the inquiry information for determining whether to establish the first connection with the bluetooth device, if a confirmation instruction (i.e., an instruction for confirming to reestablish the first connection) input by the user based on the inquiry information is received, the first connection may be reestablished 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 need for the user to manually switch the bluetooth device from being connected with the second terminal device to being connected with the first terminal device.
Fig. 5 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment of the present disclosure; the method of the embodiment can be applied to a second terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 5, the method includes the following steps S501 to S503:
in 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 a server;
In step S502, in response to receiving connection information of the bluetooth device returned by the server based on the acquisition request, a second connection is established with the bluetooth device based on the connection information;
in step S503, the second audio data is sent to the bluetooth device for playing based on the second connection.
In this embodiment, 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 further may establish a second connection with the bluetooth device based on the connection information when receiving the connection information of the bluetooth device returned by the server based on the acquisition request, where the connection information includes information sent by the server in response to receiving first notification information sent by a first terminal device, the first terminal device is a device logged in to the same account with the second terminal device, the first notification information includes information sent by the first terminal device to the server in response to receiving a first control instruction and disconnecting a first connection established with the bluetooth device, and the first control instruction includes information sent by the server under a first setting condition, where the first setting condition includes receiving the bluetooth information acquisition request; on the basis, the second terminal device can send the second audio data to the Bluetooth device for playing based on the second connection.
For example, when a first terminal device receives a control instruction for connecting with a bluetooth device, a first connection may be established with the bluetooth device, and then connection information of the bluetooth device may be sent to the server in response to the first connection being established;
on the basis, when the second terminal equipment detects that the second terminal equipment has second audio data to be played, a Bluetooth information acquisition request can be sent to the server;
further, when judging that the first setting condition is met currently, the server side can send a first control instruction to the first terminal equipment so as to control the first terminal equipment to disconnect the first connection with the Bluetooth equipment;
when the first terminal equipment detects that the first connection is disconnected, first notification information for indicating that the first connection is disconnected can be sent to the server;
further, the server may send, in response to receiving the first notification information, connection information of the bluetooth device received in advance to the second terminal device;
when the second terminal device receives the connection information, a second connection can be established with the Bluetooth device based on the connection information, and the second audio data is sent to the Bluetooth device for playing based on the second connection.
For example, the connection information of the bluetooth device may include device information of the bluetooth device, such as at least one of a device type, a device name, a bluetooth address, and bluetooth signal strength of the bluetooth device.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
In some embodiments, when the second terminal device sends the bluetooth information obtaining request to the server, at least one of current location information, a current login account number, and information of a local area network where the second terminal device is currently located (e.g., an IP address, a subnet mask, etc.) may also be sent to the server, so that the server may determine whether the first setting condition is currently met based on the information and the device related information of the first terminal device.
As can be seen from the foregoing description, in the method of this embodiment, by responding to detecting that the second terminal device has second audio data to be played, sending a bluetooth information acquisition request to a server, and responding to receiving connection information of a bluetooth device returned by the server based on the acquisition request, establishing a second connection with the bluetooth device based on the connection information, and further sending the second audio data to the bluetooth device for playing based on the second connection, it is possible to avoid a user switching the connection of the bluetooth device with the first terminal device to the connection of the second terminal device in a manual manner, thereby improving the automation level of connection switching of the bluetooth device, saving the time of the user, and further improving the use experience of the user.
Fig. 6 is a flowchart illustrating a bluetooth device control method according to yet another exemplary embodiment of the present disclosure; the method of the embodiment can be applied to a second terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 6, the method includes the following steps S601 to S605:
in step S601, a bluetooth information acquisition request is sent to a server in response to detecting that the second terminal device has second audio data to be played;
In step S602, in response to receiving connection information of the bluetooth device returned by the server based on the acquisition request, a second connection is established with the bluetooth device based on the connection information;
in step S603, the second audio data is sent to the bluetooth device for playing based on the second connection.
The explanation and explanation of the steps S601-S603 may refer to the steps S501-S503 in the embodiment shown in fig. 5, which are not described herein.
In step S604, in response to detecting that the second audio data has been played, disconnecting the second connection;
in 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.
For example, when a second terminal device establishes a second connection with the bluetooth device based on connection information of the bluetooth device sent by a server, and sends the second audio data to the bluetooth device for playing based on the second connection, if it is detected that the second audio data is played completely, the second connection may be disconnected, and further when it is detected that the second connection has been disconnected, second notification information for indicating that the second connection has been disconnected may be sent to the server. On the basis, when the second notification information is received, the server side can send a second control instruction to the first terminal equipment so as to control the first terminal equipment to establish the first connection with the Bluetooth equipment again, namely, when the second terminal equipment is disconnected from the second connection, the first connection between the first terminal equipment and the Bluetooth equipment can be automatically restored, and the Bluetooth equipment is not required to be manually switched from being connected with the second terminal equipment to being connected with the first terminal equipment by a user.
Fig. 7 is a flowchart illustrating a bluetooth device control method according to an exemplary embodiment; the method of the embodiment can be applied to a local server, a cloud server and other service ends with a data processing function, and the service ends can be deployed in an electronic device or a device cluster formed by a plurality of electronic devices.
As shown in fig. 7, the method includes the following steps S701 to S702:
in step S701, in response to detecting that a first setting condition is currently satisfied, a first control instruction is sent to the first terminal device;
in step S702, in response to receiving the first notification information sent by the first terminal device, connection information of the bluetooth device received in advance is sent to the second terminal device.
In this embodiment, the server may send a first control instruction to the first terminal device in response to detecting that a first setting condition is currently met, where the first control instruction is used to control the first terminal device to disconnect a first connection with a bluetooth device, and the first setting condition includes a bluetooth information obtaining request sent by a second terminal device after receiving second audio data to be played and used to obtain connection information of the bluetooth device. Further, the server may send, in response to receiving first notification information sent by the first terminal device, connection information of the bluetooth device received in advance to the second terminal device, where the first notification information includes information sent by the first terminal device to the server in response to detecting that the first connection has been disconnected, the connection information includes information sent by the first terminal device to the server in response to establishing the first connection, and 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 for playing based on the second connection.
For example, when a first terminal device receives a control instruction for connecting with a bluetooth device, a first connection may be established with the bluetooth device, and then connection information of the bluetooth device may be sent to the server in response to the first connection being established;
on the basis, when the second terminal equipment detects that the second terminal equipment has second audio data to be played, a Bluetooth information acquisition request can be sent to the server;
further, when the server side detects that a first setting condition is currently met, a first control instruction is sent to the first terminal device to control the first terminal device to disconnect a first connection with a bluetooth device, wherein the first setting condition includes a bluetooth information acquisition request sent by a second terminal device after receiving second audio data to be played and used for acquiring connection information of the bluetooth device;
when the first terminal equipment detects that the first connection is disconnected, first notification information for indicating that the first connection is disconnected can be sent to the server;
furthermore, the server may send, in response to receiving the first notification information, the previously received connection information of the bluetooth device to the second terminal device, so that the second terminal device establishes a second connection with the bluetooth device based on the connection information, and sends, based on the second connection, the second audio data to the bluetooth device for playing.
For example, the connection information of the bluetooth device may include device information of the bluetooth device, such as at least one of a device type, a device name, a bluetooth address, and bluetooth signal strength of the bluetooth device.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
For example, after receiving a bluetooth information acquisition request sent by a second terminal device, the server may acquire device related information of the second terminal device (for example, at least one of current location information, a current login account number, and current local area network information of the second terminal device) from the acquisition request, detect device related information of the first terminal device (for example, at least one of current location information, a current login account number, and current local area network information of the first terminal device), and then compare the device related information of the first terminal device with the device related information of the second terminal device, and further, when at least one of the following (1) - (3) is detected, determine that the first setting condition is currently satisfied:
(1) The distance between the first terminal device and the second terminal device is smaller than or equal to a preset distance threshold value; (2) The first terminal device and the second terminal device log in the same account; (3) The first terminal device and the second terminal device are in the same local area network.
It will be appreciated that the above-mentioned manner of determining the distance between the second terminal device and the first terminal device may be referred to any distance determination manner in the related art, for example, the distance between the second terminal device and the first terminal device is obtained based on the global positioning system GPS or the local area network, and the obtained results are applicable to the present embodiment.
As can be seen from the foregoing description, in the method of this embodiment, in response to detecting that the first setting condition is currently met, a first control instruction is sent to the first terminal device, and further, in response to receiving first notification information sent by the first terminal device, connection information of the bluetooth device that is received in advance is sent to the second terminal device, so that the second terminal device establishes a second connection with the bluetooth device, and sends the second audio data to the bluetooth device for playing based on the second connection, so that when the second terminal device detects that the second terminal device has the second audio data to be played, the first terminal device is controlled to disconnect the first connection with the bluetooth device, so that the second terminal device establishes the second connection with the bluetooth device, and sends the second audio data to the bluetooth device for playing based on the second connection, so that a user can be prevented from manually switching the bluetooth device from being connected with the first terminal device to be connected with the second terminal device, thereby improving an automation level of connection switching of the bluetooth device, saving time of the bluetooth device, and further improving user experience.
Fig. 8 is a flowchart illustrating a bluetooth device control method according to yet another exemplary embodiment of the present disclosure; the method of the embodiment can be applied to a local server, a cloud server and other service ends with a data processing function, and the service ends can be deployed in an electronic device or a device cluster formed by a plurality of electronic devices.
As shown in fig. 8, the method includes the following steps S801 to S803:
in step S801, in response to detecting that a first setting condition is currently satisfied, a first control instruction is sent to the first terminal device;
in step S802, in response to receiving the first notification information sent by the first terminal device, the connection information of the bluetooth device received in advance is sent to the second terminal device.
The explanation and explanation of steps S801 to S802 may refer to steps S701 to S702 in the embodiment shown in fig. 7, which are not described herein.
In step S803, a second control instruction is sent to the first terminal device in response to receiving second notification information sent by the second terminal device to indicate that the second connection has been disconnected.
The second control instruction is used for controlling the first terminal equipment to establish the first connection with the Bluetooth equipment again.
For example, when a second terminal device establishes a second connection with the bluetooth device based on connection information of the bluetooth device sent by a server, and sends the second audio data to the bluetooth device for playing based on the second connection, if it is detected that the second audio data is played completely, the second connection may be disconnected, and when it is detected that the second connection has been disconnected, second notification information indicating that the second connection has been disconnected is sent to the server. On the basis, when the second notification information is received, the server side can send a second control instruction to the first terminal equipment so as to control the first terminal equipment to establish the first connection with the Bluetooth equipment again, namely, when the second terminal equipment is disconnected from the second connection, the first connection between the first terminal equipment and the Bluetooth equipment can be automatically restored, and the Bluetooth equipment is not required to be manually switched from being connected with the second terminal equipment to being connected with the first terminal equipment by a user.
Fig. 9 is a block diagram of a bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a first terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 9, the apparatus includes: a first connection disconnection module 110 and a first notification transmission module 120, wherein:
A first connection disconnection module 110, configured to disconnect a first connection pre-established with a bluetooth device in response to receiving a first control instruction sent by a server, where the first control instruction includes information sent by the server under a first setting condition, and the first setting condition includes a bluetooth information acquisition request sent by a second terminal device after receiving second audio data to be played, where the bluetooth information acquisition request is used to acquire connection information of the bluetooth device;
and the first notification sending module 120 is configured to send, in response to detecting that the first connection has been disconnected, first notification information indicating that the first connection has been disconnected to the server, so that the server sends the connection information to the second terminal device.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
As can be seen from the foregoing description, in the apparatus of this embodiment, by responding to the first control instruction sent by the server, disconnecting the first connection pre-established with the bluetooth device, and sending, to the server, first notification information for indicating that the first connection has been disconnected in response to detecting that the first connection has been disconnected, it is possible to implement that the subsequent server sends, based on the first notification information, the pre-received connection information of the bluetooth device to the second terminal device, thereby implementing that the second terminal device establishes the second connection with the bluetooth device, and sends, based on the second connection, the second audio data to the bluetooth device for playing, so as to improve the automation level of connection switching of the bluetooth device, save the time of the user, and further improve the use experience of the user.
Fig. 10 is a block diagram of yet another bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a first terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. The first disconnection module 210 and the first notification transmission module 220 have the same functions as the first disconnection module 110 and the first notification transmission module 120 in the embodiment shown in fig. 9, and are not described herein.
As shown in fig. 10, the apparatus may further include:
a first connection establishment module 230, configured to establish a first connection with a bluetooth device in response to receiving a control instruction for connecting with the bluetooth device;
and the connection information sending module 240 is configured to send connection information of the bluetooth device to the server in response to the first connection being established.
In some embodiments, the apparatus may further include:
the first connection reestablishing module 250 is configured to reestablish 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 information sent by the server under a second set condition, and the second set condition includes receiving second notification information sent by the second terminal device and used to indicate that the second connection is broken, and the second connection is a connection established between the second terminal device and the bluetooth device.
In some embodiments, the first connection reconstruction module 250 may include:
an inquiry information generating unit 251, configured to generate, in response to receiving a second control instruction sent by the server, inquiry information for determining whether to establish a first connection with the bluetooth device;
A first connection reestablishing unit 252, configured to reestablish the first connection with the bluetooth device in response to receiving a confirmation instruction based on the inquiry information.
Fig. 11 is a block diagram of a bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a second terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. As shown in fig. 11, the apparatus includes: an acquisition request sending module 310, a second connection establishment module 320, and a second audio sending module 330, wherein:
an acquisition request sending module 310, configured to send a bluetooth information acquisition request to a server in response to detecting that the second terminal device has second audio data to be played;
a second connection establishing module 320, configured to, in response to receiving connection information of a bluetooth device returned by the server based on the acquisition request, establish a second connection with the bluetooth device based on the connection information, where the connection information includes information sent by the server in response to receiving first notification information sent by a first terminal device, where the first terminal device is a device that logs in the same account as the second terminal device, the first notification information includes information sent by the first terminal device to the server in response to receiving a first control instruction and disconnecting a first connection established with the bluetooth device, and the first control instruction includes information sent by the server under a first set condition, where the first set condition includes receiving the bluetooth information acquisition request;
And a second audio sending module 330, configured to send the second audio data to the bluetooth device for playing based on the second connection.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
As can be seen from the foregoing description, the apparatus in this embodiment sends a bluetooth information acquisition request to a server in response to detecting that the second terminal device has second audio data to be played, and establishes a second connection with the bluetooth device based on the connection information in response to receiving connection information of the bluetooth device returned by the server based on the acquisition request, and further sends the second audio data to the bluetooth device to play based on the second connection, so that a user can be avoided from manually switching the connection of the bluetooth device with the first terminal device to the connection of the bluetooth device with the second terminal device, thereby improving the automation level of connection switching of the bluetooth device, saving the time of the user, and further improving the use experience of the user.
Fig. 12 is a block diagram of yet another bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a second terminal device (such as a smart phone, a tablet computer, a smart speaker, a desktop computer and the like) with a data processing function. The functions of the acquisition request sending module 410, the second connection establishing module 420, and the second audio sending module 430 are the same as those of the acquisition request sending module 310, the second connection establishing module 320, and the second audio sending module 330 in the embodiment shown in fig. 11, and are not described herein.
As shown in fig. 12, the apparatus may further include:
a second connection disconnection module 440, configured to disconnect the second connection in response to detecting that the second audio data has been played;
and the second notification sending module 450 is configured to send, to the server, second notification information indicating that the second connection has been disconnected, in response to detecting that the second connection has been disconnected.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 13 is a block diagram of a bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a local server, a cloud server and other service ends with a data processing function, and the service ends can be deployed in an electronic device or a device cluster formed by a plurality of electronic devices. As shown in fig. 10, the apparatus includes: a first instruction sending module 510 and a connection information sending module 520, wherein:
a first instruction sending module 510, configured to send, in response to detecting that a first setting condition is currently met, a first control instruction to the first terminal device, where the first control instruction is configured to control the first terminal device to disconnect a first connection with a bluetooth device, and the first setting condition includes a bluetooth information obtaining request sent by a second terminal device after receiving second audio data to be played, where the bluetooth information obtaining request is used to obtain connection information of the bluetooth device;
the connection information sending module 520 is configured to send, in response to receiving first notification information sent by the first terminal device, pre-received connection information of the bluetooth device to the second terminal device, where the first notification information includes information sent by the first terminal device to the server in response to detecting that the first connection has been disconnected, the connection information includes information sent by the first terminal device to the server in response to establishing the first connection, and the connection information is used for establishing a second connection between the second terminal device and the bluetooth device, and sending the second audio data to the bluetooth device for playing based on the second connection.
In some embodiments, the first setting condition may further include detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
In other embodiments, the first setting condition may further include detecting that the first terminal device is logged in to the same account as the second terminal device.
In other embodiments, 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.
As can be seen from the foregoing description, the apparatus of this embodiment, in response to detecting that the first setting condition is currently met, sends the first control instruction to the first terminal device, and further, in response to receiving the first notification information sent by the first terminal device, sends the connection information of the bluetooth device, which is received in advance, to the second terminal device, so as to establish the second connection with the bluetooth device, and sends the second audio data to the bluetooth device for playing based on the second connection, so that when the second terminal device detects that the second audio data has the second audio data to be played, it can be realized that the first terminal device is controlled to disconnect the first connection with the bluetooth device, so that the second terminal device establishes the second connection with the bluetooth device, and sends the second audio data to the bluetooth device for playing based on the second connection, so that it can be avoided that the user switches the bluetooth device from being connected with the first terminal device to being connected with the second terminal device by a manual manner, thereby improving the automation level of the connection switching of the bluetooth device, saving the time of the bluetooth device, and further improving the user experience.
Fig. 14 is a block diagram of yet another bluetooth device control apparatus according to an exemplary embodiment of the present disclosure; the device of the embodiment can be applied to a local server, a cloud server and other service ends with a data processing function, and the service ends can be deployed in an electronic device or a device cluster formed by a plurality of electronic devices. The functions of the first instruction sending module 610 and the connection information sending module 620 are the same as those of the first instruction sending module 510 and the connection information sending module 520 in the embodiment shown in fig. 10, and are not described herein.
As shown in fig. 14, the apparatus may further include:
and a second instruction sending module 630, configured to send, in response to receiving second notification information sent by the second terminal device and used to indicate that the second connection has been disconnected, a second control instruction to the first terminal device, where the second control instruction is used to control the first terminal device to reestablish the first connection with the bluetooth device.
Fig. 15 is a block diagram of an electronic device according to an exemplary embodiment, where the electronic device may be a terminal device, or may be a service end such as a local server and a cloud server, where the service end may be disposed in a device cluster formed by one electronic device or multiple electronic devices. For example, device 900 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, exercise device, personal digital assistant, and the like.
Referring to fig. 15, device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input/output (I/O) interface 912, a sensor component 914, and a communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 902 can include one or more modules that facilitate interaction between the processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operations at the device 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 may be implemented by any type of volatile or nonvolatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 906 provides power to the various components of the 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 for device 900.
The multimedia component 908 comprises a screen between the device 900 and the user that provides an output interface. In some embodiments, 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 a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front-facing camera and/or a rear-facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 900 is in an operational mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a Microphone (MIC) configured to receive external audio signals when the device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
The I/O interface 912 provides an interface between the processing component 902 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 914 includes one or more sensors for providing status assessment of various aspects of the device 900. For example, the sensor assembly 914 may detect the on/off state of the device 900, the relative positioning of the components, such as the display and keypad of the device 900, the sensor assembly 914 may also detect the change in position of the device 900 or one component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration/deceleration of the device 900, and the change in temperature of the device 900. The sensor assembly 914 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communication between the device 900 and other devices, either wired or wireless. The device 900 may access a wireless network based on a communication standard, such as WiFi,2G or 3G,4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 may be implemented 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 Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for executing the methods described above.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, such as a memory 904 including instructions executable by the processor 920 of the device 900 to perform the above-described method. For example, 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.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (24)

  1. A bluetooth device control method, applied to a first terminal device, comprising:
    in response to receiving a first control instruction sent by a server, disconnecting a first connection pre-established with a Bluetooth device, wherein the first control instruction comprises information sent by the server under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request for acquiring connection information of the Bluetooth device, which is sent by a second terminal device after receiving second audio data to be played;
    And in response to detecting that the first connection is disconnected, sending first notification information for indicating that the first connection is disconnected to the server side, so that the server side sends the connection information to the second terminal device.
  2. The method of claim 1, wherein the first setting condition further comprises detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
  3. The method of claim 1, wherein the first setting condition further comprises detecting that the first terminal device is logged in to the same account as the second terminal device.
  4. The method of claim 1, wherein the first setting condition further comprises detecting that the first terminal device is within the same local area network as the second terminal device.
  5. The method according to claim 1, wherein the method further comprises:
    in response to receiving a control instruction for connecting with a Bluetooth device, establishing a first connection with the Bluetooth device;
    and transmitting connection information of the Bluetooth equipment to the server in response to the established first connection.
  6. The method according to any one of claims 1 to 5, further comprising:
    and in response to receiving a second control instruction sent by the server, re-establishing the first connection with the Bluetooth device, wherein the second control instruction comprises information sent by the server under a second setting condition, the second setting condition comprises receiving second notification information sent by the second terminal device and used for indicating that the second connection is disconnected, and the second connection is established between the second terminal device and the Bluetooth device.
  7. The method of claim 6, wherein the reestablishing the first connection with the bluetooth device in response to receiving the second control command sent by the server includes:
    generating inquiry information for determining whether to establish a first connection with the Bluetooth equipment or not in response to receiving a second control instruction sent by the server;
    and re-establishing the first connection with the Bluetooth device in response to receiving a confirmation instruction based on the inquiry information.
  8. A bluetooth device control method, applied to a second terminal device, comprising:
    In response to detecting that the second terminal equipment has second audio data to be played, sending a Bluetooth information acquisition request to a server;
    in response to receiving connection information of Bluetooth equipment returned by the server based on the acquisition request, establishing a second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the server in response to receiving first notification information sent by first terminal equipment, the first notification information comprises information sent by the first terminal equipment to the server in response to receiving a first control instruction and disconnecting the first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the server under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
    and based on the second connection, sending the second audio data to the Bluetooth device for playing.
  9. The method of claim 8, wherein the first setting condition further comprises detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
  10. The method of claim 8, wherein the first setting condition further comprises detecting that the first terminal device is logged into the same account as the second terminal device.
  11. The method of claim 8, wherein the first setting condition further comprises detecting that the first terminal device is within the same local area network as the second terminal device.
  12. The method of claim 8, wherein the method further comprises:
    in response to detecting that the second audio data has been played, disconnecting the second connection;
    and in response to detecting that the second connection is disconnected, sending second notification information for indicating that the second connection is disconnected to the service end.
  13. A bluetooth device control method, applied to a server, the method comprising:
    in response to detecting that a first setting condition is currently met, a first control instruction is sent to a first terminal device, wherein the first control instruction is used for controlling the first terminal device to disconnect a first connection with Bluetooth equipment, and the first setting condition comprises a Bluetooth information acquisition request which is sent by a second terminal device after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
    And transmitting the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving first notification information transmitted by the first terminal device, wherein the first notification information comprises information transmitted by the first terminal device to the server in response to detecting that the first connection is disconnected, the connection information comprises information transmitted by the first terminal device to the server in response to establishing the first connection, and the connection information is used for enabling the second terminal device to establish a second connection with the Bluetooth device and transmitting the second audio data to the Bluetooth device for playing based on the second connection.
  14. The method of claim 13, wherein the first setting condition further comprises detecting that a distance between the first terminal device and the second terminal device is less than or equal to a preset distance threshold.
  15. The method of claim 13, wherein the first setting condition further comprises detecting that the first terminal device is logged into the same account as the second terminal device.
  16. The method of claim 13, wherein the first setting condition further comprises detecting that the first terminal device is within the same local area network as the second terminal device.
  17. The method of claim 13, wherein the method further comprises:
    and responding to receiving second notification information which is sent by the second terminal equipment and used for indicating that the second connection is disconnected, sending a second control instruction to the first terminal equipment, wherein the second control instruction is used for controlling the first terminal equipment to reestablish the first connection with the Bluetooth equipment.
  18. A bluetooth device control apparatus, applied to a first terminal device, comprising:
    the first connection disconnection module is used for responding to a first control instruction sent by the server side, disconnecting a first connection pre-established with the Bluetooth equipment, wherein the first control instruction comprises information sent by the server side under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request which is sent by the second terminal equipment after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
    and the first notification sending module is used for sending first notification information for indicating that the first connection is disconnected to the server side in response to the detection that the first connection is disconnected, so that the server side sends the connection information to the second terminal equipment.
  19. A bluetooth device control apparatus, characterized by being applied to a second terminal device, the apparatus comprising:
    the acquisition request sending module is used for sending a Bluetooth information acquisition request to a server in response to the detection that the second terminal equipment has second audio data to be played;
    the second connection establishing module is used for responding to receiving connection information of the Bluetooth equipment returned by the service end based on the acquisition request, establishing second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the service end in response to receiving first notification information sent by first terminal equipment, the first terminal equipment is equipment logging in the same account as the second terminal equipment, the first notification information comprises information sent by the first terminal equipment to the service end in response to receiving a first control instruction and disconnecting a first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the service end under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
    and the second audio sending module is used for sending the second audio data to the Bluetooth equipment for playing based on the second connection.
  20. A bluetooth device control apparatus, applied to a server, the apparatus comprising:
    the first instruction sending module is used for sending a first control instruction to the first terminal equipment in response to the fact that a first setting condition is met currently, wherein the first control instruction is used for controlling the first terminal equipment to disconnect a first connection with Bluetooth equipment, and the first setting condition comprises a Bluetooth information acquisition request which is sent by the second terminal equipment after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
    the connection information sending module is used for responding to the first notification information sent by the first terminal equipment, sending the pre-received connection information of the Bluetooth equipment to the second terminal equipment, wherein the first notification information comprises information sent by the first terminal equipment to the server in response to the fact that the first connection is disconnected, the connection information comprises information sent by the first terminal equipment to the server in response to the fact that the first connection is established, and the connection information is used for enabling the second terminal equipment to establish a second connection with the Bluetooth equipment and sending the second audio data to the Bluetooth equipment for playing based on the second connection.
  21. A terminal device, the device comprising:
    a processor and a memory for storing a computer program;
    wherein the processor is configured to implement, when executing the computer program:
    in response to receiving a first control instruction sent by a server, disconnecting a first connection pre-established with a Bluetooth device, wherein the first control instruction comprises information sent by the server under a first setting condition, and the first setting condition comprises a Bluetooth information acquisition request for acquiring connection information of the Bluetooth device, which is sent by a second terminal device after receiving second audio data to be played;
    and in response to detecting that the first connection is disconnected, sending first notification information for indicating that the first connection is disconnected to the server side, so that the server side sends the connection information to the second terminal device.
  22. A terminal device, the device comprising:
    a processor and a memory for storing a computer program;
    wherein the processor is configured to implement, when executing the computer program:
    in response to detecting that the current terminal equipment has second audio data to be played, sending a Bluetooth information acquisition request to a server;
    In response to receiving connection information of Bluetooth equipment returned by the server based on the acquisition request, establishing a second connection with the Bluetooth equipment based on the connection information, wherein the connection information comprises information sent by the server in response to receiving first notification information sent by first terminal equipment, the first notification information comprises information sent by the first terminal equipment to the server in response to receiving a first control instruction and disconnecting the first connection established with the Bluetooth equipment, the first control instruction comprises information sent by the server under a first set condition, and the first set condition comprises receiving the Bluetooth information acquisition request;
    and based on the second connection, sending the second audio data to the Bluetooth device for playing.
  23. A server, the server comprising:
    a processor and a memory for storing a computer program;
    wherein the processor is configured to implement, when executing the computer program:
    in response to detecting that a first setting condition is currently met, a first control instruction is sent to a first terminal device, wherein the first control instruction is used for controlling the first terminal device to disconnect a first connection with Bluetooth equipment, and the first setting condition comprises a Bluetooth information acquisition request which is sent by a second terminal device after receiving second audio data to be played and used for acquiring connection information of the Bluetooth equipment;
    And transmitting the pre-received connection information of the Bluetooth device to the second terminal device in response to receiving first notification information transmitted by the first terminal device, wherein the first notification information comprises information transmitted by the first terminal device to the server in response to detecting that the first connection is disconnected, the connection information comprises information transmitted by the first terminal device to the server in response to establishing the first connection, and the connection information is used for enabling the second terminal device to establish a second connection with the Bluetooth device and transmitting the second audio data to the Bluetooth device for playing based on the second connection.
  24. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the bluetooth device control method according to any one of the preceding claims 1 to 17.
CN202280004384.7A 2022-05-24 2022-05-24 Bluetooth equipment control method, device, equipment and storage medium Pending CN117652166A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/094787 WO2023225869A1 (en) 2022-05-24 2022-05-24 Bluetooth device control method and apparatus, and device and storage medium

Publications (1)

Publication Number Publication Date
CN117652166A true CN117652166A (en) 2024-03-05

Family

ID=88918212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202280004384.7A Pending CN117652166A (en) 2022-05-24 2022-05-24 Bluetooth equipment control method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN117652166A (en)
WO (1) WO2023225869A1 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3696192B2 (en) * 2002-09-27 2005-09-14 株式会社東芝 Electronic device and method for switching connection destination of electronic device
CN113225693B (en) * 2019-04-18 2022-04-15 华为技术有限公司 Bluetooth connection method, equipment and system
CN112004173B (en) * 2020-08-27 2023-06-27 努比亚技术有限公司 Bluetooth headset switching method, mobile terminal and computer readable storage medium
CN111818503B (en) * 2020-09-08 2021-03-05 深圳市汇顶科技股份有限公司 Voice communication method, system, chip, electronic equipment and storage medium
CN114173321B (en) * 2020-09-10 2023-07-11 华为技术有限公司 Equipment communication connection establishment method and equipment communication system
CN113573172A (en) * 2021-07-28 2021-10-29 江苏紫米电子技术有限公司 Dual-device audio playing method and device, electronic device and storage medium
CN114125803A (en) * 2021-11-30 2022-03-01 Oppo广东移动通信有限公司 Device connection switching method and device, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
WO2023225869A1 (en) 2023-11-30

Similar Documents

Publication Publication Date Title
US10237901B2 (en) Method and apparatus for connecting with controlled smart device, and storage medium
US11895630B2 (en) Method and device for identifying downlink transmissions
EP3062487A1 (en) Method and apparatus for detecting smart device
CN109451877B (en) Unmanned aerial vehicle control method and device, unmanned aerial vehicle and remote control equipment
CN107635074B (en) Method, apparatus and computer-readable storage medium for controlling alarm
CN111314211A (en) Message forwarding method and device
CN110730954A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111262941B (en) Method for reconnecting cloud server and electronic equipment
CN109040651B (en) Video communication method and device
CN105227426B (en) Application interface switching method and device and terminal equipment
CN107277422B (en) Video call method, device and system
CN106550482B (en) Communication connection establishing method and device and electronic equipment
CN112640569B (en) Connection establishment method and device
CN111800836B (en) Communication method, device, electronic equipment and storage medium
WO2022052070A1 (en) Connection control method and connection control apparatus
CN114268691A (en) Call method, device, terminal equipment and readable storage medium
CN117652166A (en) Bluetooth equipment control method, device, equipment and storage medium
CN114615647A (en) Call control method, device and storage medium
CN108551459B (en) Method and device for communication between devices and readable storage medium
CN112821515A (en) Charging method, device and system
CN112954596A (en) Data sharing method, device, equipment and storage medium
CN111837411A (en) Information sending method, base station switching method, information receiving method and device
CN111601363A (en) Method, device and storage medium for assisting intelligent equipment to automatically access wireless network
CN106170038B (en) Recording method and device
CN112136340A (en) Network switching resource determining method and network switching resource configuration method

Legal Events

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