Dynamic sound field management method and system for bluetooth devices

By dynamically creating audio domains associated with Bluetooth devices, monitoring the state changes of Bluetooth devices and target applications, and generating audio mixing rules, the problem of audio domains not being compatible with Bluetooth headsets in existing technologies is solved, achieving seamless audio stream switching and resource optimization, and improving the user experience.

CN122387407APending Publication Date: 2026-07-14DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGFENG MOTOR GRP
Filing Date
2026-03-20
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In existing technologies, the audio domain is statically allocated when the system starts up, which cannot be adapted to external devices such as Bluetooth headphones that are dynamically connected and disconnected. Furthermore, it relies on multi-user systems and cannot achieve seamless, automatic switching between different screens, resulting in an interrupted experience.

Method used

By dynamically creating audio domains associated with Bluetooth devices, monitoring the state changes of Bluetooth devices and target applications, generating audio mixing rules, and achieving seamless switching of audio streams, this involves the collaborative work of a device monitoring module, an application display monitoring module, an audio rule generation module, and an audio policy control module.

Benefits of technology

It achieves isolation between different audio streams, ensures that the audio of a specified application is accurately routed to the Bluetooth device, improves scene adaptability, takes into account both individual and sharing needs, dynamically creates and releases audio domains, avoids resource occupation, and improves system resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122387407A_ABST
    Figure CN122387407A_ABST
Patent Text Reader

Abstract

The application provides a Bluetooth device dynamic sound field management method, and belongs to the technical field of automobiles. In response to a connection state of a Bluetooth device, an audio field associated with the Bluetooth device is dynamically created. A process identifier of a target application on a target display screen is acquired. An audio mixing rule is generated based on the process identifier. According to the audio mixing rule, an audio stream of the target application is switched to the audio field associated with the Bluetooth device. The application creates an independent audio field for a Bluetooth headset, realizes isolation between different audio streams, ensures that the audio of a specified application can be accurately routed to the Bluetooth device, and does not affect other system sounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive technology, and in particular to a method and system for dynamic audio range management of Bluetooth devices. Background Technology

[0002] With the development of intelligent cockpits in automobiles, multi-screen configurations such as passenger-side screens and rear-seat screens are becoming increasingly common, providing passengers with an independent audio-visual entertainment experience. To avoid disturbing the driver, passengers are often advised to use Bluetooth headphones to listen to audio.

[0003] In existing technologies, the Android native system provides a multi-user-based audio zone solution, which binds different screens to different user IDs and then to different audio output buses to achieve audio isolation.

[0004] However, the audio domain is statically allocated at system startup, making it unsuitable for dynamically connected and disconnected external devices like Bluetooth headsets. Furthermore, this solution relies on multi-user systems, while many in-vehicle systems are single-user and therefore cannot utilize this approach. When switching between different screens, seamless, automatic audio domain switching is not possible, requiring application-level intervention (such as pausing, synchronizing, and resuming playback), resulting in an interrupted experience. Summary of the Invention

[0005] The present invention aims to solve at least one of the technical problems existing in the prior art, and proposes a method and system for dynamic audio domain management of Bluetooth devices.

[0006] In a first aspect, embodiments of the present invention provide a method for dynamic audio range management of a Bluetooth device, comprising:

[0007] In response to the connection status of a Bluetooth device, dynamically create an audio domain associated with the Bluetooth device;

[0008] Obtain the process identifier of the target application on the target display screen;

[0009] Audio mixing rules are generated based on the process identifier;

[0010] The audio stream of the target application is switched to the audio domain associated with the Bluetooth device according to the audio mixing rules.

[0011] In some embodiments, obtaining the process identifier of the target application on the target display screen includes:

[0012] Obtain the target display associated with the target application from the pre-loaded configuration file;

[0013] The monitoring target is applied to the status changes of the associated target display screen.

[0014] In some embodiments, when the target application is hidden on the associated target display screen, the audio stream of the target application is switched to the audio domain corresponding to the vehicle system.

[0015] In some embodiments, the monitoring target is applied to state changes of an associated target display screen, including:

[0016] Listen to TaskStackChangeListener;

[0017] Retrieve task and process information from ActivityManagerService;

[0018] Based on the process information, the target is determined to be applied to the state changes on the target display screen.

[0019] In some embodiments, the audio mixing rules include:

[0020] The audio stream originating from the process identifier is routed to the audio domain associated with the currently connected Bluetooth device.

[0021] In some embodiments, the audio domain associated with the Bluetooth device is dynamically released when a Bluetooth device is detected to be disconnected.

[0022] Secondly, embodiments of the present invention provide a Bluetooth device dynamic audio range management system, configured to implement the above method, including:

[0023] The device monitoring module is used to monitor the connection status of Bluetooth devices and dynamically create or release audio domains associated with the Bluetooth devices.

[0024] The application display monitoring module is used to obtain the process identifier of the target application on the target display screen;

[0025] The audio rule generation module generates audio mixing rules based on the process identifier;

[0026] The audio policy control module switches the audio stream of the target application to the audio domain associated with the Bluetooth device according to the audio mixing rules.

[0027] In some embodiments, a configuration management module is also included for parsing and maintaining the configuration file, which defines a list of target application package names that need to enable Bluetooth audio domain switching and their associated target display IDs.

[0028] Thirdly, embodiments of the present invention also provide an electronic device, comprising:

[0029] One or more processors;

[0030] Memory, used to store one or more programs;

[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods.

[0032] Fourthly, embodiments of the present invention also provide a computer-readable medium storing a computer program, which, when executed by a processor, implements the steps of any of the methods described.

[0033] The Bluetooth device dynamic audio domain management method provided by this invention creates an independent audio domain for Bluetooth headsets, achieving isolation between different audio streams and ensuring that the audio of a specified application can be accurately routed to the Bluetooth device without affecting the sound of other systems. The system can adjust the audio output target in real time based on multiple dimensions such as Bluetooth connection status and application display location, improving scene adaptability. After connecting Bluetooth headsets, users can enjoy their personal audio space only when using specific applications on specific displays, while the audio is still shared through the audio domain of the whole vehicle system at other times, balancing personalization and sharing needs. Dynamically creating and releasing audio domains avoids resource occupation; routing strategies take effect and cancel immediately with state changes, improving system resource utilization. Attached Figure Description

[0034] Figure 1 This is a schematic diagram illustrating the steps of an embodiment of the Bluetooth device dynamic audio range management method of the present invention;

[0035] Figure 2 This is a flowchart illustrating the dynamic audio range management method for Bluetooth devices according to the present invention;

[0036] Figure 3 This is a schematic diagram illustrating the steps of an embodiment of the Bluetooth device dynamic audio range management system of the present invention;

[0037] Figure 4 This is a system architecture diagram of an embodiment of the Bluetooth headset dynamic audio range management system of the present invention;

[0038] Figure 5 This is a timing diagram of an embodiment of the Bluetooth headset dynamic audio range management system of the present invention;

[0039] Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of the present invention. Detailed Implementation

[0040] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0041] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.

[0042] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0043] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0044] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.

[0045] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.

[0046] In related technologies, the audio domain is statically allocated at system startup, which cannot adapt to external devices such as Bluetooth headsets that dynamically connect and disconnect. Furthermore, this solution relies on multi-user systems, while many in-vehicle systems are single-user systems and cannot adopt this approach. When switching between different screens, seamless and automatic switching of the audio domain cannot be achieved, requiring application-layer intervention (such as pausing, synchronizing, and resuming playback), resulting in an interrupted experience.

[0047] To address at least one of the technical problems existing in the aforementioned related technologies, the present invention provides a method for dynamic audio range management of Bluetooth devices. Figure 1 The flowchart illustrates the steps of a Bluetooth device dynamic audio range management method provided in this embodiment of the invention.

[0048] like Figure 1 As shown, the Bluetooth device dynamic audio range management method includes the following steps:

[0049] Step S10: Load the predefined configuration file.

[0050] Specifically, when the in-vehicle infotainment system starts up, a predefined configuration file is automatically loaded. This file is essentially a "management checklist" that explicitly lists:

[0051] Target applications: Which applications (identified by their package names) need their audio dynamically managed, such as dedicated video applications and game applications on the passenger screen.

[0052] Target Display ID: This specifies the specific display screen (e.g., passenger screen, rear left screen) that each application is bound to. Routing to the Bluetooth headset will only be triggered when the application is displayed on its bound target screen.

[0053] Understandably, this step enables the configurability of the strategy, allowing the same system to flexibly adapt to the screen layouts of different car models and different application ecosystems, and adjust the management scope without modifying the code.

[0054] Step S10: In response to the connection status of the Bluetooth device, dynamically create an audio domain associated with the Bluetooth device.

[0055] In this embodiment, the system continuously monitors Bluetooth device events. Once a successful Bluetooth connection is detected, it immediately and dynamically creates an audio zone uniquely associated with that Bluetooth device in the underlying audio framework. The Bluetooth device is typically a Bluetooth headset, meaning the system monitors the connection status between the headset and the system. The system refers to the display screen corresponding to the vehicle's infotainment system. Generally, there are multiple displays, and a Bluetooth device can establish a Bluetooth connection with one of these target displays. Once a connection is detected between a Bluetooth device and a target display, an audio zone associated with that Bluetooth device is created. An audio zone is a logical concept representing an independent audio output endpoint pointing to that Bluetooth device.

[0056] When the Bluetooth headset is detected to be disconnected, the system dynamically releases and destroys the dedicated audio domain previously created for it, clearing the occupied system resources. This achieves "on-demand creation" of the audio output channel, avoiding static resource occupation. Thus, the Bluetooth device is no longer a fixed system configuration, but a pluggable, identifiable, dynamic audio endpoint.

[0057] Step S20: Obtain the process identifier of the target application on the target display screen.

[0058] In this embodiment, after the Bluetooth device connects to the target display via Bluetooth, it is determined in real time whether the target application is in a specific context environment that should trigger an audio domain switching.

[0059] Specifically, the system monitors the state changes of the target application on the associated target display screen. Specifically, when the system detects that the target application is in a display state on the associated target display screen, it immediately captures the process identifier (PID) of the target application. The PID is a unique number in the operating system kernel that identifies a running process.

[0060] It is understandable that the user-visible behavior of "the application being displayed on a screen" is transformed into a process identifier (PID) that the system can precisely manipulate, providing a direct basis for subsequent precise audio control.

[0061] Specifically, for the Android system, by listening to TaskStackChangeListener, task and process information can be obtained from ActivityManagerService. Then, the state of the target application on the associated target display screen can be determined through the process information. When it is in the display state, the PID of the target application can be captured from ActivityManagerService and reported to the module unit used for audio mixing rule generation.

[0062] Furthermore, regarding the correspondence between target applications and associated target displays, a configuration file is pre-loaded within the system. This configuration file defines a list of target application package names that require Bluetooth audio domain switching and their associated target display IDs. Therefore, after a Bluetooth device is detected to be connected to a target display, the correspondence between the target application and the target display needs to be verified in this configuration file. Only when the target application and the target display match can Bluetooth audio domain switching be achieved.

[0063] Step S30: Generate audio mixing rules based on the process identifier.

[0064] In this embodiment, a clear audio domain stream forwarding instruction is generated based on the current context.

[0065] Specifically, based on the acquired PID, an AudioMix rule is generated. The core of this rule is: "All audio data streams originating from this PID should be routed to the dynamic audio zone corresponding to the currently connected Bluetooth device."

[0066] Step S40: Switch the audio stream of the target application to the audio domain associated with the Bluetooth device according to the audio mixing rules.

[0067] In this embodiment, the audio stream of the target application is switched based on the audio mixing rules so that the audio stream of the target application is switched to the audio domain associated with the Bluetooth device, so that the Bluetooth device can obtain the audio of the target application.

[0068] Specifically, the system's AudioPolicyService, which is the "command center" of the audio system, receives and applies the AudioMix rules generated in the above steps, and dynamically adjusts the audio routing table accordingly to seamlessly switch the audio stream generated by the target application from the default vehicle system audio domain to the audio domain associated with the Bluetooth device.

[0069] The method provided in this embodiment of the invention has two monitoring points: monitoring the Bluetooth connection status between the Bluetooth device and the target display screen, and listening to the status of the target application on the target display screen, and both monitoring points are continuous monitoring.

[0070] Furthermore, when monitoring detects a disconnection between the Bluetooth device and the target display, the audio domain associated with the Bluetooth device is dynamically released, and the target application's audio stream is switched to the audio domain corresponding to the vehicle system. Conversely, when monitoring detects no Bluetooth connection between the Bluetooth device and the target display, the target application's audio stream uses the audio domain corresponding to the vehicle system.

[0071] Furthermore, when the monitoring detects that the target application is hidden on the target display screen, the audio stream of the target application is also switched to the audio domain corresponding to the vehicle system.

[0072] It is understandable that by monitoring the Bluetooth connection between the Bluetooth device and the target display, as well as the status of the target application on the associated target display, the audio stream of the target application can be automatically and dynamically switched between the associated audio domain of the Bluetooth device and the audio domain of the vehicle system. Users do not need to perform any manual operation, which ensures that they can enjoy private audio in specific scenarios, and also ensures that the audio can automatically return to public playback after the scenario ends or the device leaves, thus ensuring driving safety and unified management of cabin sound.

[0073] See Figure 2 The present invention provides a method for dynamic audio range management of Bluetooth devices:

[0074] The system loads a predefined configuration file during startup;

[0075] Continuously monitor the status changes of Bluetooth devices and the status changes of the target application on the target display screen;

[0076] Monitor the connection status of Bluetooth devices, create or release the corresponding audio domains, and dynamically create an audio domain associated with the Bluetooth device when a Bluetooth device is detected to be connected; when a Bluetooth device is detected to be disconnected, dynamically release the audio domain and terminate the process.

[0077] Based on the configuration file, monitor the state changes of the target application on the associated target display screen, and obtain the process identifier of the target application when the target application is displayed on the associated target display screen;

[0078] Generate corresponding audio mixing rules based on the process identifier;

[0079] According to the audio mixing rules, dynamic audio routing switching is performed to switch the video stream of the target application to the audio domain associated with the Bluetooth device, and when the target application is hidden on the target display screen, it automatically switches back to the audio domain of the whole vehicle system.

[0080] This invention creates independent audio domains for Bluetooth devices, isolating different audio streams and ensuring that audio for a specified application is accurately routed to the Bluetooth device without affecting the sound of other systems. The system can adjust the audio output target in real time based on multiple dimensions such as Bluetooth connection status and application display location, improving scene adaptability. Users can enjoy their personal audio space only when using specific applications on specific displays after connecting a Bluetooth device; at other times, audio is shared through the vehicle's speakers, balancing individual needs with sharing requirements. Dynamic creation and release of audio domains avoids resource consumption; routing policies take effect and cancel immediately according to changes in monitoring status, improving system resource utilization. Furthermore, defining target applications and target displays through configuration files facilitates adaptation to different vehicle models, cabin layouts, and application ecosystems, providing good scalability and maintainability.

[0081] Please see Figure 3 Based on the same inventive concept, embodiments of the present invention also provide a dynamic audio range management system for Bluetooth devices. Figure 2 This is a schematic diagram of a Bluetooth device dynamic audio domain management system provided in an embodiment of the present invention. It is applied to the Bluetooth device dynamic audio domain management method provided in the above embodiment and specifically includes: a device monitoring module, an application display monitoring module, an audio rule generation module, and an audio strategy control module.

[0082] The device monitoring module is used to listen to the connection status of Bluetooth devices and dynamically create or release audio domains associated with the Bluetooth devices. Specifically, when a Bluetooth device is detected to be connected to the display screen, an audio domain associated with the Bluetooth device is dynamically created; and when a Bluetooth device is detected to be disconnected from the display screen, the audio domain associated with the Bluetooth device is dynamically released.

[0083] This enables "on-demand creation" of audio output channels, avoiding static resource occupation. The existence of Bluetooth devices is no longer a fixed system configuration, but a pluggable and identifiable dynamic audio endpoint.

[0084] The application display monitoring module is used to obtain the process identifier of the target application on the target display screen.

[0085] Specifically, when the device monitoring module detects a Bluetooth connection between the Bluetooth device and the display screen, and when the user launches the target application on the display screen, the application display monitoring module detects the status of the target application on the target display screen based on the correspondence between the target application and the associated target display screen. When the application is in display state, the process identifier of the target application on the target display screen is obtained synchronously.

[0086] The application displays a monitoring module, which is used to obtain the process identifier based on the status changes of the configuration file.

[0087] In this embodiment, it is determined in real time whether the target application is in a specific context environment that should trigger audio switching.

[0088] It is understandable that the user-visible behavior of "the application being displayed on a certain screen" is transformed into a logical identifier (PID) that the system can precisely operate, providing a direct basis for subsequent precise audio control.

[0089] The audio rule generation module generates audio mixing rules based on the process identifier.

[0090] In this embodiment, a clear audio stream forwarding instruction is generated based on the current context.

[0091] Specifically, the system uses the PID obtained above to generate an AudioMix rule. The core of this rule is: "All audio data streams originating from this PID should be routed to the dynamic audio domain corresponding to the currently connected Bluetooth device."

[0092] The audio policy control module switches the audio stream of the target application to the audio domain associated with the Bluetooth device according to the audio mixing rules.

[0093] In this embodiment, the routing policy is put into practice, and the policy is automatically revoked and the default state is restored according to changes in the environment.

[0094] Specifically, the system's AudioPolicyService, which acts as the "command center" of the audio system, receives and generates audio mixing rules. Based on these rules, it dynamically adjusts the audio routing table to seamlessly switch the audio stream generated by the target application from the default audio domain of the vehicle's speaker system to the audio domain output of the Bluetooth device.

[0095] Understandably, during rollback, the system will cancel or ignore the AudioMix rules previously generated for the application, forcing the application's audio stream to be rerouted back to the "audio domain" of the vehicle's speaker system.

[0096] As can be understood, this embodiment achieves fully automatic dynamic switching of audio routing, requiring no manual operation from the user. This ensures both the enjoyment of private audio in specific scenarios and the automatic return of audio to public playback after the scenario ends or the device leaves, guaranteeing unified management of driving safety and cabin sound.

[0097] Based on the above correspondence between target applications and associated target displays, the management system provided in this embodiment of the invention further includes a configuration management module for parsing and maintaining configuration files. The configuration file defines a list of target application package names that need to enable Bluetooth audio domain switching and their associated target display IDs.

[0098] Specifically, a predefined configuration file is automatically loaded when the system starts. This configuration file is essentially a "management list" that explicitly lists:

[0099] Target applications: Media applications that require Bluetooth audio domain switching (identified by their package names), which can generate a corresponding list of package names, such as media applications on the passenger screen.

[0100] Target Display ID: The above media applications are bound to the display screen (such as the passenger screen or the rear left screen), thus forming a correspondence between the target application and the target display screen. Specifically, the corresponding target display ID can be matched with the package name in the above target application package name list.

[0101] When the application display monitoring module monitors the status of a target application on a target display screen, it needs to match it with the configuration file. The application display monitoring module will only obtain the PID of the target application if the target application is displayed on the target display screen that matches the configuration file.

[0102] Please see Figure 4 This is a system architecture diagram of the Bluetooth headset dynamic audio range management system provided by the present invention.

[0103] This architecture clearly demonstrates the complete technology stack from the upper-layer application to the hardware layer, as well as the specific roles and collaborative relationships of each core component in dynamic sound range management. The following is a detailed description of the system.

[0104] This architecture adopts a layered design and enhances the Android system framework to achieve intelligent management of multi-screen and multi-audio domain scenarios.

[0105] I. Upper Application Layer

[0106] This layer contains the applications that provide specific services to end users.

[0107] For example: Media application (driver's screen instance) and media application (passenger's screen instance): The two instances may come from the same application package (such as a video player), but run on different displays.

[0108] The operating system assigns a unique process identifier (PID) to each running instance. This is the foundation for precise isolation and targeted routing of audio streams. The system can determine which instance's audio to route to the Bluetooth headset based on the PID, rather than simply the application package name.

[0109] II. Android System Framework Layer

[0110] This is the core logic and control center for implementing dynamic range management, and includes the following key enhanced services:

[0111] AudioPolicyService: As the central hub of the audio system, it is the ultimate executor of all audio routing decisions and integrates two core sub-modules:

[0112] Dynamic AudioZone Manager: Responsible for the lifecycle management of Bluetooth audio domains. When a Bluetooth connection notification is received, it dynamically creates and maintains an audio domain (e.g., AudioZone 1) bound to the Bluetooth device; when disconnected, it immediately releases the audio domain of the Bluetooth device.

[0113] PID routing rule engine: Responsible for generating and managing audio routing policies. When it receives a status report from an application, it generates an AudioMix rule based on the target application's PID, which "routes the audio stream of the specified PID to the specified AudioZone", and then passes it to the AudioPolicyService for execution.

[0114] AppDisplayMonitor: This service is specifically designed to detect critical user context. By listening to the Android system's TaskStackChangeListener and combining it with detailed task and process information obtained from ActivityManagerService, it accurately determines whether the target application is currently in the foreground on its configured target screen. Once the conditions are met, it immediately reports two things to the audio policy service: ① the target application's PID; ② the application is currently in display mode. This is the key signal that triggers a route switch.

[0115] 3. Hardware Abstraction Layer: This layer serves as the adaptation layer between the system framework and the physical hardware, including the Bluetooth device listener: responsible for monitoring the lowest-level hardware connection events. By listening to the BluetoothA2dp or AudioService interface, it captures real-time connection and disconnection state changes of Bluetooth devices (such as Bluetooth headsets). Once a state change occurs, it immediately notifies the upper-layer audio policy service, thereby triggering the audio domain creation / release process.

[0116] IV. Hardware Layer: This layer is the final physical output of the audio signal. It includes:

[0117] Vehicle speaker system: corresponds to the system's default, always-present audio domain (AudioZone 0). All audio without a specified route, as well as audio that will fall back to this audio domain when Bluetooth routing conditions fail.

[0118] Bluetooth devices: Correspond to an audio zone (AudioZone 1 or higher) dynamically created by the system. When the routing audio mixing rules are in effect, the audio stream for a specific application will be directed to this audio zone and ultimately transmitted to the Bluetooth device for playback via the Bluetooth protocol.

[0119] By employing layered decoupling, service-oriented monitoring, and a dedicated routing policy engine, the high-level logic described in the "Bluetooth Device Dynamic Audio Domain Management Method" is transformed into a reliable and executable management system, ensuring the feasibility and efficiency of the method.

[0120] Please see Figure 5 The following is a timing diagram of the Bluetooth device dynamic audio domain management system provided by the present invention, specifically taking a Bluetooth headset as an example:

[0121] Path 1: Bluetooth connection event flow

[0122] Incident occurred: The user connected a Bluetooth headset.

[0123] Detection and Reporting: The Bluetooth listener (corresponding to the device monitoring module) detects the device connection event and immediately sends a notification to the AudioPolicyService: "Device connected".

[0124] Resource preparation: In response to this notification, AudioPolicyService dynamically creates an AudioZone 1 dedicated to the Bluetooth headset and completes the internal binding.

[0125] Path 2: Application Display Event Flow

[0126] Incident occurred: The user launched, displayed, and played a media application on the passenger-side screen.

[0127] Detection and Reporting: When AppDisplayMonitor detects that the media application is displayed in the foreground on the passenger screen (the media application and the passenger screen are in a corresponding relationship that enables Bluetooth audio domain switching), it immediately obtains the process identifier (PID) of the media application, such as 1234, and then reports the key context information to AudioPolicyService: "Application PID: 1234 is displayed on the passenger screen".

[0128] Aggregation and Execution: Policy Generation and Route Switching.

[0129] Policy Decision: AudioPolicyService receives both of the above messages (AudioZone 1 is ready + application PID: 1234 is displayed on the passenger screen), and its internal PID routing rule engine immediately performs logical judgment.

[0130] Generation rule: Since the conditions are met simultaneously, the engine generates a precise routing rule (audio mixing rule), the logic of which is: "Direct the audio stream from PID: 1234 to AudioZone 1".

[0131] Command issuance and execution: AudioPolicyService applies this rule to the entire audio system, controlling the underlying driver to switch. Ultimately, the audio stream from the target media application is output to the Bluetooth headset via AudioZone 1.

[0132] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 6 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement any of the Bluetooth device dynamic audio range management methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.

[0133] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).

[0134] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.

[0135] In some embodiments, the one or more processors 101 include a field-programmable gate array.

[0136] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the Bluetooth device dynamic audio range management methods described in the above embodiments. The computer-readable storage medium can be volatile or non-volatile.

[0137] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described Bluetooth device dynamic audio range management method.

[0138] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0139] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0140] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0141] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0142] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0143] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0144] These computer-readable 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, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0145] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0146] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0147] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.

Claims

1. A method for dynamic audio range management in Bluetooth devices, characterized in that, It includes: In response to the connection status of a Bluetooth device, dynamically create an audio domain associated with the Bluetooth device; Obtain the process identifier of the target application on the target display screen; Audio mixing rules are generated based on the process identifier; The audio stream of the target application is switched to the audio domain associated with the Bluetooth device according to the audio mixing rules.

2. The Bluetooth device dynamic audio range management method according to claim 1, characterized in that, The step of obtaining the process identifier of the target application on the target display screen includes: Obtain the target display associated with the target application from the pre-loaded configuration file; The monitoring target is applied to the status changes of the associated target display screen.

3. The Bluetooth device dynamic audio range management method according to claim 2, characterized in that, When the target application is hidden on the associated target display screen, the audio stream of the target application is switched to the audio domain corresponding to the vehicle system.

4. The Bluetooth device dynamic audio range management method according to claim 2, characterized in that, The monitoring target applies to the status changes of the associated target display screen, including: Listen to TaskStackChangeListener; Retrieve task and process information from ActivityManagerService; Based on the process information, the target is determined to be applied to the state changes on the target display screen.

5. The Bluetooth device dynamic audio range management method according to claim 1, characterized in that, The audio mixing rules include: The audio stream originating from the process identifier is routed to the audio domain associated with the currently connected Bluetooth device.

6. The Bluetooth device dynamic audio range management method according to claim 5, characterized in that, When a Bluetooth device is detected to be disconnected, the audio domain associated with the Bluetooth device is dynamically released.

7. A dynamic audio range management system for Bluetooth devices, characterized in that, Configured for implementing the method of any one of claims 1-6, comprising: The device monitoring module is used to monitor the connection status of Bluetooth devices and dynamically create or release audio domains associated with the Bluetooth devices. The application display monitoring module is used to obtain the process identifier of the target application on the target display screen; The audio rule generation module generates audio mixing rules based on the process identifier; The audio policy control module switches the audio stream of the target application to the audio domain associated with the Bluetooth device according to the audio mixing rules.

8. The Bluetooth device dynamic audio range management system according to claim 7, characterized in that, It also includes a configuration management module for parsing and maintaining the configuration file, which defines a list of target application package names that need to enable Bluetooth audio domain switching and their associated target display IDs.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.