Audio output control method and device and electronic equipment

By obtaining hierarchical identification information and output configuration information of the audio and determining the target audio output device, the problem that the existing technology cannot meet complex audio output scenarios is solved, refined audio output control is achieved, and the user experience is improved.

CN120803389APending Publication Date: 2025-10-17LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510900868.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing audio control methods cannot meet the requirements of complex audio output scenarios, resulting in a reduced user experience.

Method used

By obtaining the hierarchical identification information and output configuration information of the target audio, the target audio output device is determined and its output is controlled, thereby achieving refined hierarchical control of audio output.

Benefits of technology

It meets the audio output requirements in different scenarios, improves the user experience, and realizes independent output control of audio of different processes in the same application and diversified audio output configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803389A_ABST
    Figure CN120803389A_ABST
Patent Text Reader

Abstract

The invention discloses an audio output control method and device and electronic equipment, and the method comprises the steps: obtaining hierarchical identification information of a target audio, the hierarchical identification information comprising at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio; obtaining output configuration information of the target audio; determining a target audio output device from at least one audio output device of the electronic equipment based on the hierarchical identification information and the output configuration information; and controlling the target audio output device to output the target audio.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of audio technology, and more particularly, to an audio output control method and device, and electronic equipment. BACKGROUND

[0002] With the development of electronic equipment, more and more electronic equipment has more audio applications. This makes the audio output scene of the electronic equipment more complex. For example, when a user expects to output different audio streams through different devices (such as earphones, sound boxes, etc.). The current audio control method cannot meet the needs of complex audio output scenes, reducing the user experience effect. SUMMARY

[0003] Therefore, the present application provides the following technical solutions:

[0004] An audio output control method comprises:

[0005] obtaining hierarchical identification information of a target audio, the hierarchical identification information comprising at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio;

[0006] obtaining output configuration information of the target audio;

[0007] determining a target audio output device from at least one audio output device of an electronic device based on the hierarchical identification information and the output configuration information;

[0008] controlling the target audio output device to output the target audio.

[0009] Optionally, the obtaining of the output configuration information of the target audio comprises:

[0010] generating a visual configuration interface based on at least one audio output device available to the electronic equipment and an audio application currently in an active state, wherein the audio application comprises different audio processes, and the different audio processes comprise different audios;

[0011] obtaining the output configuration information of the target audio in response to a configuration operation of a user on the visual configuration interface.

[0012] Optionally, the obtaining of the output configuration information of the target audio in response to the configuration operation of the user on the visual configuration interface comprises:

[0013] In response to the user selecting the audio output device corresponding to the audio application in the visual configuration interface, determining the target audio included in the audio application, and determining the output configuration information of the audio application to which the target audio belongs as the output configuration information of the target audio;

[0014] Alternatively, in response to the user selecting the audio output device corresponding to the audio process in the visual configuration interface, determining the target audio included in the audio process, and determining the output configuration information of the audio process to which the target audio belongs as the output configuration information of the target audio;

[0015] Alternatively, in response to the user selecting the audio output device corresponding to the target audio in the visual configuration interface, obtaining the output configuration information corresponding to the target audio.

[0016] Optionally, further comprising:

[0017] In response to the audio process ending, releasing the binding relationship between the audio process and the corresponding output configuration information;

[0018] In response to the audio ending, releasing the binding relationship between the audio and the corresponding output configuration information.

[0019] Optionally, the determining of the target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information comprises:

[0020] If the output configuration information includes the audio output device corresponding to the audio identification, the audio output device corresponding to the audio identification is determined as the target audio output device;

[0021] If the output configuration information does not include the audio output device corresponding to the audio identification, it is detected whether the output configuration information includes the audio output device corresponding to the process identification of the audio process to which the target audio belongs;

[0022] If it exists, the audio output device is determined as the target audio output device; if it does not exist, the audio output device corresponding to the application identification of the audio application to which the target audio belongs in the output configuration information is determined as the target audio output device.

[0023] Optionally, the generating of the visual configuration interface based on the audio application currently in an active state and at least one audio output device available to the electronic device comprises:

[0024] Obtaining the device form of the electronic device;

[0025] Generating the visual configuration interface based on the device form, the audio application currently in an active state, and at least one audio output device available to the electronic device.

[0026] Optionally, obtaining output configuration information of the target audio includes:

[0027] Based on the current device form of the electronic device, output configuration information of the target audio is obtained.

[0028] Optionally, determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information includes:

[0029] In response to a device form of the electronic device being switched, output configuration information corresponding to the switched device form is obtained;

[0030] A target audio output device is determined from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information.

[0031] An audio output control device, comprising:

[0032] A first acquiring unit is configured to obtain hierarchical identification information of a target audio, wherein the hierarchical identification information includes at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio;

[0033] A second acquiring unit, configured to acquire output configuration information of the target audio;

[0034] a determining unit, configured to determine a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information;

[0035] A control unit is used to control the target audio output device to output the target audio.

[0036] An electronic device, comprising:

[0037] A memory, used to store applications and data generated by the execution of the applications;

[0038] A processor, configured to execute the application program to implement:

[0039] Obtaining hierarchical identification information of a target audio, the hierarchical identification information including at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio;

[0040] Obtaining output configuration information of the target audio;

[0041] determine a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information;

[0042] control the target audio output device to output the target audio. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of the provided drawings.

[0044] Figure 1 a flowchart of an audio output control method provided by an embodiment of the present application;

[0045] Figure 2 a flowchart of an audio output control method based on device form provided by an embodiment of the present application;

[0046] Figure 3 a schematic diagram of a device form of an electronic device provided by an embodiment of the present application;

[0047] Figure 4 a flowchart of an audio configuration method provided by an embodiment of the present application;

[0048] Figure 5 a schematic diagram of an audio configuration flow of an audio hierarchy provided by an embodiment of the present application;

[0049] Figure 6 a structural schematic diagram of an audio output control device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.

[0051] The terms “first” and “second” and the like in the present application are used to distinguish different objects, but not to describe a specific order. In addition, the terms “include” and “have” and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not set to the listed steps or units, but can include steps or units not listed.

[0052] The embodiment of the present application provides an audio output control method, which is applied to an application scenario of outputting an audio stream in an electronic device to a corresponding audio output device, and determines a target audio output device and controls the target audio output device to output by acquiring hierarchical identification information of target audio and combining output configuration information. The method realizes fine hierarchical control of audio output in combination with granularity corresponding to different levels of audio, and can meet audio output requirements in different scenarios.

[0053] Referring to Figure 1 A flowchart of an audio output control method provided by the embodiment of the present application can include the following steps:

[0054] S101, obtaining hierarchical identification information of target audio.

[0055] S102, obtaining output configuration information of target audio.

[0056] S103, determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information.

[0057] S104, controlling the target audio output device to output the target audio.

[0058] In step S101, the target audio is an audio stream that needs to be output by an audio output device, which can be generated by an audio application or an audio process corresponding to an audio application. In order to facilitate users to set the audio output device of the corresponding audio stream in different granularity, in the embodiment of the present application, unlike the usual processing mode (such as only different audio output devices can be set for different audio applications), the corresponding audio output device can be set based on the audio application, the audio process or the different level granularity of the audio. Therefore, after the target audio to be output is determined, the hierarchical identification information of the target audio can be obtained.

[0059] The hierarchical identification information includes at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio itself. The hierarchical identification information can be obtained through an audio system interface and audio data characteristics. The application identifier (such as represented by ApplicationID) of the audio application is used to uniquely identify the application program to which the audio belongs, and is usually a globally unique identifier (GUID) of the application, a program name or a registry identifier.

[0060] The audio application runs multiple processes, each process corresponding to an independent process identifier (such as represented by Process ID, PID), such as the process identifier of the corresponding audio process can be viewed by the Task Manager in the Windows system. For example, when the audio application is a browser, each tab in the browser corresponds to an independent process, and the process identifiers of the respective processes are different.

[0061] Each audio process can contain multiple audios (also referred to as audio streams), such as video, voice, background music, advertisement sound, etc., and the audio identifier is used to distinguish different audio streams in the same audio process, such as the audio identifier is represented by "AudioStream ID".

[0062] Taking the Windows system as an example, the audio session can be enumerated through the multimedia device application programming interface and / or the Windows audio session application programming interface, and then the application identifier of the corresponding audio application, the process identifier of the audio process and the audio identifier of the audio are determined. Among them, the multimedia device application programming interface (MMDevice API) is a Windows system interface for enumerating, managing computer audio devices (such as speakers, earphones, microphones) and their attributes (such as volume, connection state). The Windows audio session application programming interface (WASAPI) represents a Windows audio framework interface for listening to, controlling audio sessions, implementing audio stream capture, grouping and output device allocation. Then the application identifier, process identifier and audio identifier are obtained through the corresponding interface functions.

[0063] By obtaining the hierarchical identifier information of the target audio, fine-grained control of the audio can be achieved, and different processes or audios in the same application can be distinguished, and different audios in the same process can also be distinguished, which can adapt to more complex audio output scenarios and solve the problem of audio output conflict under multiple audios.

[0064] In step S102, after obtaining the hierarchical identifier information of the target audio, an output configuration interface matching the hierarchical identifier information can be provided, such as different levels of output configuration interfaces can be provided to obtain the output configuration information of the current target audio by the user. The audio output device of the output configuration information is bound to the corresponding audio, that is, the audio can be output through the audio output device. Through the output configuration of the hierarchical identifier information, the problem of intelligent output of the entire audio application to a single audio output device is avoided.

[0065] If the system has saved the existing output configuration information of the user, the output configuration information corresponding to the target audio can be determined according to the hierarchical identification information of the target audio, so that the target audio output device used to output the target audio can be determined according to the matched output configuration information.

[0066] In obtaining the output configuration information of the target audio, the available audio output devices in the electronic device can be obtained first, such as the speaker configured in the electronic device, and the audio devices externally connected to the electronic device, such as Bluetooth earphones, wireless earphones, sound boxes, and the like. Then, the corresponding configuration interface is generated according to the hierarchical identification information, so that the user can select the audio output device corresponding to the current target audio. Thus, the configuration of the output device from the level of the audio application or the level of the audio process, or the configuration of the output device from the level of the audio can be realized.

[0067] The output device corresponding to the different hierarchical identification can be obtained through the output configuration information, and then the current target audio is matched to the corresponding target audio output device according to the hierarchical identification information and the output configuration information. For example, the audio application is a browser, when the user opens two tabs in the browser, different audios will be played respectively. The system obtains the identification of the application to which the audio belongs as the identification of the browser, the process identification as the process ID of tab 1, and the audio identification as the audio stream ID of video 1 in tab 1. The output configuration information can be obtained according to the above hierarchical identification information, and in the output configuration information, the output device corresponding to the application identification can be set as a sound box, and the output device corresponding to the process identification can be set as earphones. Since the configuration corresponding to the audio identification exists, the system can determine the target output device as the earphones according to the hierarchical identification information and the output configuration information, and control the earphones to play the audio. In this way, the independent output control of different process audios in the same application is realized, the needs of the user in a complex scene are met, and the audio use experience is improved.

[0068] The electronic device itself can have multiple audio output devices, and when the electronic device is externally connected to an electronic device having an audio output device, the electronic device displays the configuration identification of these externally connected audio output devices, and the user can select the audio output devices of the electronic device itself and the externally connected audio output devices. The audio output control method provided in the embodiments of the present application determines the target audio output device and controls the output thereof by obtaining the hierarchical identification information of the target audio and combining the output configuration information. The fine-grained level control of the audio output corresponding to the different levels to which the audio belongs is realized, and the audio output needs in different scenes can be met.

[0069] The audio output control method of the embodiments of the present application will be described below in combination with specific application scenarios.

[0070] The output configuration information of the target audio obtained in the embodiments of the present application can be obtained from existing output configuration information previously configured by the user, or can be generated based on a currently active audio application and at least one audio output device available to the electronic device to generate a visual configuration interface, and the output configuration information is obtained based on a configuration operation performed by the user on the interface.

[0071] In an embodiment, the process of obtaining the output configuration information of the target audio includes:

[0072] Based on the currently active audio application and at least one audio output device available to the electronic device, a visual configuration interface is generated, and the output configuration information of the target audio is obtained in response to a configuration operation performed by the user on the visual configuration interface.

[0073] The currently active audio application can be an audio application that has been started in the electronic device, or can be an audio application that has audio to be output. Correspondingly, the currently active audio application can be obtained through an audio management interface or a system task manager interface in the electronic device system. The audio application includes different audio processes and different audios in the audio processes. The system first obtains the currently active audio application, which includes different audio processes and different audios in the processes, and at least one audio output device available to the electronic device. Then, based on these information, a visual configuration interface is generated, which displays the audio applications, processes and audios, and associates the available output devices. The user performs a configuration operation on the interface, and the system obtains the output configuration information of the target audio in response to the operation.

[0074] In this embodiment, different levels of configuration operation information can be displayed in the visual configuration interface, which allows the user to intuitively perform audio output settings at different levels, thereby realizing audio output configuration at different granularities, improving the convenience and flexibility of user operation, and meeting the configuration requirements of different audios output through different audio output devices.

[0075] For example, the system of the electronic device detects that the active audio application is a game application, and the available output devices are a sound box and a headset. A visual configuration interface is generated, which displays the application and its corresponding two processes (e.g., the two processes correspond to the audios of the players on both sides of the electronic device in a dual-screen game), and the user selects the headset as the output device for process 1 and the sound box for process 2 on the interface. The system obtains the output configuration information of the target audio (e.g., the audio of process 1) as the headset in response to the user operation. In this way, the user can flexibly configure according to his own needs, so that different process audios are output to different devices, and in a game scenario, the players on both sides can receive audios through appropriate devices, thereby improving the game experience.

[0076] In the embodiments of the present application, the user can select the audio output device corresponding to the audio application, the audio process or the target audio in the visual configuration interface, and the system determines the corresponding output configuration information accordingly, thereby realizing audio output configuration at different levels and enabling the user to more accurately control audio output. Correspondingly, in the process of obtaining the output configuration information of the target audio in response to the configuration operation of the user in the visual configuration interface, the audio output configuration information can be determined based on the configuration operation of the user at different levels.

[0077] In an implementation, the application level information can be displayed in the visual configuration interface, so that the user can realize audio output configuration at the audio application level. That is, in response to the user selecting the audio output device corresponding to the audio application in the visual configuration interface, the target audio included in the audio application is determined, and the output configuration information of the audio application to which the target audio belongs is determined as the output configuration information of the target audio.

[0078] Based on the application identifier of the audio application and the application identifier of the audio application to which the target audio belongs and the identifier of the target audio included in the hierarchical identification information of the target audio, it is determined whether the audio application currently selected by the user is the audio application corresponding to the target audio. If the user does not make further settings, the output configuration information of the audio application to which the target audio belongs can be determined as the output configuration information of the target audio. For example, the currently active audio applications include a first application and a second application. The visual configuration interface can generate configuration options for the first application and the second application according to the currently available audio output devices in the electronic device, and the user can select the audio output device (such as a sound box) corresponding to the first application and the audio output device (such as earphones) of the second application according to the configuration options. If the user only sets to the application level, that is, only differentiates that different audio applications adopt different audio output devices. At this time, according to the identifier of the corresponding audio application to which the target audio belongs and the identifier of the target audio in the hierarchical identification information of the target audio, it is determined whether the currently set audio application includes the target audio. If the first application includes the target audio, the output configuration information corresponding to the first application can be determined as the output configuration information of the target audio, that is, the target audio is output through the sound box corresponding to the first application.

[0079] In another implementation, the system can provide audio output configuration at the audio process level. In response to the user selecting the audio output device corresponding to the audio process in the visual configuration interface, the target audio included in the audio process is determined, and the output configuration information of the audio process to which the target audio belongs is determined as the output configuration information of the target audio.

[0080] In this embodiment, the user can realize the audio output configuration of the audio process hierarchy in the visual configuration interface. The system can first display the configuration interface of the currently active audio application in the visual configuration interface, and if the user directly configures in this interface, the output configuration information matched with each audio application can be obtained. If the user clicks the corresponding audio application, the configuration interface of the audio process included in the audio application can be entered, so as to realize the configuration operation of the audio process, that is, to select the audio output device corresponding to the audio process. Then, according to the process identifier of the currently configured audio process and the process identifier and the audio identifier to which the target audio belongs, the audio process of the target audio is determined, and the audio output information corresponding to the audio process is determined as the output configuration information of the target audio. For example, the target audio belongs to process 1, and the audio output device configured by the user for process 1 is a sound box, so the target audio is also output through the sound box.

[0081] Correspondingly, in another embodiment, the system can also provide the user with the output configuration of the audio level, that is, the user can set different audio output devices for different audio streams. In response to the user selecting the audio output device corresponding to the target audio in the visual configuration interface, the output configuration information corresponding to the target audio is obtained. The user can realize the configuration of the audio level in the visual configuration interface, and the visual configuration interface can present the configuration options of the currently active audio application. When the user selects the corresponding audio application, the configuration interface of the audio process included in the audio application can be jumped to, and then if the user selects the corresponding audio process again, the configuration interface of the audio included in the audio process can be further jumped to. In this way, the user can select the audio output device corresponding to the audio in the configuration interface, and based on the matching of the audio identifier of the target audio and the audio identifiers of the configured audios, the output configuration information of the target audio is obtained.

[0082] For example, when a user uses a browser, the system can obtain the application identifier of the browser application and the audio processes corresponding to the browser application, i.e., different tab page processes of the browser and the audio included in the corresponding tab page processes. First, the visual configuration interface can display a configuration sub-interface of the browser application, which can include the browser application and the currently available audio output devices of the electronic device. If the user selects a sound box as the audio output device of the browser at the application level and saves the configuration information without subsequent configuration, the audio of the browser, the process audio of different processes included in the browser, and the output devices corresponding to the audio included in the processes can all be set to the sound box. If the user selects the browser in the configuration interface of the browser application, the visual configuration interface can present the configuration options of different tabs included in the browser, and the user can perform audio output configuration on the tabs. If the user enters the tab 1 process interface and selects a headset as the output device of the process, the output configuration information of the target audio in tab 1 becomes the headset. If the user selects a tab in the audio configuration interface of the tab, the configuration options of the audio included in the tab are jumped to. If the user directly selects a Bluetooth sound box for a certain video audio at the audio level, the output configuration information of the audio is the Bluetooth sound box. This multi-level configuration method allows the user to make precise settings at different levels according to specific needs, which meets the diversified audio output control requirements, such as allowing different tab audio to be output to different devices when multiple tabs are browsed, which improves work and entertainment efficiency.

[0083] In the embodiments of the present application, different levels of audio output configuration can be provided. In order to facilitate user configuration, the default audio output device of the next level during initialization configuration can be the output device selected at the previous level, which can better match the user's usage habits. The user can adjust the initialization configuration according to the type or quantity of the current audio to be output to obtain corresponding audio output configuration information.

[0084] In the embodiments of the present application, in order to provide accurate audio output meeting the user's demand, after the user sets the corresponding output configuration information, the binding relationship between the audio process and the corresponding output configuration information is contacted in response to the end of the audio process. The binding relationship between the audio and the corresponding output configuration information is released in response to the end of the audio. In this way, not only the rational release of system resources can be ensured, but also the accuracy of audio output control can be improved, and the invalid binding can be avoided to affect the subsequent audio output control. For example, the process identifier allocated by the operating system each time the process is started has uncertainty, that is, the process identifier of the current process can be changed when the process is started next time. Different instances of the same application program can obtain different process identifiers (such as PID). Therefore, the binding relationship between the audio process and the corresponding output configuration information is released after the end of the audio process, so as to avoid the error caused by the change of the process identifier when the process is started next time, and affect the output effect of the audio. Correspondingly, the audio identifier generated by the system is also dynamically allocated, and does not have fixedness. Therefore, the binding relationship between the audio and the corresponding output configuration information is contacted after the end of the audio, so as to ensure the stability of the system.

[0085] In another embodiment of the embodiments of the present application, the target audio output device corresponding to the current target audio can also be determined according to the existing output configuration information set by the user in advance. It should be noted that the method is applied to the application scenario in which the application identifier, process identifier and audio identifier of the audio application are fixed or not dynamically allocated. Correspondingly, the target audio output device is determined from at least one audio output device of the electronic device based on the hierarchical identifier information and the output configuration information, including:

[0086] If the output configuration information exists the audio output device corresponding to the audio identifier, the output device corresponding to the audio identifier is determined as the target audio output device; if the output configuration information does not exist the audio output device corresponding to the audio identifier, it is detected whether the output configuration information exists the audio output device corresponding to the process identifier of the audio process to which the target audio belongs; if yes, the audio output device is determined as the target audio output device; if no, the audio output device corresponding to the application identifier of the audio application to which the target audio belongs in the output configuration information is determined as the target audio output device.

[0087] For example, the audio identifier of the target audio is A, the process identifier is B, and the application identifier is C. In the output configuration information, the audio identifier A has no corresponding output device, the process identifier B corresponds to a headset, and the application identifier C corresponds to a sound system. The system first checks the audio identifier A, which has no corresponding device, and then checks the process identifier B, which has a corresponding headset. It is determined that the headset is the target output device. If the process identifier B also has no corresponding device, the sound system corresponding to the application identifier C is determined to be the target device. This hierarchical determination method enables the system to accurately find the corresponding output device according to the user's different level configuration intentions. For example, when the user only configures the process and does not configure the audio separately, the output can be configured according to the process, ensuring the accuracy of the audio output and meeting the user's expectations, and improving the user experience. In addition to being able to provide corresponding audio configuration methods based on different levels to achieve more granular audio configuration, the embodiments of the present application can also provide corresponding audio configuration methods in combination with the form of the electronic device. The form of the electronic device can include the form of the electronic device in the folded state (the electronic device can be folded into a single screen) and the form of the electronic device in the unfolded state (such as the electronic device can be unfolded into a double screen). If the electronic device is a multi-modal deformable device, it can also have different use forms, such as a tablet use form, a notebook use form, or a double-screen use form, etc. See Figure 2 The flowchart of the method for controlling audio output based on the form of the device provided in the embodiments of the present application can include the following steps:

[0088] S201, obtaining hierarchical identification information of a target audio.

[0089] S202, obtaining the device form of the electronic device.

[0090] S203, generating a visual configuration interface based on the device form, the currently active audio application, and at least one audio output device available to the electronic device.

[0091] S204, obtaining output configuration information of the target audio in response to a user's configuration operation on the visual configuration interface.

[0092] S205, determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information.

[0093] S206, controlling the target audio output device to output the target audio.

[0094] In this embodiment, the device form of the electronic device is considered when generating the visual configuration interface, which is generated based on the device form, the currently active audio application, and the available audio output device. The interface generated in this way can better adapt to different use states of the device and provide audio output configuration options that are more suitable for the current device form, making it more convenient and reasonable for the user to configure.

[0095] Referring to Figure 3 which shows three device forms of the electronic device, Figure 3 From top to bottom, the notebook form, the double-screen folding display form (also can be called the tent form due to its form similar to a tent), and the form of two screens combined into one display screen (similar to a tablet computer, also can be called the tablet form) of the electronic device are sequentially shown. Based on the device form, the currently active audio application, and at least one audio output device available to the electronic device, a corresponding visual configuration interface is generated, and the interface will display appropriate audio application and output device options according to the device form. For example, when the electronic device is in the tent form, the system obtains that the device form is the tent mode, the currently active audio application is an education application, and the available output devices are a sound box and earphones. The generated visual configuration interface will be optimized for the tent mode, and may highlight the audio configuration options suitable for this mode, such as more intuitively displaying the configuration options of the sound box and earphones, to facilitate the user to configure the output devices for different audio processes of the education application in the tent mode. In this way, the device form is different, and the interface display and configuration options are also different, so that the user can more conveniently perform audio configuration in a specific mode, for example, in a parent-child education scene in the tent mode, the teacher's audio can be quickly output to the sound box, and the student's audio can be quickly output to the earphones, thereby improving the education interaction effect.

[0096] In the embodiments of the present application, when the output configuration information of the target audio is obtained, the output configuration information of the target audio can also be obtained based on the current device form of the electronic device. That is, the corresponding output configuration information is determined in combination with the device form and the corresponding audio application, process, or audio, so that the output configuration information can more meet the configuration requirements of the current application scenario, and the audio use requirements of the user in different forms are provided.

[0097] In another implementation of the embodiments of the present application, when the electronic device has two or more screens, since the audio application can be displayed on different screens. The screen identifier corresponding to the different device forms of the electronic device can also be used as the top-level identifier information, and then the audio application window running on each screen is obtained, and the configuration interface of each screen is displayed according to the screen identifier information and the audio application identifier information, for example, the visual configuration interface displays the hierarchical configuration interface about the screen identifier, the audio application, the audio process, and the audio, and the user selects any one level for configuration, so that the user can configure the audio output configuration information under the corresponding screen based on the configuration interface. If the user configures the audio output device of each screen, when an audio window is displayed on a screen or switched to a screen for display, the hierarchical identifier corresponding to the audio window is obtained, and the corresponding audio output device is determined based on the audio configuration information corresponding to the screen, and the corresponding target audio is output through the audio output device.

[0098] In an embodiment, the process of determining the target audio output device from the at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information comprises: obtaining the output configuration information corresponding to the device form after the device form of the electronic device is switched; and determining the target audio output device from the at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information.

[0099] When the device form of the electronic device is switched, the system obtains the output configuration information corresponding to the device form after the switching, and then determines the target audio output device from the at least one audio output device of the electronic device in combination with the hierarchical identification information of the target audio. For example, the electronic device is currently in a tablet mode, and then a configuration interface is generated for configuration. It is detected that the electronic device can also be in a notebook mode or a tent mode, so that other configuration options can also be available when configuration is performed. Thus, in the configuration interface corresponding to the tablet mode, the configuration in the notebook mode can be selected for synchronous configuration. In the case that the device form is changed and the hierarchical identification information of the audio is not changed, the corresponding audio output device is matched, and the audio output device is controlled to output the corresponding target audio.

[0100] The audio configuration process of the electronic device is described by taking the electronic device having the above-described tablet form, notebook form and tent form as an example. If the electronic device is in a normal device form, the hierarchical configuration manner in the present solution can be directly used. Figure 4 FIG. 1 shows a flowchart of an audio configuration method according to an embodiment of the present application. The method can include the following steps:

[0101] S401, obtaining available audio output devices of an electronic device.

[0102] S402, obtaining a currently active audio session.

[0103] S403, determining whether the electronic device is in a multi-device form. If yes, step S404 is performed, otherwise step S405 is performed.

[0104] S404, loading a visual configuration interface for the multi-device form.

[0105] S405, loading a default visual configuration interface.

[0106] The visual configuration interface for the multi-device form can have more configuration options for the device form than the default visual configuration interface. Other configuration options are determined according to the audio hierarchy.

[0107] FIG. 1 shows a flowchart of an audio configuration method according to an embodiment of the present application. The method can include the following steps: Figure 5Fig. 1 shows a schematic diagram of an audio configuration process of an audio hierarchy according to an embodiment of the present application, which can include the following steps:

[0108] S501, grouping audio applications based on application identifiers of audio applications of an audio session.

[0109] S502, grouping audio processes corresponding to each audio application according to process identifiers.

[0110] S503, grouping audios corresponding to each audio process according to audio identifiers.

[0111] S504, generating a visual configuration interface based on the grouping information.

[0112] S505, determining audio configuration information in response to user operations on the visual configuration interface.

[0113] S506, if the user operation is an application-level operation, binding the application identifier to the corresponding audio output device.

[0114] Since the application identifier is usually a static identifier, the above configuration information can be stored persistently.

[0115] S507, if the user operation is a process-level operation, binding the process identifier to the corresponding audio output device.

[0116] Since the process identifier is usually dynamically updated, the configuration information at the process level can be temporarily stored.

[0117] S508, if the user operation is an audio-level operation, binding the audio identifier to the corresponding audio output device. After exiting the software, it is also not saved to ensure software stability.

[0118] In the embodiments of the present application, the audio settings can be more refined than the system default audio management program granularity according to user needs, and the audio output can be controlled from the system level, which has good universality. The application such as a browser using a cross-process session can be optimized to achieve the effect of outputting audio of different tabs to different devices, and the application scenario of outputting the same audio stream to different devices can also be realized, and the control granularity is more refined. The output settings of the audio can be further refined according to the characteristics of the device form of the electronic device, the supported characteristics of the product, the use scenarios, and the seamless switching of the audio output device of the electronic device in different device forms.

[0119] Referring to Figure 6 In the embodiments of the present application, an audio output control device is also provided, which can include:

[0120] The first obtaining unit 601 is configured to obtain hierarchical identification information of a target audio, the hierarchical identification information comprising at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio.

[0121] The second obtaining unit 602 is configured to obtain output configuration information of the target audio.

[0122] The determining unit 603 is configured to determine a target audio output device from at least one audio output device of an electronic device based on the hierarchical identification information and the output configuration information.

[0123] The control unit 604 is configured to control the target audio output device to output the target audio.

[0124] Optionally, the second obtaining unit comprises:

[0125] The generating sub-unit is configured to generate a visual configuration interface based on an audio application currently in an active state and at least one audio output device available to the electronic device, wherein the audio application comprises different audio processes, and the different audio processes comprise different audios.

[0126] The first obtaining sub-unit is configured to obtain the output configuration information of the target audio in response to a configuration operation of a user on the visual configuration interface.

[0127] Optionally, the first obtaining sub-unit is configured to:

[0128] In response to the user selecting an audio output device corresponding to the audio application on the visual configuration interface, determine a target audio included in the audio application, and determine output configuration information of an audio application to which the target audio belongs as the output configuration information of the target audio.

[0129] Or, in response to the user selecting an audio output device corresponding to an audio process on the visual configuration interface, determine a target audio included in the audio process, and determine output configuration information of an audio process to which the target audio belongs as the output configuration information of the target audio.

[0130] Or, in response to the user selecting an audio output device corresponding to the target audio on the visual configuration interface, obtain output configuration information corresponding to the target audio.

[0131] Optionally, the first obtaining sub-unit is further configured to:

[0132] In response to the audio process ending, release a binding relationship between the audio process and the corresponding output configuration information.

[0133] In response to the audio ending, the binding relationship between the audio and the corresponding output configuration information is released.

[0134] Optionally, the determining unit comprises:

[0135] a first determining sub-unit, configured to determine, if the output configuration information exists the audio output device corresponding to the audio identifier, the audio output device corresponding to the audio identifier as the target audio output device;

[0136] a second determining sub-unit, configured to, if the output configuration information does not exist the audio output device corresponding to the audio identifier, detect whether the output configuration information exists the audio output device corresponding to the process identifier of the audio process to which the target audio belongs;

[0137] a third determining sub-unit, configured to, if yes, determine the audio output device as the target audio output device; and if no, determine the audio output device corresponding to the application identifier of the audio application to which the target audio belongs as the target audio output device.

[0138] Optionally, the generating sub-unit is configured to:

[0139] obtain the device form of the electronic device;

[0140] generate a visual configuration interface based on the device form, the audio application currently in an active state, and at least one audio output device available to the electronic device.

[0141] Optionally, the second obtaining unit comprises:

[0142] a second obtaining sub-unit, configured to obtain the output configuration information of the target audio based on the current device form of the electronic device.

[0143] Optionally, the determining unit is configured to:

[0144] in response to the device form of the electronic device being switched, obtain the output configuration information corresponding to the switched device form;

[0145] determine the target audio output device from at least one audio output device of the electronic device based on the hierarchical identifier information and the output configuration information.

[0146] It should be noted that the specific implementation of each unit and sub-unit in the embodiment can refer to the corresponding content in the foregoing, which will not be described in detail here.

[0147] In another embodiment of the present application, a readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, the audio output control method in the above embodiments is implemented.

[0148] In another embodiment of the present application, an electronic device is also provided, which can include:

[0149] a memory for storing an application program and data generated by running of the application program;

[0150] a processor for executing the application program to implement:

[0151] obtaining hierarchical identification information of a target audio, the hierarchical identification information including at least one of an application identification of an audio application to which the target audio belongs, a process identification of an audio process to which the target audio belongs and an audio identification of the target audio;

[0152] obtaining output configuration information of the target audio;

[0153] determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information;

[0154] controlling the target audio output device to output the target audio.

[0155] It should be noted that the specific implementation of the processor in the present embodiment can refer to the corresponding content in the foregoing, which will not be described in detail here.

[0156] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0157] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or combination of the two. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0158] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and

[0159] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments of the application will be apparent to those of skill in the art upon reviewing the above description. The scope of the application should, therefore, be determined not with reference to the above description, but instead should be determined with reference to the appended claims, along with their full scope of equivalents.

Claims

1. A method for controlling audio output, comprising: Obtaining hierarchical identification information of a target audio, the hierarchical identification information including at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio; Obtaining output configuration information of the target audio; determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information; The target audio output device is controlled to output the target audio.

2. The method according to claim 1, wherein obtaining the output configuration information of the target audio comprises: Generate a visual configuration interface based on a currently active audio application and at least one audio output device available to the electronic device; wherein the audio application includes different audio processes and different audios included in the audio processes; In response to a configuration operation performed by a user on the visual configuration interface, output configuration information of the target audio is obtained.

3. The method according to claim 2, wherein obtaining the output configuration information of the target audio in response to the user's configuration operation on the visual configuration interface comprises: In response to a user selecting an audio output device corresponding to the audio application on the visual configuration interface, determining a target audio included in the audio application, and determining output configuration information of the audio application to which the target audio belongs as output configuration information of the target audio; or, in response to a user selecting an audio output device corresponding to an audio process in the visual configuration interface, determining a target audio included in the audio process, and determining the output configuration information of the audio process to which the target audio belongs as the output configuration information of the target audio; Alternatively, in response to the user selecting the audio output device corresponding to the target audio in the visual configuration interface, output configuration information corresponding to the target audio is obtained.

4. The method according to claim 3, further comprising: In response to the audio process ending, releasing the binding relationship between the audio process and the corresponding output configuration information; In response to the audio ending, the binding relationship between the audio and the corresponding output configuration information is released.

5. The method according to claim 1, wherein determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information comprises: If the output configuration information contains an audio output device corresponding to the audio identifier, determining the output device corresponding to the audio identifier as a target audio output device; If the audio output device corresponding to the audio identifier does not exist in the output configuration information, detecting whether there is an audio output device corresponding to the process identifier of the audio process to which the target audio belongs in the output configuration information; If so, determining the audio output device as a target audio output device; If not, the audio output device corresponding to the application identifier of the audio application to which the target audio belongs in the output configuration information is determined as the target audio output device.

6. The method according to claim 2, wherein generating a visual configuration interface based on a currently active audio application and at least one audio output device available to the electronic device comprises: Obtaining a device form of the electronic device; A visual configuration interface is generated based on the device form, a currently active audio application, and at least one audio output device available to the electronic device.

7. The method according to claim 1, wherein obtaining output configuration information of the target audio comprises: Based on the current device form of the electronic device, output configuration information of the target audio is obtained.

8. The method according to claim 7, wherein determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information comprises: In response to a device form of the electronic device being switched, output configuration information corresponding to the switched device form is obtained; A target audio output device is determined from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information.

9. An audio output control device, comprising: A first acquiring unit is configured to obtain hierarchical identification information of a target audio, wherein the hierarchical identification information includes at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio; A second acquiring unit, configured to acquire output configuration information of the target audio; a determining unit, configured to determine a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information; A control unit is used to control the target audio output device to output the target audio.

10. An electronic device comprising: A memory, used to store applications and data generated by the execution of the applications; A processor, configured to execute the application program to implement: Obtaining hierarchical identification information of a target audio, the hierarchical identification information including at least one of an application identifier of an audio application to which the target audio belongs, a process identifier of an audio process to which the target audio belongs, and an audio identifier of the target audio; Obtaining output configuration information of the target audio; determining a target audio output device from at least one audio output device of the electronic device based on the hierarchical identification information and the output configuration information; The target audio output device is controlled to output the target audio.