An audio playing method, an electronic device, a vehicle and a medium
By selecting an appropriate audio management strategy based on the audio type, the problem that existing audio management strategies cannot adapt to multiple audio types is solved, thus improving audio playback quality and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SAIC GM WULING AUTOMOBILE CO LTD
- Filing Date
- 2026-01-21
- Publication Date
- 2026-06-02
AI Technical Summary
Existing audio management strategies cannot adapt to various audio types, resulting in poor playback quality of external and local audio, which affects the user experience.
By receiving audio data from external audio sources, determining the audio type based on its communication protocol and preset classification conditions, and selecting an appropriate audio management strategy based on the audio type, the playback of local and external audio is controlled.
Improved playback quality of both external and local audio, enhancing the user experience.
Smart Images

Figure CN122132000A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of in-vehicle infotainment technology, and more particularly to an audio playback method, electronic device, vehicle, and medium. Background Technology
[0002] In practical applications, users can play local audio (e.g., car radio and local music) through the audio playback module and the in-vehicle infotainment (IVI) system. Alternatively, external devices can be connected to the IVI system via short-range wireless communication technologies (e.g., Bluetooth), and, according to relevant audio transmission protocols such as the Advanced Audio Distribution Profile (A2DP) and Bluetooth Hands-Free Profile (HFP), external audio (e.g., media audio, navigation prompts, voice assistant prompts, call audio, etc.) can be played through the vehicle's audio playback module to improve the user's driving experience.
[0003] It should be noted that external audio data received by an IVI system typically does not carry audio type information. In other words, the IVI system has difficulty determining the audio type of external audio. Therefore, IVI systems usually employ fixed audio management strategies to handle playback conflicts between local and external audio. Some common audio management strategies include interrupting local audio playback of external audio (preemptive strategy), playing both local and external audio simultaneously (mixing strategy), and prioritizing local audio playback while ignoring external audio (silent strategy).
[0004] However, fixed audio management strategies are often incompatible with various types of external audio, resulting in poor playback quality of at least one of the external and local audio. For example, a preemptive strategy may cause navigation prompts to frequently interrupt local music; a mixing strategy may cause external and local audio to interfere with each other; and a silent strategy may cause navigation prompts to be ignored, thus degrading the user experience.
[0005] It should be noted that the information disclosed in the background section of this application is intended only to enhance the understanding of the general background of this application, and should not be construed as an admission or in any way implying that the information constitutes prior art known to those skilled in the art. Summary of the Invention
[0006] This application provides an audio playback method, electronic device, vehicle, and medium that helps to solve the problem that the playback effect of at least one of the external audio and local audio is poor due to the incompatibility of the audio management strategy with various types of external audio.
[0007] In a first aspect, embodiments of this application provide an audio playback method, including: Receive audio data from external audio sources. If the vehicle is playing local audio when the audio data of the target external audio is received, the audio type of the target external audio is determined according to the communication protocol corresponding to the target external audio and the preset classification conditions; Based on the audio type of the target external audio, determine the corresponding target audio management strategy; According to the target audio management strategy, play the target external audio and / or local audio.
[0008] In some possible implementations, determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the audio characteristics and temporal distribution of the historical external audio within the preset time interval satisfy the first preset classification subcondition, then the audio type of the target external audio is determined to be the first audio type, and the first audio type is used to characterize the target external audio as a navigation prompt sound.
[0009] In some possible implementations, if the communication protocol corresponding to the target external audio is a first communication protocol, and the audio characteristics and temporal distribution of historical external audio within a preset time interval satisfy a first preset classification sub-condition, then the audio type of the target external audio is determined to be the first audio type, including: Obtain the current status information of the vehicle; If the communication protocol corresponding to the target external audio is the first communication protocol, the audio characteristics and temporal distribution of the historical external audio within the preset time interval satisfy the first preset classification sub-condition, and the current status information of the vehicle satisfies the second preset classification sub-condition, then the audio type of the target external audio is determined to be the first audio type.
[0010] In some possible implementations, determining the corresponding target audio management strategy based on the audio type of the target external audio includes: Determine the audio state of the local audio, which is used to characterize whether the local audio holds audio focus of the audio type; Based on the audio type of the target external audio and the audio status of the local audio, a corresponding target audio management strategy is determined.
[0011] In some possible implementations, determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the audio features of the target external audio match the preset audio features, then the audio type of the target external audio is determined to be the second audio type, and the second audio type is used to characterize the target external audio as a voice assistant prompt sound.
[0012] In some possible implementations, determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the duration of the target external audio is greater than a preset time threshold, then the audio type of the target external audio is determined to be the third audio type, and the third audio type is used to characterize the target external audio as media audio.
[0013] In some possible implementations, determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the second communication protocol, then the audio type of the target external audio is determined to be the fourth audio type, and the fourth audio type is used to characterize the target external audio as a voice call.
[0014] Secondly, embodiments of this application provide an electronic device, including: processor; Memory; And a computer program, wherein the computer program is stored in the memory, the computer program including instructions that, when executed by the processor, cause the electronic device to perform the method described in any one of the first aspects.
[0015] Thirdly, embodiments of this application provide a vehicle, including: A controller configured to perform the method described in any one of the first aspects.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform the method described in any one of the first aspects.
[0017] In this embodiment, the audio type of the target external audio is determined based on the communication protocol corresponding to the target external audio and preset classification conditions. Then, a target audio management strategy corresponding to the audio type is determined. According to the target audio management strategy, the target external audio and / or local audio are played. This can basically avoid the incompatibility between the audio management strategy and the external audio, improve the playback effect of the external audio and / or local audio, and enhance the user experience. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a structural diagram illustrating an application scenario provided in an embodiment of this application. Figure 2 A flowchart illustrating an audio playback method provided in an embodiment of this application; Figure 3 A timing diagram of an optional historical external audio provided for an embodiment of this application; Figure 4 A flowchart illustrating another audio playback method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 6 This is a structural schematic diagram of a vehicle provided in an embodiment of this application. Detailed Implementation
[0020] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0021] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0022] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0024] In practical applications, users can play local audio through the audio playback module and the in-vehicle infotainment (IVI) system. Alternatively, external devices can be connected to the IVI system via short-range wireless communication technology, and according to relevant transmission protocols, external audio can be played through the vehicle's audio playback module to improve the user's driving experience.
[0025] See Figure 1 This is a structural diagram illustrating an application scenario provided in an embodiment of this application, such as... Figure 1 As shown, the vehicle 100 includes an IVI system 101 and an audio playback module 102. Users can select local audio such as a car radio and local music through the IVI system 101 and play it through the audio playback module 102. The user's mobile device 200 can communicate with the IVI system 101 via short-range wireless communication technology (e.g., Bluetooth) and transmit external audio data to the IVI system 101 according to relevant audio transmission protocols such as Advanced Audio Distribution Profile (A2DP) and Bluetooth Hands-Free Profile (HFP), enabling the playback of external audio through the audio playback module 102.
[0026] It should be pointed out that, as Figure 1 The application scenario shown is only an exemplary application scenario and should not be regarded as a limitation on the protection scope of the embodiments of this application. For example, the external device that communicates with the vehicle can also be a smartwatch, microphone, tablet computer, laptop computer and other devices that can transmit audio data. The number of external devices can also be two or more.
[0027] Furthermore, the external audio transmitted by the user's mobile device 200 can be of various types, such as media audio, navigation prompts, voice assistant prompts, and call voice. In practical applications, the transmitted audio data usually does not carry audio type information, meaning that the IVI system has difficulty determining the audio type of the external audio. Therefore, IVI systems typically employ fixed audio management strategies to handle playback conflicts between local and external audio. Some common audio management strategies include interrupting local audio playback of external audio (preemptive strategy), playing both local and external audio simultaneously (mixing strategy), and prioritizing local audio playback while ignoring external audio (silent strategy).
[0028] However, fixed audio management strategies are often incompatible with various types of external audio, resulting in poor playback quality of at least one of the external and local audio. For example, a preemptive strategy may cause navigation voices to frequently interrupt local music; a mixing strategy may cause external and local audios to interfere with each other; and a silence strategy may cause navigation prompts to be ignored, thus degrading the user's driving experience.
[0029] In view of this, embodiments of this application provide an audio playback method that helps to solve the problem that the audio management strategy is not compatible with external audio of various audio types, resulting in poor playback effect of at least one of the external audio and local audio.
[0030] See Figure 2 This is a flowchart illustrating an audio playback method provided in an embodiment of this application, which can be applied to, for example... Figure 1 The application scenarios shown can specifically be applied to IVI systems, such as... Figure 2 As shown, the method specifically includes the following steps.
[0031] S201: Receive audio data from external audio sources.
[0032] As mentioned earlier, in practical applications, the IVI system can communicate with external devices and receive audio data (i.e., external audio) sent by external devices.
[0033] Optionally, audio data from a target external audio source can be received according to an audio transmission communication protocol. The audio transmission communication protocol may include the A2DP protocol and the HFP protocol. The A2DP protocol is typically used to transmit general audio data (e.g., media audio, navigation prompts, voice assistant prompts, etc.). The HFP protocol is typically used to transmit call audio to enable hands-free calling in in-vehicle scenarios.
[0034] Of course, those skilled in the art will understand that the A2DP protocol and the HFP protocol are only two exemplary audio transmission communication protocols, and audio transmission communication protocols may also include other communication protocols that can be used to transmit audio data to external devices.
[0035] S202: If the vehicle is playing local audio when the audio data of the target external audio is received, the audio type of the target external audio is determined according to the communication protocol corresponding to the target external audio and the preset classification conditions.
[0036] In practical applications, when the IVI system receives audio data from a target external audio source, it can determine whether the vehicle is currently playing local audio. If the vehicle is not playing local audio, it can directly play the target external audio through the audio playback module without needing to perform subsequent actions such as audio type determination and audio playback strategy selection. Conversely, if the vehicle is playing local audio when it receives audio data from the target external audio source, it can be assumed that there may be a playback conflict between the local and external audio, requiring further action.
[0037] Specifically, there are several ways to determine whether a vehicle is playing local audio. For example, thread listening can be used, where the IVI system determines whether local audio is being played by listening to the running status of the local audio playback thread.
[0038] In this embodiment, the preset classification conditions typically refer to a pre-configured set of judgment rules for classifying external audio types. The communication protocol of the external audio can be one of the judgment criteria for the preset classification conditions. Simultaneously, the preset classification conditions can also determine the audio type of the target external audio based on other judgment criteria. Optionally, the audio type of the external audio can be identified based on at least one of the following characteristics: audio features, acoustic features, transmission features, etc. That is, the audio type of the target external audio is determined based on the communication protocol corresponding to the target external audio, and at least one of the audio features and acoustic features of the target external audio.
[0039] For example, the audio feature includes duration. Thus, if the communication protocol corresponding to the target external audio is the first communication protocol and the duration of the target audio is less than 2 seconds, the audio type of the target external audio is determined to be a message prompt; if the communication protocol corresponding to the target external audio is the first communication protocol and the duration of the target audio is more than 2 seconds but less than 8 seconds, the audio type of the target external audio is determined to be a navigation prompt; if the communication protocol corresponding to the target external audio is the first communication protocol and the duration of the target audio is more than 8 seconds, the audio type of the target external audio is determined to be media audio.
[0040] This allows for the rapid and cost-effective determination of the audio type of the target external audio, enabling the selection of an appropriate audio management strategy. Furthermore, as the duration of the target external audio increases, the previously determined audio type can be adjusted to maximize the accuracy of audio type identification.
[0041] In some possible implementations, if the communication protocol corresponding to the target external audio is a first communication protocol, and the audio characteristics and temporal distribution of the historical external audio within a preset time interval satisfy a first preset sub-condition, then the audio type of the target external audio is determined to be a first audio type; the first audio type is used to characterize the target external audio as a navigation prompt sound.
[0042] In the embodiments of this application, the first communication protocol is typically a communication protocol used to transmit general audio data, and optionally, the first communication protocol is the A2DP protocol.
[0043] It is understood that the preset time interval is a period of time of preset length preceding the moment when the audio data of the target external audio is received. Of course, those skilled in the art can set the length of the preset time interval according to actual needs. For example, it can be set to within two minutes preceding the moment when the audio data of the target external audio is received. Of course, the duration can be longer or shorter, and this application does not impose specific limitations on it.
[0044] Furthermore, the external audio received within the preset time interval is the historical external audio. Within the preset time interval, the IVI system can receive one, multiple, or zero segments of external audio. In other words, within the regional time interval, there can be one, multiple, or zero segments of historical external audio.
[0045] In the embodiments of this application, temporal distribution typically refers to the distribution characteristics of time dimensions such as the time intervals and occurrence times of historical external audio being received. Optionally, audio characteristics may include the duration of the audio.
[0046] Those skilled in the art will understand that the first preset category sub-condition can be set according to the characteristics of the navigation prompt tone. It is understood that the navigation prompt tone usually has the characteristics of short duration, relatively stable volume, and relatively fixed time interval between two adjacent occurrences. Those skilled in the art can set the first preset category sub-condition according to the above characteristics.
[0047] Optionally, the audio characteristics and temporal distribution of historical external audio within the preset time interval satisfy the first preset sub-condition, including: the duration of all historical external audio within the preset time interval is within the first preset duration range, and the interval time of all historical external audio within the preset time interval is within the second preset duration range.
[0048] In this way, by judging whether the audio characteristics and temporal distribution of historical external audio within the preset time interval meet the first preset classification sub-condition, it can be basically determined that the audio type of the historical external audio is a navigation prompt tone, and thus it can be considered that the audio type of the currently received target external audio is a navigation prompt tone.
[0049] To facilitate understanding of the embodiments of this application, a detailed explanation of historical external audio is provided below using an example. See [link to example]. Figure 3 This is a timing diagram of an optional historical external audio provided in an embodiment of this application. For example, T10 is the moment when the target external audio is first received, and the time interval consisting of T11-T10 is a preset time interval. Within the preset time interval, three external audio segments are received in the time intervals of T12-T13, T14-T15, and T16-T17, respectively. In other words, there are three historical external audio segments within the preset time interval.
[0050] It is understood that the durations of the three historical external audio segments are the time intervals corresponding to T12-T13, T14-T15, and T16-T17, respectively. The two time intervals between the three historical external audio segments are the time intervals corresponding to T13-T14 and T15-T16, respectively. The time interval between the closest historical external audio segment and the target external audio segment is the time interval corresponding to T11-T10. If the above time intervals match the characteristics of navigation prompts (for example, the durations of T12-T13, T14-T15, and T16-T17 are between 2 and 8 seconds; the durations of T13-T14, T15-T16, and T11-T10 are between 30 and 120 seconds), then it can be determined that the audio characteristics and temporal distribution of the historical external audio segments within the preset time interval satisfy the first preset classification sub-condition.
[0051] In other words, after confirming that the communication protocol corresponding to the target external audio is the first communication protocol, the IVI system can extract historical external audio within a preset time interval, analyze the audio characteristics and temporal distribution of the historical external audio, and determine whether it meets the first preset classification sub-condition. Therefore, it can determine that the audio type of the target external audio is a navigation prompt tone, i.e., the first audio type.
[0052] Understandably, in this way, in the embodiments of this application, the target external audio can be more accurately determined to be a navigation prompt sound by using the audio characteristics and temporal distribution of historical external audio as the basis for judgment.
[0053] In some possible implementations, after determining that the audio type of the target external audio is a first audio type, the audio type of the subsequently received external audio is also determined to be the first audio type.
[0054] Optionally, the method further includes: if the audio characteristics and temporal distribution of historical external audio within a preset time interval satisfy a first preset sub-condition, then the audio type of the subsequently received external audio is the first audio type.
[0055] In some possible implementations, the current status information of the vehicle is obtained; if the communication protocol corresponding to the target external audio is a first communication protocol, the historical external audio within a preset time interval satisfies a first preset sub-condition, and the current status information of the vehicle satisfies a second preset sub-condition, then the audio type of the target external audio is determined to be the first audio type.
[0056] In this embodiment, the audio type of the target external audio can also be determined as a navigation prompt tone, i.e., the first audio type, based on the vehicle's current state information. The vehicle's current state information typically refers to a set of information characterizing the vehicle's current motion and operating conditions, including but not limited to the vehicle's speed, steering wheel angle signal, vehicle ignition status, and door open / close status.
[0057] Vehicle status information can be obtained through various methods. For example, real-time collection and updating of status information can be achieved through a preset thread listening mechanism and the vehicle data interaction interface.
[0058] Optionally, the vehicle's current motion status and the target external audio data can be acquired synchronously. Specifically, two independent listening threads can be started. One thread continuously listens for audio data input from external devices, while the other thread continuously acquires the vehicle's current status information through the vehicle's CAN bus interface and updates the collected information to a preset globally accessible status cache in real time, providing more timely and accurate information for subsequent steps.
[0059] Furthermore, the second preset classification sub-conditions are usually determined based on the application scenario of the navigation prompt tone. They are a series of judgment rules based on the current status information of the vehicle, which are used to further improve the accuracy of the recognition of the navigation prompt tone audio type.
[0060] For example, if it is determined that the vehicle's current driving speed is greater than 20 km / h, the vehicle's steering wheel angle is greater than a preset angle threshold, the vehicle door is closed and the vehicle is in ignition state, or the vehicle's turn signal is flashing, then it can be determined that the vehicle's current motion state satisfies the second preset sub-condition.
[0061] In this way, the application scenario of the navigation prompt tone is determined based on the vehicle's current motion status, thus improving the accuracy of identifying this audio type.
[0062] In some possible implementations, if the communication protocol corresponding to the target external audio is a first communication protocol, and the audio features of the target external audio match preset audio features, then the audio type of the target external audio is determined to be a second audio type, and the second audio type is used to characterize the target external audio as a voice assistant prompt sound.
[0063] Understandably, after an external device establishes a communication connection with the vehicle, the user wakes up the external device's voice assistant, and the voice assistant responds and outputs audio data. The specific type of the audio can be determined through protocol matching and audio feature recognition. It should be noted that voice assistant prompts often possess a fixed structure and characteristic patterns that distinguish them from other audio types, typically exhibiting specific combination patterns. Preset audio features can be set based on this characteristic to achieve the recognition of this audio type: voice prompts.
[0064] For example, a common structure for a voice assistant prompt tone may include a fixed guiding prompt tone, a preset duration of silence, or a specific response prompt audio or operation feedback audio. Preset audio features can be set based on the above characteristics. Of course, preset audio features may also be set with characteristics such as relatively stable volume, frequency range concentrated in a specific interval, and fixed audio signal attenuation patterns at the beginning and end stages. If the communication protocol corresponding to the target external audio is a first communication protocol, and the audio features of the target external audio match the preset audio features, then the audio type of the target external audio is determined to be a voice assistant prompt tone, i.e., the second audio type. Optionally, the first communication protocol is the A2DP protocol.
[0065] Understandably, in this way, in the embodiments of this application, by using the audio characteristics of the target external audio and the preset audio characteristics as the basis for judgment, it is possible to more accurately determine that the target external audio is a voice assistant prompt.
[0066] In some possible implementations, if the communication protocol corresponding to the target external audio is a first communication protocol and the duration of the target external audio is greater than a preset time threshold, then the audio type of the target external audio is determined to be a third audio type, and the third audio type is used to characterize the target external audio as media audio.
[0067] It is understandable that media audio (e.g., music, audiobooks, radio blogs) typically has a relatively long duration (e.g., greater than 8 seconds), so audio duration can be used as a key criterion. The first communication protocol is typically a communication protocol used for transmitting general audio data; optionally, the first communication protocol is the A2DP protocol.
[0068] In some possible implementations, if the communication protocol corresponding to the target external audio is a second communication protocol, then the audio type of the target external audio is determined to be a fourth audio type, which is used to characterize the target external audio as a voice call.
[0069] In this embodiment, the second communication protocol is typically a communication protocol used to transmit call-related audio data; optionally, the second communication protocol can be the HFP protocol. Therefore, if the communication protocol corresponding to the target external audio is the second communication protocol, the audio type of the target external audio can be determined to be call voice, i.e., the fourth audio type.
[0070] In some possible implementations, if the communication protocol corresponding to the target external audio is the first communication protocol, and the duration of the target external audio is less than a preset short audio time threshold, then the audio type of the target external audio is determined to be the fifth audio type, and the fifth audio type is used to characterize the target external audio as a notification prompt tone.
[0071] S203: Determine the corresponding target audio management strategy based on the audio type of the target external audio.
[0072] As mentioned earlier, audio management strategies typically refer to the control rules used by an IVI system to handle playback conflicts between local audio and external audio. In the embodiments of this application, audio management strategies may, exemplarily, include preemption strategies, mixing strategies, silence strategies, and volume reduction strategies. Specifically, a preemption strategy interrupts the playback of local audio and prioritizes the playback of external audio; a mixing strategy maintains the playback of local audio while simultaneously playing external audio; a silence strategy maintains the playback of local audio while ignoring external audio; and a volume reduction strategy lowers the playback volume of local audio while playing external audio.
[0073] Understandably, a target audio management strategy suitable for the current scenario can be determined based on the audio type of the target external audio and the preset mapping rules. For example, if the audio type of the target external audio is a call voice, the corresponding target audio management strategy can be determined as a preemption strategy to ensure the clear transmission of the call content; if the audio type of the target external audio is a navigation prompt tone, the corresponding target audio management strategy can be determined as a volume reduction strategy, that is, reducing the volume of the local audio to highlight the navigation prompt tone.
[0074] Optional, see below Figure 4 This is a flowchart illustrating another audio playback method provided in this application, as shown below. Figure 4 As shown, in Figure 2 Based on the method shown, step S203 specifically includes the following steps.
[0075] S2031: Determine the audio state of the local audio, wherein the audio state of the local audio is used to characterize whether the local audio holds audio focus of the audio type.
[0076] In practical applications, audio focus usually refers to a mechanism used to coordinate the playback priority between different audio streams. To a certain extent, it ensures that audio output can be played in an orderly manner according to predetermined rules at the same time, thereby basically avoiding multiple audio streams from competing for the output channel in an disorderly manner.
[0077] In practical applications, different audio types can correspond to different categories of audio focus. For example, it can include navigation prompt audio focus and voice assistant prompt audio focus corresponding to the first audio type and the second audio type, respectively.
[0078] Furthermore, it can be determined whether the local audio holds the audio focus of the audio type, and the audio state of the local audio can be determined. For example, when the local audio is performing a navigation function, it can be considered that the local audio holds the audio focus of the navigation prompt sound; when a voice assistant application is running in the IVI system, it can be considered that the local audio holds the audio focus of the voice assistant prompt sound.
[0079] S2032: Determine the corresponding target audio management strategy based on the audio type of the target external audio and the audio status of the local audio.
[0080] It is understandable that a suitable target audio management strategy can be determined based on the audio type of the target external audio, the audio status of the local audio, and preset mapping conditions.
[0081] For example, if the target external audio is a navigation prompt (or voice assistant prompt), and the local audio does not hold the navigation prompt audio focus (or voice assistant prompt audio focus), then the target audio management strategy is determined to be a volume reduction strategy, that is, temporarily reducing the playback volume of the local audio and playing the external audio; if the local audio holds the navigation prompt audio focus (or voice assistant prompt audio focus), then the target audio management strategy is determined to be a silence strategy, that is, ignoring the playback of the target external audio.
[0082] If the target external audio is media audio and the local audio does not hold either voice focus or navigation focus, the target audio management strategy is determined to be a preemptive strategy, that is, interrupting the playback of the local audio and playing the target external audio; if the local audio holds either voice focus or navigation focus, the target audio management strategy is determined to be a volume reduction strategy.
[0083] S204: Play target external audio and / or local audio according to the target audio management policy.
[0084] In this embodiment, after determining the target audio management strategy, the IVI system controls the audio playback module to play target external audio and / or local audio according to the target audio management strategy. For example, if the target audio management strategy is a preemptive strategy, local audio playback can typically be stopped, and target external audio can be played; if the target audio management strategy is a volume reduction or mixing strategy, target external audio and (lowered volume) local audio can be played; if the target audio management strategy is a silent strategy, target external audio can be not played, and the local audio playback status can be maintained.
[0085] Corresponding to the above embodiments, this application also provides an electronic device, including: a processor; a memory; and a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device performs any one of the methods described in the method embodiments.
[0086] Corresponding to the above embodiments, this application also provides an electronic device.
[0087] See Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 may include a processor 501, a memory 502, and a communication unit 503. These components communicate via one or more buses. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the embodiments of this application. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0088] The communication unit 503 is used to establish a communication channel, thereby enabling the electronic device to communicate with other devices.
[0089] The processor 501 serves as the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 502, and calls data stored in the memory to perform various functions and / or process data. The processor may be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 501 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.
[0090] Memory 502 is used to store the execution instructions of processor 501. Memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0091] When the execution instructions in memory 502 are executed by processor 501, the electronic device 500 is able to perform some or all of the steps in the above method embodiments. Corresponding to the above embodiments, this application also provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, and when the program runs, it can control the device where the computer-readable storage medium is located to perform some or all of the steps in the above method embodiments. Specifically, the computer-readable storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0092] For details regarding the embodiments of this application, please refer to the description of the above method embodiments. For the sake of brevity, these details will not be repeated here.
[0093] Corresponding to the above embodiments, this application also provides a vehicle, see [link to previous embodiment]. Figure 6 This is a structural schematic diagram of a vehicle provided in an embodiment of this application. Figure 6 As shown, vehicle 600 includes controller 601, which is configured to perform some or all of the steps in the above method embodiments. For details regarding the embodiments of this application, please refer to the description of the above method embodiments; for the sake of brevity, further details will not be repeated here.
[0094] Corresponding to the above embodiments, this application also provides a computer-readable storage medium, wherein the computer-readable storage medium may store a program, and when the program runs, it can control the device where the computer-readable storage medium is located to execute some or all of the steps in the above method embodiments. In specific implementation, the computer-readable storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0095] For details regarding the embodiments of this application, please refer to the description of the above method embodiments. For the sake of brevity, these details will not be repeated here.
[0096] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, the simultaneous existence of A and B, or the existence of B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects have an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, and c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0097] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0098] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the electronic devices, controllers, and computer storage media described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0099] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0100] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.
Claims
1. An audio playback method, characterized in that, include: Receive audio data from external audio sources. If the vehicle is playing local audio when the audio data of the target external audio is received, the audio type of the target external audio is determined according to the communication protocol corresponding to the target external audio and the preset classification conditions; Based on the audio type of the target external audio, determine the corresponding target audio management strategy; According to the target audio management strategy, play the target external audio and / or local audio.
2. The method according to claim 1, characterized in that, The step of determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the audio characteristics and temporal distribution of the historical external audio within the preset time interval satisfy the first preset classification subcondition, then the audio type of the target external audio is determined to be the first audio type, and the first audio type is used to characterize the target external audio as a navigation prompt sound.
3. The method according to claim 2, characterized in that, If the communication protocol corresponding to the target external audio is a first communication protocol, and the audio characteristics and temporal distribution of historical external audio within a preset time interval satisfy a first preset classification sub-condition, then the audio type of the target external audio is determined to be the first audio type, including: Obtain the current status information of the vehicle; If the communication protocol corresponding to the target external audio is the first communication protocol, the audio characteristics and temporal distribution of the historical external audio within the preset time interval satisfy the first preset classification sub-condition, and the current status information of the vehicle satisfies the second preset classification sub-condition, then the audio type of the target external audio is determined to be the first audio type.
4. The method according to claim 1, characterized in that, The step of determining the corresponding target audio management strategy based on the audio type of the target external audio includes: Determine the audio state of the local audio, which is used to characterize whether the local audio holds audio focus of the audio type; Based on the audio type of the target external audio and the audio status of the local audio, a corresponding target audio management strategy is determined.
5. The method according to claim 1, characterized in that, The step of determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the audio features of the target external audio match the preset audio features, then the audio type of the target external audio is determined to be the second audio type, and the second audio type is used to characterize the target external audio as a voice assistant prompt sound.
6. The method according to claim 1, characterized in that, The step of determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the first communication protocol, and the duration of the target external audio is greater than a preset time threshold, then the audio type of the target external audio is determined to be the third audio type, and the third audio type is used to characterize the target external audio as media audio.
7. The method according to claim 1, characterized in that, The step of determining the audio type of the target external audio based on the communication protocol corresponding to the target external audio and preset classification conditions includes: If the communication protocol corresponding to the target external audio is the second communication protocol, then the audio type of the target external audio is determined to be the fourth audio type, and the fourth audio type is used to characterize the target external audio as a voice call.
8. An electronic device, characterized in that, include: processor; Memory; And a computer program, wherein the computer program is stored in the memory, the computer program including instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1 to 7.
9. A vehicle, characterized in that, include: A controller configured to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1 to 7.