Audio focus control method and device and electronic equipment

By processing audio focus requests within the local system of the audio system and using mechanisms such as inter-process communication to allocate audio focus, the problem of computational resource consumption caused by the introduction of proxy containers is solved, thereby improving the performance of the in-vehicle audio system.

CN121174084APending Publication Date: 2025-12-19SHANGHAI CHANGXINGDA INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511198082.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

Introducing an audio management container into an in-vehicle system will consume the audio system's computing resources, leading to performance degradation.

Method used

By acquiring and processing application access requests within the local system of the audio system, and utilizing inter-process communication mechanisms, Binder mechanisms, or Socket mechanisms, the running status of audio focus is determined and audio focus is allocated, avoiding the introduction of an additional intermediate processing step by a proxy container.

Benefits of technology

It effectively solved the problem of audio system performance degradation and improved the operating efficiency and resource utilization of the audio system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121174084A_ABST
    Figure CN121174084A_ABST
Patent Text Reader

Abstract

The invention discloses an audio focus control method and device and electronic equipment, and is applied to the technical field of wireless communication. The audio focus control method is applied to a first system of at least two systems in an audio system, and comprises the following steps: obtaining an access request of a first application, the access request being used for requesting to access an audio focus used for managing audio equipment in the first system; according to the access request, determining a second system corresponding to the first application, the second system being any one of the at least two systems; according to the second system and the operation state of the audio focus, first request response information corresponding to the access request is determined, and the first request response information is used for indicating whether the first application successfully requests the audio focus of the audio equipment or not. According to the method, acquisition and processing of the access request related to the audio focus of the audio equipment are integrated in the existing first system of the audio system, so that the problem that the performance of the audio system is reduced due to the fact that an agent container is additionally introduced is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of wireless communication, and particularly relates to an audio focus control method and device and electronic equipment. BACKGROUND

[0002] With the development of technology, multiple applications are usually installed in an audio system. When multiple applications simultaneously access the same sound output device such as a loudspeaker, an audio conflict problem occurs, such as mutual interference or overlapping playback of audio signals of multiple applications. The multiple applications are distributed and run in multiple containers.

[0003] In related technologies, an audio management container independent of the multiple containers can be separately configured in the audio system, and a global audio focus proxy service is run on the audio management container. The global audio focus proxy service is configured to receive audio focus requests of applications running in each container, and when audio focus requests of multiple containers for the same audio device are received, the global audio focus proxy service performs audio focus allocation according to a preset strategy. In this way, the authorized container can obtain the use right of the sound output device. However, the introduction of the audio management container in the vehicle-mounted system occupies the computing resources of the audio system, resulting in a decline in the performance of the audio system. SUMMARY

[0004] Embodiments of the present application provide an audio focus control method, device, electronic equipment, storage medium and program product, which can solve the problem that the introduction of a proxy container in an audio system occupies the computing resources of the audio system, resulting in a decline in the performance of the audio system.

[0005] In a first aspect, embodiments of the present application provide an audio focus control method, which is applied to a first system of at least two systems in a vehicle-mounted system. The audio focus control method comprises the following steps.

[0006] obtaining an access request of a first application, the access request being configured to request access to an audio focus of an audio device in the first system;

[0007] determining a second system corresponding to the first application according to the access request, the second system being any one of the at least two systems;

[0008] determining first request response information corresponding to the access request according to the second system and a running state of the audio focus, the first request response information being configured to indicate whether the first application successfully requests the audio focus of the audio device.

[0009] In some possible implementation manners of embodiments of the present application, the determination of the first request response information corresponding to the access request according to the second system and the running state of the audio focus comprises the following steps.

[0010] In a running state of the audio focus, the audio focus is occupied, and the second application occupying the audio focus is obtained;

[0011] According to the application information of the second application, a third system corresponding to the second application is determined, the third system being any one of the at least two systems;

[0012] According to the second system and the third system, request access information corresponding to the access request is determined.

[0013] In some possible implementation manners of the embodiments of the present application, the above-mentioned determining, according to the second system and the third system, of the request access information corresponding to the access request comprises:

[0014] In a case where the second system and the third system are target systems, an audio focus allocation request is sent to the target systems, the target systems being any one of the at least two systems, the audio focus allocation request being used to request the target systems to determine whether to allocate the audio focus of the audio device to the first application based on a preset application priority;

[0015] According to the second request response information sent by the target system, first request response information corresponding to the access request is determined, the second request response information being used to indicate whether the target system allocates the audio focus of the audio device to the first application.

[0016] In some possible implementation manners of the embodiments of the present application, the above-mentioned determining, according to the second system and the third system, of the request access information corresponding to the access request comprises:

[0017] In a case where the second system and the third system are different, the request access information corresponding to the access request is determined according to a preset system priority.

[0018] In some possible implementation manners of the embodiments of the present application, the above-mentioned audio focus control method can further comprise:

[0019] In a case where the audio focus of the audio device is occupied by the second application, and the first request response information is request response information used to indicate that the first application successfully requests the audio focus of the audio device, the audio focus of the audio device is switched from the second application to the first application.

[0020] In some possible implementation manners of the embodiments of the present application, the first system is a host system, and the second system is the host system, the host system being configured with an audio management module, the audio management module being integrated with a first communication protocol, the first communication protocol being implemented based on an inter-process communication mechanism;

[0021] The access request of the first application is obtained, comprising:

[0022] The audio management module obtains an access request sent by the first application in the host system according to the first communication protocol.

[0023] In some possible implementation manners of the embodiments of the present application, the first system is a host system, the second system is an Android system, the host system is configured with an audio management module, the Android system is configured with an audio control hardware abstraction layer module, the audio management module is integrated with a second communication protocol for cross-host system and Android system, and the second communication protocol is implemented based on a Binder mechanism or a Socket mechanism.

[0024] The access request of the first application includes:

[0025] The audio management module obtains an access request sent by the first application in the Android system according to the second communication protocol.

[0026] In some possible implementation manners of the embodiments of the present application, the first system is a host system, the second system is a Linux system, the host system is configured with an audio management module, the Linux system is configured with an audio service module, the audio management module is integrated with a third communication protocol for cross-host system and Linux system, and the third communication protocol is implemented based on a Binder mechanism or a Socket mechanism.

[0027] The access request of the first application includes:

[0028] The audio management module obtains an access request of the first application in the Linux system according to the third communication protocol.

[0029] In a second aspect, the embodiments of the present application provide an audio focus control apparatus, applied to a first system in at least two systems in an audio system, and the audio focus control apparatus includes:

[0030] An obtaining module is configured to obtain an access request of a first application, and the access request is used to request an audio focus of an audio device in the first system for managing the audio device.

[0031] A first determining module is configured to determine a second system corresponding to the first application according to the access request, and the second system is any one of the at least two systems.

[0032] A second determining module is configured to determine first request response information corresponding to the access request according to the second system and a running state of the audio focus, and the first request response information is used to indicate whether the first application successfully requests the audio focus of the audio device.

[0033] In a third aspect, an electronic device is provided, and the electronic device includes a processor and a memory storing computer program instructions; and the processor implements the audio focus control method according to any one of the first aspect when executing the computer program instructions.

[0034] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the audio focus control method according to any one of the first aspect.

[0035] In a fifth aspect, a computer program product is provided, and the computer program product includes computer programs or instructions, and the computer programs or instructions are executed by a processor to implement the audio focus control method according to any one of the first aspect.

[0036] The audio focus control method, device, electronic device, storage medium and program product provided by the embodiments of the present application can acquire and process an access request of a first application in a local system of an audio system, that is, a first system, wherein processing the access request of the first application includes determining a second system for managing the first application based on the access request, and determining first request response information corresponding to the access request based on the second system and a running state of an audio focus, so that the processing process of the access request is directly performed in the first system and the second system of the audio system. In this way, by integrating the acquisition and processing of the access request related to the audio focus of the audio device in the existing first system of the audio system, the additional introduction of a proxy container in the related art is effectively avoided, so that the calculation resource occupation caused by the intermediate processing link of the access request to a centralized external proxy container is avoided, thereby effectively solving the problem of performance degradation of the audio system. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments of the present application will be briefly introduced. For those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0038] Figure 1 A system architecture diagram of an audio system provided by some embodiments of the present application is shown;

[0039] Figure 2 A flowchart of an audio focus control method provided by some embodiments of the present application is shown;

[0040] Figure 3 A system architecture diagram of a host system provided by some embodiments of the present application is shown;

[0041] Figure 4Fig. 1 shows a communication interaction diagram between a host system and an Android system according to some embodiments of the present application;

[0042] Figure 5 Fig. 2 shows a communication interaction diagram between a host system and a Linux system according to some embodiments of the present application;

[0043] Figure 6 Fig. 3 shows a flow diagram of a specific implementation of step 230 according to some embodiments of the present application;

[0044] Figure 7 Fig. 4 shows a flow diagram of a specific implementation of step 2303 according to some embodiments of the present application;

[0045] Figure 8 Fig. 5 shows a communication interaction diagram between a host system and an Android system according to some other embodiments of the present application;

[0046] Figure 9 Fig. 6 shows a communication interaction diagram between a host system and a Linux system according to some other embodiments of the present application;

[0047] Figure 10 Fig. 7 shows a structural diagram of an audio focus control device according to some embodiments of the present application;

[0048] Figure 11 Fig. 8 shows a structural diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION

[0049] The features and exemplary embodiments of various aspects of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application clearer. The following further describes the present application in detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of the specific details by those skilled in the art. The following description of the embodiments is only intended to provide a better understanding of the present application by showing examples of the present application.

[0050] It should be noted that, in this document, the terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between such entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0051] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application comply with the relevant provisions of national laws and regulations.

[0052] It should be noted that in the embodiments of the present application, some software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0053] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the related technologies involved:

[0054] In a Linux-based containerized deployment environment, when multiple containerized application programs need to access the same physical audio output device at the same time, an audio conflict problem will be caused. The performance of the audio conflict is that when multiple containers in the audio system access the same audio device at the same time, an audio conflict problem will be caused, such as mutual interference or overlapping playback of audio signals of multiple containers. In the related art, the following three schemes are usually used to solve the audio conflict problem.

[0055] Scheme one: an audio management container independent of multiple containers is configured in the audio system, and a global audio focus proxy service is run on the audio management container, the global audio focus proxy service is used to receive an audio focus request initiated by an application running in each container to the global audio focus proxy service through a desktop bus (D-Bus) interface, the global audio focus proxy service maintains a predefined application priority rule table, for example, media player > navigation prompt > notification sound; when the global audio focus proxy service receives a new audio focus request, it will allocate the audio focus according to the running state of the current audio focus and the predefined application priority rule table, and notify the related container of the allocation result through the D-Bus interface.

[0056] Solution two: operating at the ALSA driver layer, specifically, by modifying the ALSA hardware parameter configuration, an independent sound card channel is allocated for each container, so that the audio system can distinguish the audio stream from different containers, and physically shunt or dynamically redirect the audio stream of different containers to avoid hard conflict of the underlying signal. When the audio focus is lost, the audio stream of the container is automatically switched from the physical channel to a virtual loopback device. This virtual loopback device internally loops the audio data and does not output to the real audio device.

[0057] Solution three: containers with close cooperative relationship are organized into logical groups, for example, navigation container group and media playback container group that often work together in a vehicle system, and a lighter audio focus coordination is implemented within the logical group. At the same time, an extended Berkeley Packet Filter (eBPF) program is used to realize low-latency event response and real-time detection of audio focus preemption requests.

[0058] However, the above solution one introduces a global audio focus proxy service, which requires an additional audio management container, and will occupy the computing resources of the audio system, resulting in performance degradation of the audio system; the redirection configuration at the ALSA layer in solution two is complex and difficult to maintain, and its universality is limited; the grouping management mechanism in solution three cannot meet the scene requirements of globally unified control of all containers accessing all audio devices.

[0059] To solve the problems in the related art, the embodiments of the present application provide an audio focus control method and device, an electronic device, a storage medium and a program product.

[0060] First, in combination with Figure 1 A kind of audio system provided by the embodiments of the present application is described in detail.

[0061] In some embodiments of the present application, as Figure 1As shown, the audio system 100 can include a host system 110, an Android system 120, a Linux system 130 and an audio device 140. Among them, the host system 110 runs in a host container, which is an isolated environment running the host system 110. The host system 110 includes a PulseAudio service, which is an open source, cross-platform audio service for managing the collection, processing, output, etc. of audio data, and is a commonly used audio processing middleware in the audio system. The Android system 120 includes an Android application, an Android system-level audio service, an audio hardware abstraction layer, an Advanced Linux Sound Architecture and a PulseAudio system module. The Android system runs in an Android container, which is an isolated environment running the Android system. The audio hardware abstraction layer is used for hardware audio interface, the Advanced Linux Sound Architecture processes audio data, and then communicates with the PulseAudio service of the host system 110 through the PulseAudio system module as a bridge, and finally outputs audio through the audio device. The Linux system 130 includes a Linux application and a PulseAudio system module. The Linux system 130 runs in a Linux container, which is an isolated environment running the Linux system. The Linux application initiates an audio request, and the Linux system 130 communicates with the PulseAudio service of the host system 110 through the PulseAudio system module, thereby realizing the audio interaction of the Linux application, and finally outputting audio through the audio device 140. The host system 110 includes a host application and a PulseAudio service, and the host system 110 can realize the audio input / output function through the open source project PulseAudio service in the host system 110. The audio device 140 can be an audio amplifier for receiving the audio signal output by the PulseAudio service and driving the speaker and other peripheral devices to produce sound.

[0062] It can be seen that the audio system 100 takes the PulseAudio service in the host system 110 as the hub, and connects the Android system 120, the Linux system 130 and the host system 110 to realize the transmission and processing of audio data.

[0063] In some embodiments of the present application, the above-mentioned audio system can be a vehicle-mounted system. Further, the Android application can include but is not limited to: entertainment system application, navigation application, voice interaction application. Among them, the entertainment system application can be specifically a music playing application, a video streaming media playing application. The Linux application can include but is not limited to: instrument related application, head-up display related application, alarm sound related application. The host application can include but is not limited to: audio input device related application, audio output device related application, display device related application.

[0064] In some embodiments of the present application, the host system 110 described above can be used to:

[0065] obtain an access request of a first application, the access request being used to request access to an audio focus in a first system for managing an audio device;

[0066] determine, according to the access request, a second system corresponding to the first application, the second system being any one of the at least two systems;

[0067] determine, according to the second system and a running state of the audio focus, first request response information corresponding to the access request, the first request response information being used to indicate whether the first application successfully requests the audio focus of the audio device.

[0068] Thus, the host system can obtain and process the access request of the first application in the local system of the audio system, i.e., the first system, wherein processing the access request of the first application includes determining the second system for managing the first application based on the access request, and determining the first request response information corresponding to the access request based on the second system and the running state of the audio focus, so that the processing process of the access request is directly performed in the first system and the second system of the audio system. In this way, by integrating the obtaining and processing of the access request related to the audio focus of the audio device in the existing first system of the audio system, the additional introduction of the proxy container in the related art is effectively avoided, so that the calculation resource occupation caused by the intermediate processing link of the access request to a centralized external proxy container is avoided, thereby effectively solving the problem of performance degradation of the audio system.

[0069] The audio focus control method provided by the embodiments of the present application will be described in detail below in combination with the accompanying drawings and specific embodiments and application scenarios. Figures 2 to 9 The audio focus control method provided by the embodiments of the present application will be described in detail below in combination with the accompanying drawings and specific embodiments and application scenarios.

[0070] Figure 2 A flowchart of an audio focus control method provided by some embodiments of the present application is shown. As shown in Figure 2 the audio focus control method is applied to a first system in the at least two systems of the audio system, and the first system can be the host system described above. The audio focus control method can include steps 210 to 230.

[0071] Step 210: Obtain an access request of a first application, the access request being used to request access to an audio focus in a first system for managing an audio device.

[0072] Step 220: Determine, according to the access request, a second system corresponding to the first application, the second system being any one of the at least two systems.

[0073] Step 230: Based on the operating status of the second system and the audio focus, determine the first request response information corresponding to the access request. The first request response information is used to indicate whether the first application has successfully requested the audio focus of the audio device.

[0074] Therefore, access requests from the first application can be acquired and processed within the local system (first system) of the audio system. Processing the access requests from the first application includes determining the second system for managing the first application based on the access request, and determining the first request response information corresponding to the access request based on the operating status of the second system and the audio focus. This allows the processing of access requests to be performed directly within the first and second systems of the audio system. By integrating the acquisition and processing of audio focus-related access requests from the audio device into the existing first system of the audio system, the computational resource consumption caused by the introduction of an additional proxy container in related technologies, which forces access requests to first bypass a centralized external proxy container for intermediate processing, is effectively avoided. This effectively solves the problem of performance degradation in the audio system.

[0075] The steps described above are explained in detail below.

[0076] First, regarding step 210, the audio focus in this embodiment is a concept introduced by the audio system to manage audio devices, used to control the application's use of the audio device in the time dimension. Generally, when an application requests audio focus, it can play the application's audio normally after the audio focus request is successful. After the application finishes playing the audio, it releases the audio focus so that other applications can successfully request the audio focus when they need to play audio. The first system refers to the system in the audio system used to manage the audio focus processing related access requests of the audio device, for example, it could be the one described above. Figure 1 The host system in the audio device management system has direct hardware or low-level driver connections with the audio device, enabling it to control the audio device without requiring additional intermediate layer forwarding commands. Therefore, managing the audio focus of the audio device through the host system allows for more efficient audio focus management. Audio devices can include sound input devices and sound output devices; for example, sound input devices can include microphones, and sound output devices can include speakers and headphones.

[0077] In some embodiments of this application, the first system in this application embodiment is a host system, the second system is a host system, the host system is configured with an audio management module, the audio management module integrates the first communication protocol of the host system, and the first communication protocol is implemented based on an inter-process communication mechanism; based on this, the above step 210 may specifically include: obtaining the access request sent by the first application in the host system through the audio management module in accordance with the first communication protocol.

[0078] Inter-process communication (IPC) refers to the technical methods by which different processes in a host system transfer data and exchange information, enabling collaborative work between different processes within the same system.

[0079] For example, such as Figure 3 As shown, when the first application in the host system needs to use an audio device, it generates an access request for the first application. Following the first communication protocol of the host system, the access request is encapsulated and sent to the audio management module (such as the AudioManager module) via the host system's inter-process communication channel. The audio management module continuously monitors the inter-process communication channel. When it detects the access request from the first application, it retrieves the request according to the first communication protocol. Subsequently, the audio management module determines the second system corresponding to the first application and, based on the running status of the second system and the audio focus, determines the first request response information corresponding to the access request. Based on this first request response information, it responds to the first application's access request.

[0080] Therefore, after integrating the first communication protocol based on inter-process communication mechanism, the audio management module can handle the access requests of the first application within the host system, realizing direct data interaction between the application within the host system and the audio management module. Compared with the solution that relies on external proxy containers, the inter-process communication within the same host system consumes less resources, indirectly improving the operating efficiency of the audio system.

[0081] In other embodiments of this application, the first system is a host system and the second system is an Android system. The host system is configured with an audio management module and the Android system is configured with an audio control hardware abstraction layer module. The audio management module integrates a second communication protocol between the host system and the Android system. The second communication protocol is implemented based on the Binder mechanism or the Socket mechanism. Based on this, step 210 above may specifically include: obtaining the access request sent by the first application in the Android system through the audio management module in accordance with the second communication protocol.

[0082] Among them, the Binder mechanism refers to the communication mechanism in the Android system, which supports cross-process calls and is the core method for communication between application components in the Android system. The Socket mechanism refers to a general communication method based on the network protocol stack. The second communication protocol refers to a protocol specifically designed for cross-system communication between the host system and the Android system, based on the Binder or Socket mechanism. The Audio Control Hardware Abstraction Layer (Audio Control HAL) module is an intermediate module in the Android system that connects the application layer and the hardware driver. It is responsible for converting the audio requests of the first application into hardware-recognizable instructions, while also supporting interaction with the host system.

[0083] For example, such as Figure 4 As shown, when the first application within the Android system needs to use an audio device, it generates an access request. This request is then encapsulated according to the second communication protocol between the host system and the Android system. The encapsulated request is then sent to the host system's audio management module via a cross-system communication link established using the Binder or Socket mechanism, by calling the audio control hardware abstraction layer module (such as Audio Control HAL) within the Android system. Specifically, the audio control hardware abstraction layer module establishes a virtual channel between the processes of the host system and the Android system, enabling the relay and synchronization of access requests. The host system's audio management module continuously listens for and receives access requests from the Android system. Upon detecting an access request from the first application sent by the Android system, it acquires the access request according to the second communication protocol. Subsequently, the audio management module determines the second system corresponding to the first application and, based on the running status of the second system and the audio focus, determines the first request response information corresponding to the access request. Based on this first request response information, it responds to the first application's access request by calling the audio control hardware abstraction layer module within the Android system.

[0084] Therefore, after integrating a second communication protocol based on the Binder or Socket mechanism, the audio management module can receive access requests from the Android system, solving the cross-platform communication problem between the host system and the Android system. Among them, the audio control hardware abstraction layer module, as an intermediate node of the Android system, uniformly handles the access requests of audio focus of Android applications within the Android system, avoiding the chaos of direct communication between Android applications and the host system, and improving the standardization of cross-system communication.

[0085] In some other embodiments of this application, the first system in this application embodiment is a host system, the second system is a Linux system, the host system is configured with an audio management module, the Linux system is configured with an audio service module, and the audio management module integrates a third communication protocol between the host system and the Linux system. The third communication protocol is implemented based on the Binder mechanism or the Socket mechanism. Based on this, the above step 210 may specifically include: obtaining the access request of the first application in the Linux system through the audio management module in accordance with the third communication protocol.

[0086] The Linux system runs applications based on the Linux kernel. The audio service module is the module in the Linux system used to uniformly handle audio-related requests. It acts as an intermediary node between Linux applications and the host system's audio management module, undertaking request forwarding functions. The third communication protocol is a protocol used for cross-system communication between the host system and the Linux system. It is designed based on the Binder or Socket mechanism, and its data transmission format and interaction logic are optimized for the characteristics of the Linux system, supporting cross-system transmission of audio focus requests.

[0087] For example, such as Figure 5 As shown, when the first application in the Linux system needs to use an audio device, it generates an access request. This request is then encapsulated according to the host system's third communication protocol. By calling the audio service module (such as Audio Manager) in the Linux system, and establishing a cross-system communication link based on the Binder or Socket mechanism, the audio service module sends the encapsulated access request to the host system's audio management module. The host system's audio management module continuously listens for and receives access requests from the Linux system. Upon detecting an access request from the first application sent by the Linux system, it retrieves the access request according to the third communication protocol. Subsequently, the audio management module determines the second system corresponding to the first application, and based on the running status of the second system and the audio focus, determines the first request response information corresponding to the access request. Based on this first request response information, it responds to the first application's access request by calling the audio service module in the Linux system.

[0088] Therefore, after the host system's audio management module integrates a third communication protocol based on the Binder or Socket mechanism, it can receive access requests from the Linux system, solving the cross-platform communication problem between the host system and the Linux system. Among them, the audio service module, as an intermediate node of the Linux system, uniformly handles the access requests of the audio focus of all Linux applications within the Linux system, avoiding the chaos of direct communication between Linux applications and the host system, and improving the standardization of cross-system communication.

[0089] Secondly, regarding step 220, the second system in this embodiment refers to the system corresponding to or associated with the first application that initiated the access request, and belongs to one of at least two systems in the audio system. For example, the access request may include, but is not limited to, the application identification information of the first application, the device information of the audio device requested for access, and the timestamp of the request. The application identification information is information used to uniquely identify the first application and may include, but is not limited to: the application's package name, process identifier (ID), application signature, and a custom unique identifier.

[0090] In some embodiments of this application, the access request carries at least the application identifier information of the first application; based on this, step 220 above may specifically include: determining the reference system corresponding to the application identifier information of the first application as the second system according to the correspondence between the reference application identifier information and the reference system.

[0091] The reference application identification information refers to the application identification information pre-stored in the first system's host system for comparison. Specifically, it includes the identification information of all applications in the audio system that may initiate audio requests. The reference system refers to the system that corresponds one-to-one with the reference application identification information, i.e., the system to which the reference application belongs, such as the host system, Android system, or Linux system. Key-value pairs between the reference application identification information and the reference system can be pre-established in the first system and stored in the first system's database. This allows the first system to quickly query the second system to which the first application belongs after receiving an access request from the first application.

[0092] Therefore, by applying the identification information and the system's preset correspondence, the first system does not need complex cross-system queries or dynamic identification logic. It can determine the second system simply by matching, which effectively improves the identification efficiency of the system corresponding to the first application.

[0093] Furthermore, regarding step 230, the first request response information refers to the information generated by the first system and used to provide feedback to the first application, clearly informing the first application whether it has successfully requested the audio focus of the audio device. The operating status of the audio focus is used to characterize the current usage of the audio focus, specifically including a first operating status or a second operating status. The first operating status indicates that the audio focus is occupied, and the second operating status indicates that the audio focus is unoccupied.

[0094] In some embodiments of this application, such as Figure 6 As shown, step 230 above may specifically include steps 2301 to 2303.

[0095] Step 2301: If the audio focus is occupied, then obtain the second application that occupies the audio focus.

[0096] For example, the audio management module of the host system can maintain an audio focus status table in real time. The audio focus status table records the current running status (idle / occupied) of the audio focus of the audio device. When the current running status of the audio focus of the audio device in the audio focus status table is occupied, the second application occupying the audio focus of the audio device is queried.

[0097] Step 2302: Based on the application information of the second application, determine the third system corresponding to the second application. The third system is any one of the at least two systems.

[0098] The second application refers to the application currently occupying audio focus; that is, the application using the audio device when the first application requests audio focus, and its system is the third system. The application information of the second application may include the identification information of the second application.

[0099] For example, based on the correspondence between reference application identification information and reference system, the reference system corresponding to the application identification information of the second application is determined as the third system.

[0100] Step 2303: Determine the request access information corresponding to the access request based on the second system and the third system.

[0101] Therefore, when the audio focus is occupied, obtaining the second application occupying the audio focus, i.e., the application currently using the audio device, can provide a basis for processing the audio focus access request. Subsequently, by obtaining the third system corresponding to the second application, the audio conflict between applications can be converted into an audio conflict between systems. The access request can be processed from the overall level of the audio system, so that the processing result of the access request can be adapted to the characteristics of different systems in the audio system. This improves the applicability of access request processing in the audio system and increases the processing efficiency of access requests.

[0102] In some other embodiments of this application, step 230 may specifically include determining the first target request response information as the first request response information corresponding to the access request when the audio focus's running state indicates that the audio focus is not occupied. The first target request response information is used to indicate that the first application has successfully requested the audio focus of the audio device.

[0103] Therefore, when the audio focus is in the second running state, that is, when it is not occupied, it means that there are no conflicting applications or systems in the audio system. Without the need for priority comparison, occupant notification, or other processing, the first target request response information indicating that the first application has successfully requested the audio focus of the audio device can be directly generated. This reduces unnecessary calculation and interaction processes, enabling the first application to quickly obtain the audio focus, improving response efficiency, and reducing resource consumption.

[0104] In some embodiments of this application, such as Figure 7 As shown, step 2303 can specifically include steps 23031 and 23032.

[0105] Step 23031: If the second system and the third system are target systems, send an audio focus allocation request to the target system. The target system can be any one of the at least two systems. The audio focus allocation request is used to request the target system to determine whether to allocate the audio focus of the audio device to the first application based on a preset application priority.

[0106] In this context, when the second system to which the first application belongs and the third system to which the second application belongs are the same system, that system is the target system. For example, both could be Android systems, both could be Linux systems, or both could be the host system. Preset application priority refers to the application priority rules predefined within the target system, used to determine the preemptive access rights for audio focus by different applications within the same system. For example, within the same Android system, the priority order of Android applications could be set as: navigation application priority > call application priority > music application priority. The audio focus allocation request is the instruction sent by the first system to the target system, including the identification information of the first application, the identification information of the second application, and request information, used to trigger the target system to perform its internal application priority determination. The second request response information is the feedback generated by the target system based on its own preset application priority, indicating whether the first application is allowed to preempt the audio focus of the second application.

[0107] Step 23032: Based on the second request response information sent by the target system, determine the first request response information corresponding to the access request. The second request response information is used to instruct the target system whether to allocate the audio focus of the audio device to the first application.

[0108] For example, when the second request response information is used to instruct the target system to allocate the audio focus of the audio device to the first application, the first request response information is used to instruct the first application to successfully request the audio focus of the audio device. When the second request response information is used to instruct the target system to allocate the audio focus of the audio device to the second application, the first request response information is used to instruct the first application not to successfully request the audio focus of the audio device.

[0109] Therefore, in scenarios where the second and third systems are the same target system, by sending an allocation request to the target system, the decision-making power is returned to the target system that is most familiar with the internal rules of the system, rather than the first system forcibly formulating cross-application rules. This avoids the first system making misjudgments due to its unfamiliarity with the priority of the target system's internal applications, making the audio focus conflict judgment within the same system more in line with the functional design of the system and improving the accuracy of audio focus allocation for audio devices.

[0110] In audio systems where multiple systems coexist, such as audio systems where a host system, an Android system, and a Linux system run simultaneously, the functional positioning of different systems differs. For example, the host system focuses on security control, while the Android system focuses on entertainment and interaction. Therefore, the priority of the audio focus of the audio device varies among different systems. Thus, in some embodiments of this application, step 2303 may specifically include: when the second system and the third system are different, determining the request access information corresponding to the access request based on the preset system priority.

[0111] Among them, the preset system priority refers to the system priority rules predefined within the first system, which are used to determine the preemptive rights of different systems within the audio system for audio focus. For example, the host system priority > the Android system priority > the Linux system priority.

[0112] For example, the priority levels of the second system to which the first application belongs and the third system to which the second application belongs are extracted from the priority rule table corresponding to the preset system priorities and compared. If the priority level of the second system is higher than that of the third system, a request response message is generated to indicate that the first application has successfully requested audio focus from the audio device. If the priority level of the second system is lower than that of the third system, a request response message is generated to indicate that the first application has not successfully requested audio focus from the audio device.

[0113] Therefore, by establishing clear priority levels for different systems in the audio system through preset system priorities, when audio focus conflicts occur across systems, it is not necessary to interact between the two applications distributed across the two systems. In other words, it is not necessary to obtain application information of the two applications distributed across the two systems through cross-system interaction. The request access information corresponding to the access request can be determined by directly calling the preset system priorities for a simple priority level comparison. This simplifies the cross-system judgment process, reduces the computing resource consumption of the audio system, and improves the response speed of cross-system allocation of audio focus.

[0114] In some embodiments of this application, after step 230 above, the audio focus control may further include: switching the audio focus of the audio device from the second application to the first application when the audio focus of the audio device is occupied by the second application and the first request response information is a request response information indicating that the first application has successfully requested the audio focus of the audio device.

[0115] Audio focus switching refers to the process of transferring the audio focus of an audio device from the currently occupied second application to the first application that has successfully made a new request. In other words, it is to transfer the right to use the audio device from the second application to the first application. During the transfer process, operations such as pausing the audio output of the second application and activating the audio channel of the first application are involved.

[0116] In one example, such as Figure 8 As shown, the audio control hardware abstraction layer module within the Android system receives an access request from a first application. Based on this request, it determines that the audio focus of the audio device is occupied by a second application. If both the first and second applications are Android applications within the Android system, the audio control hardware abstraction layer module sends an audio focus release notification to the second application, triggering the second application's audio pause logic. Subsequently, the audio control hardware abstraction layer module monitors the release status of the second application, confirming whether it has stopped using the audio device. After confirming that the second application has released the audio focus, it sends an audio focus occupation notification to the first application through the audio control hardware abstraction layer module, thereby establishing a connection between the first application and the audio device through the hardware abstraction layer module and the audio management module in the host system.

[0117] In another example, such as Figure 9 As shown, the audio service module within the Linux system receives an access request from the first application and determines, based on the access request, that the audio focus of the audio device is occupied by the second application. If both the first and second applications are Linux applications within the Linux system, the audio service module within the Linux system sends an audio focus release notification to the second application, triggering the audio pause logic of the second application. Subsequently, the audio service module monitors the release status of the second application, confirms whether the second application has stopped using the audio device, and after confirming that the second application has released the audio focus of the audio device, sends an audio focus occupation notification to the first application through the audio service module, thereby establishing a connection between the first application and the audio device through the audio service module and the audio management module in the host system.

[0118] Therefore, by uniformly executing the audio focus switching steps through the first system, audio abnormalities caused by incompatibility in switching logic between different applications are avoided, thus improving the stability of the audio focus switching process. Furthermore, compared with the application-independent negotiation method for audio focus switching, the unified execution of audio focus switching by the first system reduces cross-application and cross-system communication interactions and lowers the resource consumption of the audio system.

[0119] The audio focus control method provided in the above embodiments, by leveraging the centralized reading of audio device configuration information by the audio management module in the host system, enables unified management and control of the audio focus of audio devices. Furthermore, when an audio device changes, adaptation can be completed simply by updating the audio configuration file in the host system, without requiring modifications to the audio focus control-related code within the Linux or Android systems. This mechanism not only enables rapid integration of audio devices but also shortens the response time of audio focus control after audio device changes, effectively improving the audio system's adaptation efficiency and flexibility to hardware changes.

[0120] Based on the audio focus control method provided in the above embodiments, this application also provides specific implementations of an audio focus control device. Please refer to the following embodiments.

[0121] See Figure 10 The audio focus control device 300 provided in this application embodiment is applied to the first system of at least two systems in an audio system. The audio focus control device 300 includes:

[0122] The acquisition module 310 is used to acquire the access request of the first application. The access request is used to request access to the audio focus used to manage audio devices in the first system.

[0123] The first determining module 320 is used to determine the second system corresponding to the first application based on the access request, wherein the second system is any one of at least two systems;

[0124] The second determining module 330 is used to determine the first request response information corresponding to the access request based on the operating status of the second system and the audio focus. The first request response information is used to indicate whether the first application has successfully requested the audio focus of the audio device.

[0125] Therefore, by acquiring module 310, first determining module 320, and second determining module 330, the access request of the first application is acquired and processed within the local system (first system) of the audio system. The processing of the access request of the first application includes, through the first determining module 320, determining the second system for managing the first application based on the access request, and through the second determining module 330, determining the first request response information corresponding to the access request based on the operating status of the second system and the audio focus. This allows the processing of the access request to be performed directly within the first and second systems of the audio system. In this way, by integrating the acquisition and processing of access requests related to the audio focus of the audio device into the existing first system of the audio system, the computational resource consumption caused by the additional introduction of a proxy container in related technologies, which forces the access request to first bypass a centralized external proxy container for intermediate processing, is effectively avoided, thus effectively solving the problem of audio system performance degradation.

[0126] In some embodiments of this application, the second determining module 330 described above can specifically be used for:

[0127] When the audio focus is occupied, the second application that occupies the audio focus is obtained.

[0128] Based on the application information of the second application, determine the third system corresponding to the second application. The third system can be any one of the at least two systems.

[0129] Based on the second and third systems, determine the request access information corresponding to the access request.

[0130] In some embodiments of this application, the second determining module 330 described above can specifically be used for:

[0131] When the second system and the third system are the target systems, an audio focus allocation request is sent to the target system. The target system can be any one of the two systems. The audio focus allocation request is used to request the target system to determine whether to allocate the audio focus of the audio device to the first application based on a preset application priority.

[0132] Based on the second request response information sent by the target system, the first request response information corresponding to the access request is determined. The second request response information is used to instruct the target system whether to allocate the audio focus of the audio device to the first application.

[0133] In other embodiments of this application, the second determining module 330 may also be used to: determine the request access information corresponding to the access request based on a preset system priority when the second system and the third system are different.

[0134] In some embodiments of this application, the audio focus control device 300 described above may further include a switching module.

[0135] The switching module is used to switch the audio focus of the audio device from the second application to the first application when the audio focus of the audio device is occupied by the second application and the first request response information is a request response information indicating that the first application has successfully requested the audio focus of the audio device.

[0136] In some embodiments of this application, the acquisition module 310 is used to acquire, in the case that the first system is a host system, the second system is a host system, the host system is configured with an audio management module, the audio management module integrates a first communication protocol and the first communication protocol is implemented based on an inter-process communication mechanism, the acquisition module acquires the access request sent by the first application in the host system in accordance with the first communication protocol.

[0137] In other embodiments of this application, the acquisition module 310 is used to acquire, in the case where the first system is a host system, the second system is an Android system, the host system is configured with an audio management module, the Android system is configured with an audio control hardware abstraction layer module, the audio management module integrates a second communication protocol between the host system and the Android system, and the second communication protocol is implemented based on the Binder mechanism or the Socket mechanism, the acquisition module acquires the access request sent by the first application in the Android system according to the second communication protocol.

[0138] In some other embodiments of this application, the acquisition module 310 is used to acquire the access request of the first application in the Linux system through the audio management module in accordance with the third communication protocol when the first system is a host system, the second system is a Linux system, the host system is configured with an audio management module, the Linux system is configured with an audio service module, and the audio management module integrates a third communication protocol between the host system and the Linux system and the third communication protocol is implemented based on the Binder mechanism or the Socket mechanism.

[0139] The various modules of the audio focus control device 300 provided in this application embodiment can achieve Figures 2 to 9 The functions of each step of the provided audio focus control method, and the corresponding technical effects they achieve, will not be elaborated here for the sake of brevity.

[0140] Figure 11 The diagram shows a schematic representation of the hardware structure of an electronic device provided in some embodiments of this application.

[0141] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.

[0142] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0143] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 402 is non-volatile solid-state memory.

[0144] In certain embodiments, memory 402 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 402 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the audio focus control method according to the first aspect of this application.

[0145] The processor 401 implements any of the audio focus control methods described in the above embodiments by reading and executing computer program instructions stored in the memory 402.

[0146] In one example, the electronic device may also include a communication interface 403 and a bus 410. For example, Figure 11 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0147] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0148] Bus 410 includes hardware, software, or both, that couples components of the aforementioned electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0149] The electronic device can execute the audio focus control method in the embodiments of this application, thereby achieving a combination Figures 2 to 9 The described audio focus control method and apparatus.

[0150] Furthermore, in conjunction with the audio focus control methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any one of the audio focus control methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, etc.

[0151] Furthermore, in conjunction with the audio focus control methods in the above embodiments, this application embodiment can provide a computer program product for implementation. This program product is stored in a storage medium and may specifically include a computer program or instructions. When executed by a processor, the computer program or instructions implement any of the audio focus control methods in the above embodiments. This program product is executed by at least one processor to implement the various processes of the audio focus control method embodiments described above, and can achieve the same technical effects. To avoid repetition, further details are omitted here.

[0152] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0153] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0154] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0155] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0156] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. An audio focus control method, characterized in that, The first system applied in at least two systems in an audio system includes: Obtain an access request from the first application, the access request being used to request access to the audio focus used to manage audio devices in the first system; Based on the access request, the second system corresponding to the first application is determined, and the second system is any one of the at least two systems; Based on the operating status of the second system and the audio focus, a first request response information corresponding to the access request is determined. The first request response information is used to indicate whether the first application has successfully requested the audio focus of the audio device.

2. The method according to claim 1, characterized in that, The step of determining the first request response information corresponding to the access request based on the operating status of the second system and the audio focus includes: If the operating state of the audio focus indicates that the audio focus is occupied, then obtain the second application occupying the audio focus; Based on the application information of the second application, a third system corresponding to the second application is determined, wherein the third system is any one of the at least two systems; Based on the second system and the third system, the request access information corresponding to the access request is determined.

3. The method according to claim 2, characterized in that, The step of determining the request access information corresponding to the access request based on the second system and the third system includes: When the second system and the third system are target systems, an audio focus allocation request is sent to the target system. The target system is any one of the at least two systems. The audio focus allocation request is used to request the target system to determine whether to allocate the audio focus of the audio device to the first application based on a preset application priority. Based on the second request response information sent by the target system, a first request response information corresponding to the access request is determined. The second request response information is used to instruct the target system whether to allocate the audio focus of the audio device to the first application.

4. The method according to claim 2, characterized in that, The step of determining the request access information corresponding to the access request based on the second system and the third system includes: In cases where the second system and the third system are different, the request access information corresponding to the access request is determined according to the preset system priority.

5. The method according to claim 1, characterized in that, The method further includes: If the audio focus of the audio device is occupied by a second application, and the first request response information is a request response information indicating that the first application has successfully requested the audio focus of the audio device, the audio focus of the audio device shall be switched from the second application to the first application.

6. The method according to claim 1, characterized in that, The first system is a host system, and the second system is the host system. The host system is configured with an audio management module, and the audio management module integrates the first communication protocol of the host system. The first communication protocol is implemented based on an inter-process communication mechanism. The step of obtaining the access request for the first application includes: The audio management module obtains the access request sent by the first application in the host system according to the first communication protocol.

7. The method according to claim 1, characterized in that, The first system is a host system, and the second system is an Android system. The host system is equipped with an audio management module, and the Android system is equipped with an audio control hardware abstraction layer module. The audio management module integrates a second communication protocol across the host system and the Android system. The second communication protocol is implemented based on the Binder mechanism or the Socket mechanism. The step of obtaining the access request for the first application includes: The audio management module obtains the access request sent by the first application in the Android system according to the second communication protocol.

8. The method according to claim 1, characterized in that, The first system is a host system, and the second system is a Linux system. The host system is configured with an audio management module, and the Linux system is configured with an audio service module. The audio management module integrates a third communication protocol between the host system and the Linux system. The third communication protocol is implemented based on the Binder mechanism or the Socket mechanism. The step of obtaining the access request for the first application includes: The audio management module obtains the access request of the first application in the Linux system according to the third communication protocol.

9. An audio focus control device, characterized in that, A first system applied in at least two systems within an audio system, the device comprising: The acquisition module is used to acquire the access request of the first application, the access request being used to request access to the audio focus used to manage audio devices in the first system; The first determining module is used to determine the second system corresponding to the first application based on the access request, wherein the second system is any one of the at least two systems; The second determining module is used to determine, based on the operating status of the second system and the audio focus, first request response information corresponding to the access request, wherein the first request response information is used to indicate whether the first application has successfully requested the audio focus of the audio device.

10. An electronic device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the audio focus control method as described in any one of claims 1-8.