Method, terminal, and computer-readable storage medium for activating an audio device

By obtaining audio application properties and activating the corresponding audio equipment, the problems of low user experience and complex audio equipment switching are solved, and intelligent audio equipment selection and simplified operation are realized.

CN114338900BActive Publication Date: 2025-06-03ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011047831.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2025-06-03
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

Users have a low experience in terminal audio playback, and the operation of switching audio devices is complicated.

Method used

Activate the corresponding audio device by obtaining the attributes of the audio application and obtaining the corresponding audio device ID from the preset audio device switching routing table based on these attributes.

Benefits of technology

It realizes intelligent selection of suitable audio devices for playback according to different playback applications, improves user experience and simplifies the switching operation of audio devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114338900B_ABST
    Figure CN114338900B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, a terminal, and a computer-readable storage medium for activating an audio device. The method includes obtaining the attributes of an audio application; obtaining, according to the attributes, the audio device ID mapped by the attributes from a preset audio device switching routing table; and activating the audio device corresponding to the audio device ID. In certain implementation processes, it has the technical effect of preventing the user from inappropriately switching the audio device and realizing the selection of an audio device for playback according to different playback applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to, but are not limited to, the field of communications. Specifically, embodiments of the present invention relate to, but are not limited to, a method, a terminal, and a computer-readable storage medium for activating an audio device. Background Art

[0002] With the increasing popularity of applications on terminals, it has become a general trend for terminals to be connected to multiple playback devices. Currently, a terminal can be connected to multiple audio playback devices, but only one device is in an active state and outputs audio by default. Moreover, in the face of different audio effects of multiple applications, users need to manually switch the audio device to play audio, and users may not know which audio device is more suitable for which audio, resulting in a low user experience for terminal audio playback and complex operations for switching audio devices. Summary of the Invention

[0003] A method, a terminal, and a computer-readable storage medium for activating an audio device provided by embodiments of the present invention mainly solve the technical problem of low user experience for terminal audio playback and complex operations for switching audio devices.

[0004] To solve the above technical problem, embodiments of the present invention provide a method for activating an audio device, the method including:

[0005] Obtaining attributes of an audio application;

[0006] Obtaining, from a preset audio device switching routing table according to the attributes, an audio device ID mapped by the attributes; the audio device ID mapped by the attributes includes: an audio device ID for audio encoding and decoding corresponding to the attributes;

[0007] Activating an audio device corresponding to the audio device ID.

[0008] Embodiments of the present invention further provide a terminal, the terminal including a first obtaining module, a second obtaining module, and an activation module;

[0009] The first obtaining module is configured to obtain attributes of an audio application;

[0010] The second obtaining module is configured to obtain, from a preset audio device switching routing table according to the attributes, an audio device ID mapped by the attributes; the audio device ID mapped by the attributes includes: an audio device ID for audio encoding and decoding corresponding to the attributes;

[0011] The activation module is configured to activate an audio device corresponding to the audio device ID.

[0012] Embodiments of the present invention further provide a terminal, the terminal including a processor, a memory, and a communication bus;

[0013] The communication bus is used to implement the connection and communication between the processor and the memory;

[0014] The processor is used to execute one or more computer programs stored in the memory to implement the steps of the method for activating an audio device as described above.

[0015] An embodiment of the present invention further provides a computer-readable storage medium, characterized in that the computer-readable storage medium

[0016] stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the method for activating an audio device as described above.

[0017] According to the method, terminal and computer-readable storage medium for activating an audio device provided by the embodiments of the present invention, obtain the attributes of an audio application; obtain the audio device ID mapped by the attributes from a preset audio device switching routing table; the audio device ID mapped by the attributes includes: the audio device ID of the audio device codec corresponding to the attributes; activate the audio device corresponding to the audio device ID. In some implementation processes, technical effects including but not limited to avoiding the user's inability to appropriately switch the audio device and realizing the selection of an audio device for playback according to the attributes of different playback applications can be achieved.

[0018] Other features and corresponding beneficial effects of the present invention are described and explained in the following part of the specification, and it should be understood that at least some of the beneficial effects are obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a basic flowchart of the method for activating an audio device according to Embodiment 1 of the present invention;

[0020] Figure 2 is a detailed flowchart of the method for activating an audio device according to Embodiment 2 of the present invention;

[0021] Figure 3 is a detailed flowchart of the method for activating an audio device according to Embodiment 3 of the present invention;

[0022] Figure 4 is a schematic diagram of the composition of the terminal according to Embodiment 4 of the present invention;

[0023] Figure 5 is a schematic structural diagram of the terminal according to Embodiment 5 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the following further elaborates on the embodiments of the present invention in conjunction with the accompanying drawings through specific implementation manners. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0025] Embodiment 1:

[0026] To solve the technical problems of low user experience in terminal audio playback and complex operation of switching audio devices, the present invention proposes a method for activating an audio device. The following describes this method in conjunction with this embodiment:

[0027] Please refer to Figure 1 , Figure 1 , which is the basic flowchart of the method for activating an audio device according to Embodiment 1 of the present invention. The method includes:

[0028] S101. Obtain the attributes of the audio application.

[0029] In this embodiment, obtaining the attributes of the audio application can be done before the audio application is launched, or simultaneously or after the audio application is launched. For the case where there is only one audio application, the launch of the audio application can include: opening an audio application for the first time or switching the first audio application to the second audio application. For example: opening Tencent Meeting for the first time; switching from NetEase Cloud Music to WeChat Call. The above are only examples and do not limit the specific type of audio application.

[0030] In some embodiments, when there are at least two audio applications, when the audio applications are launched, obtaining the attributes of the audio applications includes: when at least two audio applications are launched successively, obtaining the attributes of at least two audio applications respectively. For example: the user launches QQ Music, Three Kingdoms, Himalayas, etc. successively; or the user launches Tencent Meeting, NetEase Cloud Music, and then jumps from NetEase Cloud Music to WeChat, etc. The above are only examples and do not limit the specific type of audio application, nor the situation where at least two audio applications are launched successively.

[0031] The attributes of the audio application include: the package name of the application and the audio parameters of the application.

[0032] In some instances, obtaining the attributes of the audio application can be done when the audio application is launched.

[0033] In some embodiments, before obtaining the attributes of the audio application, the method may further include:

[0034] If a command to select an audio device ID is received, obtain the audio device ID selected by the command and activate the audio device corresponding to the selected audio device ID. Before activating the audio device corresponding to the selected audio device ID, the attributes of the audio application can be obtained, a mapping relationship between the attributes of the audio application and the selected audio device ID can be established, and the audio device ID mapped by the attributes of the audio application in the preset audio device switching routing table can be updated. The step of updating the routing table can occur not only before activating the audio device corresponding to the selected audio device ID, but also after or simultaneously with the activation of the audio device.

[0035] If a command for a user to select an audio device ID is not received, obtain the attributes of the audio application, and based on the attributes of the audio application, find the audio device ID corresponding to the audio device encoding and decoding in the preset audio device switching routing table and activate it. If a command to select an audio device ID is not received, it can be that a command for the user to select to automatically obtain the audio device ID or to automatically jump to obtain the attributes of the audio application at a preset time is received. The user selection command or voice selection command can be received on the terminal display screen.

[0036] S102. Obtain the audio device ID mapped by the attributes of the audio application from the preset audio device switching routing table.

[0037] Among them, the mapped audio device ID includes: the audio device ID corresponding to the audio device encoding and decoding of the attribute. The audio device ID (identification) can be the serial number or label corresponding to the audio device, etc.

[0038] In some embodiments, the audio device can be a wired-connected audio playback device or a wireless-connected audio playback device. Among them, the wireless-connected audio playback device includes a Bluetooth playback device. The description of the above audio devices is only an example and is not limited to the above audio devices.

[0039] In some embodiments, the preset audio device switching routing table includes: the attributes of the audio application, the encoding and decoding of the audio device, and the audio device ID; among them, the audio device ID can also include: the user-preset audio device ID corresponding to the attributes of the audio application; obtaining the audio device ID mapped by the attributes of the audio application can also include: obtaining the audio device ID mapped by the attribute from the preset audio device switching routing table according to the attributes of the audio application, and selecting the audio device ID according to the preset audio device priority.

[0040] In some embodiments, when there is one audio application, obtaining the audio device ID mapped by the attribute from the preset audio device switching routing table according to the audio application attribute includes: obtaining one or at least two audio device IDs mapped by the attribute from the preset audio device switching routing table according to the audio application attribute;

[0041] When obtaining one audio device ID mapped by the attribute, activate the audio device corresponding to the audio device ID;

[0042] When obtaining at least two audio device IDs mapped by the attribute, obtain a preset number of target audio device IDs from the at least two audio device IDs; activate the audio devices corresponding to the target audio device IDs; the preset number includes: one or at least two. Among them, when obtaining at least two audio device IDs mapped by the audio application attribute and detecting that the terminal supports one audio application to play on at least two audio devices simultaneously, obtain the audio device IDs corresponding to the preset number supported by the terminal according to the preset priority.

[0043] In some embodiments, when there is one audio application, the opening of the audio application includes: opening one audio application for the first time or downloading one audio application for the first time or switching the first audio application to the second audio application. Among them, when switching the first audio application to the second audio application, obtain the attribute of the second audio application;

[0044] In some embodiments, when there are at least two audio applications, obtaining the attributes of the audio applications includes: when at least two audio applications are opened successively, obtain the attributes of the at least two audio applications respectively;

[0045] Among them, when there is no attribute and audio device ID of the terminal audio application in the preset audio device routing table, display an audio device ID selection box on the terminal display screen or give a voice prompt, and obtain the audio device ID according to the user's selection; or compare the attribute of the terminal application that is not available with the attributes in the preset audio device switching routing table, and use the audio device corresponding to the similar attribute as the audio device mapped by the attribute. When the attribute and the similar attribute are detected simultaneously, send a selection prompt for activating the audio device with this attribute to the user, obtain the audio device ID according to the user's prompt, and activate the audio device specified by the user; if the user does not obtain an audio device mapped by a similar attribute in the routing table, obtain the audio device ID of other audio devices except the audio application corresponding to the similar attribute, and activate the device.

[0046] S103. Activate the audio device corresponding to the audio device ID.

[0047] In some embodiments, when there is one audio application and the first audio application switches to the second audio application, the attributes of the second audio application are obtained; activating the audio device mapped by the attributes of the second audio application may include: popping up a selection interface on the terminal display screen, and activating the audio device corresponding to the audio device ID mapped by the attributes of the second audio application according to the selection instruction, or maintaining the connection of the audio device corresponding to the first audio application to the second audio application.

[0048] In some embodiments, when there are at least two audio applications, obtaining the attributes of the audio applications includes: when at least two audio applications are started successively, obtaining the attributes of at least two audio applications respectively; activating the audio device corresponding to the audio device ID includes: detecting whether the terminal supports simultaneous audio output of multiple audio applications, and when it is detected that the terminal supports simultaneous audio output of multiple audio applications, activating different audio devices mapped by the attributes of at least two audio applications respectively. When the attributes of these at least two audio applications map to the same audio device ID, other audio device IDs corresponding to the attributes of at least two audio applications are automatically selected.

[0049] In some embodiments, when there are at least two audio applications, obtaining the attributes of the audio applications includes: when at least two audio applications are downloaded successively, obtaining the attributes of at least two audio applications respectively. It is also possible to obtain the attributes of at least two audio applications respectively after at least two audio applications are downloaded. Regarding how to activate the corresponding audio devices when at least two audio applications are downloaded successively, the activation method when at least two audio device applications are started successively can be referred to; it can also be to activate the audio devices with relevant audio device IDs according to a preset rule. The preset rule is: the first downloaded application obtains the audio device ID first, and the later downloaded audio applications are not eligible to obtain the already obtained audio device IDs.

[0050] When at least two audio applications are started successively, obtaining the attributes of at least two audio applications respectively; activating the audio device corresponding to the audio device ID includes:

[0051] When it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of at least two audio applications, the audio devices are activated in the following manner:

[0052] When it is detected that the same audio device ID is the highest-priority audio device ID among the audio device IDs mapped by the attributes of the fourth audio application, connecting the fourth audio application to the audio device corresponding to the same audio device ID, and connecting the third audio application to other audio devices, where the other audio devices exclude the audio device connected by the fourth audio application;

[0053] When it is detected that the audio device ID of the same audio device is not the audio device ID with the highest priority among the audio device IDs mapped by the fourth audio application attributes, the fourth audio application connects to the audio device corresponding to the audio device ID with the highest priority, and the third audio application maintains the audio device originally connected by the third audio application. When the third audio application maintains the originally connected audio device, it may further include: detecting whether the originally connected audio device is the audio device with the highest priority of the third audio application, and if not, switching to the audio device with the highest priority. Wherein the third audio application is the audio application that is opened first; the fourth audio application is the audio application that is opened later.

[0054] In some embodiments, when it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of at least two audio applications, and the attributes of at least two audio applications are mapped to multiple audio device IDs, exclude the same audio device ID, and connect the respective other audio devices of at least two audio applications that are opened successively to each other.

[0055] In some embodiments, when it is detected that the audio device ID mapped by the attributes of the later-opened audio application is at least two, the audio device ID mapped by the attributes of the earlier-opened audio application is one, and the same audio device ID is the audio device ID with the highest priority among the audio device IDs mapped by the attributes of the successively-opened audio applications, the later-opened audio application may be connected to the audio device corresponding to the audio device ID with the second priority, and the earlier-opened audio application may be connected to the audio device corresponding to the same audio device ID.

[0056] If it is detected that the audio device IDs mapped by the attributes of at least two audio applications are not the same audio device ID, the activation method of each audio application of at least two audio applications may be to obtain the audio device ID and activate the relevant audio device according to the activation method applied when there is one audio application.

[0057] After detecting that the same audio device ID is the audio device ID with the highest priority among the audio device IDs mapped by the fourth audio application attributes, it may further include:

[0058] The attributes of the earlier-opened audio application are mapped to at least one audio device ID, and the audio device ID with the highest priority mapped by the attributes of the earlier-opened audio application is the same as the audio device ID with the highest priority mapped by the attributes of the later-opened audio application; or;

[0059] The attributes of the later-opened audio application are mapped to multiple audio device IDs, the attributes of the earlier-opened audio application are mapped to at least one audio device ID, and the audio device ID with the highest priority mapped by the earlier-opened audio application is the same as the audio device ID with the highest priority mapped by the later-opened audio application; or;

[0060] The application attribute started later maps only one audio device ID. The application attribute started earlier maps at least one audio device ID, and the highest-priority audio device ID of the application started earlier does not conflict with the highest-priority audio device ID of the application started later; or;

[0061] The application attribute started later maps at least two audio device IDs. The application attribute started earlier maps at least one audio device ID, and the highest-priority audio device ID of the application started earlier does not conflict with the highest-priority audio device ID of the application started later.

[0062] In the case where the above-mentioned application attribute started earlier maps multiple, and the audio device ID mapped by the application attribute started later is at least one, regardless of whether the highest-priority audio device ID of the application started earlier conflicts with the highest-priority audio device ID of the application started later, the application started earlier can be connected to the audio device corresponding to the second-priority audio device ID. Here, the second-priority audio device ID is the second-priority audio device ID among the multiple audio device IDs mapped by the application started earlier. The application started earlier can also be connected to other audio devices. Here, the other audio devices may not be the audio devices corresponding to the audio device IDs mapped by the application attribute started earlier. The application started later is connected to the audio device that conflicts with the application started earlier. In the case where the audio device ID mapped by the application attribute started later is at least two, the application started later can also be connected to multiple audio devices at the same time. The number of the connected multiple audio devices can be the number of audio devices supported by the terminal obtained according to the preset priority.

[0063] It is also possible that in the case where the above-mentioned application attribute started earlier maps multiple, and the audio device ID mapped by the application attribute started later is at least one, when the highest-priority audio device ID that the application started earlier should be connected to is the same as the highest-priority audio device ID of the application started later, both the application started earlier and the application started later randomly select non-conflicting audio devices to connect.

[0064] In the case where the above-mentioned application attribute started earlier maps to 1, and the audio device ID mapped by the application attribute started later is also 1, the application started earlier is connected to other audio devices. Here, the other audio devices exclude the audio devices corresponding to the audio device IDs mapped by the application attribute started later. The application started later is connected to the audio device that conflicts with the application started earlier. Among them, connecting the application started earlier to other audio devices may include: randomly selecting other audio devices or obtaining the audio device ID similar to the corresponding one according to the application attribute started earlier, and connecting the application started earlier in this way.

[0065] In the case where the attributes of the previously launched audio application are mapped to one, and the audio device IDs mapped by the attributes of the subsequently launched audio application are multiple, the previously launched audio application connects to other audio devices, where the other audio devices exclude the audio devices corresponding to the audio device IDs mapped by the attributes of the subsequently launched audio application. The subsequently launched audio application connects to the audio devices that conflict with the previously launched audio application. It is also possible that when the audio device IDs mapped by the attributes of the subsequently launched audio application are at least two, the subsequently launched audio application can also connect to multiple audio devices simultaneously, and the number of the multiple connected audio devices can be the number of audio devices supported by the terminal obtained according to a preset priority.

[0066] The method for activating an audio device provided by an embodiment of the present invention includes: obtaining the attributes of an audio application; obtaining the audio devices mapped by the attributes from a preset audio device switching routing table according to the attributes; and activating the audio devices corresponding to the audio device IDs. In some implementation processes, technical effects including but not limited to avoiding the situation where the user cannot switch to a suitable audio device and being able to select an audio device to play audio according to different playback applications can be achieved.

[0067] Embodiment 2:

[0068] The method for activating an audio device of the present invention can avoid the situation where the user cannot switch to a suitable audio device and can select a suitable audio device for playback according to different playback applications. For the sake of easy understanding, the method for activating an audio device of the present invention will be described below in conjunction with an application scenario.

[0069] Figure 2 The following is a detailed flowchart of the method for activating an audio device provided by Embodiment 2 of the present invention. The method for activating an audio device includes:

[0070] S201. The terminal is connected to at least two audio devices.

[0071] In this embodiment, the terminal supports simultaneous output of multiple audio applications, and in this embodiment, the audio devices are playback devices connected to the terminal via Bluetooth.

[0072] S202. When at least two audio applications are launched, a selection interface is displayed on the terminal display screen, and it is detected whether a selection audio device ID instruction is received.

[0073] If a selection audio device ID instruction is received, then S203 is executed; otherwise, S204 is executed. Otherwise includes: receiving an instruction for automatically obtaining audio device attributes selected by the user or not receiving any instruction within a preset time.

[0074] S203. Obtain their respective audio device IDs and activate the relevant audio devices.

[0075] S204. Obtain the attributes of at least two audio applications respectively.

[0076] In this embodiment, the attributes of the audio application include: the package name of the application and the audio parameters of the application. The audio applications in this embodiment include: Tencent Meeting, QQ Music, and Sanguosha. The above descriptions of audio applications are only examples and are not limited to the above audio applications.

[0077] S205. Obtain the audio device ID mapped to the attributes of the audio application from the preset audio device switching routing table according to the attributes of the audio application.

[0078] In this embodiment, the preset audio device switching routing table includes: the attributes of the audio application, the codec of the audio device, and at least two audio device IDs. The audio device ID includes: the audio device ID mapped according to the attributes of the audio application and the codec of the audio device;

[0079] In this embodiment, the codecs of the audio devices include but are not limited to aptx, LDAC, aptx HD, WBS, aptx adaptive, etc. Bluetooth devices that support aptx, LDAC, and aptx HD can be used as a playback device group, mainly used to support the output of music applications; Bluetooth devices that support WBS can be used as a playback device group, mainly used to support the output of phone calls; Bluetooth devices that support aptx adaptive can be used as a playback device group, mainly used to support the output of games.

[0080] The audio device ID in this embodiment is a playback device classified and set according to the Bluetooth audio codec. And the priority is set.

[0081] S206. When it is detected that the audio devices mapped to the attributes of at least two audio applications are the same audio device, connect the later-opened audio application to this audio device.

[0082] For example, when it is detected that the best Bluetooth device A is selected for playing music, and when the game application is opened later, it is found that the best device A for playing games is occupied by the music application. The music application playback can be switched to another best Bluetooth device B other than this, and this device A can be switched to for the game.

[0083] Among them, in this embodiment, when the user opens the music playback application, the application package name is extracted. According to the device switching routing table, the Aptx Bluetooth encoding and sound effects are set for it, and then the device with Aptx sound quality is selected according to the Bluetooth encoding and sound effects, and this device is activated. Then the user opens the game application, sets the aptx adaptive Bluetooth encoding and sound effects for it, and then selects the device within the aptx adaptive sound quality playback group according to the Bluetooth encoding and sound effects, and activates this device.

[0084] The method for activating an audio device provided by an embodiment of the present invention connects the terminal to at least two audio devices. When at least two audio applications are opened, a selection interface is displayed on the terminal display screen, and it is detected whether a selection audio device ID instruction is received; if so, the respective audio device IDs are obtained to activate the relevant audio devices. When the answer is no, the attributes of at least two audio applications are respectively obtained; according to the attributes, the audio device IDs mapped by the attributes are obtained from a preset audio device switching routing table. When it is detected that the audio devices mapped by the attributes of at least two audio applications are the same audio device, the later-opened audio application is connected to this audio device. In some implementation processes, it can be achieved including but not limited to avoiding that the user cannot switch to a suitable audio device, and can realize intelligent selection of a suitable audio device for playing according to different playback applications, improving the user experience.

[0085] Embodiment 3:

[0086] The method for activating an audio device of the present invention can avoid that the user cannot switch to a suitable audio device and can select a suitable audio device for playing according to different playback applications. For the convenience of understanding, the method for activating an audio device of the present invention will be described below in combination with an application scenario.

[0087] Figure 3 It is a detailed flowchart of the method for activating an audio device provided by Embodiment 3 of the present invention. The method for activating an audio device includes:

[0088] In this embodiment, the terminal supports simultaneous output of multiple audio applications and multiple outputs of one audio application. In this embodiment, the audio device is a playback device connected to the terminal via Bluetooth. Such as Bluetooth headsets, projectors, etc.

[0089] S301. When switching from the first audio application to the second audio application, obtain the attributes of the second audio application.

[0090] In this embodiment, the attributes of the audio application include: the package name of the application, the audio parameters of the application, etc. The audio applications in this embodiment include: WeChat, NetEase Cloud Music, and PUBG Mobile. The above description of the audio applications is only an example and is not limited to the above audio applications.

[0091] S302. Obtain one or at least two audio device IDs mapped by the attributes of the second audio application from a preset audio device switching routing table according to the attributes of the second audio application.

[0092] In this embodiment, the preset audio device switching routing table includes: the attributes of the audio application, the codec of the audio device, and at least two audio device IDs. The audio device ID includes: the audio device ID mapped according to the attributes of the audio application and the codec of the audio device; the audio device ID established according to the user's habits and the attributes of the audio application. Obtaining the audio device mapped by the attributes includes: selecting the audio device ID according to the preset audio device priority.

[0093] In this embodiment, the codec of the audio device includes but is not limited to aptx, LDAC, aptx HD, WBS, aptx adaptive, etc. Bluetooth devices that support aptx, LDAC, and aptx HD can be used as a playback device group, mainly used to support the output of music and audio applications; Bluetooth devices that support WBS can be used as a playback device group, mainly used to support the output of phone calls; Bluetooth devices that support aptx adaptive can be used as a playback device group, mainly used to support the output of games.

[0094] The routing table in this embodiment can support the self-learning process, and will save the applications that the user often uses and the corresponding device situations according to the user's usage habits. For example, if the user often uses Bluetooth speaker A to play music and game Bluetooth headset B to play games, when the corresponding application is opened, we will intelligently switch the user to the corresponding device A or B.

[0095] S303. Detect whether the audio device ID mapped by the attribute is not obtained.

[0096] If so, execute S304; otherwise, execute S305.

[0097] S304. Display an audio device ID selection box on the terminal display screen or give a voice prompt, and obtain the audio device ID according to the user's selection.

[0098] S305. Detect whether the number of audio device IDs mapped by the attribute obtained is one.

[0099] If it is one, execute S306; otherwise, execute S307.

[0100] S306. Activate the audio device corresponding to the audio device ID.

[0101] S307. Obtain a preset number of target audio device IDs from at least two audio device IDs according to the preset priority; activate the audio devices corresponding to the target audio device IDs.

[0102] The preset quantity includes: one or at least two. When at least two audio device IDs mapped to the audio application attributes are obtained and it is detected that the terminal supports an audio application to play on at least two audio devices simultaneously, the audio device IDs of the preset number supported by the terminal are obtained according to the preset priority.

[0103] If the user uses device A that supports Aptx encoding when listening to music and then the user answers an incoming call, the system will intelligently switch to device B that supports WBS to play the audio at this time, or a selection box will pop up on the display screen of the terminal for the user to select or confirm whether to switch the audio device to output the call, or switch according to the device that the user is used to. The priority can be set for switching devices according to the user's habit and for switching devices intelligently through parameters and codec. The user's habit can be the highest priority.

[0104] If the terminal device supports multiple applications to play using different Bluetooth devices respectively, when playing music, the best Bluetooth device A is selected for it. When the game application is opened later and it is found that the best device A for playing music is occupied by the game, the music application can be switched to another best Bluetooth device B other than this one, and the game can be switched to device A.

[0105] The method for activating an audio device provided by the embodiment of the present invention, when switching from a first audio application to a second audio application, obtains the attributes of the second audio application, and obtains one or at least two audio device IDs mapped to the attributes of the second audio application from a preset audio device switching routing table. If the audio device IDs mapped to the attributes are not obtained, an audio device ID selection box is displayed on the terminal display screen or a voice prompt is issued, and the audio device ID is obtained according to the user's selection. If the obtained audio device ID mapped to the attributes is one, the one audio device corresponding to the audio device ID is activated. If multiple audio devices mapped to the attributes are obtained, the audio device IDs of the preset number supported by the terminal are obtained according to the preset priority, and the audio device is activated. In some implementation processes, it can be achieved including but not limited to avoiding that the user cannot switch to a suitable audio device, and can intelligently select a suitable audio device for playing according to different playing applications, improving the user experience.

[0106] Embodiment 4

[0107] To solve the technical problems of low user experience in terminal audio playback and complex operation of switching audio devices, the present invention proposes a terminal, which will be described below in conjunction with this embodiment:

[0108] Please refer to Figure 4 , Figure 4Schematic diagram of the composition of the terminal according to the fourth embodiment of the present invention, where the terminal includes a first acquisition module 401, a second acquisition module 402, and an activation module 403;

[0109] The first acquisition module 401 acquires the attributes of the audio application;

[0110] The second acquisition module 402 is configured to acquire the audio device ID mapped by the attribute from a preset audio device switching routing table according to the attribute; the mapped audio device ID includes: the audio device ID of the audio device codec corresponding to the attribute;

[0111] The activation module 403 is configured to activate the audio device corresponding to the audio device ID.

[0112] In this embodiment, the audio device may be a wired-connected audio playback device or a wireless-connected audio playback device. Among them, the wireless-connected audio playback device includes a Bluetooth playback device. The description of the above audio devices is only an example and is not limited to the above audio devices.

[0113] In this embodiment, when there is one audio application, the opening of the audio application may include: opening an audio application for the first time, downloading an audio application for the first time, or switching the first audio application to the second audio application. For example: opening Tencent Meeting for the first time; switching from NetEase Cloud Music to WeChat Call. The above is only an example and does not limit the specific type of audio application.

[0114] In some embodiments, when there are at least two audio applications, when the audio applications are opened, acquiring the attributes of the audio applications includes: when at least two audio applications are opened successively, respectively acquiring the attributes of the at least two audio applications. For example: the user successively opens QQ Music, Three Kingdoms, Himalayas, etc.; or the user opens Tencent Meeting, NetEase Cloud Music, and then jumps from NetEase Cloud Music to WeChat, etc. The above is only an example and does not limit the specific type of audio application, nor does it limit the situation where at least two audio applications are opened successively.

[0115] Among them, the attributes of the audio application include: the package name of the application and the audio parameters of the application.

[0116] In some instances, acquiring the attributes of the audio application may be acquiring the attributes of the audio application when the audio application is opened.

[0117] In some embodiments, before acquiring the attributes of the audio application, it may further include:

[0118] If an instruction to select an audio device ID is received, obtain the audio device ID selected by the instruction and activate the audio device corresponding to the selected audio device ID. Before activating the audio device corresponding to the selected audio device ID, the audio application attributes may be obtained, a mapping relationship between the attributes of the audio application and the selected audio device ID may be established, and the audio device ID mapped by the audio application attributes in the preset audio device switching routing table may be updated. The step of updating the routing table may occur not only before activating the audio device corresponding to the selected audio device ID, but also after or simultaneously with the activation of the audio device.

[0119] If an instruction for the user to select an audio device ID is not received, obtain the attributes of the audio application, and based on the attributes of the audio application, find the audio device ID corresponding to the audio device codec from the preset audio device switching routing table and activate it. If an instruction to select an audio device ID is not received, it may be that an instruction for the user to select to automatically obtain the audio device ID or an automatic jump to obtain the attributes of the audio application occurs at a preset time. The user selection instruction or voice selection instruction may be received on the terminal display screen. Among them, the mapped audio device ID includes: the audio device ID corresponding to the audio device codec corresponding to the attribute. The audio device ID (identification, identity identification number) may be the serial number or label corresponding to the audio device, etc.

[0120] In some embodiments, the audio device may be a wired-connected audio playback device or a wireless-connected audio playback device. The wireless-connected audio playback device includes a Bluetooth playback device. The description of the above audio devices is only an example and is not limited to the above audio devices.

[0121] In some embodiments, the preset audio device switching routing table includes: the attributes of the audio application, the codec of the audio device, and the audio device ID; the audio device ID may further include: the user-preferred audio device ID corresponding to the audio application attributes; obtaining the audio device ID mapped by the audio application attributes may further include: obtaining the audio device ID mapped by the attribute from the preset audio device switching routing table according to the audio application attributes, and selecting the audio device ID according to the preset audio device priority.

[0122] In some embodiments, when there is one audio application, obtaining the audio device ID mapped by the audio application attributes from the preset audio device switching routing table includes: obtaining one or at least two audio device IDs mapped by the attribute from the preset audio device switching routing table according to the audio application attributes;

[0123] When one audio device ID mapped by the attribute is obtained, activate the audio device corresponding to the audio device ID;

[0124] When at least two audio device IDs of the attribute mapping are obtained, a preset number of target audio device IDs are obtained from the at least two audio device IDs; the audio devices corresponding to the target audio device IDs are activated; the preset number includes: 1 or at least two. Among them, when at least two audio device IDs of the audio application attribute mapping are obtained and it is detected that the terminal supports an audio application to play on at least two audio devices simultaneously, the audio device IDs of the preset number supported by the terminal are obtained according to the preset priority.

[0125] In some embodiments, when there is 1 audio application, when the audio application is opened, it includes: opening 1 audio application for the first time or switching the first audio application to the second audio application. Among them, when the first audio application is switched to the second audio application, the attributes of the second audio application are obtained; activating the audio devices mapped by the attributes of the second audio application may include: popping up a selection interface on the terminal display screen, activating the audio devices corresponding to the audio device IDs mapped by the attributes of the second audio application according to the selection instruction, or keeping the audio devices corresponding to the first audio application connected to the second audio application.

[0126] In some embodiments, when there are at least two audio applications, obtaining the attributes of the audio applications includes: when at least two audio applications are opened successively, obtaining the attributes of at least two audio applications respectively; activating the audio devices corresponding to the audio device IDs includes: detecting whether the terminal supports the simultaneous output of audio of multiple audio applications. When it is detected that the terminal supports the simultaneous output of audio of multiple audio applications, different audio devices mapped by the attributes of at least two audio applications are activated respectively. When the at least two audio applications are mapped to the same audio device ID, other audio device IDs corresponding to the attributes of at least two audio applications are automatically selected.

[0127] In some embodiments, when there are at least two audio applications, obtaining the attributes of the audio applications may also include: when at least two audio applications are downloaded successively, obtaining the attributes of at least two audio applications respectively. It is also possible to obtain the attributes of at least two audio applications respectively after at least two audio applications are downloaded. Regarding how to activate the corresponding audio devices when at least two audio applications are downloaded successively, the activation method when at least two audio device applications are opened successively can be referred to; it can also be to activate the audio devices of relevant audio device IDs according to a preset rule. The preset rule is: the audio application downloaded first obtains the audio device ID first, and the audio applications downloaded later are not eligible to obtain the audio device IDs that have already been obtained.

[0128] When at least two audio applications are opened successively, obtain the attributes of at least two audio applications respectively; activating the audio devices corresponding to the audio device IDs includes:

[0129] When the same audio device ID exists in the audio device IDs mapped by the attributes of at least two audio applications, the audio device is activated in the following manner:

[0130] When it is detected that the same audio device ID is the highest-priority audio device ID among the audio device IDs mapped by the attributes of the fourth audio application, connect the fourth audio application to the audio device corresponding to the same audio device ID, and connect the third audio application to other audio devices, where the other audio devices exclude the audio device connected by the fourth audio application;

[0131] When it is detected that the same audio device ID is not the highest-priority audio device ID among the audio device IDs mapped by the attributes of the fourth audio application, connect the fourth audio application to the audio device corresponding to the highest-priority audio device ID, and the third audio application maintains the audio device originally connected. When the third audio application maintains the originally connected audio device, it may further include: detecting whether the originally connected audio device is the highest-priority audio device of the third audio application, and if not, switching to the highest-priority audio device. Here, the third audio application is the audio application that is opened first; the fourth audio application is the audio application that is opened later.

[0132] In some embodiments, when the same audio device ID exists in the audio device IDs mapped by the attributes of at least two audio applications, and the attributes of at least two audio applications are both mapped to multiple audio device IDs, exclude the same audio device ID, and connect each of the at least two audio applications opened successively to their respective other audio devices.

[0133] If it is detected that the audio device IDs mapped by the attributes of at least two audio applications are not the same audio device ID, the activation method for each audio application of the at least two audio applications may be to obtain the audio device ID and activate the relevant audio device according to the activation method when there is 1 audio application.

[0134] After it is detected that the same audio device ID is the highest-priority audio device ID among the audio device IDs mapped by the attributes of the fourth audio application, it may further include:

[0135] The attributes of the audio application opened first are mapped to at least 1 audio device ID, and the highest-priority audio device ID mapped by the attributes of the audio application opened first is the same as the highest-priority audio device ID mapped by the attributes of the audio application opened later; or;

[0136] The attributes of the audio application opened later are mapped to multiple audio device IDs, the attributes of the audio application opened first are mapped to at least 1 audio device ID, and the highest-priority audio device ID mapped by the audio application opened first is the same as the highest-priority audio device ID mapped by the audio application opened later; or;

[0137] The application property started later maps only one audio device ID. The application property started earlier maps at least one audio device ID, and the highest-priority audio device ID of the application started earlier does not conflict with the highest-priority audio device ID of the application started later; or;

[0138] The application property started later maps at least two audio device IDs. The application property started earlier maps at least one audio device ID, and the highest-priority audio device ID of the application started earlier does not conflict with the highest-priority audio device ID of the application started later.

[0139] In the above case where the application property of the audio application started earlier maps multiple, and the audio device ID mapped by the application property of the audio application started later is at least one, regardless of whether the highest-priority audio device ID of the application started earlier conflicts with the highest-priority audio device ID of the application started later, the audio application started earlier can be connected to the audio device corresponding to the second-priority audio device ID. Here, the second-priority audio device ID is the second-priority audio device ID among the multiple audio device IDs mapped by the audio application started earlier. The audio application started earlier can also be connected to other audio devices. Here, the other audio devices may not be the audio devices corresponding to the audio device IDs mapped by the application property of the audio application started earlier. The audio application started later is connected to the audio device that conflicts with the audio application started earlier. In the case where the audio device ID mapped by the application property of the audio application started later is at least two, the audio application started later can also be connected to multiple audio devices at the same time. The number of the connected multiple audio devices can be the number of audio devices supported by the terminal obtained according to the preset priority.

[0140] It is also possible that in the above case where the application property of the audio application started earlier maps multiple, and the audio device ID mapped by the application property of the audio application started later is at least one, when the highest-priority audio device ID that the application started earlier should be connected to is the same as the highest-priority audio device ID of the application started later, the applications started earlier and later both randomly select non-conflicting audio devices to connect.

[0141] In the above case where the application property of the audio application started earlier maps to 1, and the audio device ID mapped by the application property of the audio application started later is also 1, the audio application started earlier is connected to other audio devices. Here, the other audio devices exclude the audio device corresponding to the audio device ID mapped by the application property of the audio application started later. The audio application started later is connected to the audio device that conflicts with the audio application started earlier. Among them, connecting the audio application started earlier to other audio devices may include: randomly selecting other audio devices or obtaining the audio device ID similar to the corresponding one according to the application property of the audio application started earlier, and connecting the audio application started earlier in this way.

[0142] The terminal provided by the embodiment of the present invention obtains the attributes of an audio application; obtains the audio device mapped by the attributes from a preset audio device switching routing table; and activates the audio device corresponding to the audio device ID. In some implementation processes, technical effects including but not limited to avoiding the user being unable to switch to a suitable audio device and enabling selection of a suitable audio device for playing according to different playback applications can be achieved.

[0143] Embodiment 5:

[0144] This embodiment also provides a terminal. As shown in Figure 5 Figure, it includes a processor 501, a memory 502, and a communication bus 503, where:

[0145] The communication bus 503 is used to implement connection communication between the processor 501 and the memory 502;

[0146] The processor 501 is used to execute one or more computer programs stored in the memory 502 to implement at least one step in the method for activating an audio device in any one of Embodiments 1 to 3 above.

[0147] This embodiment also provides a computer-readable storage medium, which includes a volatile or non-volatile, removable or non-removable medium implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). The computer-readable storage medium includes but is not limited to RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory, or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), digital versatile disc (DVD), or other optical disc storage, magnetic cassette, tape, magnetic disk storage, or any other medium that can be used to store the desired information and can be accessed by a computer.

[0148] The computer-readable storage medium in this embodiment can be used to store one or more computer programs, and the one or more computer programs stored therein can be executed by a processor to implement at least one step in the method for activating an audio device in any one of Embodiments 1 to 3 above.

[0149] It can be seen that those skilled in the art should understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software (which can be realized by computer program codes executable by a computing device), firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.

[0150] In addition, as is well known to those of ordinary skill in the art, a communication medium generally includes computer-readable instructions, data structures, computer program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanisms, and can include any information delivery medium. Therefore, the present invention is not limited to any specific combination of hardware and software.

[0151] The above content is a further detailed description of the embodiments of the present invention in combination with specific implementation manners. It cannot be determined that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention belongs, without departing from the concept of the present invention, several simple deductions or substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.

Claims

1. A method for activating an audio device, the method comprises: Obtaining the attributes of an audio application. When at least two of the audio applications are successively started, the obtained attributes include the attributes of at least two of the audio applications. The at least two audio applications include a third audio application and a fourth audio application. The third audio application is the audio application that is started first, and the fourth audio application is the audio application that is started later; Obtaining, from a preset audio device switching routing table according to the attributes, the audio device ID mapped by the attributes. The audio device ID mapped by the attributes includes: the audio device ID of the audio device codec corresponding to the attributes; When it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of at least two of the audio applications, and the same audio device ID is the audio device ID with the highest priority among the audio device IDs mapped by the attributes of the fourth audio application, activate the audio device in the following manner: connect the fourth audio application to the audio device corresponding to the same audio device ID, connect the third audio application to other audio devices, and the other audio devices exclude the audio device connected by the fourth audio application; When it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of the at least two audio applications, and the same audio device ID is not the audio device ID with the highest priority among the audio device IDs mapped by the attributes of the fourth audio application, activate the audio device in the following manner: connect the fourth audio application to the audio device corresponding to the audio device ID with the highest priority, and the third audio application maintains the audio device originally connected by the third audio application.

2. The method for activating an audio device according to claim 1, wherein, before obtaining the attributes of the audio application, it further comprises: When receiving an instruction to select an audio device ID, obtaining the selected audio device ID and activating the audio device corresponding to the selected audio device ID; When not receiving the instruction to select an audio device ID, obtaining the attributes of the audio application.

3. The method for activating an audio device according to claim 2, wherein, before activating the audio device corresponding to the selected audio device ID, it further comprises: Obtaining the attributes of the audio application, establishing a mapping relationship between the attributes of the audio application and the selected audio device ID, and updating the preset audio device switching routing table.

4. The method for activating an audio device according to any one of claims 1-3, wherein, when there is 1 audio application, the obtaining, from a preset audio device switching routing table according to the attributes, the audio device ID mapped by the attributes includes: obtaining, from a preset audio device switching routing table according to the attributes, one or at least two audio device IDs mapped by the attributes; the method further comprises: when obtaining one audio device ID mapped by the attributes, activating the audio device corresponding to the audio device ID; When at least two audio device IDs of the attribute mapping are obtained, obtain a preset number of audio device IDs from the at least two audio device IDs according to a preset priority; activate the audio devices corresponding to the audio device IDs; the preset number includes: 1 or at least two.

5. The method for activating an audio device according to any one of claims 1-2, wherein, obtaining the attributes of the audio application includes: when switching from a first audio application to a second audio application, obtaining the attributes of the second audio application; After obtaining the audio device ID of the attribute mapping from the preset audio device switching routing table according to the attribute, the method further includes: obtaining the audio device ID of the attribute mapping of the second audio application, and activating the audio device corresponding to the audio device ID; or switching the audio device connected to the first audio application to the second audio application.

6. The method for activating an audio device according to claim 1, wherein, the method further includes: When it is detected that there is no same audio device ID among the audio device IDs of the attribute mapping of the at least two audio applications, the activation method of each audio application of the at least two audio applications is the method for activating the audio device corresponding to the audio device ID in claim 4.

7. A method for activating an audio device, wherein, the method includes: Obtain the attributes of the audio application, wherein when at least two of the audio applications are started successively, the obtained attributes include the attributes of at least two audio applications started successively; Obtain the audio device ID of the attribute mapping from the preset audio device switching routing table according to the attribute; the audio device ID of the attribute mapping includes: the audio device ID of the audio device codec corresponding to the attribute; When it is detected that the audio device IDs of the attribute mapping of the later-started audio application are at least two, the audio device ID of the attribute mapping of the earlier-started audio application is one, and the highest-priority audio device ID among the audio device IDs of the attribute mapping of the successively-started audio applications is the same audio device ID, connect the later-started audio application to the audio device corresponding to the second-priority audio device ID, and connect the earlier-started audio application to the audio device corresponding to the same audio device ID.

8. The method for activating an audio device according to claim 7, wherein, Before obtaining the attributes of the audio application, it further includes: When receiving an instruction to select an audio device ID, obtain the selected audio device ID and activate the audio device corresponding to the selected audio device ID; When the instruction to select the audio device ID is not received, obtain the attributes of the audio application.

9. The method for activating an audio device according to claim 8, wherein, Before activating the audio device corresponding to the selected audio device ID, it further includes: Obtain the attributes of the audio application, establish a mapping relationship between the attributes of the audio application and the selected audio device ID, and update the preset audio device switching routing table.

10. The method for activating an audio device according to any one of claims 7-9, characterized in that, when there is 1 audio application, the obtaining of the audio device ID mapped by the attribute from the preset audio device switching routing table according to the attribute includes: obtaining one or at least two audio device IDs mapped by the attribute from the preset audio device switching routing table according to the attribute; the method further includes: when obtaining one audio device ID mapped by the attribute, activating the audio device corresponding to the audio device ID; when obtaining at least two audio device IDs mapped by the attribute, obtaining a preset number of audio device IDs from the at least two audio device IDs according to a preset priority; activating the audio device corresponding to the audio device ID; the preset number includes: 1 or at least two.

11. The method for activating an audio device according to any one of claims 7-8, characterized in that, the obtaining of the attribute of the audio application includes: when switching from a first audio application to a second audio application, obtaining the attribute of the second audio application; after obtaining the audio device ID mapped by the attribute from the preset audio device switching routing table according to the attribute, the method further includes: obtaining the audio device ID mapped by the attribute of the second audio application, and activating the audio device corresponding to the audio device ID; or switching the audio device connection corresponding to the first audio application to be activated to the second audio application.

12. A terminal, the terminal includes a first obtaining module, a second obtaining module and an activation module; the first obtaining module is configured to obtain the attribute of the audio application, wherein, when at least two of the audio applications are started successively, the obtained attribute includes the attributes of at least two of the audio applications, the at least two audio applications include a third audio application and a fourth audio application, the third audio application is the audio application started first, and the fourth audio application is the audio application started later; the second obtaining module is configured to obtain the audio device ID mapped by the attribute from the preset audio device switching routing table; the audio device mapped by the attribute includes: the audio device ID for audio device codec corresponding to the attribute; The activation module is configured to activate the audio device in the following manner when it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of the at least two audio applications, and the same audio device ID is the audio device ID with the highest priority among the audio device IDs mapped by the attributes of the fourth audio application: connect the fourth audio application to the audio device corresponding to the same audio device ID, connect the third audio application to other audio devices, and the other audio devices exclude the audio device connected by the fourth audio application; when it is detected that there is the same audio device ID among the audio device IDs mapped by the attributes of the at least two audio applications, and the same audio device ID is not the audio device ID with the highest priority among the audio device IDs mapped by the attributes of the fourth audio application, activate the audio device in the following manner: connect the fourth audio application to the audio device corresponding to the audio device ID with the highest priority, and the third audio application maintains the audio device originally connected by the third audio application.

13. A terminal, the terminal includes a processor, a memory and a communication bus; The communication bus is used to realize the connection communication between the processor and the memory; The processor is configured to execute one or more computer programs stored in the memory to implement the steps of the method for activating an audio device as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the method for activating an audio device as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Audio playing method and device, storage medium and communication terminal

    CN109857364A

  • Method and device for playing audio data

    CN110764730A

  • Method and apparatus to process audio signal

    US20120054613A1