Audio processing method and device, electronic equipment and storage medium

By automatically adjusting the audio mode and establishing a connection by monitoring audio events, the problem of audio mode adjustment in wireless headphone switching scenarios between multiple devices is solved, and the intelligence and user experience is improved.

CN119907139AActive Publication Date: 2025-04-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Application Number
CN202311403307.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-26
Publication Date
2025-04-29
Estimated Expiration
2043-10-26

AI Technical Summary

Technical Problem

In the wireless headphone switching scenario between multiple devices, how to automatically adjust the audio mode of each device, reduce user operations, and improve the intelligence of audio switching.

Method used

By monitoring the audio event, it is determined whether there is a target audio playback device to be connected, and the audio mode of the first terminal device is automatically set and adjusted according to the audio event, a connection with the target audio playback device is established, and the connection with the second terminal device is disconnected, and the audio mode is adjusted to meet the needs of different scenarios.

Benefits of technology

It realizes automatic adjustment of audio mode between multiple devices, reduces user manual operations, and improves the intelligence and user experience of audio switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119907139A_ABST
    Figure CN119907139A_ABST
Patent Text Reader

Abstract

The invention provides an audio processing method and device, electronic equipment and a storage medium, and the method comprises the steps: setting a first audio mode of first terminal equipment according to a monitored audio event in response to determining that to-be-connected target audio playing equipment exists and the target audio playing equipment is connected with second terminal equipment, the method comprises the following steps: establishing a connection with a target audio playing device, enabling the connection between the target audio playing device and a second terminal device to be in a disconnected state, and adjusting a first audio mode of the first terminal device to a second audio mode when the second terminal device and the first terminal device have the same account information, the audio mode of the first terminal equipment is automatically set and adjusted according to the monitored audio event under the condition that the target audio playing equipment capable of carrying out audio switching is connected, so that the audio playing requirements in various scenes are met, and the intelligence and the experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio processing technology, and in particular to an audio processing method, device, electronic device and storage medium. Background Art

[0002] For multiple devices supporting the same account, the same wireless headset can be connected, so that the wireless headset can switch between multiple terminal devices supporting the same account. However, in the scenario where the wireless headset switches between multiple devices, how to adjust the audio mode of each device to reduce user operations and improve the intelligence of audio switching is a technical problem that urgently needs to be solved. Summary of the invention

[0003] The present application aims to solve one of the technical problems in the related art at least to some extent.

[0004] To this end, the present application proposes an audio processing method, device, electronic device and storage medium. When it is determined that there is a target audio playback device that can perform audio switching, the audio mode of the device is automatically set and adjusted according to the monitored audio events, thereby reducing the user's manual operations and improving intelligence and user experience.

[0005] In one aspect, an embodiment of the present application provides an audio processing method, which is applied to a first terminal device, including:

[0006] In response to monitoring an audio event, determining whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device;

[0007] In response to the existence of a target audio playback device to be connected, setting a first audio mode corresponding to the first terminal device according to the monitored audio event;

[0008] Establishing a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device;

[0009] The first audio mode of the first terminal device is adjusted to a second audio state, and the audio of the target audio event is sent to the target audio playback device.

[0010] In one aspect, an embodiment of the present application provides an audio processing method, which is applied to a second terminal device, including:

[0011] In response to monitoring the first information broadcast by the first terminal device, determining whether the currently played audio is in a playing state; wherein the first information is used to indicate that a target audio playback device connected to the second terminal device is connected to the first terminal device, and the second terminal device has the same account information as the first terminal device; wherein the first information is broadcast by the first terminal device in response to monitoring an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event, suggesting a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;

[0012] In response to the currently playing audio being in the earpiece playing mode, controlling the second terminal device to switch from the earpiece playing mode to the silent playing mode.

[0013] Another aspect of the present application provides an audio mode processing device, which is applied to a first terminal device, including:

[0014] a determination module, configured to determine, in response to monitoring an audio event, whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device;

[0015] A setting module, configured to, in response to the existence of a target audio playback device to be connected, set a first audio mode corresponding to the first terminal device according to the monitored audio event;

[0016] an establishing module, used to establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device;

[0017] The adjustment module is used to adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.

[0018] Another aspect of the present application provides an audio processing device, which is applied to a second terminal device, including:

[0019] A determination module, configured to determine whether the currently played audio is in a playing state in response to monitoring the first information broadcast by the first terminal device; wherein the first information is used to indicate that a target audio playback device connected to the second terminal device is connected to the first terminal device, and the second terminal device has the same account information as the first terminal device; wherein the first information is broadcast by the first terminal device in response to monitoring an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event, suggesting a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;

[0020] The adjustment module is used to control the second terminal device to switch from the earpiece playback mode to the silent playback mode in response to the currently played audio being in the earpiece playback mode.

[0021] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect or the second aspect is implemented.

[0022] Another aspect of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in the first aspect or the method described in the second aspect is implemented.

[0023] Another aspect of the present application provides a computer program product on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0024] The audio processing method, device, electronic device and storage medium proposed in the present application determine whether there is a target audio playback device to be connected in response to monitoring an audio event, wherein the target audio playback device is connected to a second terminal device, and the second terminal device has the same account information as the first terminal device. In response to determining that there is a target audio playback device to be connected, according to the monitored audio event, a first audio mode of the first terminal device is set, a connection is established with the target audio playback device, and the connection between the target audio playback device and the second terminal device is disconnected, the first audio mode of the first terminal device is adjusted to the second audio mode, and the audio of the target audio event is sent to the target audio playback device. When it is determined that there is a target audio playback device that can perform audio switching, the target audio playback device is connected, and the audio mode of the first terminal device is automatically set and adjusted according to the monitored audio event to meet the user's audio playback needs in various scenarios and improve intelligence and user experience.

[0025] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0027] Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application;

[0028] Figure 2 A flowchart of another audio processing method provided in an embodiment of the present application;

[0029] Figure 3 A flowchart of another audio processing method provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of an interactive method for audio processing provided in an embodiment of the present application;

[0031] Figure 5 A schematic diagram of an interactive scenario of audio processing provided in an embodiment of the present application;

[0032] Figure 6 A schematic diagram of the structure of an audio processing device provided in an embodiment of the present application;

[0033] Figure 7 A schematic diagram of the structure of another audio processing device provided in an embodiment of the present application;

[0034] Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0036] The following describes the audio processing method, device, electronic device and storage medium of the embodiments of the present application with reference to the accompanying drawings.

[0037] Figure 1 A flowchart of an audio processing method provided in an embodiment of the present application.

[0038] The executor of the audio processing method in the embodiment of the present application is an audio processing device, which can be set in a first terminal device. The first terminal device can be a smart phone, a smart watch, a Pad, etc., which is not limited in this embodiment.

[0039] like Figure 1 As shown, the method may include the following steps:

[0040] Step 101: In response to monitoring an audio event, determining whether there is a target audio playback device to be connected.

[0041] The target audio playback device has established a connection with the second terminal device, and the second terminal device has the same account information as the first terminal device.

[0042] Among them, the first terminal device and the second terminal device have the same account signal, and the account information is the account information for logging into the service platform, that is, the first terminal device and the second terminal device can use the same account to log into the service platform, such as the cloud service platform, to obtain the corresponding service. As an example, taking a certain Apple device as an example, a certain Apple mobile phone and Pad have the same account A*ID, which is the login account for cloud storage. Multiple devices with the same account information can be connected to the same audio playback device, wherein the audio playback device is, for example, a Bluetooth headset.

[0043] In actual scenarios, the user may have at least one audio playback device, and at least one audio playback device may be connected to other devices of the same account, and the target audio playback device to be connected determined by the first terminal device is one of the at least one audio playback device. For the target audio playback device to be connected, the target audio playback device is connected to the second terminal device and is in a wearing state, and the priority of the audio corresponding to the audio event of the first terminal device is greater than the priority of the audio currently played by the target audio playback device, and the audio switching conditions are met, so that the first terminal device can connect to the target audio playback device and use the target audio playback device to play the audio corresponding to the audio event. Among them, the second terminal device is a device that has established a connection with the target audio playback device. The second terminal device can be a smart phone, a smart watch, a pad, a tablet computer, a laptop computer, a projection device, smart glasses, etc., which is not limited in this embodiment.

[0044] As an example, the user has two devices, one is a mobile phone and the other is a Pad. The user has a Bluetooth headset, then the first terminal device is the Pad, the second terminal device is the mobile phone, and the Bluetooth headset has established a connection with the mobile phone. Optionally, the Bluetooth headset is not playing any music, or the Bluetooth headset is playing the audio of the mobile phone and the volume is greater than 0.

[0045] Among them, determining the target audio playback device to be connected, as an implementation method, obtaining the status information of at least one audio playback device to be screened, wherein the audio playback device to be screened is an audio playback device that can be directly connected and pre-stored in each terminal device, and the audio playback device to be screened can be connected to the first terminal device and the second terminal device, and determining whether there is an audio playback device that meets the audio switching condition based on the status information of each audio playback device and the priority of the audio event, in response to the existence of an audio playback device that meets the audio switching condition, determining the target audio playback device from the audio playback devices that meet the audio switching condition; in response to the absence of an audio playback device that meets the audio switching condition, determining that there is no target audio playback device to be connected.

[0046] The status information of at least one audio playback device to be screened can be determined from the current status information of at least one audio playback device stored in the setting list, or the broadcast information of at least one audio playback device is searched and parsed to obtain the current status information of at least one candidate audio playback device. The status information of the headset includes the wearing status, audio status and audio focus status of the headset, wherein the wearing status indicates whether the corresponding headset is in a wearing and use state; the audio status indicates whether the corresponding headset is playing audio; the audio focus status indicates which application the audio played by the corresponding headset belongs to, thereby identifying whether the audio type is a call type or a media type. The type of audio can be used to indicate the priority of the audio, and different types of audio have different priorities when playing.

[0047] Step 102: In response to determining that there is a target audio playback device to be connected, the first terminal device is set to a first audio mode according to the monitored audio event.

[0048] In an embodiment of the present application, the first terminal device monitors an audio event, and the audio event indicates the audio and audio type to be played by the first terminal device, wherein the audio type includes voice audio and media audio, and the voice audio includes the voice audio of an ordinary phone and the voice audio of a voice call of a three-party application software (for example, a voice call or voice video of an instant messaging software). Media audio includes music, video, and live audio, etc. When the first terminal device monitors an audio event and determines that there is a target audio playback device to be connected based on the audio event, the audio mode corresponding to the first terminal device can be set according to the monitored audio event, wherein the audio mode includes a first audio mode and a second audio mode, and the first audio mode and the second audio mode can be the same or different. In the case where the monitored audio events are different, the first audio mode and the second audio mode set by the first terminal device are also different, and the specific follow-up is explained based on different audio events.

[0049] Step 103: Establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device.

[0050] In one implementation of an embodiment of the present application, if the first terminal device and the target audio playback device have been paired, then based on information such as the address and pairing password of the target audio playback device, the first terminal device can directly call the target audio playback device and establish a connection with the target audio playback device, and make the connection between the target audio playback device and the second terminal device disconnected, so that the first terminal device can grab the connection with the target audio playback device that is already connected to the second terminal device, thereby realizing automatic switching of the terminal device connected to the target audio playback device.

[0051] In a second implementation method of the embodiment of the present application, if the first terminal device and the target audio playback device have not completed pairing, the user interface of the first terminal device can be used to guide the user to long press the target audio playback device to enter pairing mode, thereby completing the pairing process of the first terminal device and the target audio playback device. After the pairing is completed, a connection between the first terminal device and the target audio playback device is established, and the connection between the target audio playback device and the second terminal device is disconnected, so that the first terminal device can connect to the target audio playback device that is already connected to the second terminal device, thereby avoiding user operation, realizing automatic switching of the terminal device connected to the target audio playback device, realizing consistency between multiple devices, and covering more scenarios.

[0052] In a third implementation method of the embodiment of the present application, if the first terminal device has not completed pairing with the target audio playback device, then pairing and connecting with the target audio playback device are performed. Specifically, based on the same-account quick connection protocol, the first terminal device can identify the target audio playback device belonging to the user, that is, the target audio playback device that all devices with the same account can connect to is identified. Then, the pairing process of the first terminal device and the target audio playback device is completed through the quick connection protocol. There is no need to guide the user to long press the target audio playback device to enter the pairing mode, thereby avoiding user operation, and connecting after the pairing is completed, thereby achieving consistency between multiple devices and covering more scenarios.

[0053] It should be understood that the quick connect protocol can be customized by the manufacturer, defining the data format and content that the target audio playback device needs to follow when sending broadcast data to the terminal device and connecting data, so as to identify whether a connection can be established and store the data of the target audio playback device.

[0054] Step 104: adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.

[0055] In an embodiment of the present application, when a connection is established between a first terminal device and a target audio playback device, the first audio mode that has been set on the first terminal device is adjusted to a second audio mode, so that the audio of the audio event is played using different audio modes before and after the first terminal device is connected to the target audio playback device, and the audio corresponding to the audio event is sent to the target audio playback device via Bluetooth to be played through the target audio playback device. The audio mode of the first terminal device is automatically set and adjusted to meet the user's audio playback needs in a variety of scenarios, thereby improving intelligence and user experience.

[0056] In the audio processing method of the embodiment of the present application, in response to monitoring an audio event, it is determined whether there is a target audio playback device to be connected, wherein the target audio playback device is connected to the second terminal device, and the second terminal device has the same account information as the first terminal device. In response to determining that there is a target audio playback device to be connected, according to the monitored audio event, a first audio mode of the first terminal device is set, a connection is established with the target audio playback device, and the connection between the target audio playback device and the second terminal device is disconnected, the first audio mode of the first terminal device is adjusted to the second audio mode, and audio of the target audio event is sent to the target audio playback device. When it is determined that there is a target audio playback device that can perform audio switching, the target audio playback device is connected, and according to the monitored audio event, the audio mode of the first terminal device is automatically set and adjusted to meet the user's audio playback needs in various scenarios and improve intelligence and user experience.

[0057] Based on the above embodiments, the embodiments of the present application set the audio mode in different scenarios to meet the audio playback requirements in different scenarios, as described below:

[0058] In one scenario, the audio type of the audio event is a call type, such as a voice call, a video call, and an ordinary call. In order to prevent the user from missing the call information, in response to determining that there is a target audio playback device to be connected, according to the monitored audio event, the first audio mode of the first terminal device is set to the speaker playback mode, wherein the speaker playback mode refers to the first terminal device playing the voice outward through the speaker. That is, the first terminal device can play the ringing prompt audio of the call outward to remind the user to be prepared to answer the call and avoid missing the phone information. Then, a connection is established with the target audio playback device. In response to establishing the connection with the target audio playback device, the audio mode corresponding to the first terminal device is adjusted from the speaker playback mode to the receiver playback mode, wherein the receiver playback mode refers to the first terminal being able to play voice through the target audio playback device. Thus, after the audio event is sent to the target audio playback device, it can be played through the target audio playback device, so that when the first terminal device detects that the audio type corresponding to the audio event is a call type, the first audio mode of the first terminal device is set to the speaker playback mode, so that the user can know the incoming call in advance in a call scenario, such as an ordinary phone call, or a voice or video call scenario of a third-party application, to ensure that the user will not miss the call due to abnormalities in the audio flow process, and when connected to the target audio playback device, it is set to the handset mode to use the target audio playback device for playback to meet the playback needs in different scenarios.

[0059] In another scenario, the audio type of the audio event is a multimedia type. Since the multimedia type plays music, video, live broadcast and other audio, using the first terminal device to play the audio externally usually creates environmental noise. Therefore, in response to determining that there is a target audio playback device to be connected, according to the monitored audio event, the audio mode corresponding to the first terminal device is set to a silent playback mode, wherein the silent playback mode means that the voice of the audio event is still playing, but the first terminal device does not make a sound, and then a connection with the target audio playback device is established. In response to establishing a connection with the target audio playback device, the audio mode corresponding to the first terminal device is switched from the silent playback mode to the earpiece playback mode, so that the target audio playback device connected to the first terminal device can play the audio corresponding to the audio event, that is, the target audio playback device automatically switches from playing the audio of the second terminal device to playing the audio of the first terminal device, so that in the process of different devices connecting to the target audio playback device, that is, in the process of audio streaming, the audio mode of the terminal device is set and switched to meet the user needs in different scenarios, which is more intelligent.

[0060] Based on the above embodiments, Figure 2 A flowchart of another audio mode processing method provided in an embodiment of the present application is shown as follows: Figure 2 As shown, the method comprises the following steps:

[0061] Step 201: Obtain status information of at least one audio playback device to be screened.

[0062] As an implementation manner, the status information of each audio playback device is determined based on the information broadcast by each audio playback device.

[0063] In an embodiment of the present application, the status information of at least one audio playback device to be screened is stored in a setting list for explanation, wherein the audio playback device to be screened is an audio playback device that can be directly connected and pre-stored by each terminal device. For example, the audio playback device is a Bluetooth headset, and the user has two Bluetooth headsets. A setting list including the status information of the two Bluetooth headsets is stored in the user's mobile phone, wherein the status information of the Bluetooth headset can be determined based on the information broadcast by each Bluetooth headset, or in response to user operation input. The first terminal device maintains a setting list, and the setting list stores the status information of the Bluetooth headset that can be automatically switched to, that is, the status information of the headset that can be automatically connected. The status information of each Bluetooth headset in the setting list is updated regularly, and the frequency of the update is the same as the frequency of the broadcast information of each Bluetooth headset, that is, each Bluetooth headset can broadcast its own status message through Bluetooth according to the set period, which meets the requirements of the symbol fast connection protocol.

[0064] Among them, the status information of the headset includes the wearing status, audio status and audio focus status of the headset. Among them, the wearing status indicates whether the corresponding headset is in a wearing and use state; the audio status indicates whether the corresponding headset is playing audio; the audio focus status indicates which application the audio played by the corresponding headset belongs to, thereby identifying whether the audio type is a call type or a media type.

[0065] Step 202: Determine whether there is an audio playback device that meets the audio switching condition according to the status information of each audio playback device and the priority of the audio event.

[0066] Among them, audio events include incoming call events, voice call events, video call events, and media audio playback events. Therefore, the corresponding audio includes incoming call audio, voice call audio, video call audio, and media audio (music, video, etc.). The audio priority can be pre-set. Usually, the audio priority is set as follows:

[0067] The priority of incoming call audio = the priority of voice call audio = the priority of video call audio > the priority of media audio > the priority of no audio;

[0068] Among them, no audio means that the audio playback device is connected to a device in the same device account, but no audio data is played, and it has the lowest priority.

[0069] In an embodiment of the present application, for each audio playback device's status information, the first terminal device determines whether the audio playback device is in a wearing state according to the wearing state in the status information of the audio playback device, that is, whether the user is currently using the audio playback device. When the audio playback device is in a wearing state, it is determined whether the audio playback device is currently playing the audio of a certain application according to the audio state and the audio focus state. If no audio is played, the audio priority is determined to be the lowest. If audio is playing, the audio type is determined according to the application corresponding to the audio, thereby determining the corresponding audio priority. The audio priority of the audio played by the audio playback device is compared with the audio priority corresponding to the audio event to determine whether the audio priority of the audio played by the audio playback device is less than or equal to the audio priority corresponding to the audio event. If the audio priority of the audio played by the audio playback device is less than or equal to the audio priority corresponding to the audio event, and the audio played by the audio playback device is not call audio, and the audio event is not call audio, it is determined that there is an audio playback device that meets the audio switching condition, and the first terminal device can connect to the audio playback device to play the audio event through the audio playback device to achieve switching of audio data played by the audio playback device.

[0070] Step 203: In response to the existence of an audio playback device that meets the audio switching condition, determine a target audio playback device from the audio playback devices that meet the audio switching condition.

[0071] In an embodiment of the present application, since there are multiple audio playback devices that can be automatically switched or connected in the setting list, it is determined that there are multiple audio playback devices that meet the audio switching conditions. As an implementation method, the audio playback device corresponding to the most recently received broadcast information can be used as the target audio playback device based on the order of time when the broadcast information of each audio playback device that meets the audio switching conditions is received.

[0072] As another implementation manner, the audio playback device corresponding to the firstly received broadcast information may be determined as the target audio playback device according to the time information of the broadcast information of each audio playback device satisfying the audio switching condition.

[0073] As another implementation method, the audio playback device with the lowest audio priority can be determined according to the priority of the audio of the second terminal device played by each audio playback device that meets the audio switching condition, and the audio playback device can be used as the target audio playback device to be connected to the first terminal device. That is, the audio playback device can be used as the target audio playback device that the first terminal device wants to connect to, so as to realize automatic audio flow, without the need for user operation, which is more convenient and intelligent.

[0074] As an example, the first terminal device is Pad, and there are two second terminal devices, namely mobile phone 1 and mobile phone 2, and the audio playback device is headphones. There are two pairs of headphones playing audio, among which headphone 1 is playing the call audio of mobile phone 1, and headphone 2 is playing the media audio of mobile phone 2. The audio event monitored by the Pad is call audio, then the Pad will try to connect to the pair of headphones that are playing the media audio, because the priority of media audio is lower than the priority of call audio; if both pairs of headphones are playing media audio, then the Pad receives the broadcast information of headphone 1 first, then it will try to connect to headphone 1 first, or, the last time the Pad received the broadcast information of headphone 2, that is, headphone 2 is still regularly updating the headphone status information, so headphone 2 must be in a connected state, then it will try to connect to headphone 2 first to improve the reliability of the connection.

[0075] Optionally, in response to the absence of an audio playback device satisfying the audio switching condition, it is determined that there is no target audio playback device to be connected, so that no audio playback device can be connected.

[0076] Step 204: in response to determining that there is a target audio playback device to be connected, the first terminal device is set to a first audio mode according to the audio type corresponding to the monitored audio event.

[0077] The target audio playback device is connected to a second terminal device among the multiple devices.

[0078] Step 205: Establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device.

[0079] Step 206: adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.

[0080] Among them, step 204 to step 206 can refer to the explanation in the above-mentioned embodiment, and the principles are the same, so they will not be repeated here.

[0081] Step 207: broadcast first information, wherein the first information is used to indicate that the first terminal device has been connected to the target audio playback device.

[0082] In an embodiment of the present application, when a first terminal device establishes a connection with a target audio playback device and controls the target audio playback device to play audio corresponding to an audio event, a first message is broadcast so that when the second terminal device searches for the first message broadcast by the first terminal device, it is determined based on the first message that the target audio playback device has been disconnected by the first terminal device, so as to make it clear that the first terminal device has a higher priority voice and wants to use the target audio playback device, thereby disconnecting from the target audio playback device, so as to avoid the second terminal device from connecting to the target audio playback device again. Instead, when the target audio playback device is disconnected, the second terminal device automatically adjusts the audio mode of its own device to improve the user experience.

[0083] In the audio mode processing method of the embodiment of the present application, the first terminal device automatically sets and adjusts the audio mode of the first terminal device according to the audio type corresponding to the monitored audio event, so that when multiple terminal devices with the same account information compete to connect to the audio playback device, the audio mode processing process is automatically performed. At the same time, the computing power requirements for the audio playback device are relatively low, and more audio playback devices can be applied to meet the audio playback needs of users in various scenarios, thereby improving intelligence and user experience.

[0084] Based on the above embodiment, in one implementation of the embodiment of the present application, prompt information is displayed in the interactive interface of the first terminal device, wherein the prompt information is used to indicate the continuous status of the first terminal device and the target audio playback device. Specifically, during the process of the first terminal device establishing a connection with the target audio playback device, prompt information can be displayed through the interactive interface of the first terminal device, and the prompt information is used to prompt the user that the connection status between the first terminal device and the user's target audio playback device is connecting. Furthermore, when the connection is completed, the displayed prompt information is used to prompt the user that the connection status between the first terminal device and the user's target audio playback device is already connected.

[0085] Based on the above embodiments, the present application provides another audio mode processing method. Figure 3 A flowchart of another audio mode processing method provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the method comprises the following steps:

[0086] Step 301: In response to monitoring first information broadcast by a first terminal device, determining whether the currently played audio is in a handset playing mode.

[0087] The execution subject of the embodiment of the present application is a second terminal device. The second terminal device and the first terminal device have the same account information and can be connected to the same target audio playback device. Currently, the target audio playback device connected to the second terminal device is preempted by the first terminal device. The second terminal device can be a smart phone, a smart watch, a pad, a tablet computer, a laptop computer, a projection device, smart glasses, etc., which is not limited in this embodiment.

[0088] The first information is broadcasted in response to the existence of a target audio playback device to be connected, the first terminal device sets the first audio mode corresponding to the first terminal device according to the monitored audio event, proposes a connection with the target audio playback device, disconnects the connection between the target audio playback device and the second terminal device, adjusts the first audio mode of the first terminal device to the second audio mode, and sends the audio of the target audio event to the target audio playback device. The first information is used to indicate that the target audio playback device originally connected to the second terminal device has now established a connection with the first terminal device.

[0089] Among them, the relevant explanations about the first information in the aforementioned embodiment, as well as other explanations related to this embodiment, are also applicable to this embodiment and will not be repeated here.

[0090] In the embodiment of the present application, the second terminal device is a terminal device connected to the target audio playback device before the first terminal device is connected to the target audio playback device.

[0091] Step 302: In response to the currently played audio being in the earpiece play mode, control the second terminal device to switch from the earpiece play mode to the silent play mode.

[0092] In an embodiment of the present application, when the second terminal device determines based on the first information that the target audio playback device is connected to the first terminal device, it will determine whether the second terminal device is currently playing audio. If there is audio being played, since the target audio playback device has been disconnected, the second terminal device is controlled to switch from the earpiece playback mode to the silent playback mode, that is, the second terminal device does not use the earpiece playback mode for voice playback, so as to avoid interference from environmental noise or to protect user privacy.

[0093] In the audio mode processing method of the embodiment of the present application, in response to monitoring the first information broadcast by the first terminal device, it is determined whether the currently played audio is in the handset playback mode, and in response to the currently played audio being in the handset playback mode, the second terminal device is controlled to switch from the handset playback mode to the silent playback mode. In the scenario where the same account is connected, when the connected target audio playback device is preempted, the second terminal device among multiple terminal devices determines whether it is necessary to set the second terminal device to the voice silent playback mode according to whether the audio is still in the handset playback mode at this time. This process is also automatically triggered, which reduces the need for users to manually pause or mute the playback, improves intelligence, and achieves the purpose of improving user experience.

[0094] Based on the above embodiments, in an implementation method of the embodiments of the present application, in response to monitoring the first information broadcast by the first terminal device, before determining whether the currently played audio is in a playing state, it also includes: obtaining the headphone preemption information sent by the connected target audio playback device; wherein the headphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device, so that during the process of the target audio playback device being connected to the first terminal device, the second terminal device is informed through an AT command that the target audio playback device is being preempted by the first terminal device, so as to remind the user who is using the target audio playback device to play the audio in the second terminal device, thereby improving the user experience.

[0095] In one implementation of the embodiment of the present application, after the second terminal device and the audio playback device are disconnected, in response to the currently played audio being in the earpiece playback mode, the second terminal device is controlled to switch from the earpiece playback mode to the silent playback mode, it also includes: displaying prompt information on the interactive interface of the second terminal device; wherein the prompt information is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device, so as to prompt the user that the target audio playback device has been connected to other terminal devices, so that the user can understand the reason for the disconnection with the target audio playback device, thereby improving the user experience.

[0096] Based on the above embodiment, as an implementation method, in response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from the silent playback mode to the speaker playback mode. In the embodiment of the present application, if the user wants to continue playing the original audio after learning that the target audio playback device has been preempted by other devices, the user can click the target button of the second terminal device, such as the power button, to turn the screen of the second terminal device on and off, or the user manually increases or decreases the volume, or the user changes the audio playback state, then the second terminal device cancels the silent playback mode and switches to the speaker playback mode.

[0097] Based on the above embodiments, an interactive method for audio processing is provided in an embodiment of the present application. Figure 4 A flowchart of an interactive method for audio mode processing provided in an embodiment of the present application is provided. In the embodiment of the present application, the target audio playback device is a headset as an example for explanation. Figure 4 As shown, the method includes:

[0098] In the embodiment of the present application, there are two terminal devices with the same account signal, respectively referred to as device 1 and device 2, and there is one connectable headset, referred to as headset 1.

[0099] (1) Device 2 is connected to earphone 1 and is playing audio, and the volume value is greater than 0.

[0100] (2) Headphone 1 periodically sends broadcast information, i.e., quick connect broadcast with the same account. Device 1 receives the broadcast information, parses the broadcast information, obtains status information of headset 1, including wearing status, audio status, audio focus status, etc., and uses headset 1 as a headset that can be used for automatic switching, and stores the status information of headset 1 in the headset list.

[0101] (3) Device 1 monitors audio events, which may be audio or video playback / voice VOIP calls, or ordinary phone calls.

[0102] (4) Device 1 receives an audio event and checks whether there is a connected headset. If no headset is connected, the headset list is queried to determine whether there is a headset that meets the audio switching condition. Among them, the audio switching condition: the headset is worn on both ears and the audio priority meets the condition before switching. That is, when the audio monitored by device 1 and the audio played by device 1 are not call audio at the same time, the audio priority currently played by the headset is less than or equal to the audio priority of the device to be preempted, and the audio switching condition is met. Among them, the audio priority: phone = VOIP > audio = video > none. If there is a headset that meets the audio switching condition, the headset 1 is used as the target headset to be connected. In the embodiment of the present application, taking the audio event monitored by device 1 as media audio as an example, since the media audio played by device 1 is played later, although the media audio to be played by device 1 and the media audio played by device 2 have the same priority, according to the principle of limited higher priority of later playback, device 1 can be connected to headset 1 and the audio played by headset 1 can be switched.

[0103] It should be noted that, when the audio to be played on device 1 is call audio and the audio to be played on device 2 is also call audio, the user needs to confirm that device 1 can be connected to headset 1.

[0104] Among them, the way of setting the audio mode of the device 2 in the process of connecting to the headset 1 can refer to the description of different scenarios in the above embodiments, which will not be repeated here.

[0105] (5) If earphone 1 is not paired with device 1, the same account pairing process needs to be performed, and then device 1 can be connected to earphone 1. Otherwise, earphone 1 can be directly connected.

[0106] (6) When device 1 is connected to earphone 1, earphone 1 sends an AT command to device 2 to notify device 1 that it is preempting earphone 1.

[0107] (7) After device 1 is connected, device 2 is disconnected, and device 1 cancels the silent playback mode.

[0108] (8) Device 1 broadcasts the first information, i.e., the same-account quick connection broadcast, to notify device 2 that earphone 1 has been preempted by device 1. Device 2 is first set to silent playback mode (i.e., audio mute) to stop playing the audio currently being played. Then, the user is prompted on the interactive interface of device 2 that the earphone has been connected to another device with the same account.

[0109] (9) When monitoring the screen turning on and off, the volume changing, or the playback status changing of the device, that is, when device 2 detects that a target button is clicked, such as the power button, which turns the screen of the second terminal device on and off, or the user manually increases or decreases the volume, or the user changes the audio playback status, device 2 cancels the silent playback mode and switches to the speaker playback state, so as to continue to play the originally played audio by playing the sound externally, thereby avoiding interruption or pause of the originally played audio.

[0110] Among them, the relevant explanations and beneficial effects in the aforementioned embodiments are also applicable to this embodiment, and the principles are the same, so they will not be repeated here.

[0111] Based on the above embodiments, Figure 5 Schematic diagram of an interactive scenario of audio mode processing provided in an embodiment of the present application. In the embodiment of the present application, the target audio playback device is a headset as an example for explanation. Figure 5 As shown, the method includes:

[0112] As a scenario example, among multiple terminal devices with the same device account, the first terminal device is a tablet computer, the second terminal device is a mobile phone, and the user only has one headset. When the user uses the mobile phone to connect the headset to play music, the tablet computer suddenly receives a voice call from a third-party application (WeChat, QQ, etc.). The audio processing process of the first terminal device and the second terminal device. Specifically:

[0113] 1) The phone is connected to the headset and music is playing;

[0114] 2) The tablet searches for the same account quick connection broadcast sent by the headset, which carries the headset status information, and the tablet stores the headset status information. The tablet receives the voice and video call of the three-party application, that is, the tablet monitors the call event. Since the audio priority of the music played by the headset is lower than the audio priority of the tablet voice call that preempts the headset, the audio switching condition is triggered, that is, the tablet can connect to the headset to play the audio of the voice call through the headset.

[0115] 3) The audio mode of the tablet computer is set to the speaker playback mode, so that the tablet computer can play the ringing tone of the voice call to remind the user that there is a voice call.

[0116] 4) The tablet receives the same account quick connection broadcast message from the headset, starts pairing, and tries to connect to the headset.

[0117] 5) The headset sends an AT command to the mobile phone, wherein the AT command carries the headset preemption information to notify the mobile phone that the tablet computer is preempting the headset.

[0118] 6) The headset is successfully connected to the tablet.

[0119] 7) The headset is disconnected from the mobile phone.

[0120] 8) The tablet computer switches from speaker playback mode to earpiece playback mode, so that the earphone can play the voice call sound.

[0121] 9) The tablet computer broadcasts the first message, quickly broadcasts the same account, and notifies the mobile phone that the headset has been preempted by the tablet computer.

[0122] 10) Set the mobile phone audio to mute mode, that is, silent playback mode.

[0123] 11) The user manually turns the screen on and off, that is, clicks the target button of the second terminal device, such as the power button, to turn the screen of the second terminal device on and off, or the user manually increases or decreases the volume, or the user manually changes the audio / video playback status, then the second terminal device cancels the silent playback mode and switches to the speaker playback mode.

[0124] Among them, the relevant explanations and beneficial effects in the aforementioned embodiments are also applicable to this embodiment, and the principles are the same, so they will not be repeated here.

[0125] In order to implement the above embodiment, the embodiment of the present application also proposes an audio processing device, which is applied to a first terminal device.

[0126] Figure 6 A schematic diagram of the structure of an audio mode processing device provided in an embodiment of the present application.

[0127] like Figure 6 As shown, the device may include:

[0128] A determination module 61 is used for determining whether there is a target audio playback device to be connected in response to monitoring an audio event, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device;

[0129] A setting module 62, configured to set the first terminal device to a first audio mode in response to the existence of a target audio playback device to be connected and according to the monitored audio event;

[0130] An establishing module 63, configured to establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device;

[0131] The adjustment module 64 is configured to adjust the first audio mode of the first terminal device to a second audio mode, and send the audio of the target audio event to the target audio playback device.

[0132] Furthermore, in an implementation of the embodiment of the present application, the determination module 61 is further configured to:

[0133] Obtaining status information of at least one audio playback device to be screened;

[0134] Determining whether there is an audio playback device that meets the audio switching condition according to the status information of each of the audio playback devices and the priority of the audio event;

[0135] In response to the existence of the audio playback device that meets the audio switching condition, determining the target audio playback device from the audio playback devices that meet the audio switching condition;

[0136] In response to the absence of the audio playback device satisfying the audio switching condition, it is determined that there is no target audio playback device to be connected.

[0137] In an implementation of the embodiment of the present application, the determination module 61 is further used to: search for broadcast information of the at least one audio playback device, and parse to obtain current status information of the at least one candidate audio playback device.

[0138] In an implementation manner of the embodiment of the present application, the determination module 61 is further used to: obtain the current status information of the at least one audio playback device stored in the setting list.

[0139] In an implementation of the embodiment of the present application, the audio type corresponding to the audio event is a call type, and the adjustment module 64 is further configured to:

[0140] Adjust the speaker playback mode corresponding to the first terminal device to the earpiece playback mode.

[0141] In an implementation of the embodiment of the present application, the audio type corresponding to the audio event is a multimedia type, and the adjustment module 64 is further used to:

[0142] Adjust the silent playback mode corresponding to the first terminal device to the handset playback mode.

[0143] In one implementation of the embodiment of the present application, the device further includes:

[0144] The broadcast module is used to broadcast first information; wherein, the first information is used to indicate that the first terminal device has been connected to the target audio playback device.

[0145] In one implementation of the embodiment of the present application, the device further includes:

[0146] A display module is used to display prompt information in the interactive interface of the first terminal device.

[0147] In one implementation of the embodiment of the present application, the establishment module 63 is further used to:

[0148] In response to detecting that the first terminal device is not paired with the target audio playback device, pairing and connecting with the target audio playback device is performed.

[0149] In one implementation of the embodiment of the present application, the device further includes:

[0150] A determination module, configured to, in response to monitoring an audio event and detecting that no earphone is connected, obtain status information of each earphone stored in the earphone list; wherein the status information of each earphone is determined based on broadcast information periodically sent by each earphone;

[0151] Determining whether there is an earphone that meets the audio switching condition according to the status information of each earphone and the audio priority corresponding to the audio event;

[0152] In response to the presence of the earphones satisfying the audio switching condition, the target audio playback device is determined from the earphones satisfying the audio switching condition.

[0153] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and will not be repeated here.

[0154] In the audio mode processing device proposed in the present application, in response to determining that there is a target audio playback device that meets the audio switching conditions, the audio mode of the first terminal device is set according to the monitored audio event, wherein the target audio playback device is connected to the second terminal device, and a connection with the target audio playback device is established, and the audio mode of the first terminal device is adjusted from the first audio mode to the second audio mode to control the target audio playback device to play the audio corresponding to the audio event. In a scenario where the target audio playback device can be connected to any of multiple terminal devices with the same device account, the audio mode of the first terminal device is automatically set and adjusted according to the monitored audio event to meet the user's audio playback needs in a variety of scenarios and improve intelligence and user experience.

[0155] In order to implement the above embodiment, the embodiment of the present application also proposes an audio mode processing device, which is applied to a second terminal device.

[0156] Figure 7 A schematic diagram of the structure of an audio mode processing device provided in an embodiment of the present application.

[0157] like Figure 7 As shown, the device may include:

[0158] A determination module 71 is used to determine whether the currently played audio is in the handset playback mode in response to monitoring the first information broadcast by the first terminal device; wherein the first information is used to indicate that the target audio playback device connected to the second terminal device is connected to the first terminal device, and the second terminal device has the same account information as the first terminal device; wherein the first information is broadcast by the first terminal device in response to monitoring an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event, suggesting a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device;

[0159] The adjustment module 72 is configured to control the second terminal device to switch from the earpiece playing mode to the silent playing mode in response to the currently playing audio being in the earpiece playing mode.

[0160] Furthermore, in an implementation of the embodiment of the present application, the device further includes:

[0161] A display module is used to display prompt information on the interactive interface of the second terminal device; wherein the prompt information is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device.

[0162] In one implementation of the embodiment of the present application, the device further includes:

[0163] Acquiring information, used to acquire earphone preemption information sent by a connected target audio playback device; wherein the earphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device.

[0164] In one implementation of the embodiment of the present application, the adjustment module 72 is further configured to:

[0165] In response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from a silent playback mode to a loudspeaker playback mode.

[0166] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and will not be repeated here.

[0167] In the audio mode processing device of the embodiment of the present application, in response to monitoring the first information broadcast by the first terminal device, it is determined whether the currently played audio is in the handset playback mode, and in response to the currently played audio being in the handset playback mode, the second terminal device is controlled to switch from the handset playback mode to the silent playback mode. In the scenario where the same account is connected, when the connected target audio playback device is preempted, the second terminal device among multiple terminal devices determines whether it is necessary to put the second terminal device into the voice silent playback mode according to whether the audio is still playing at this time. This process is also automatically triggered, which reduces the need for users to manually pause playback or mute, improves intelligence, and achieves the purpose of improving user experience.

[0168] In order to implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the above method embodiments is implemented.

[0169] In order to implement the above embodiments, the present application also proposes a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in the above method embodiments is implemented.

[0170] In order to implement the above embodiments, the present application also proposes a computer program product on which a computer program is stored. When the computer program is executed by a processor, the method described in the above method embodiments is implemented.

[0171] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0172] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0173] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0174] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0175] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0176] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0177] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0178] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0179] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0180] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0181] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0182] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0183] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0184] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0185] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0186] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0187] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0188] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0189] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0190] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. An audio processing method, characterized in that: Applied to the first terminal device, including: In response to monitoring an audio event, determining whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device; In response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event; Establishing a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device; The first audio mode of the first terminal device is adjusted to a second audio mode, and the audio of the target audio event is sent to the target audio playback device.

2. The method according to claim 1, characterized in that The step of determining whether there is a target audio playback device to be connected includes: Obtaining status information of at least one audio playback device to be screened; Determining whether there is an audio playback device that meets the audio switching condition according to the status information of each of the audio playback devices and the priority of the audio event; In response to the existence of the audio playback device that meets the audio switching condition, determining the target audio playback device from the audio playback devices that meet the audio switching condition; In response to the absence of the audio playback device satisfying the audio switching condition, it is determined that there is no target audio playback device to be connected.

3. The method according to claim 2, characterized in that The obtaining of status information of at least one audio playback device to be screened includes: The broadcast information of the at least one audio playback device is searched and obtained, and the current state information of the at least one candidate audio playback device is obtained by parsing.

4. The method according to claim 2, characterized in that The obtaining of status information of at least one audio playback device to be screened includes: The current status information of the at least one audio playback device stored in the setting list is obtained.

5. The method according to claim 1, characterized in that The audio type corresponding to the audio event is a call type, and the adjusting the first audio mode of the first terminal device to a second audio mode includes: Adjust the speaker playback mode corresponding to the first terminal device to the earpiece playback mode.

6. The method according to claim 1, characterized in that The audio type corresponding to the audio event is a multimedia type, and the adjusting the first audio mode of the first terminal device to a second audio mode includes: Adjust the silent playback mode corresponding to the first terminal device to the handset playback mode.

7. The method according to any one of claims 1 to 6, characterized in that: After adjusting the first audio mode of the first terminal device to a second audio mode and sending the audio of the target audio event to the target audio playback device, the method further includes: Broadcasting first information; wherein, the first information is used to indicate that the first terminal device has been connected to the target audio playback device.

8. The method according to claim 7, characterized in that The method further comprises: Displaying prompt information in the interactive interface of the first terminal device; wherein the prompt information is used to indicate the continuous status of the first terminal device and the target audio playback device.

9. The method according to any one of claims 1 to 6, characterized in that: Establishing a connection with the target audio playback device includes: In response to detecting that the first terminal device is not paired with the target audio playback device, pairing and connecting with the target audio playback device is performed.

10. An audio processing method, characterized in that: Applied to the second terminal device, including: In response to monitoring the first information broadcast by the first terminal device, determining whether the currently played audio is in the handset playback mode; wherein the first information is used to indicate that the target audio playback device connected to the second terminal device is connected to the first terminal device and establishes a connection, and the second terminal device and the first terminal device have the same account information; wherein the first information is broadcast by the first terminal device in response to monitoring an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event, suggesting a connection with the target audio playback device, and disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device; In response to the currently playing audio being in the earpiece playing mode, controlling the second terminal device to switch from the earpiece playing mode to the silent playing mode.

11. The method according to claim 10, characterized in that After the step of controlling the second terminal device to switch from the earpiece playing mode to the silent playing mode in response to the currently played audio being in the earpiece playing mode, the method further includes: A prompt message is displayed on the interactive interface of the second terminal device, wherein the prompt message is used to indicate that the target audio playback device connected to the second terminal device has been connected to the first terminal device.

12. The method according to claim 10, characterized in that Before the step of determining whether the currently played audio is in the handset play mode in response to monitoring the first information broadcast by the first terminal device, the step further includes: Acquire earphone preemption information sent by the connected target audio playback device; wherein the earphone preemption information is used to indicate that the target audio playback device is connecting to the first terminal device.

13. The method according to any one of claims 10 to 12, characterized in that: After the step of controlling the second terminal device to switch from the earpiece playing mode to the silent playing mode in response to the currently played audio being in the earpiece playing mode, the method further includes: In response to detecting a target operation on the second terminal device, the second terminal device is controlled to switch from a silent playback mode to a loudspeaker playback mode.

14. An audio processing device, characterized in that: Applied to the first terminal device, including: a determination module, configured to determine, in response to monitoring an audio event, whether there is a target audio playback device to be connected, wherein the target audio playback device has established a connection with a second terminal device, and the second terminal device has the same account information as the first terminal device; A setting module, configured to, in response to the existence of a target audio playback device to be connected, set the first terminal device to a first audio mode according to the monitored audio event; an establishing module, used to establish a connection with the target audio playback device, and disconnect the connection between the target audio playback device and the second terminal device; The adjustment module is used to adjust the first audio mode of the first terminal device to the second audio mode, and send the audio of the target audio event to the target audio playback device.

15. An audio processing device, characterized in that: Applied to the second terminal device, including: A determination module, configured to determine whether the currently played audio is in an earpiece playback mode in response to monitoring a first information broadcast by a first terminal device; wherein the first information is used to indicate that a target audio playback device connected to the second terminal device is connected to the first terminal device, and the second terminal device has the same account information as the first terminal device; wherein the first information is broadcast by the first terminal device in response to monitoring an audio event, determining whether there is a target audio playback device to be connected, and in response to the existence of a target audio playback device to be connected, setting the first terminal device to a first audio mode according to the monitored audio event, suggesting a connection with the target audio playback device, disconnecting the connection between the target audio playback device and the second terminal device, adjusting the first audio mode of the first terminal device to a second audio mode, and sending the audio of the target audio event to the target audio playback device; The adjustment module is used to control the second terminal device to switch from the earpiece playback mode to the silent playback mode in response to the currently played audio being in the earpiece playback mode.

16. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method according to any one of claims 1 to 9 is implemented, or the method according to any one of claims 10 to 13 is implemented.

17. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented, or the method according to any one of claims 10 to 13 is implemented.

Citation Information

Patent Citations

  • Bluetooth earphone switching method, Bluetooth earphone and terminal

    CN109890021A

  • Wireless earphone box and system

    CN111601199A

  • Systems, Methods, and Graphical User Interfaces for Automatic Audio Routing

    US20210377663A1

  • Audio playback control method, audio playback control apparatus and storage medium

    US20210405961A1

Cited By

  • Information processing method, information processing device and electronic equipment

    CN120950032A