CN107770759B - Bluetooth voice link establishing method and device, storage medium and mobile terminal - Google Patents

Bluetooth voice link establishing method and device, storage medium and mobile terminal Download PDF

Info

Publication number
CN107770759B
CN107770759B CN201710966835.6A CN201710966835A CN107770759B CN 107770759 B CN107770759 B CN 107770759B CN 201710966835 A CN201710966835 A CN 201710966835A CN 107770759 B CN107770759 B CN 107770759B
Authority
CN
China
Prior art keywords
bluetooth
decoding mode
identification information
bluetooth equipment
voice 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.)
Active
Application number
CN201710966835.6A
Other languages
Chinese (zh)
Other versions
CN107770759A (en
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 CN201710966835.6A priority Critical patent/CN107770759B/en
Publication of CN107770759A publication Critical patent/CN107770759A/en
Application granted granted Critical
Publication of CN107770759B publication Critical patent/CN107770759B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a method and a device for establishing a Bluetooth voice link, a storage medium and a mobile terminal. The method comprises the following steps: when an audio data playing instruction is received, acquiring identification information of the Bluetooth equipment; determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information; and establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode. By adopting the technical scheme, the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is failed to be established and the audio data cannot be output by the Bluetooth equipment can be solved, and the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is effectively ensured.

Description

Bluetooth voice link establishing method and device, storage medium and mobile terminal
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a method, a device, a storage medium and a mobile terminal for establishing a Bluetooth voice link.
Background
With the rapid development of electronic technology and the increasing living standard of people, mobile terminals such as smart phones and tablet computers have become an essential part of the life of people. The mobile terminal can provide not only a voice call function but also a bluetooth function. A series of Bluetooth devices matched with the mobile terminal, such as a Bluetooth headset, a vehicle-mounted Bluetooth device and the like, are produced.
When audio data in the mobile terminal needs to be played through the Bluetooth device, a Bluetooth voice link needs to be established between the mobile terminal and the Bluetooth device.
However, when the mobile terminal establishes the bluetooth voice link with the bluetooth device, the bluetooth voice link is often failed to be established due to the bluetooth device itself, so that the audio data cannot be output by the bluetooth device.
Disclosure of Invention
The embodiment of the application provides a method and a device for establishing a Bluetooth voice link, a storage medium and a mobile terminal, which can achieve the effect of effectively ensuring the successful establishment of the Bluetooth voice link between the mobile terminal and Bluetooth equipment.
In a first aspect, an embodiment of the present application provides a method for establishing a bluetooth voice link, where the method includes:
when an audio data playing instruction is received, acquiring identification information of the Bluetooth equipment;
determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
and establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
In a second aspect, an embodiment of the present application provides an apparatus for establishing a bluetooth voice link, where the apparatus includes:
the identification information acquisition module is used for acquiring the identification information of the Bluetooth equipment when receiving an audio data playing instruction;
the target coding and decoding mode determining module is used for determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
and the Bluetooth voice link establishing module is used for establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for establishing a bluetooth voice link according to the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a mobile terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for establishing a bluetooth voice link according to the first aspect of the embodiment of the present application.
According to the establishment scheme of the Bluetooth voice link provided by the embodiment of the application, when an audio data playing instruction is received, the identification information of the Bluetooth device is obtained, the target coding and decoding mode corresponding to the Bluetooth device is determined according to the identification information, and finally the Bluetooth voice link is established with the Bluetooth device based on the target coding and decoding mode. Because the target coding and decoding mode supported by the Bluetooth equipment can be determined according to the identification information of the Bluetooth equipment, the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is ensured, the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment fails to be established and audio data cannot be output by the Bluetooth equipment can be solved, and the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is effectively ensured.
Drawings
Fig. 1 is a schematic view of an application scenario for establishing a bluetooth voice link according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for establishing a bluetooth voice link according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another method for establishing a bluetooth voice link according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for establishing a bluetooth voice link according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus for establishing a bluetooth voice link according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application.
Detailed Description
The technical scheme of the application is further explained by the specific implementation mode in combination with the attached drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
In order to improve convenience, users often play audio data output by the mobile terminal through a bluetooth device. In order to realize the playing of the audio data output by the mobile terminal by the bluetooth device, the mobile terminal and the bluetooth device need to establish a bluetooth connection and a bluetooth voice link. For example, after the mobile terminal establishes a bluetooth connection with the bluetooth device, if the mobile terminal has a phone call, the call sound of the mobile terminal of the other party can be transmitted to the bluetooth device via bluetooth for playing. Before the conversation sound is transmitted to the Bluetooth equipment through the Bluetooth, the mobile terminal and the Bluetooth equipment need to establish a Bluetooth voice link.
When the mobile terminal and the bluetooth device establish a bluetooth voice link, the Codec modes used by both parties need to be negotiated. Currently, a bluetooth device may support two coding and decoding modes, namely Continuous Variable slope delta Modulation (CVSD) and modified sub-band coding (mSBC). The CVSD is a codec mode that the bluetooth device must support, and the mSBC is an optional codec mode. Because the performance of the mSBC is better than that of the CVSD, when the mobile terminal and the Bluetooth device establish a Bluetooth voice link, the mSBC is used as a default coding and decoding mode, that is, under the default condition, the mobile terminal and the Bluetooth device establish the Bluetooth voice link based on the mSBC coding and decoding mode. However, some bluetooth devices do not support mSBC, which causes failure in establishing a bluetooth voice link between the mobile terminal and the bluetooth device, so that audio data output by the mobile terminal cannot be played by the bluetooth device, thereby seriously affecting the use of the user. For the above reasons, the embodiments of the present application provide the following method for establishing a bluetooth voice link.
Fig. 1 is a schematic view of an application scenario for establishing a bluetooth voice link according to an embodiment of the present application. The mobile terminal is communicated with the Bluetooth device in a Bluetooth mode, the mobile terminal can comprise mobile devices which are provided with Bluetooth functions and can play audio data, such as a mobile phone, a tablet personal computer and the like, and the Bluetooth device can comprise playing devices which are provided with Bluetooth connection functions, such as a Bluetooth earphone, a vehicle-mounted Bluetooth device and the like. When a user needs to play audio data in the mobile terminal through the Bluetooth device, the mobile terminal establishes a Bluetooth voice link with the Bluetooth device based on a target coding and decoding mode. As shown in fig. 1, in this embodiment, a bluetooth headset is taken as an example of a bluetooth device to perform an application scenario description of bluetooth voice link establishment.
Fig. 2 is a flowchart illustrating a method for establishing a bluetooth voice link according to an embodiment of the present application, where the method may be performed by an apparatus for establishing a bluetooth voice link, where the apparatus may be implemented by software and/or hardware, and may be generally integrated in a mobile terminal. As shown in fig. 2, the method includes:
step 201, when an audio data playing instruction is received, acquiring identification information of the bluetooth device.
In this embodiment, the identification information of the bluetooth device may be a bluetooth name of the bluetooth device, or may also be address information of the bluetooth device, or higher-3-bit address information in an address of the bluetooth device. The address of the bluetooth device includes three parts: a Lower Address Part (LAP), an Upper Address Part (UAP) and a meaningless Address Part (Non-significant Address Part, NAP). The NAP and the UAP are unique identifiers of manufacturers of the Bluetooth equipment, and can characterize the uniqueness of the Bluetooth equipment. The upper 3-bit address information in this embodiment refers to the UAP of the bluetooth device.
Optionally, before receiving the audio data playing instruction, the mobile terminal and the bluetooth device have already established a bluetooth connection. When the mobile terminal establishes the bluetooth connection with the bluetooth device, the mobile terminal may initiate a bluetooth connection request to the bluetooth device, or the mobile terminal passively receives the bluetooth connection request initiated by the bluetooth device. In this embodiment, the way for establishing the bluetooth connection between the mobile terminal and the bluetooth device is not specifically limited.
Optionally, before the audio data playing instruction is received, the mobile terminal and the bluetooth device do not establish a bluetooth connection. When an audio data playing instruction is received, the mobile terminal establishes Bluetooth connection with the Bluetooth equipment and acquires identification information of the Bluetooth equipment.
For example, the received audio data playing instruction may be an instruction for the mobile terminal to play music, an instruction for the mobile terminal to play video, an instruction for the mobile terminal to start a voice call, such as a call, or an instruction for playing a WeChat voice. The present embodiment does not limit the form of the audio data.
Step 202, determining a target coding and decoding mode corresponding to the Bluetooth device according to the identification information.
Exemplarily, whether the identification information is matched with preset bluetooth device information is judged; and when the identification information is matched with the preset Bluetooth equipment information, taking the first coding and decoding mode as a target coding and decoding mode. And when the identification information is not matched with the preset Bluetooth equipment information, taking the second coding and decoding mode as a target coding and decoding mode, wherein the priority of the second coding and decoding mode is higher than that of the first coding and decoding mode. And if the preset Bluetooth device information is the high-3-bit address information in the address of the Bluetooth device, the acquired identification information is the high-3-bit address information in the address of the Bluetooth device.
Wherein, judge whether identification information matches with the bluetooth equipment information of presetting, include: acquiring a preset blacklist, wherein the blacklist comprises preset Bluetooth equipment information; and judging whether the identification information is matched with the preset Bluetooth equipment information in the preset blacklist list. And storing preset Bluetooth equipment information, such as high-order 3-bit address information of the Bluetooth equipment, in the mobile terminal in a blacklist form. And when judging whether the identification information is matched with the preset Bluetooth equipment information, matching the identification information with the Bluetooth equipment information in the blacklist one by one to obtain a result of matching the identification information with the preset Bluetooth equipment information. The advantages of such an arrangement are: the matching result of the identification information and the preset Bluetooth information can be simply and quickly obtained.
For example, the blacklist may be used to indicate that the bluetooth device corresponding to the preset bluetooth device information does not support the second codec mode but only the first codec mode. Therefore, when the identification information is judged to be matched with the preset Bluetooth device information in the preset blacklist list, the Bluetooth device corresponding to the identification information is indicated to not support the second coding and decoding mode, and therefore the first coding and decoding mode is directly used as the target coding and decoding mode. When the identification information is judged not to be matched with the preset Bluetooth equipment information in the preset blacklist list, the Bluetooth equipment corresponding to the identification information supports the second coding and decoding mode, and therefore the second coding and decoding mode is directly used as a target coding and decoding mode. The advantages of such an arrangement are: the situation that the establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment fails can be effectively avoided.
Optionally, the blacklist configuration file is obtained from a local storage space of the mobile terminal or a storage device connected to the peripheral interface, where the blacklist configuration file includes preset bluetooth device information. And analyzing preset Bluetooth equipment information from the blacklist configuration file, and searching whether information completely matched with the identification information exists in the preset Bluetooth information. And when the information completely matched with the identification information is found, the identification information is matched with the preset Bluetooth equipment information, otherwise, the identification information is not matched. The advantages of such an arrangement are: the Bluetooth equipment information is stored in the blacklist configuration file, so that the condition that the user carelessly changes the Bluetooth equipment information can be effectively prevented, and the error judgment of the matching result of the identification information and the preset Bluetooth equipment information is prevented.
Optionally, when the target encoding and decoding mode corresponding to the bluetooth device is determined according to the identification information, it may be further determined whether the use frequency of the identification information is greater than a preset threshold, if the use frequency of the identification information is less than the preset frequency threshold, it is indicated that the bluetooth device corresponding to the identification information is not a device frequently used by the user, and further, when the user uses the bluetooth device to play the audio data of the mobile terminal, the playing effect of the audio data is poor, so that the first encoding and decoding mode may be used as the target encoding and decoding mode. If the use frequency of the identification information is greater than or equal to the preset frequency threshold, it is indicated that the bluetooth device corresponding to the identification information is a device frequently used by the user, and further, when the user uses the bluetooth device to play the audio data of the mobile terminal, the playing effect of the audio data is better, so that the second encoding and decoding mode can be used as the target encoding and decoding mode. The priority of the second coding and decoding mode is higher than that of the first coding and decoding mode. Optionally, the first coding and decoding manner may be CVSD, and the second coding and decoding manner may be mSBC. It should be noted that the priority of the second codec mode is higher than that of the first codec mode, that is, when the mobile terminal and the bluetooth device establish a bluetooth voice link based on the second codec mode, the playing effect of the audio data is better than that based on the first codec mode. The present embodiment does not limit the specific encoding and decoding types of the first encoding and decoding manner and the second encoding and decoding manner.
Step 203, establishing a bluetooth voice link with the bluetooth device based on the target encoding and decoding mode.
The mobile terminal sends a request instruction for establishing a Bluetooth voice link based on a target coding and decoding mode to the Bluetooth device, the Bluetooth device sends a feedback instruction for establishing the Bluetooth voice link based on the target coding and decoding mode to the mobile terminal, and when the mobile terminal receives the feedback instruction within preset time, the mobile terminal is determined to establish the Bluetooth voice link with the Bluetooth device based on the target coding and decoding mode. After a Bluetooth voice link is established between the mobile terminal and the Bluetooth equipment, the audio data output by the mobile terminal can be played through the Bluetooth equipment, and the requirement of a user for playing the audio data through the Bluetooth equipment is met. Optionally, when the audio data play stop instruction is received, the mobile terminal disconnects the bluetooth voice link established between the mobile terminal and the bluetooth device, so that power consumption of the mobile terminal can be effectively reduced.
According to the method for establishing the Bluetooth voice link, when an audio data playing instruction is received, identification information of Bluetooth equipment is obtained, a target coding and decoding mode corresponding to the Bluetooth equipment is determined according to the identification information, and finally the Bluetooth voice link is established with the Bluetooth equipment based on the target coding and decoding mode. Because the target coding and decoding mode supported by the Bluetooth equipment can be determined according to the identification information of the Bluetooth equipment, the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is ensured, the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment fails to be established and audio data cannot be output by the Bluetooth equipment can be solved, and the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is effectively ensured.
In some embodiments, the method for establishing a bluetooth voice link may further include: judging whether the Bluetooth equipment is connected for the first time; correspondingly, the establishing of the bluetooth voice link with the bluetooth device based on the target coding and decoding mode includes: and if the Bluetooth device is not the device connected for the first time, establishing a Bluetooth voice link with the Bluetooth device based on the target coding and decoding mode. If the Bluetooth equipment is connected for the first time, when an audio data playing instruction is received, a Bluetooth voice link establishment request is sent to the Bluetooth equipment based on a second coding and decoding mode; detecting whether feedback information sent by the Bluetooth equipment is received within a preset time period or not, wherein the feedback information corresponds to a Bluetooth voice link establishment request; if the feedback information is not received within the preset time period, the Bluetooth voice link is established with the Bluetooth equipment based on the first coding and decoding mode.
When the Bluetooth device is connected with the mobile terminal for the first time, the Bluetooth device information matched with the identification information of the Bluetooth device does not exist in the blacklist, and at the moment, under the condition that the Bluetooth device can support the second coding and decoding mode, if the target coding and decoding mode is determined directly according to the judgment result of whether the identification information is matched with the preset Bluetooth device information, the mobile terminal can only establish a Bluetooth voice link with the Bluetooth device connected for the first time based on the first coding and decoding mode. Therefore, the advantage of the setting is that no matter whether the connection between the Bluetooth device and the mobile terminal is established for the first time, the mobile terminal and the Bluetooth device can establish the Bluetooth voice link preferentially based on the optimal coding and decoding mode while ensuring that the Bluetooth voice link is established between the mobile terminal and the Bluetooth device successfully.
When judging whether the Bluetooth device is the device connected for the first time, the Bluetooth device can be matched with a preset white list by judging whether the identification information of the Bluetooth device is matched with the preset white list. The preset white list is used for recording the identification information of all the Bluetooth devices connected with the mobile terminal. When the identification information of the Bluetooth equipment is matched with a preset white list, the Bluetooth equipment is indicated to be not equipment connected for the first time; and when the identification information of the Bluetooth device is not matched with the preset white list, the Bluetooth device is indicated to be the device connected for the first time.
Illustratively, if it is determined that the bluetooth device is not the first-time connected device, when an audio data playing instruction is received, the identification information of the bluetooth device is obtained, a target coding and decoding mode corresponding to the bluetooth device is determined according to the identification information, and then a bluetooth voice link is established with the bluetooth device based on the target coding and decoding mode. And if the Bluetooth device is judged to be the device connected for the first time, sending a Bluetooth voice link establishment request to the Bluetooth device based on a second coding and decoding mode (such as mSBC) when receiving an audio data playing instruction. If the bluetooth device supports the second codec mode, the feedback information corresponding to the bluetooth voice link establishment request is sent to the mobile terminal within a short time, and therefore, the mobile terminal detects whether the feedback information sent by the bluetooth device is received within a preset time period. If the mobile terminal does not receive the feedback information within the preset time period, which indicates that the bluetooth device does not support the second coding and decoding mode, the mobile terminal switches to establish a bluetooth voice link with the bluetooth device based on the first coding and decoding mode (such as CVSD). And if the mobile terminal receives the feedback information in the preset time period and indicates that the Bluetooth equipment supports the second coding and decoding mode, the mobile terminal establishes a Bluetooth voice link with the Bluetooth equipment based on the second coding and decoding mode.
In some embodiments, after the feedback information is not received within the preset time period, the method may further include: and adding the identification information of the Bluetooth equipment into a preset blacklist. The advantages of such an arrangement are: in the process that a user establishes a Bluetooth voice link with the Bluetooth device by using the mobile terminal, the Bluetooth device which does not support the second coding and decoding mode can be added into the blacklist in time, namely, the preset Bluetooth device information in the blacklist is updated in time. When the Bluetooth device is connected with the mobile terminal again, the mobile terminal can simply and quickly establish a Bluetooth voice link with the Bluetooth device based on the coding and decoding mode supported by the Bluetooth device.
Fig. 3 is a schematic flowchart of another method for establishing a bluetooth voice link according to an embodiment of the present application, where the method includes:
step 301, when receiving an audio data playing instruction, acquiring identification information of the bluetooth device.
Step 302, obtaining a preset blacklist list.
And the blacklist list comprises preset Bluetooth equipment information.
Step 303, determining whether the identification information matches with bluetooth device information preset in the blacklist, if yes, executing step 304, otherwise, executing step 305.
And step 304, taking the first coding and decoding mode as a target coding and decoding mode.
Step 305, the second codec mode is set as the target codec mode.
The priority of the second coding and decoding mode is higher than that of the first coding and decoding mode.
And step 306, establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
According to the establishment method of the Bluetooth voice link, when an audio data playing instruction is received, identification information of Bluetooth equipment is obtained, a blacklist list containing preset Bluetooth equipment information is obtained, whether the identification information is matched with the preset Bluetooth equipment information in the blacklist list or not is judged, when the identification information is matched with the blacklist list, the Bluetooth equipment corresponding to the identification information does not support a second coding and decoding mode, the first coding and decoding mode is directly used as a target coding and decoding mode, and otherwise, the second coding and decoding mode is used as the target coding and decoding mode. And finally, establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode. By judging whether the identification information is matched with the preset Bluetooth equipment information in the blacklist list or not, the matching result of the identification information and the preset Bluetooth information can be simply and quickly obtained. Meanwhile, the target coding and decoding mode supported by the Bluetooth equipment can be determined according to the identification information of the Bluetooth equipment, so that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is successfully established, and the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is failed to be established and audio data cannot be output by the Bluetooth equipment can be solved.
Fig. 4 is a flowchart illustrating another method for establishing a bluetooth voice link according to an embodiment of the present application, where the method includes:
step 401, determining whether the bluetooth device is a device connected for the first time, if so, executing step 407, otherwise, executing step 402.
Step 402, when an audio data playing instruction is received, acquiring identification information of the bluetooth device.
Step 403, determining whether the identification information matches with preset bluetooth device information, if yes, executing step 404, otherwise, executing step 405.
The preset bluetooth device information can be stored in a preset blacklist, and the preset bluetooth device information is obtained by acquiring the preset blacklist. The preset Bluetooth device information can also be stored in a blacklist configuration file, the blacklist configuration file is obtained from a local storage space of the mobile terminal or a storage device connected with an external interface, and the blacklist configuration file is analyzed to obtain the preset Bluetooth device information. The embodiment does not limit the storage form and the acquisition form of the preset bluetooth device information.
And step 404, taking the first coding and decoding mode as a target coding and decoding mode.
And step 405, taking the second coding and decoding mode as a target coding and decoding mode.
The priority of the second coding and decoding mode is higher than that of the first coding and decoding mode.
And step 406, establishing a bluetooth voice link with the bluetooth device based on the target coding and decoding mode.
Step 407, when receiving the audio data playing instruction, sending a bluetooth voice link establishment request to the bluetooth device based on the second encoding and decoding manner.
Step 408, detecting whether feedback information sent by the bluetooth device is received within a preset time period, if so, executing step 410, otherwise, executing step 409.
Wherein the feedback information corresponds to a bluetooth voice link establishment request.
Optionally, after the feedback information is not received within the preset time period, the method may further include: the identification information of the Bluetooth equipment is added into a preset blacklist list, so that the blacklist list can be updated in time according to the actual condition of Bluetooth voice link establishment between the mobile terminal and the Bluetooth equipment.
Step 409, establishing a bluetooth voice link with the bluetooth device based on the first encoding and decoding mode.
And step 410, establishing a Bluetooth voice link with the Bluetooth equipment based on the second coding and decoding mode.
The method for establishing the bluetooth voice link provided in the embodiment of the application judges whether the bluetooth device is a device connected for the first time, if the bluetooth device is not the device connected for the first time, when an audio data playing instruction is received, acquires the identification information of the bluetooth device, acquires a blacklist list containing preset bluetooth device information, judges whether the identification information is matched with the preset bluetooth device information in the blacklist list, and when the identification information is matched with the blacklist list, indicates that the bluetooth device corresponding to the identification information does not support a second coding and decoding mode, directly takes the first coding and decoding mode as a target coding and decoding mode, and otherwise, takes the second coding and decoding mode as the target coding and decoding mode. And finally, establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode. By judging whether the identification information is matched with the preset Bluetooth equipment information in the blacklist list or not, the matching result of the identification information and the preset Bluetooth information can be simply and quickly obtained. If the Bluetooth equipment is judged to be the equipment connected for the first time, when an audio data playing instruction is received, a Bluetooth voice link establishment request is sent to the Bluetooth equipment based on a second coding and decoding mode; detecting whether feedback information sent by the Bluetooth equipment is received within a preset time period or not, wherein the feedback information corresponds to a Bluetooth voice link establishment request; if the feedback information is not received within the preset time period, the Bluetooth voice link is established with the Bluetooth equipment based on the first coding and decoding mode. The method can ensure that the mobile terminal and the Bluetooth equipment establish the Bluetooth voice link preferentially based on the optimal coding and decoding mode while ensuring that the Bluetooth voice link is successfully established between the mobile terminal and the Bluetooth equipment
Fig. 5 is a schematic structural diagram of an apparatus for establishing a bluetooth voice link according to an embodiment of the present disclosure, where the apparatus may be implemented by software and/or hardware, and is generally integrated on a mobile terminal, and may determine a target codec mode by executing a method for establishing a bluetooth voice link, and establish a bluetooth voice link with a bluetooth device based on the target codec mode. As shown in fig. 5, the apparatus includes:
an identification information obtaining module 501, configured to obtain identification information of a bluetooth device when an audio data playing instruction is received;
a target encoding and decoding mode determining module 502, configured to determine a target encoding and decoding mode corresponding to the bluetooth device according to the identification information;
a bluetooth voice link establishing module 503, configured to establish a bluetooth voice link with the bluetooth device based on the target encoding and decoding manner.
According to the Bluetooth voice link establishing device provided by the embodiment of the application, when an audio data playing instruction is received, identification information of Bluetooth equipment is obtained, a target coding and decoding mode corresponding to the Bluetooth equipment is determined according to the identification information, and finally a Bluetooth voice link is established with the Bluetooth equipment based on the target coding and decoding mode. Because the target coding and decoding mode supported by the Bluetooth equipment can be determined according to the identification information of the Bluetooth equipment, the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is ensured, the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment fails to be established and audio data cannot be output by the Bluetooth equipment can be solved, and the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is effectively ensured.
Optionally, the target encoding and decoding mode determining module includes:
the judging unit is used for judging whether the identification information is matched with preset Bluetooth equipment information or not;
and the first target coding and decoding mode determining unit is used for taking the first coding and decoding mode as a target coding and decoding mode when the identification information is matched with the preset Bluetooth equipment information.
Optionally, the determining unit is configured to:
acquiring a preset blacklist, wherein the blacklist comprises the preset Bluetooth equipment information;
and judging whether the identification information is matched with the preset Bluetooth equipment information in the preset blacklist list.
Optionally, the method further includes:
and the first target coding and decoding mode determining unit is used for taking a second coding and decoding mode as a target coding and decoding mode when the identification information is not matched with preset Bluetooth equipment information, wherein the priority of the second coding and decoding mode is higher than that of the first coding and decoding mode.
Optionally, the apparatus further comprises:
the first connection judging module is used for judging whether the Bluetooth equipment is the equipment connected for the first time;
the bluetooth voice link establishing module is configured to:
and if the Bluetooth equipment is not the equipment connected for the first time, establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
Optionally, the apparatus further comprises:
the request sending module is used for sending a Bluetooth voice link establishment request to the Bluetooth equipment based on the second coding and decoding mode when receiving an audio data playing instruction if the Bluetooth equipment is connected for the first time;
a feedback information detection module, configured to detect whether feedback information sent by the bluetooth device is received within a preset time period, where the feedback information corresponds to the bluetooth voice link establishment request;
and the coding and decoding mode conversion module is used for converting to establish a Bluetooth voice link with the Bluetooth equipment based on the first coding and decoding mode if the feedback information is not received within a preset time period.
Optionally, the apparatus further comprises:
and the identification information adding module is used for adding the identification information of the Bluetooth equipment into the preset blacklist after the feedback information is not received in the preset time period.
Optionally, the identification information obtaining module is configured to:
and when an audio data playing instruction is received, establishing Bluetooth connection with the Bluetooth equipment, and acquiring the identification information of the Bluetooth equipment.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, provide for a method of establishing a bluetooth voice link, the method comprising:
when an audio data playing instruction is received, acquiring identification information of the Bluetooth equipment;
determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
and establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDRRAM, SRAM, EDORAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations, such as in different computer systems that are connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in this embodiment of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the establishing operation of the bluetooth voice link described above, and may also perform related operations in the establishing method of the bluetooth voice link provided in any embodiment of the present application.
The embodiment of the application provides a mobile terminal, and the device for establishing the Bluetooth voice link provided by the embodiment of the application can be integrated in the mobile terminal. Fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. As shown in fig. 6, the mobile terminal 600 may include: the bluetooth voice link establishing method includes a memory 601, a processor 602 and a computer program stored on the memory and executable on the processor, where the processor 602 executes the computer program to implement the bluetooth voice link establishing method according to an embodiment of the present application.
According to the mobile terminal provided by the embodiment of the application, when the audio data playing instruction is received, the identification information of the Bluetooth device is obtained, the target coding and decoding mode corresponding to the Bluetooth device is determined according to the identification information, and finally the Bluetooth voice link is established with the Bluetooth device based on the target coding and decoding mode. Because the target coding and decoding mode supported by the Bluetooth equipment can be determined according to the identification information of the Bluetooth equipment, the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is ensured, the technical problems that the Bluetooth voice link between the mobile terminal and the Bluetooth equipment fails to be established and audio data cannot be output by the Bluetooth equipment can be solved, and the successful establishment of the Bluetooth voice link between the mobile terminal and the Bluetooth equipment is effectively ensured.
Fig. 7 is a schematic structural diagram of another mobile terminal provided in an embodiment of the present application, and as shown in fig. 7, the mobile terminal may include: a housing (not shown), a memory 701, a Central Processing Unit (CPU) 702 (also called a processor, hereinafter referred to as CPU), a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU702 and the memory 701 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the mobile terminal; the memory 701 is used for storing executable program codes; the CPU702 executes a computer program corresponding to the executable program code by reading the executable program code stored in the memory 701 to implement the steps of:
when an audio data playing instruction is received, acquiring identification information of the Bluetooth equipment;
determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
and establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
The mobile terminal further includes: peripheral interfaces 703, RF (Radio Frequency) circuitry 705, audio circuitry 706, speakers 711, power management chip 708, input/output (I/O) subsystems 709, other input/control devices 710, touch screen 712, other input/control devices 710, and external port 704, which communicate via one or more communication buses or signal lines 707.
It should be understood that the illustrated mobile terminal 700 is merely one example of a mobile terminal and that the mobile terminal 700 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail a mobile terminal for bluetooth voice link establishment provided in this embodiment, where the mobile terminal is a mobile phone as an example.
A memory 701, the memory 701 being accessible by the CPU702, the peripheral interface 703, and the like, the memory 701 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 703, said peripheral interface 703 may connect input and output peripherals of the device to the CPU702 and the memory 701.
An I/O subsystem 709, which I/O subsystem 709 may connect input and output peripherals on the device, such as a touch screen 712 and other input/control devices 710, to the peripheral interface 703. The I/O subsystem 709 may include a display controller 7091 and one or more input controllers 7092 for controlling other input/control devices 710. Where one or more input controllers 7092 receive electrical signals from or transmit electrical signals to other input/control devices 710, the other input/control devices 710 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is worth noting that the input controller 7092 may be connected to any one of the following: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
A touch screen 712, the touch screen 712 being an input interface and an output interface between the user's mobile terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like.
The display controller 7091 in the I/O subsystem 709 receives electrical signals from the touch screen 712 or transmits electrical signals to the touch screen 712. The touch screen 712 detects a contact on the touch screen, and the display controller 7091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 712, i.e., implements a human-computer interaction, and the user interface object displayed on the touch screen 712 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 705 is mainly used to establish communication between the mobile phone and the wireless network (i.e., network side), and implement data reception and transmission between the mobile phone and the wireless network. Such as sending and receiving short messages, e-mails, etc. In particular, RF circuitry 705 receives and transmits RF signals, also referred to as electromagnetic signals, through which RF circuitry 705 converts electrical signals to or from electromagnetic signals and communicates with communication networks and other devices. RF circuitry 705 may include known circuitry for performing these functions including, but not limited to, an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC (CODEC) chipset, a Subscriber Identity Module (SIM), and so forth.
The audio circuit 706 is mainly used to receive audio data from the peripheral interface 703, convert the audio data into an electric signal, and transmit the electric signal to the speaker 711.
The speaker 711 is used to convert the voice signal received by the handset from the wireless network through the RF circuit 705 into sound and play the sound to the user.
And a power management chip 708 for supplying power and managing power to the hardware connected to the CPU702, the I/O subsystem, and the peripheral interface.
The device for establishing a bluetooth voice link, the storage medium and the mobile terminal provided in the above embodiments may execute the method for establishing a corresponding bluetooth voice link provided in the embodiments of the present application, and have corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in the above embodiments, reference may be made to the method for establishing a bluetooth voice link provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. A method for establishing a Bluetooth voice link, comprising:
when an audio data playing instruction is received, acquiring identification information of the Bluetooth equipment;
determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode;
wherein, the determining the target coding and decoding mode corresponding to the bluetooth device according to the identification information includes:
judging whether the identification information is matched with preset Bluetooth equipment information or not;
when the identification information is matched with preset Bluetooth equipment information, taking a first coding and decoding mode as a target coding and decoding mode;
and when the identification information is not matched with the preset Bluetooth equipment information, taking a second coding and decoding mode as a target coding and decoding mode, wherein the priority of the second coding and decoding mode is higher than that of the first coding and decoding mode.
2. The method of claim 1, wherein the determining whether the identification information matches preset bluetooth device information comprises:
acquiring a preset blacklist, wherein the blacklist comprises the preset Bluetooth equipment information;
and judging whether the identification information is matched with the preset Bluetooth equipment information in the preset blacklist list.
3. The method of claim 2, further comprising:
judging whether the Bluetooth equipment is connected for the first time or not;
the establishing of the Bluetooth voice link with the Bluetooth device based on the target coding and decoding mode comprises the following steps:
and if the Bluetooth equipment is not the equipment connected for the first time, establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode.
4. The method of claim 3, further comprising:
if the Bluetooth equipment is connected for the first time, when an audio data playing instruction is received, a Bluetooth voice link establishment request is sent to the Bluetooth equipment based on the second coding and decoding mode;
detecting whether feedback information sent by the Bluetooth equipment is received within a preset time period or not, wherein the feedback information corresponds to the Bluetooth voice link establishment request;
and if the feedback information is not received within a preset time period, switching to establishing a Bluetooth voice link with the Bluetooth equipment based on a first coding and decoding mode.
5. The method of claim 4, further comprising, after the feedback information is not received within a preset time period:
and adding the identification information of the Bluetooth equipment into the preset blacklist.
6. The method according to any one of claims 1 to 5, wherein the obtaining the identification information of the bluetooth device when receiving the audio data playing instruction comprises:
and when an audio data playing instruction is received, establishing Bluetooth connection with the Bluetooth equipment, and acquiring the identification information of the Bluetooth equipment.
7. An apparatus for establishing a bluetooth voice link, comprising:
the identification information acquisition module is used for acquiring the identification information of the Bluetooth equipment when receiving an audio data playing instruction;
the target coding and decoding mode determining module is used for determining a target coding and decoding mode corresponding to the Bluetooth equipment according to the identification information;
the Bluetooth voice link establishing module is used for establishing a Bluetooth voice link with the Bluetooth equipment based on the target coding and decoding mode;
wherein, the target encoding and decoding mode determining module comprises:
the judging unit is used for judging whether the identification information is matched with preset Bluetooth equipment information or not;
a first target encoding and decoding mode determining unit, configured to use the first encoding and decoding mode as a target encoding and decoding mode when the identification information matches preset bluetooth device information;
and the second target coding and decoding mode determining unit is used for taking the second coding and decoding mode as a target coding and decoding mode when the identification information is not matched with the preset Bluetooth equipment information, wherein the priority of the second coding and decoding mode is higher than that of the first coding and decoding mode.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method for establishing a bluetooth voice link according to any one of claims 1 to 6.
9. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for establishing a bluetooth voice link according to any one of claims 1 to 6 when executing the computer program.
CN201710966835.6A 2017-10-17 2017-10-17 Bluetooth voice link establishing method and device, storage medium and mobile terminal Active CN107770759B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710966835.6A CN107770759B (en) 2017-10-17 2017-10-17 Bluetooth voice link establishing method and device, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710966835.6A CN107770759B (en) 2017-10-17 2017-10-17 Bluetooth voice link establishing method and device, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107770759A CN107770759A (en) 2018-03-06
CN107770759B true CN107770759B (en) 2020-09-29

Family

ID=61269660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710966835.6A Active CN107770759B (en) 2017-10-17 2017-10-17 Bluetooth voice link establishing method and device, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107770759B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108541080B (en) * 2018-04-23 2020-09-22 Oppo广东移动通信有限公司 Method for realizing loop connection between first electronic equipment and second electronic equipment and related product
CN109166578B (en) * 2018-08-14 2021-05-11 Oppo广东移动通信有限公司 Mobile terminal, voice control method and related product
CN110896568A (en) * 2018-09-13 2020-03-20 上海博泰悦臻电子设备制造有限公司 Automatic connection method based on vehicle-mounted Bluetooth and vehicle
CN112073768B (en) * 2019-06-10 2023-03-21 海信视像科技股份有限公司 Bluetooth communication method and display device
CN111199743B (en) * 2020-02-28 2023-08-18 Oppo广东移动通信有限公司 Audio coding format determining method and device, storage medium and electronic equipment
CN111385621B (en) * 2020-03-18 2022-08-02 海信视像科技股份有限公司 Display device and Bluetooth audio transmission method
CN115580851A (en) * 2021-06-21 2023-01-06 Oppo广东移动通信有限公司 Connection isochronous link information feedback method, device, storage medium and electronic equipment
CN113709737B (en) * 2021-08-24 2024-01-26 深圳艾创力科技有限公司 Voice communication method and device based on TWS Bluetooth headset

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
CN102377457A (en) * 2010-08-11 2012-03-14 中兴通讯股份有限公司 Method and device for sharing audio information by mobile communication terminals
CN103167371A (en) * 2013-04-09 2013-06-19 北京兴科迪科技有限公司 Bluetooth headset with record storage function and vehicle with same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8989661B2 (en) * 2005-08-30 2015-03-24 Broadcom Corporation Method and system for optimized architecture for bluetooth streaming audio applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
CN102377457A (en) * 2010-08-11 2012-03-14 中兴通讯股份有限公司 Method and device for sharing audio information by mobile communication terminals
CN103167371A (en) * 2013-04-09 2013-06-19 北京兴科迪科技有限公司 Bluetooth headset with record storage function and vehicle with same

Also Published As

Publication number Publication date
CN107770759A (en) 2018-03-06

Similar Documents

Publication Publication Date Title
CN107770759B (en) Bluetooth voice link establishing method and device, storage medium and mobile terminal
CN107889092B (en) Bluetooth device communication control method, device, terminal device and storage medium
CN107562405B (en) Audio playing control method and device, storage medium and mobile terminal
CN108024128B (en) Control method and device for Bluetooth music playing, terminal equipment and storage medium
CN108347719B (en) Bluetooth device connection method, device, storage medium, mobile terminal and server
CN108681474B (en) Application preloading method and device, storage medium and terminal
CN109495871B (en) Bluetooth connection control method, electronic device and computer readable storage medium
CN107371102B (en) Audio playing volume control method and device, storage medium and mobile terminal
CN108093451B (en) Random access control method, device, storage medium and mobile terminal
KR102043641B1 (en) Operating Method For Nearby Function and Electronic Device supporting the same
CN107831886B (en) Control method and device for associated starting application, storage medium and intelligent terminal
CN107291302B (en) Control method and device of touch screen, storage medium and terminal
CN107885588B (en) Application service control method and device, storage medium and mobile terminal
CN110688051B (en) Screen recording operation method and device, computer readable storage medium and terminal
CN106936516B (en) Display screen display state control method, storage medium and terminal
CN106603870B (en) Control method and device of playing equipment, playing equipment and mobile terminal
WO2019033436A1 (en) Volume adjustment method, device, storage medium and mobile terminal
CN108833033B (en) Method and device for determining radio frequency calibration parameters, storage medium and mobile terminal
CN107707721B (en) Recording method and device of mobile terminal, storage medium and mobile terminal
CN111885591A (en) Network connection method, device, storage medium and terminal
CN106210325B (en) Method, device and terminal for setting incoming call ringtone of social application
CN112367425B (en) Volume adjusting method and device and terminal
CN105635379B (en) Noise suppression method and device
CN108989576B (en) Variable value adjustment method and device, storage medium and mobile terminal
CN110754097B (en) Call control method, device, terminal equipment 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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant