CN115278615A - Method and device for controlling transmission of Bluetooth equipment and electronic equipment - Google Patents

Method and device for controlling transmission of Bluetooth equipment and electronic equipment Download PDF

Info

Publication number
CN115278615A
CN115278615A CN202110484400.4A CN202110484400A CN115278615A CN 115278615 A CN115278615 A CN 115278615A CN 202110484400 A CN202110484400 A CN 202110484400A CN 115278615 A CN115278615 A CN 115278615A
Authority
CN
China
Prior art keywords
terminal
service
data transmission
target data
link
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
CN202110484400.4A
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110484400.4A priority Critical patent/CN115278615A/en
Priority to PCT/CN2022/090543 priority patent/WO2022228569A1/en
Publication of CN115278615A publication Critical patent/CN115278615A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • H04B5/48
    • 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
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0055Transmission or use of information for re-establishing the radio link
    • H04W36/0069Transmission or use of information for re-establishing the radio link in case of dual connectivity, e.g. decoupled uplink/downlink

Abstract

The application relates to a method for controlling transmission by Bluetooth equipment, which is applied to the Bluetooth equipment and comprises the following steps: establishing physical connection with a first terminal and a second terminal respectively; receiving a second service data transmission request sent by a second terminal when the first service data transmission is carried out with a first terminal; determining a target data transmission terminal according to the priority of the first service and the second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the control mode comprises the steps of reducing the receiving data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link; and carrying out service data transmission with the target data transmission terminal. The application also discloses a device for controlling transmission by the Bluetooth equipment, the electronic equipment and a computer readable storage medium. The delay of switching between the devices can be reduced, and the data transmission efficiency can be improved.

Description

Method and device for controlling transmission of Bluetooth equipment and electronic equipment
Technical Field
The present application relates to the field of electronic device technologies, and in particular, to a method and an apparatus for controlling transmission by a bluetooth device, an electronic device, and a computer-readable storage medium.
Background
Along with the abundance of life contents of people in recent years, electronic equipment owned by users is more and more, and the technology of Bluetooth equipment such as Bluetooth earphones and Bluetooth sound boxes is rapidly improved. In order to facilitate work and life of users, a plurality of electronic devices can be connected to the Bluetooth device at the same time. How to handle service switching of multiple electronic devices through a pair of bluetooth headsets is a very important issue for user experience at present.
How to handle the service switching of a plurality of electronic devices through bluetooth devices is a very important issue at present, but when the bluetooth devices handle the service switching of a plurality of electronic devices in the market, the problem that the switching delay is large and the switching quality is low exists.
Disclosure of Invention
Embodiments of the present application provide a method and an apparatus for controlling transmission by a bluetooth device, an electronic device, and a computer-readable storage medium, where delay in switching between devices is low, and a service between another device and the bluetooth device is not affected by a switched device, thereby improving data transmission efficiency and quality.
A method for controlling transmission by a Bluetooth device is applied to the Bluetooth device and comprises the following steps:
establishing physical connection with a first terminal and a second terminal respectively;
when first service data transmission is carried out with a first terminal, receiving a second service data transmission request sent by a second terminal;
determining a target data transmission terminal according to the priority of a first service and a second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link;
and carrying out service data transmission with the target data transmission terminal.
An apparatus for controlling transmission of a bluetooth device, applied to the bluetooth device, comprises:
the connection module is used for respectively establishing physical connection with the first terminal and the second terminal;
the receiving module is used for receiving a second service data transmission request sent by the second terminal when the first service data transmission is carried out with the first terminal;
the switching connection module is used for determining a target data transmission terminal according to the priority of the first service and the second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises the step of reducing the receiving data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link;
and the data transmission module is used for carrying out service data transmission with the target data transmission terminal.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
establishing physical connection with a first terminal and a second terminal respectively;
when first service data transmission is carried out with a first terminal, receiving a second service data transmission request sent by a second terminal;
determining a target data transmission terminal according to the priority of a first service and a second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link;
and carrying out service data transmission with the target data transmission terminal.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, causes the processor to carry out the steps of:
establishing physical connection with a first terminal and a second terminal respectively;
when first service data transmission is carried out with a first terminal, receiving a second service data transmission request sent by a second terminal;
determining a target data transmission terminal according to the priority of a first service and a second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link;
and carrying out service data transmission with a target data transmission terminal.
The method, the device, the electronic equipment and the computer readable storage medium for controlling transmission of the Bluetooth equipment establish physical connection with the first terminal and the second terminal respectively; receiving a second service data transmission request sent by a second terminal when the first service data transmission is carried out with a first terminal; determining a target data transmission terminal according to the priority of the first service and the second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, keeping the physical connection with the non-target data transmission terminal, and controlling the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link; when the Bluetooth device supports one-to-two operation, the Bluetooth device can be automatically switched to use according to the service priority of two terminals connected with the Bluetooth device, the physical connection between the two terminals and the Bluetooth device does not need to be disconnected and reconnected during switching, so that the switching speed is improved, the delay of the switching between the devices is low, when the two devices switch to use the Bluetooth device, the two devices still maintain the physical connection with the Bluetooth device, the interaction frequency of an ACL link established with a non-target data transmission terminal is reduced, the occupation of the link on the bandwidth of the Bluetooth device is reduced, the service between the target data transmission terminal and the Bluetooth device is not influenced, or a corresponding SCO synchronous connection-oriented link is disconnected, the call data of the non-target data transmission terminal cannot be transmitted to the Bluetooth device, the occupation of the link on the bandwidth of the Bluetooth device is avoided, the service between the target data transmission terminal and the Bluetooth device is not influenced, and the data transmission efficiency and quality are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary implementation of a method for controlling transmissions by a Bluetooth enabled device;
FIG. 2 is a block diagram of a portion of the structure of a handset associated with an electronic device as provided in one embodiment;
FIG. 3 is a flow diagram illustrating a method for controlling transmissions by a Bluetooth device in one embodiment;
FIG. 4 is a data interaction diagram illustrating a method for controlling transmissions by a Bluetooth device in an exemplary embodiment;
FIG. 5 is a schematic diagram of data interaction for a method for controlling transmissions by a Bluetooth device in another exemplary embodiment;
FIG. 6 is a data interaction diagram illustrating a method for controlling transmissions by a Bluetooth device in yet another embodiment;
FIG. 7 is a data interaction diagram illustrating a method for controlling transmissions by a Bluetooth enabled device in yet another exemplary embodiment;
FIG. 8 is a data interaction diagram illustrating a method for controlling transmissions by a Bluetooth device in yet another embodiment;
FIG. 9 is a block diagram of an apparatus for controlling transmission by a Bluetooth device in one embodiment;
fig. 10 is a block diagram of an internal configuration of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Fig. 1 is a schematic diagram of an application environment of a method for controlling transmission by a bluetooth device in an embodiment. As shown in fig. 1, the application environment includes a bluetooth device 102, a first terminal 104, and a second terminal 106. The bluetooth device 102 may communicate with the first terminal 104 and the second terminal 106 via bluetooth. The bluetooth device 102 may be a bluetooth headset (e.g., a True wireless stereo, TWS headset), a bluetooth speaker, etc., and the first terminal 104 and the second terminal 106 may be a personal computer, a notebook computer, a smart phone, a tablet computer, a portable wearable device, etc., but are not limited thereto.
In one embodiment, fig. 2 is a block diagram of a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 2, the handset includes: a Radio Frequency (RF) circuit 210, a memory 220, an input unit 230, a display unit 240, a bluetooth module 250, an audio circuit 260, a wireless fidelity (WIFI) module 270, a processor 280, and a power supply 290. Those skilled in the art will appreciate that the handset configuration shown in fig. 2 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein bluetooth module 250 supports bluetooth functionality. The bluetooth technology is a radio technology supporting short-distance communication of devices, and can perform wireless information interaction among various wireless terminal devices including smart phones, personal computers, notebook computers, tablet computers, portable wearable devices, wireless earphones, wireless sound boxes and the like.
Fig. 3 is a flow diagram of a method for a bluetooth device to control transmissions in one embodiment. The method for controlling transmission by the bluetooth device shown in fig. 3 can be applied to the bluetooth device 102, and includes:
step 202, physical connections are established with the first terminal and the second terminal respectively.
Specifically, the bluetooth device may establish a physical connection, i.e., an ACL (asynchronous connection) connection, with the first terminal and the second terminal at the same time. ACL links are directed transmission packets that support both symmetric and asymmetric connections. The established physical connection comprises connection of an upper layer protocol HFP (hand-Free Profile) and connection of an upper layer protocol A2DP (Advanced Audio Distribution Profile, bluetooth Audio transmission model protocol), wherein the HFP protocol specifies that a Hands-Free device controls related operations of the telephone, and the Hands-Free device refers to related bluetooth devices, such as vehicle-mounted bluetooth, bluetooth sound box and the like. A2DP defines protocols and procedures for transmitting high quality audio information, such as mono or stereo, over ACL channels.
Step 204, when the first service data transmission is being performed with the first terminal, receiving a second service data transmission request sent by the second terminal.
The first service may be a call service, where the call service refers to a bluetooth call protocol, that is, a service corresponding to an HFP protocol, such as making a call through a phone number, performing a real-time voice call in an application, performing a video call in the application, and the like. The first service may also be an audio service, where the audio service refers to a service corresponding to a bluetooth audio protocol, that is, a service corresponding to an A2dp protocol, such as playing music or video. The first service may also be other multimedia services.
Specifically, the first terminal sends a service notification to the bluetooth device through the corresponding physical connection, when the bluetooth device is idle, the service notification is replied to the first terminal, and first service data transmission is performed according to a first service type corresponding to the first terminal. And if the first service is a call service, the Bluetooth device and the first terminal establish an SCO link, and the Bluetooth device and the first terminal perform service data transmission through the SCO link. SCO (Synchronous Connection organized) is mainly used to transmit data communication with high time requirement, and is usually used in bluetooth call or virtual phone scenario. And if the first service is the audio service, receiving the audio data stream of the first terminal and outputting the audio service data of the first terminal. The second service data transmission request is used for requesting second service data transmission with the bluetooth device, and indicates that the second terminal needs to seize the bluetooth device with the first terminal. The second service data transmission request is used for requesting to transmit second service data with the bluetooth device, wherein the second service may be a call service, an audio service, or other multimedia services.
In one embodiment, the receiving the second service data transmission request sent by the second terminal includes: and when the second service is a service corresponding to the Bluetooth communication protocol, receiving a communication connection instruction sent by the second terminal. And when the second service is a service corresponding to the Bluetooth audio protocol, receiving an audio data playing request sent by the second terminal.
Specifically, the second service data transmission request has different forms when the second terminal performs different services, if the second terminal performs a call service, which is a service corresponding to the bluetooth call protocol, a call connection instruction is generated when the second terminal connects the call request, and the call connection instruction is sent to the bluetooth device, where the bluetooth device receives the call connection instruction, that is, the call connection instruction is the received second service data transmission request. If the second terminal carries out the audio service which is the service corresponding to the Bluetooth audio protocol, when the second terminal needs to play audio data, an audio data playing request is generated and sent to the Bluetooth equipment, and the Bluetooth equipment receives the audio data playing request, namely, the audio data playing request is received. The audio data playing request may be generated when the audio player is started to play the audio data for the first time, or may be generated when the audio data is played again after the audio data is paused. Different services correspond to different service data transmission requests, and the Bluetooth equipment performs corresponding responses after recognizing the service data transmission requests corresponding to the different services.
Step 206, determining a target data transmission terminal according to the priority of the first service and the second service, controlling the link data reception corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, maintaining the physical connection with the non-target data transmission terminal, and controlling the link data reception corresponding to the non-target data transmission terminal includes reducing the received data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link.
The target data transmission terminal is a terminal which finally successfully seizes the Bluetooth equipment and normally communicates with the Bluetooth equipment, the target data transmission terminal and the non-target data transmission terminal are respectively determined from the first terminal and the second terminal according to the priority of the first service and the second service, the terminal with high service priority level is used as the target data transmission terminal, and the terminal with low service priority level is used as the non-target data transmission terminal. The priority between different services can be customized according to requirements, and in one embodiment, the priority of the call service is higher than that of the audio service. It can be understood that, if the first service and the second service are services with the same priority level, the corresponding target data transmission terminal is determined according to the sequence of the service data transmission requests, and a specific rule may be defined. In one embodiment, when the service priority levels are the same, the terminal that later sends the service data transmission request serves as a target data transmission terminal, and can preempt the service resources that are being transmitted before. The terminal corresponding to the service with high priority level can preempt the use of the Bluetooth equipment by the terminal corresponding to the service with low priority level.
Specifically, the receiving of the link data corresponding to the non-target data transmission terminal is controlled according to the service type corresponding to the non-target data transmission terminal, and when the service types corresponding to the non-target data transmission terminals are different, the receiving of the link data corresponding to the non-target data transmission terminals is controlled to be different. The control mode comprises reducing the received data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link, wherein the target frequency can be customized according to needs and the received data frequency is reduced, so that the occupation of the link on the bandwidth of the Bluetooth equipment is reduced, and the service between the target data transmission terminal and the Bluetooth equipment is not influenced. Even if the application data of the first terminal is still transmitted to the Bluetooth device through physical connection after switching, the Bluetooth device discards the service data transmitted by the first terminal, so that the sound of the third-party application app during and after switching cannot be played, and the user cannot be troubled by playing the sound. After the switching, the physical connection with the non-target data transmission terminal is kept, so that the reconnection is not needed in the next switching, and the switching efficiency is improved. And the audio data of the non-target data transmission terminal is not played. And (3) disconnecting the corresponding SCO synchronous connection-oriented link, so that the call data of the non-target data transmission terminal cannot be transmitted to the Bluetooth equipment, and the service data of the non-target data transmission terminal can be directly output from a microphone of the non-target data transmission terminal.
And step 208, performing service data transmission with the target data transmission terminal.
Specifically, according to the service type corresponding to the target data transmission terminal, a matching mode is selected to perform service data transmission with the target data transmission terminal. If the data is a call service, an SCO link needs to be established with the target data transmission terminal, and service data transmission is performed with the target data transmission terminal through the SCO link. And if the data is the audio service, receiving the audio data stream of the target data transmission terminal and outputting the audio service data of the target data transmission terminal.
In the method for controlling transmission by a bluetooth device in this embodiment, the bluetooth device establishes physical connections with a first terminal and a second terminal, respectively; receiving a second service data transmission request sent by a second terminal when the first service data transmission is carried out with a first terminal; determining a target data transmission terminal according to the priority of a first service and a second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link; when the Bluetooth device supports one-to-two operation, the Bluetooth device can be automatically switched to use according to the service priority of two terminals connected with the Bluetooth device, the physical connection between the two terminals and the Bluetooth device does not need to be disconnected and reconnected during switching, so that the switching speed is improved, the switching delay between the devices is low, when the two devices switch to use the Bluetooth device, the two devices still keep the physical connection with the Bluetooth device, the interaction frequency of an ACL link established with a non-target data transmission terminal is reduced, so that the occupation of the bandwidth of the Bluetooth device by the link is reduced, the service between the target data transmission terminal and the Bluetooth device is not influenced, or a corresponding SCO synchronous connection-oriented link is disconnected, the call data of the non-target data transmission terminal cannot be transmitted to the Bluetooth device, the occupation of the bandwidth of the Bluetooth device by the link is avoided, the service between the target data transmission terminal and the Bluetooth device is not influenced, and the efficiency and the quality of data transmission are improved.
In one embodiment, the step 206 of determining the target data transmission terminal according to the priority of the first service and the second service comprises: and when the priorities of the first service and the second service are the same, determining that the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal. And when the priority of the first service is higher than that of the second service, determining that the first terminal is a target data transmission terminal and the second terminal is a non-target data transmission terminal. And when the priority of the first service is lower than that of the second service, determining that the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal.
Specifically, when the priorities of the first service and the second service are the same, the second terminal sends a service data transmission request, so that the ongoing first service data transmission can be preempted, and the second terminal is determined to be the target data transmission terminal.
If the first terminal is using the Bluetooth device to perform the call service, the second terminal generates the call service, if the user answers the call service of the second terminal, the second terminal sends a call service data transmission request to the Bluetooth device, and because the priorities of the first service and the second service are the same, the second terminal is determined to be a target data transmission terminal and the first terminal is a non-target data transmission terminal, so that the connection switching between the Bluetooth device and the terminal is realized, the physical connection with the first terminal is maintained, the SCO synchronous connection-oriented link corresponding to the first terminal is disconnected, and the service data transmission with the second terminal is started.
If the first terminal is using the Bluetooth device to perform audio service, and the second terminal generates audio service, the second terminal sends an audio service data transmission request to the Bluetooth device, and because the priority of the first service is the same as that of the second service, the second terminal is determined to be a target data transmission terminal, and the first terminal is a non-target data transmission terminal, so that the connection switching between the Bluetooth device and the terminal is realized, the physical connection with the first terminal is maintained, the received data frequency of a link corresponding to the first terminal is reduced to the target frequency, and the service data transmission with the second terminal is started.
If the first terminal is using the Bluetooth device to perform the call service, the second terminal generates the audio service, and because the call service optimization level is higher than the audio service, the first terminal is determined to be the target data transmission terminal and the second terminal is the non-target data transmission terminal, so the Bluetooth device maintains the call service of the first terminal, maintains the physical connection with the second terminal, and simultaneously reduces the received data frequency of the link corresponding to the second terminal to the target frequency.
If the first terminal is using the Bluetooth device to perform the audio service, the second terminal generates the call service, and because the call service optimization level is higher than the audio service, the second terminal is determined to be a target data transmission terminal, the first terminal is a non-target data transmission terminal, the connection switching between the Bluetooth device and the terminals is realized, the physical connection with the first terminal is maintained, the received data frequency of the link corresponding to the first terminal is reduced to the target frequency, and the service data transmission with the second terminal is started. After the second terminal seizes the Bluetooth equipment, the audio service of the first terminal can not be snatched back to the Bluetooth equipment in the conversation process because the conversation service priority is higher than the audio service.
The audio service is a service corresponding to a Bluetooth audio protocol, and the call service is a service corresponding to a Bluetooth call protocol.
In the embodiment, the target data transmission terminal and the non-target data transmission terminal are determined in a self-adaptive manner according to the priority of the first service and the priority of the second service, so that automatic switching can be realized subsequently, and convenience and high efficiency are realized. The user can define the priority level of each different service, thereby flexibly realizing the switching between the Bluetooth equipment and the terminal service transmission.
In one embodiment, the first service and the second service are services corresponding to a bluetooth call protocol, and step 206 includes: and if the priority of the first service is the same as that of the second service, the second terminal is a target data transmission terminal, the first terminal is a non-target data transmission terminal, and the SCO link with the first terminal is disconnected. Step 208 includes: and creating an SCO link with the second terminal, and transmitting service data with the second terminal through the SCO link.
Specifically, the first service and the second service are services corresponding to a bluetooth call protocol, and the priorities of the first service and the second service are the same, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal. The bluetooth device will disconnect the SCO link with the first terminal, let the service data of first terminal directly export from the terminal microphone, keep being connected with the physics of first terminal simultaneously, including upper protocol HFP's connection, if the first terminal supports the service that the bluetooth audio protocol corresponds, then can also keep the connection of upper protocol A2DP, the bluetooth device will establish the SCO link with the second terminal, the conversation sound of second terminal will be exported from the bluetooth device.
In this embodiment, when both terminals perform a call service, the terminal that performs the call service may seize the bluetooth device, so that the call service data of the terminal that performs the call service may be output from the audio device of the terminal, and the call service data of the terminal that performs the call service is output using the bluetooth device.
In one embodiment, the first service and the second service are services corresponding to a bluetooth audio protocol, and step 206 includes: and if the priority of the first service is the same as that of the second service, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal. And sending a data transmission pause instruction to the first terminal, reducing the frequency of the received data of the link corresponding to the first terminal to a target frequency, and discarding the received data of the link corresponding to the first terminal. Step 208 includes: an audio data stream of the second terminal is received.
Specifically, the first service and the second service are services corresponding to a bluetooth audio protocol, and the priorities of the first service and the second service are the same, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal. The Bluetooth device sends a data transmission pause instruction to the first terminal first, keeps physical connection with the first terminal, including connection of an upper layer protocol A2DP, and if the first terminal supports a service corresponding to a Bluetooth communication protocol, connection of an upper layer protocol HFP can be kept, and meanwhile, the frequency of receiving audio data streams in a first terminal link is greatly reduced, namely, sending audio data to the Bluetooth device by the first terminal is reduced as much as possible, occupation of the bandwidth of the Bluetooth device by the first terminal is reduced, and further, if a small amount of audio data sent by the first terminal is received, the audio data is discarded and is not played. And simultaneously, receiving the audio data stream of the second terminal, and outputting the audio service data of the second terminal by the Bluetooth equipment. In one embodiment, a data transmission suspension instruction is sent to the first terminal, and if it is detected that the data transmission suspension is successful, that is, the data sent by the first terminal is not received, the frequency of the received data of the link corresponding to the first terminal does not need to be reduced to the target frequency. If the data transmission suspension is not successfully detected, that is, the data sent by the first terminal is still received, the frequency of the received data of the link corresponding to the first terminal is reduced to the target frequency, and further, the received data sent by the first terminal can be discarded.
If the first terminal needs to preempt the Bluetooth device, the first terminal needs to pause and then play again, and the Bluetooth device detects that the first terminal resumes receiving the service data of the first terminal after playing again, and meanwhile, the frequency of receiving the audio data stream in the second terminal link is greatly reduced. This case is equivalent to the case where the first service and the second service are both services corresponding to the bluetooth audio protocol, and when the bluetooth device is performing the first service data transmission with the second terminal, the bluetooth device receives the second service data transmission request sent by the first terminal, and determines that the first terminal is the target data transmission terminal and the second terminal is the non-target data transmission terminal.
In this embodiment, when two terminals both perform audio service, a terminal that performs audio service may seize a bluetooth device, so that audio service data of the terminal that performs audio service cannot be output by using the bluetooth device, and audio service data of the terminal that performs audio service is output by using the bluetooth device. The Bluetooth device sends a data transmission pause instruction to the non-target data transmission terminal, if the application of the non-target data transmission terminal can respond to the data transmission pause instruction, the data transmission can be directly paused, in addition, even if the data of the application of the non-target data transmission terminal does not respond to the data transmission pause instruction after switching, the data can still be transmitted to the Bluetooth device through physical connection, the Bluetooth device can discard the service data sent by the first terminal, so that the sound of the third-party application app in the switching process and after switching can not be played outside, the audio service data of the terminal which originally carries out the audio service can not be played outside, and the trouble of playing outside can not be brought to a user.
In one embodiment, the first service is a service corresponding to a bluetooth audio protocol, and the second service is a service corresponding to a bluetooth call protocol, and step 206 includes: and if the priority of the first service is lower than that of the second service, the second terminal is a target data transmission terminal, the first terminal is a non-target data transmission terminal, a data transmission pause instruction is sent to the first terminal, the received data frequency of the link corresponding to the first terminal is reduced to the target frequency, and the received data of the link corresponding to the first terminal is discarded. Step 208 includes: and creating an SCO link with the second terminal, and transmitting service data with the second terminal through the SCO link.
Specifically, the first service is a service corresponding to a bluetooth audio protocol, the second service is a service corresponding to a bluetooth call protocol, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal. The method comprises the steps that the Bluetooth equipment sends a data transmission pause instruction to the first terminal firstly, the physical connection with the first terminal is kept, including the connection of an upper layer protocol A2DP, if the first terminal supports a service corresponding to a Bluetooth communication protocol, the connection of an upper layer protocol HFP is also required to be kept, and meanwhile, the frequency of receiving an audio data stream in a first terminal link is greatly reduced, namely, the frequency that the first terminal sends audio data to the Bluetooth equipment is reduced as much as possible, the occupation of the first terminal on the bandwidth of the Bluetooth equipment is reduced, if a small amount of audio data sent by the first terminal are received, the audio data are discarded without being played, and the pause or silence of the audio service is realized. The bluetooth device may create an SCO link with the second terminal, and the call sound of the second terminal may be output from the bluetooth device. After the second terminal seizes the Bluetooth headset, the audio service of the first terminal cannot be seized back to the Bluetooth headset in the call process because the call service priority is higher than the audio service priority. In one embodiment, a data transmission suspension instruction is sent to the first terminal, and if it is detected that the data transmission suspension is successful, that is, the data sent by the first terminal is not received, the frequency of the received data of the link corresponding to the first terminal does not need to be reduced to the target frequency. And if the data transmission suspension is not successfully detected, that is, the data sent by the first terminal is still received, reducing the data receiving frequency of the link corresponding to the first terminal to the target frequency.
In this embodiment, when the terminal performing the call service needs to preempt the connection between the terminal performing the audio service and the bluetooth device, the priority of the call service is higher than that of the audio service, so that the preemption of the bluetooth device is successful, and thus the audio service data of the terminal performing the audio service cannot be output by using the bluetooth device, and the call service data of the terminal performing the call service is output by using the bluetooth device. The Bluetooth device sends a data transmission pause instruction to the non-target data transmission terminal, if the application of the non-target data transmission terminal can respond to the data transmission pause instruction, the data transmission can be directly paused, in addition, even if the data of the application of the non-target data transmission terminal after switching can still be transmitted to the Bluetooth device through physical connection, the Bluetooth device can discard the service data sent by the non-target data transmission terminal, so that the sound of the third-party application app in the switching process and after switching can not be played outside, the audio service data of the terminal which originally carries out the audio service can not be played outside, and the trouble of playing outside can not be brought to a user.
In one embodiment, the first service is a service corresponding to a bluetooth call protocol, and the second service is a service corresponding to a bluetooth audio protocol, and step 206 includes: if the priority of the first service is higher than that of the second service, the first terminal is a target data transmission terminal, the second terminal is a non-target data transmission terminal, a data transmission pause instruction is sent to the second terminal, the frequency of the received data of the link corresponding to the second terminal is reduced to the target frequency, and the received data of the link corresponding to the second terminal is discarded; step 208 includes: and continuously transmitting the service data with the first terminal through the original SCO link corresponding to the first terminal.
Specifically, the first service is a service corresponding to a bluetooth call protocol, the second service is a service corresponding to a bluetooth audio protocol, and the priority of the first service is higher than that of the second service, so that the first terminal is a target data transmission terminal and the second terminal is a non-target data transmission terminal. Because the conversation service optimization level is higher than the audio service, the bluetooth device keeps the conversation service of the first terminal, continues to transmit service data with the first terminal through the original SCO link corresponding to the first terminal, keeps physical connection with the second terminal, including connection of an upper protocol A2DP, and if the second terminal supports the service corresponding to the bluetooth conversation protocol, needs to keep connection of an upper protocol HFP, meanwhile, greatly reduces the frequency of receiving the audio data stream of the second terminal, sends a data transmission pause instruction to the second terminal, and discards the received data of the link corresponding to the second terminal. In one embodiment, a data transmission suspension instruction is sent to the second terminal, and if it is detected that the data transmission suspension is successful, that is, the data sent by the second terminal is not received, the frequency of the received data of the link corresponding to the second terminal does not need to be reduced to the target frequency. And if the data transmission suspension is not successfully detected, that is, the data sent by the second terminal is still received, reducing the data receiving frequency of the link corresponding to the second terminal to the target frequency.
In this embodiment, when the terminal that performs the audio service needs to seize the connection between the terminal that performs the call service and the bluetooth device, since the priority of the call service is higher than that of the audio service, the seizing of the bluetooth device fails, and thus the call service data of the terminal that performs the call service is output by using the bluetooth device continuously. The data transmission pause instruction is sent to the second terminal, the received data frequency of the link corresponding to the second terminal is reduced to the target frequency, the received data of the link corresponding to the second terminal is discarded, the audio service data are prevented from being output from the Bluetooth equipment, even if the applied data of the second terminal are still transmitted to the Bluetooth equipment through physical connection, the Bluetooth equipment can discard the service data sent by the first terminal, and therefore even if a terminal occupies the Bluetooth equipment, the conversation service of the terminal which originally carries out the conversation service cannot be influenced.
In one embodiment, the method further comprises: and when the transmission of the service data corresponding to the first terminal is finished, disconnecting the SCO link with the first terminal. And restoring the receiving data frequency of the link corresponding to the second terminal to the normal receiving frequency, and receiving the audio data stream transmitted by the second terminal.
Specifically, the priority of the call service is higher than that of the audio service, so that the normal operation of the call service is preferentially ensured, when the call service is ended, that is, when the transmission of the service data corresponding to the first terminal is completed, the SCO link with the first terminal is disconnected, the transmission of the audio service corresponding to the second terminal is started, the receiving data frequency of the link corresponding to the second terminal is recovered to the normal receiving frequency, and if the second terminal does not respond to the pause after receiving the data transmission pause instruction, the audio data stream transmitted by the second terminal can be directly received. In one embodiment, if the second terminal suspends data transmission after receiving the data transmission suspension command, the second terminal may detect whether the frequency of the received data of the corresponding link is recovered to the normal receiving frequency, and if it is detected that the frequency of the received data of the corresponding link is recovered to the normal receiving frequency, retransmit the audio data stream to the bluetooth device. In one embodiment, in addition to restoring the data receiving frequency of the link corresponding to the second terminal to the normal receiving frequency, a data re-receiving instruction is sent to the second terminal, where the data re-receiving instruction is used to indicate that the second terminal may re-transmit data, and if the second terminal has suspended data transmission after receiving the data transmission suspension instruction, the data re-transmission may be triggered according to the data re-receiving instruction. And after receiving the audio data stream transmitted by the second terminal, the Bluetooth device outputs the audio service data of the second terminal, so that the audio service can be output through the Bluetooth device.
In the embodiment, when the service with the high priority level is finished, the service with the low priority level can be automatically performed, and the data transmission of the link of the service with the low priority level is recovered, so that the method is intelligent and convenient.
In one embodiment, after the service data transmission with the target data transmission terminal, the method further includes: and playing the service data.
Specifically, after receiving the service data transmitted by the target data transmission terminal, the bluetooth device may play the service data, where the service data may be service data corresponding to a bluetooth call protocol, such as call audio data, or service data corresponding to a bluetooth audio protocol, such as music audio data.
In this embodiment, the bluetooth device may automatically play the service data transmitted by the target data transmission terminal after receiving the service data, so as to output the service data from the bluetooth device in time.
In one embodiment, the method further comprises: and detecting a pause result of the non-target data transmission terminal based on the data transmission pause instruction, if the pause is not detected to be successful, reducing the received data frequency of the link corresponding to the non-target data transmission terminal to the target frequency, and discarding the received data of the link corresponding to the non-target data transmission terminal.
Specifically, if it is detected that the non-target data transmission terminal does not transmit the service data to the bluetooth device, it is determined that the suspension is successful, and if it is detected that the non-target data transmission terminal still transmits the service data to the bluetooth device, it is determined that the suspension is unsuccessful. And if the pause is detected to be successful, the non-target data transmission terminal does not transmit data to the Bluetooth equipment, and the received data frequency of the link corresponding to the non-target data transmission terminal does not need to be reduced to the target frequency.
In this embodiment, whether the received data frequency of the link corresponding to the non-target data transmission terminal is reduced to the target frequency is selected according to whether the suspension is detected to be successful, which is intelligent and convenient.
In a specific embodiment, a method for controlling transmission by a bluetooth device is provided, where the bluetooth device is a bluetooth headset, and for different service scenarios, the following switching processes are respectively performed:
1. as shown in fig. 4, when only one of the devices has a scenario where the service requires the use of a bluetooth headset:
the Bluetooth equipment is respectively in physical connection with a first terminal and a second terminal;
the Bluetooth device is in an idle state;
the first terminal has audio service or conversation service;
the first terminal sends a service notification to the Bluetooth device, wherein the service notification is used for notifying the Bluetooth device that the service needs to be processed;
the Bluetooth equipment sends a reply service notification to the first terminal according to the received service notification, wherein the reply service notification is used for notifying the first terminal to start transmitting service data;
the Bluetooth equipment starts to process the service data of the first terminal, the service data is transmitted with the first terminal, and the service data of the first terminal is output through the Bluetooth equipment.
2. As shown in fig. 5, when both devices have a scenario that the bluetooth headset needs to be used for the call service:
the Bluetooth equipment is respectively in physical connection with a first terminal and a second terminal;
the Bluetooth device is in an idle state;
the first terminal has a call service;
the first terminal sends a service notification to the Bluetooth device, wherein the service notification is used for notifying the Bluetooth device that the call service needs to be processed; the Bluetooth equipment receives the service notification, creates an SCO link with the first terminal, transmits service data with the first terminal through the SCO link, processes the call service of the first terminal, and outputs the call service data of the first terminal through the Bluetooth equipment;
the second terminal has a call service;
the second terminal sends a service notification to the Bluetooth device, the service notification is used for notifying the Bluetooth device that a new call service exists, the Bluetooth device can output a corresponding call reminding audio according to the received service notification, the call reminding audio is mixed with the call service data of the original first terminal and output, and in addition, the second terminal can also output the corresponding call reminding audio through an audio playing device;
the second terminal answers the call service;
the second terminal informs the Bluetooth device of the update of the answering state of the second terminal, namely, sends a call service data transmission request to the Bluetooth device;
the Bluetooth equipment disconnects an SCO link with the first terminal, and conversation service data of the first terminal is output through a microphone;
the Bluetooth device and the second terminal establish an SCO link, service data transmission is carried out between the Bluetooth device and the second terminal through the SCO link, the conversation service of the second terminal is processed, and the conversation service data of the second terminal is output through the Bluetooth device.
3. As shown in fig. 6, when both devices have a scenario where audio service requires the use of a bluetooth headset:
the Bluetooth equipment is respectively in physical connection with a first terminal and a second terminal;
the Bluetooth device is in an idle state;
the first terminal has an audio service;
the first terminal sends a service notice to the Bluetooth device, wherein the service notice is used for informing the Bluetooth device that audio service needs to be processed; the Bluetooth equipment sends a reply service notification to the first terminal according to the received service notification, wherein the reply service notification is used for notifying
The first terminal starts to transmit service data;
the Bluetooth equipment starts to process the audio service of the first terminal, service data transmission is carried out between the Bluetooth equipment and the first terminal, and the audio service data of the first terminal are output through the Bluetooth equipment;
the second terminal has audio service;
the second terminal sends a service notice to the Bluetooth equipment, namely sends an audio service data transmission request;
the Bluetooth equipment sends a data transmission pause instruction to a first terminal, the frequency of received data of a link corresponding to the first terminal is reduced to a target frequency, the received data of the link corresponding to the first terminal is discarded, the audio service of the first terminal is paused or silenced, if the first terminal pauses data transmission according to the received data transmission pause instruction, the audio service of the first terminal is paused, if the first terminal does not respond to the data transmission pause instruction, the audio service data is still transmitted, and because the Bluetooth equipment discards the received data of the link corresponding to the first terminal, the audio service of the first terminal is noiseless;
the Bluetooth equipment sends a reply service notification to the second terminal according to the received service notification, wherein the reply service notification is used for notifying the second terminal of starting to transmit service data;
the Bluetooth device starts to process the audio service of the second terminal, service data transmission is carried out between the Bluetooth device and the second terminal, and the audio service data of the second terminal are output through the Bluetooth device.
4. As shown in FIG. 7, when the first terminal has audio service using Bluetooth headset, the second terminal has communication
Scenario of the speech service:
this scenario is similar to scenario 3 above, except that the second terminal is using the bluetooth headset, and since the communication priority of the second terminal is often higher than the audio frequency, the bluetooth headset will not be robbed back by the first terminal in the communication process of the second terminal.
The Bluetooth equipment is respectively in physical connection with a first terminal and a second terminal;
the Bluetooth device is in an idle state;
the first terminal has an audio service;
the first terminal sends a service notice to the Bluetooth device, wherein the service notice is used for informing the Bluetooth device that audio service needs to be processed; the Bluetooth equipment sends a reply service notification to the first terminal according to the received service notification, wherein the reply service notification is used for notifying
The first terminal starts to transmit service data;
the Bluetooth equipment starts to process the audio service of the first terminal, service data transmission is carried out between the Bluetooth equipment and the first terminal, and the audio service data of the first terminal are output through the Bluetooth equipment;
the second terminal has a call service;
the second terminal sends a service notice, namely a call service data transmission request, to the Bluetooth device;
the Bluetooth equipment sends a data transmission pause instruction to a first terminal, the frequency of received data of a link corresponding to the first terminal is reduced to a target frequency, the received data of the link corresponding to the first terminal is discarded, the audio service of the first terminal is paused or silenced, if the first terminal pauses data transmission according to the received data transmission pause instruction, the audio service of the first terminal is paused, if the first terminal does not respond to the data transmission pause instruction, the audio service data is still transmitted, and because the Bluetooth equipment discards the received data of the link corresponding to the first terminal, the audio service of the first terminal is noiseless;
the Bluetooth equipment sends a reply service notification to the second terminal according to the received service notification, and the reply service notification is used for notifying the second terminal to start transmitting service data;
the Bluetooth device starts to process the conversation service of the second terminal, the Bluetooth device transmits service data with the second terminal, and the conversation service data of the second terminal are output through the Bluetooth device.
5. As shown in fig. 8, when the first terminal has a call service using a bluetooth headset, the second terminal has a scenario of an audio service:
the Bluetooth equipment is respectively in physical connection with a first terminal and a second terminal;
the Bluetooth device is in an idle state;
the first terminal has a call service;
the first terminal sends a service notification to the Bluetooth device, wherein the service notification is used for notifying the Bluetooth device that the call service needs to be processed; the Bluetooth equipment receives the service notification, creates an SCO link with the first terminal, transmits service data with the first terminal through the SCO link, processes the call service of the first terminal, and outputs the call service data of the first terminal through the Bluetooth equipment;
the second terminal has audio service;
the second terminal sends a service notification, namely an audio service data transmission request, to the Bluetooth device;
the Bluetooth equipment replies a service notice to the second terminal, sends a data transmission pause instruction, reduces the frequency of the received data of the link corresponding to the second terminal to a target frequency, discards the received data of the link corresponding to the second terminal, and has no sound audio service of the second terminal, so that the audio service is silent no matter the audio service data is paused or still transmitted, namely the audio service data cannot be played from the Bluetooth equipment;
the call service of the first terminal is finished;
and recovering the data receiving frequency of the link corresponding to the second terminal, sending a data re-receiving instruction to the second terminal, processing the audio service of the second terminal, and outputting the audio service data of the second terminal through the Bluetooth equipment.
It should be understood that, although the steps in the flowchart of fig. 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 9 is a block diagram of an apparatus 600 for controlling transmission by a bluetooth device according to an embodiment. As shown in fig. 9, an apparatus 600 for controlling transmission by a bluetooth device, applied to the bluetooth device, includes: a connection module 602, a receiving module 604, a switch connection module 606, and a data transmission module 608. Wherein:
a connection module 602, configured to establish physical connections with the first terminal and the second terminal, respectively.
A receiving module 604, configured to receive a second service data transmission request sent by the second terminal when the first service data transmission is ongoing with the first terminal.
A switching connection module 606, configured to determine a target data transmission terminal according to the priority of the first service and the second service, control, according to a service type corresponding to the non-target data transmission terminal, link data reception corresponding to the non-target data transmission terminal, and maintain physical connection with the non-target data transmission terminal, where controlling link data reception corresponding to the non-target data transmission terminal includes reducing a received data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link.
And a data transmission module 608, configured to perform service data transmission with the target data transmission terminal.
In the apparatus 600 for controlling transmission by bluetooth devices in this embodiment, the bluetooth devices establish physical connections with the first terminal and the second terminal, respectively; when first service data transmission is carried out with a first terminal, receiving a second service data transmission request sent by a second terminal; determining a target data transmission terminal according to the priority of the first service and the second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the control mode comprises the steps of reducing the receiving data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link; when the Bluetooth device supports one-to-two operation, the Bluetooth device can be automatically switched to use according to the service priority of two terminals connected with the Bluetooth device, the physical connection between the two terminals and the Bluetooth device does not need to be disconnected and reconnected during switching, so that the switching speed is improved, the delay of the switching between the devices is low, when the two devices switch to use the Bluetooth device, the two devices still maintain the physical connection with the Bluetooth device, the interaction frequency of an ACL link established with a non-target data transmission terminal is reduced, the occupation of the link on the bandwidth of the Bluetooth device is reduced, the service between the target data transmission terminal and the Bluetooth device is not influenced, or a corresponding SCO synchronous connection-oriented link is disconnected, the call data of the non-target data transmission terminal cannot be transmitted to the Bluetooth device, the occupation of the link on the bandwidth of the Bluetooth device is avoided, the service between the target data transmission terminal and the Bluetooth device is not influenced, and the efficiency and the quality of data transmission are improved.
In one embodiment, the handover connection module 606 is further configured to determine that the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal when the priorities of the first service and the second service are the same; when the priority of the first service is higher than that of the second service, determining that the first terminal is a target data transmission terminal and the second terminal is a non-target data transmission terminal; and when the priority of the first service is lower than that of the second service, determining that the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal.
The apparatus 600 for controlling transmission by bluetooth device in this embodiment adaptively determines the target data transmission terminal and the non-target data transmission terminal according to the priority of the first service and the second service, and may implement automatic switching from the subsequent process, which is convenient and efficient. The user can define the priority level of each different service, thereby flexibly realizing the switching between the Bluetooth equipment and the terminal service transmission.
In one embodiment, the first service and the second service are services corresponding to a bluetooth call protocol, and the handover connection module 606 is further configured to disconnect an SCO link with the first terminal if the priorities of the first service and the second service are the same, the second terminal is a target data transmission terminal, the first terminal is a non-target data transmission terminal, and the first terminal is a target data transmission terminal; the data transmission module 608 is further configured to create an SCO link with the second terminal, and perform service data transmission with the second terminal through the SCO link.
In the apparatus 600 for controlling transmission by bluetooth device in this embodiment, when two terminals both perform a call service, a terminal performing a call service can seize the bluetooth device, so that the call service data of the terminal performing the call service is output from the external device of the terminal, and the call service data of the terminal performing the call service is output by the bluetooth device.
In an embodiment, the first service and the second service are services corresponding to a bluetooth audio protocol, the handover connection module 606 is further configured to send a data transmission pause instruction to the first terminal if the priorities of the first service and the second service are the same, where the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal, reduce the frequency of received data of a link corresponding to the first terminal to a target frequency, discard the received data of the link corresponding to the first terminal, and the data transmission module 608 is further configured to receive an audio data stream of the second terminal.
In this embodiment, when two terminals both perform audio service, a terminal that performs audio service may seize a bluetooth device, so that audio service data of the terminal that performs audio service cannot be output by using the bluetooth device, and audio service data of the terminal that performs audio service is output by using the bluetooth device. In addition, even if the application data of the first terminal is still transmitted to the bluetooth device through physical connection after switching, the bluetooth device discards the service data sent by the first terminal, so that the sound of the third-party application app in the switching process and after switching cannot be played, the audio service data of the terminal which originally performs the audio service cannot be played, and the user cannot be puzzled by playing the audio service data.
In one embodiment, the first service is a service corresponding to a bluetooth audio protocol, the second service is a service corresponding to a bluetooth call protocol, and the handover connection module 606 is further configured to send a data transmission suspension instruction to the first terminal if the priority of the first service is lower than the priority of the second service, and drop the received data of the link corresponding to the first terminal if the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal. The data transmission module 608 is further configured to create an SCO link with the second terminal, and perform service data transmission with the second terminal through the SCO link.
In this embodiment, when the terminal performing the call service needs to preempt the connection between the terminal performing the audio service and the bluetooth device, the priority of the call service is higher than that of the audio service, so that the preemption of the bluetooth device is successful, and thus the audio service data of the terminal performing the audio service cannot be output by using the bluetooth device, and the call service data of the terminal performing the call service is output by using the bluetooth device. In addition, even if the application data of the first terminal is still transmitted to the bluetooth device through physical connection after switching, the bluetooth device discards the service data sent by the first terminal, so that the sound of the third-party application app in the switching process and after switching cannot be played, the audio service data of the terminal which originally performs the audio service cannot be played, and the user cannot be puzzled by playing the audio service data.
In one embodiment, the first service is a service corresponding to a bluetooth call protocol, the second service is a service corresponding to a bluetooth audio protocol, and the handover connection module 606 is further configured to, if the priority of the first service is higher than the priority of the second service, send a data transmission suspension instruction to the second terminal, reduce the frequency of received data of a link corresponding to the second terminal to a target frequency, and discard the received data of the link corresponding to the second terminal, where the first terminal is a target data transmission terminal and the second terminal is a non-target data transmission terminal. The data transmission module 608 is further configured to continue to perform service data transmission with the first terminal through the original SCO link corresponding to the first terminal.
In this embodiment, when the terminal performing the audio service needs to preempt the connection between the terminal performing the call service and the bluetooth device, since the priority of the call service is higher than that of the audio service, the preemption of the bluetooth device fails, and thus the call service data of the terminal performing the original call service is continuously output by using the bluetooth device. The data transmission pause instruction is sent to the second terminal, the received data frequency of the link corresponding to the second terminal is reduced to the target frequency, the received data of the link corresponding to the second terminal is discarded, the audio service data are prevented from being output from the Bluetooth equipment, even if the applied data of the second terminal are still transmitted to the Bluetooth equipment through physical connection, the Bluetooth equipment can discard the service data sent by the first terminal, and therefore even if a terminal occupies the Bluetooth equipment, the conversation service of the terminal which originally carries out the conversation service cannot be influenced.
In an embodiment, the handover connection module 606 is further configured to disconnect an SCO link with the first terminal when the transmission of the service data corresponding to the first terminal is completed; and restoring the receiving data frequency of the link corresponding to the second terminal to the normal receiving frequency, sending a data re-receiving instruction to the second terminal, and receiving the audio data stream transmitted by the second terminal according to the data re-receiving instruction.
In the embodiment, when the service with the high priority level is finished, the service with the low priority level can be automatically performed, and the data transmission of the link of the service with the low priority level is recovered, so that the intelligent and convenient effects are achieved.
In an embodiment, the handover connection module 606 is further configured to detect a suspension result of the non-target data transmission terminal based on the data transmission suspension instruction, and if the suspension is not detected successfully, decrease the received data frequency of the link corresponding to the non-target data transmission terminal to the target frequency, and discard the received data of the link corresponding to the non-target data transmission terminal.
In this embodiment, whether the received data frequency of the link corresponding to the non-target data transmission terminal is reduced to the target frequency is selected according to whether the suspension is detected to be successful, which is intelligent and convenient.
In one embodiment, the apparatus further comprises:
the playing module 610 is configured to play the service data.
In this embodiment, the bluetooth device may automatically play the service data transmitted by the target data transmission terminal after receiving the service data, so that the service data may be output from the bluetooth device in time.
In an embodiment, the receiving module 604 is further configured to receive a call connection instruction sent by the second terminal when the second service is a service corresponding to a bluetooth call protocol; and when the second service is a service corresponding to the Bluetooth audio protocol, receiving an audio data playing request sent by the second terminal.
In this embodiment, different services correspond to different service data transmission requests, and the bluetooth device performs corresponding responses after recognizing the service data transmission requests corresponding to the different services.
For specific limitations of the apparatus for controlling transmission by a bluetooth device, reference may be made to the above limitations of the method for controlling transmission by a bluetooth device, which are not described herein again. The modules in the device for controlling transmission by the bluetooth equipment can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 10 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 10, the electronic device includes a processor, a memory, and a bluetooth module connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing the method for controlling transmission of bluetooth device provided in the above embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium. The electronic device may be a mobile phone, a TV, etc.
The implementation of each module in the apparatus for controlling transmission by a bluetooth device provided in the embodiments of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules formed by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform steps of a method for a bluetooth device to control transmissions.
A computer program product containing instructions which, when run on a computer, cause the computer to perform a method of bluetooth device control transmission.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (13)

1. A method for controlling transmission of Bluetooth equipment is applied to the Bluetooth equipment and is characterized by comprising the following steps:
establishing physical connection with a first terminal and a second terminal respectively;
when first service data transmission is carried out with a first terminal, receiving a second service data transmission request sent by a second terminal; determining a target data transmission terminal according to the priority of a first service and a second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises reducing the receiving data frequency of a corresponding link to a target frequency or disconnecting a corresponding SCO synchronous connection-oriented link;
and carrying out service data transmission with a target data transmission terminal.
2. The method of claim 1, wherein the determining the target data transmission terminal according to the priority of the first service and the second service comprises:
when the priority of a first service is the same as that of a second service, determining that the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal;
when the priority of a first service is higher than that of a second service, determining that the first terminal is a target data transmission terminal and the second terminal is a non-target data transmission terminal;
and when the priority of the first service is lower than that of the second service, determining that the second terminal is a target data transmission terminal and the first terminal is a non-target data transmission terminal.
3. The method of claim 1, wherein the first service and the second service are services corresponding to a bluetooth communication protocol, the determining a target data transmission terminal according to the priority of the first service and the second service, and the controlling the receiving of the link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal comprises:
if the priority of the first service is the same as that of the second service, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal;
disconnecting the SCO link with the first terminal;
the service data transmission with the target data transmission terminal comprises:
and creating an SCO link with the second terminal, and transmitting service data with the second terminal through the SCO link.
4. The method of claim 1, wherein the first service and the second service are services corresponding to a bluetooth audio protocol, the determining the target data transmission terminal according to the priority of the first service and the second service, and the controlling the link data reception corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal comprises:
if the priority of the first service is the same as that of the second service, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal;
sending a data transmission pause instruction to the first terminal, reducing the frequency of the received data of the link corresponding to the first terminal to a target frequency, and discarding the received data of the link corresponding to the first terminal;
the service data transmission with the target data transmission terminal comprises:
and receiving the audio data stream of the second terminal.
5. The method of claim 1, wherein the first service is a service corresponding to a bluetooth audio protocol, the second service is a service corresponding to a bluetooth call protocol, the determining a target data transmission terminal according to the priority of the first service and the second service, and the controlling the receiving of the link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal comprises:
if the priority of the first service is lower than that of the second service, the second terminal is a target data transmission terminal, and the first terminal is a non-target data transmission terminal;
sending a data transmission pause instruction to the first terminal, reducing the frequency of the received data of the link corresponding to the first terminal to a target frequency, and discarding the received data of the link corresponding to the first terminal;
the service data transmission with the target data transmission terminal comprises:
and creating an SCO link with the second terminal, and transmitting service data with the second terminal through the SCO link.
6. The method of claim 1, wherein the first service is a service corresponding to a bluetooth call protocol, the second service is a service corresponding to a bluetooth audio protocol, the determining a target data transmission terminal according to the priority of the first service and the second service, and the controlling the receiving of the link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal comprises:
if the priority of the first service is higher than that of the second service, the first terminal is a target data transmission terminal, and the second terminal is a non-target data transmission terminal;
sending a data transmission pause instruction to the second terminal, reducing the frequency of the received data of the link corresponding to the second terminal to a target frequency, and discarding the received data of the link corresponding to the second terminal;
the service data transmission with the target data transmission terminal comprises:
and continuously carrying out service data transmission with the first terminal through the original SCO link corresponding to the first terminal.
7. The method of claim 6, further comprising:
when the transmission of the service data corresponding to the first terminal is finished, disconnecting the SCO link with the first terminal;
and restoring the receiving data frequency of the link corresponding to the second terminal to a normal receiving frequency, and receiving the audio data stream transmitted by the second terminal.
8. The method according to any one of claims 4 to 6, further comprising:
and detecting a pause result of the non-target data transmission terminal based on the data transmission pause instruction, if the pause is not successful, reducing the received data frequency of the link corresponding to the non-target data transmission terminal to the target frequency, and discarding the received data of the link corresponding to the non-target data transmission terminal.
9. The method according to any one of claims 1 to 7, wherein after the service data transmission with the target data transmission terminal, further comprising:
and playing the service data.
10. The method according to any of claims 1 to 7, wherein the receiving a second service data transmission request sent by the second terminal comprises:
when the second service is a service corresponding to a Bluetooth call protocol, receiving a call connection instruction sent by the second terminal;
and when the second service is a service corresponding to the Bluetooth audio protocol, receiving an audio data playing request sent by the second terminal.
11. The utility model provides a bluetooth equipment control transmission's device, is applied to bluetooth equipment, its characterized in that includes:
the connection module is used for respectively establishing physical connection with the first terminal and the second terminal;
the receiving module is used for receiving a second service data transmission request sent by the second terminal when the first service data transmission is carried out with the first terminal;
the switching connection module is used for determining a target data transmission terminal according to the priority of the first service and the second service, controlling the receiving of link data corresponding to the non-target data transmission terminal according to the service type corresponding to the non-target data transmission terminal, and keeping the physical connection with the non-target data transmission terminal, wherein the controlling of the receiving of the link data corresponding to the non-target data transmission terminal comprises the step of reducing the receiving data frequency of the corresponding link to the target frequency or disconnecting the corresponding SCO synchronous connection-oriented link;
and the data transmission module is used for carrying out service data transmission with the target data transmission terminal.
12. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 10.
CN202110484400.4A 2021-04-30 2021-04-30 Method and device for controlling transmission of Bluetooth equipment and electronic equipment Pending CN115278615A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110484400.4A CN115278615A (en) 2021-04-30 2021-04-30 Method and device for controlling transmission of Bluetooth equipment and electronic equipment
PCT/CN2022/090543 WO2022228569A1 (en) 2021-04-30 2022-04-29 Method and apparatus for bluetooth device to control transmission and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110484400.4A CN115278615A (en) 2021-04-30 2021-04-30 Method and device for controlling transmission of Bluetooth equipment and electronic equipment

Publications (1)

Publication Number Publication Date
CN115278615A true CN115278615A (en) 2022-11-01

Family

ID=83744687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110484400.4A Pending CN115278615A (en) 2021-04-30 2021-04-30 Method and device for controlling transmission of Bluetooth equipment and electronic equipment

Country Status (2)

Country Link
CN (1) CN115278615A (en)
WO (1) WO2022228569A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117615466A (en) * 2023-01-04 2024-02-27 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal
CN117615466B (en) * 2023-01-04 2024-05-03 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5657771B1 (en) * 2013-12-10 2015-01-21 パナソニックIpマネジメント株式会社 Telephone device and mobile phone linkage method
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
CN113382397B (en) * 2019-04-18 2023-12-08 华为技术有限公司 Bluetooth connection method, device and system
CN110602683B (en) * 2019-09-26 2022-11-22 RealMe重庆移动通信有限公司 Bluetooth control method, device, mobile terminal and storage medium
CN112399396B (en) * 2021-01-19 2021-06-29 深圳市汇顶科技股份有限公司 Bluetooth connection switching method, Bluetooth chip and Bluetooth device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117615466A (en) * 2023-01-04 2024-02-27 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal
CN117615466B (en) * 2023-01-04 2024-05-03 广州星际悦动股份有限公司 Connection control method, device, equipment and medium for oral care equipment and terminal

Also Published As

Publication number Publication date
WO2022228569A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
JP6915079B2 (en) Communication methods and terminals that implement dual card, dual standby, and dual path
US20100048133A1 (en) Audio data flow input/output method and system
CN111818503B (en) Voice communication method, system, chip, electronic equipment and storage medium
US11501779B2 (en) Bluetooth speaker base, method and system for controlling thereof
CN112055349B (en) Wireless communication method and Bluetooth device
CN109151212B (en) Equipment control method and device and electronic equipment
US10827455B1 (en) Method and apparatus for sending a notification to a short-range wireless communication audio output device
US20230325145A1 (en) Audio Control System
WO2023087793A1 (en) Audio service processing method and apparatus, electronic device, and storage medium
CN111556439A (en) Terminal connection control method, terminal and computer storage medium
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN110324913B (en) 5G network communication method, terminal, device, network equipment and functional entity
CN113840269B (en) Multimedia data transmission method and device, electronic equipment and storage medium
CN112995829B (en) Audio processing assembly for wireless communication and signal processing method thereof
CN110337825A (en) Business switch method and device
WO2023045784A1 (en) Call control method and apparatus, and electronic device and computer-readable storage medium
CN115776662A (en) Bluetooth connection method, device, earphone device and computer readable storage medium
CN110337079B (en) 5G network communication method, terminal, network equipment and server
CN103238371B (en) For the method and apparatus being ensured the transmission of critical data by wireless adapter
CN115278615A (en) Method and device for controlling transmission of Bluetooth equipment and electronic equipment
CN112312368A (en) Data processing method, device, equipment and storage medium
CN115696283A (en) Audio control method, electronic device, audio device, and storage medium
CN113271385A (en) Call forwarding method
CN113395576A (en) Scene switching method, computer equipment and storage medium
WO2023109282A1 (en) Incoming call processing method and apparatus, electronic device, and storage medium

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