Volume control method, electronic equipment and related device

By adjusting the volume when switching audio sources, the decibel level of the same type of audio is kept consistent or similar, thus solving the problem of volume changes caused by audio source switching and improving the user experience.

CN121277458APending Publication Date: 2026-01-06HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410890939.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

When electronic devices switch audio sources, volume changes cause the audio decibel level to fluctuate, affecting the user experience.

Method used

By detecting changes in audio source and adjusting the volume accordingly, the decibel levels of the same type of audio can be kept consistent or similar, thus adapting to the user's preferred decibel range.

Benefits of technology

This avoids the problem of fluctuating audio decibel levels when switching audio sources, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121277458A_ABST
    Figure CN121277458A_ABST
Patent Text Reader

Abstract

The invention provides a volume control method, an electronic device and a related device, a first electronic device can play a first audio from a first audio source at a first volume, and when the first audio source is detected to be switched to a second audio source, a second audio from a second audio source is played at a second volume. The type of the first audio is the same as that of the second audio, the decibel of playing the first audio at the first volume is a first decibel, the decibel of playing the second audio at the second volume is a second decibel, and the difference between the first decibel and the second decibel is smaller than or equal to a first threshold value. Wherein in the audio source switching scene, for the same type of audio, the first electronic equipment can play the same type of audio with different volumes, so that the decibels of the first electronic equipment when playing the same type of audio are the same or similar, and a user can hear that the decibels of the same type of audio are within the decibel range habitually of the user; and the problem that the audio decibel is suddenly large and suddenly small during audio source switching is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of multi-device interaction technology, and in particular to a volume control method, electronic device and related apparatus. Background Technology

[0002] With the development of electronic devices, for example, a connection can be established between the first and second electronic devices, and the second electronic device can also project its screen or sound onto the first electronic device, enabling the first electronic device to play audio from the second electronic device. In addition, the second electronic device can also play local audio.

[0003] Currently, when the first electronic device switches audio sources, for example, when the first electronic device switches from playing local audio to playing audio from the second electronic device, or when the first electronic device switches from playing audio from the second electronic device to playing local audio, the first electronic device plays the audio at the same local volume, which causes the user to hear the audio volume fluctuate, affecting the user experience. Summary of the Invention

[0004] This application provides a volume control method, an electronic device, and related apparatus. In scenarios where audio sources are switched, the electronic device can play audio at different volumes, so that the decibel level of the audio played by the first electronic device is the same or similar, so that the decibel level of the audio heard by the user is within the decibel range that the user is accustomed to, and avoids the problem of the audio decibel level fluctuating when switching audio sources.

[0005] In a first aspect, embodiments of this application provide a volume control method. The executing entity of this method can be a first electronic device, or a chip within the first electronic device, etc. The following description uses a first electronic device as an example. In this method, the first electronic device can play a first audio signal from a first audio source at a first volume. When it is detected that the first audio source has switched to a second audio source, the first electronic device can play a second audio signal from the second audio source at a second volume.

[0006] Wherein, the type of the first audio is the same as the type of the second audio. Wherein, the decibel level at which the first electronic device plays the first audio at the first volume is defined as the first decibel level, and the decibel level at which the first electronic device plays the second audio at the second volume is defined as the second decibel level, and the difference between the first decibel level and the second decibel level is less than or equal to a first threshold.

[0007] In this implementation method, in the scenario of audio source switching, for the same type of audio, the first electronic device can play the same type of audio at different volumes, so that the decibel level when the first electronic device plays the same type of audio is the same or similar, so that the user hears the same type of audio at a decibel level within the user's habitual decibel range, avoiding the problem of audio decibel fluctuating when switching audio sources.

[0008] In one possible implementation, the first audio source is the first electronic device, and the second audio source is the second electronic device. In this scenario, switching from the first audio source to the second audio source can be understood as switching from a local audio source to a remote audio source. Alternatively,

[0009] The first audio source is the second electronic device, and the second audio source is either the first electronic device or a third electronic device. When the second audio source is the first electronic device, switching from the first audio source to the second audio source can be understood as switching from a remote audio source to a local audio source. When the second audio source is the third electronic device, switching from the first audio source to the second audio source can be understood as switching from one remote audio source to another remote audio source.

[0010] In this implementation, the volume control method provided in this application embodiment can be applied to scenarios involving switching between multiple audio sources, and has a wide range of applications.

[0011] In one possible implementation, after the first electronic device plays a first audio from a first audio source at a first volume, when a switch from the first audio to a third audio from the first audio source is detected, the first electronic device can play the third audio at a third volume, wherein the type of the first audio is different from the type of the third audio.

[0012] In this implementation, when the audio source remains the same but the type of audio changes, the first electronic device can also play the audio at different volumes. This can adapt to the user's decibel requirements for different audio types and improve the user experience.

[0013] In one possible implementation, after the first electronic device plays a first audio from a first audio source at a first volume, when a fourth audio is detected switching from the first audio to the first audio source, the first electronic device can play the fourth audio at the first volume, wherein the type of the first audio is the same as the type of the fourth audio.

[0014] In this implementation, when the audio source and the type of audio remain unchanged, the first electronic device can also play the audio at the same volume, which can adapt to the user's decibel requirement for this type of audio and improve the user experience.

[0015] In one possible implementation, the first electronic device can play a first audio signal from a first audio source at a first volume. When a switch from the first audio source to a second audio source is detected, the first electronic device can play a sixth audio signal at a sixth volume, the sixth audio signal being of a different type than the first audio signal.

[0016] In this implementation, when the audio source changes and the type of audio changes, the first electronic device can also play the audio at different volumes. This can adapt to the user's decibel requirements for that type of audio source and improve the user experience.

[0017] In summary, in this embodiment of the application, the first electronic device can adjust its volume in detail based on the audio source and the type of audio, enabling the first electronic device to play audio at a volume that is more suitable for the user's different needs for the audio source and the type of audio, thereby improving the user experience.

[0018] In one possible implementation, a first electronic device plays a fifth audio signal from a first audio source at a fourth volume, wherein the type of the first audio signal is the same as the type of the fifth audio signal, and the decibel level at which the fifth audio signal is played at the fourth volume is a third decibel, the difference between the first decibel level and the third decibel level being greater than a first threshold. In response to a user adjusting the volume of the first electronic device, the first electronic device can adjust the fourth volume to the first volume, and the first electronic device can store the first audio source, the type of the fifth audio signal, and the corresponding first volume level.

[0019] In this implementation, when playing a certain type of audio from an audio source, the first electronic device can determine the volume corresponding to that type of audio from that audio source based on the user's volume adjustment operation. When the first electronic device plays that type of audio from the same audio source again, it can play the audio at that volume, enabling the audio decibel level to adapt to the user.

[0020] In one possible implementation, the first electronic device stores the first audio source, the type of the fifth audio, and the corresponding first volume, including: storing the first audio source, the type of the fifth audio, and the corresponding first volume when at least one of the following conditions is met. The conditions may include: playing an audio of the same type as the fifth audio at the first volume for a duration greater than or equal to a preset duration; or playing the fifth audio at the first volume until it is finished.

[0021] In this implementation, in response to the user's operation of adjusting the fourth volume to the first volume, the first electronic device can determine that it will only store the first audio source, the type of the fifth audio, and the corresponding first volume when certain conditions are met. This not only reduces the number of times the first electronic device updates the volume of the fifth audio type of the first audio source, thus reducing the workload of the first electronic device, but also enables the volume of the fifth audio type of the first audio source stored by the first electronic device to be more suitable for the user.

[0022] In one possible implementation, before the first electronic device plays the first audio from the first audio source at a first volume, the method further includes: the first electronic device determining the first volume corresponding to the first audio source and the type of the first audio based on the correspondence between the first audio source, the type of the fifth audio, and the first volume. Thus, the first electronic device can play the first audio at the first volume.

[0023] In one possible implementation, the first electronic device can continuously update the correspondence between the audio source, the audio type, and the volume of the first electronic device so that the correspondence can adapt to new user needs. For example, after the first electronic device plays a first audio from a first audio source at a first volume, in response to a user's operation to adjust the volume of the first electronic device, the first electronic device can adjust the first volume to the fifth volume, and the first electronic device can update the correspondence between the first audio source, the type of the fifth audio, and the first volume to the same correspondence.

[0024] After the first electronic device updates the correspondence between the first audio source, the type of the fifth audio, and the fifth volume, when the first electronic device plays the fourth audio from the first audio source, it can play the fourth audio at the fifth volume. The type of the first audio is the same as the type of the fourth audio. In some embodiments, the decibel level at which the first electronic device plays the first audio at the fifth volume is the fourth decibel, and the difference between the first decibel and the fourth decibel is less than or equal to the first threshold.

[0025] In this implementation, the first electronic device can continuously update the correspondence between the audio source, the audio type, and the volume of the first electronic device, so that the correspondence can adapt to the user's decibel requirements for different audio sources and different audio types.

[0026] In one possible implementation, since the user can adjust the volume of the first electronic device, a protection strategy can be deployed in the first electronic device. Specifically, in response to the user's operation to adjust the volume of the first electronic device, when it is determined that the volume of the first electronic device has reached a protection level, the first electronic device can output a prompt message to suggest to the user whether to continue adjusting the volume.

[0027] In this implementation, while the user is adjusting the volume of the first electronic device, the first electronic device can also output a prompt message to remind the user that the volume of the first electronic device has reached the protection volume and whether to continue adjusting the volume of the first electronic device. This timely notification can improve the user experience.

[0028] In a second aspect, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory is used to store code instructions and the processor is used to execute the code instructions to perform the methods described in the first aspect or any possible implementation thereof.

[0029] The electronic device described in the second aspect is the first electronic device described in the first aspect.

[0030] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0031] Fourthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0032] Fifthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation thereof. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0033] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0034] It should be understood that the second to fifth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0035] Figure 1 A schematic diagram illustrating the applicable scenarios for the volume control method provided in the embodiments of this application;

[0036] Figure 2 A diagram illustrating the decibel level of audio played from a mobile phone on a car's infotainment system.

[0037] Figure 3 A schematic diagram of the structure of the first electronic device and the second electronic device provided in the embodiments of this application;

[0038] Figure 4 A flowchart illustrating one embodiment of the volume control method provided in this application;

[0039] Figure 5 A schematic flowchart of another embodiment of the volume control method provided in this application;

[0040] Figure 6 A schematic diagram illustrating the playback of the same type of audio by the vehicle system when switching audio sources, as provided in an embodiment of this application.

[0041] Figure 7 This is a schematic diagram illustrating the playback of different types of audio by the vehicle's infotainment system when switching audio sources, as provided in an embodiment of this application.

[0042] Figure 8 A schematic diagram of the structure of a first electronic device provided in an embodiment of this application;

[0043] Figure 9 This is a schematic diagram of a second electronic device provided in an embodiment of this application. Detailed Implementation

[0044] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below:

[0045] 1. Audio Source: In audio playback scenarios, the audio source refers to the electronic device used to provide audio. For example, taking a car infotainment system as an example, the car infotainment system uses its built-in audio player to play audio, thus the car infotainment system can be used as the audio source. For example, in a projection scenario, taking a mobile phone projecting audio onto a car infotainment system, the car infotainment system can play audio from the mobile phone. Although the car infotainment system is playing audio, the audio originates from the mobile phone, thus the mobile phone can be used as the audio source.

[0046] In some embodiments, casting may include screen casting or audio casting. Screen casting can be understood as casting video (including audio and video footage), while audio casting can be understood as casting only audio.

[0047] 2. Volume: Refers to the relative volume value on an electronic device. In some embodiments, the volume on an electronic device can be normalized to 0-100%, for example, the volume of the electronic device can be 50%.

[0048] 3. Decibels: This refers to the volume of audio played by an electronic device. The higher the decibel level, the louder the audio sound is to the user; the lower the decibel level, the quieter the audio sound is to the user.

[0049] For example, 40-60 decibels is the typical volume of conversation in a normal indoor environment; a sound level of 40-60 decibels is suitable when using headphones. Volumes above 70 decibels can cause irritability and difficulty concentrating. If noise reaches an intensity of 80 decibels or higher, prolonged exposure to continuous noise can damage the inner ear's spiral organ and spiral nerve, leading to noise-induced hearing loss. Generally, sound levels of 85-90 decibels can affect a user's hearing.

[0050] 4. Electronic Devices: In this application embodiment, electronic devices can be referred to as user equipment (UE), terminals, etc. For example, electronic devices can be mobile phones, portable Android devices (PADs), personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices, in-vehicle devices, or wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in smart homes, etc. The form of electronic devices is not specifically limited in this application embodiment.

[0051] Figure 1 This diagram illustrates a scenario where the volume control method provided in this application is applicable. The volume control method provided in this application is applicable to projection scenarios, see below. Figure 1 This scenario may include: a first electronic device 100 and a second electronic device 200.

[0052] In some embodiments, the second electronic device 200 may be referred to as a delivery device, and the first electronic device 100 may be referred to as a delivery device. The second electronic device 200 may deliver video or audio to the first electronic device 100. It should be understood that the video may include audio, and the volume control method for the audio can be referred to the description of the volume control method in the embodiments of this application. In the following embodiments, the second electronic device 200 delivers audio to the first electronic device 100 as an example. The audio may be standalone audio or audio carried in a video.

[0053] In some embodiments, the second electronic device 200 may be, for example, an electronic device with projection capabilities such as a mobile phone, a tablet computer, a personal computer (PC), or a wearable device. In some embodiments, the second electronic device 200 also has an audio playback function. For example, the second electronic device 200 may be equipped with an audio playback module such as a speaker (or loudspeaker) to realize the audio playback function of the second electronic device 200. This application embodiment does not limit the hardware involved in the audio playback function of the second electronic device 200.

[0054] The first electronic device 100 can be, for example, an electronic device with audio playback function such as a vehicle infotainment system, speaker, television, VR device, or AR device. For example, the first electronic device 100 can be equipped with an audio playback module such as a speaker (or loudspeaker) to realize the audio playback function of the first electronic device 100. This application embodiment does not limit the hardware involved in the audio playback function of the first electronic device 100.

[0055] The embodiments of this application do not limit the form of the first electronic device 100 and the second electronic device 200.

[0056] Figure 1 In the following embodiments, the second electronic device 200 is a mobile phone and the first electronic device 100 is a vehicle-mounted system, which will be used as an example for explanation.

[0057] In some embodiments, the first electronic device and the second electronic device can be interconnected through a communication network to enable audio and video playback. This communication network can be, but is not limited to, a Wi-Fi hotspot network, a Wi-Fi peer-to-peer (P2P) network, a Bluetooth network, a Zigbee network, or a near field communication (NFC) network.

[0058] The following is combined with Figure 1 The scenario shown illustrates the current volume control method:

[0059] The in-vehicle infotainment system can play local audio; for example, it can use its built-in audio player. In scenarios where a mobile phone is connected to the system, the phone can stream audio to the system, and the system can play the audio streamed from the phone. In other words, the system can play not only local audio but also remote audio. In some embodiments, remote audio can be understood as audio streamed to the system from other devices.

[0060] Both the phone and the car's infotainment system have volume control functions. Taking local audio playback in the car as an example, users can adjust the audio volume (in decibels) by using physical buttons on the car's infotainment system or the volume bar on the screen. In scenarios where audio is streamed from the phone to the car's infotainment system, users can adjust the volume using both physical buttons on the phone and the volume bar on the car's screen.

[0061] It should be understood that users can also adjust the volume of audio played on the vehicle system using voice, air gestures, etc., and this application embodiment does not limit this.

[0062] In some embodiments, to protect users' hearing, electronic devices (vehicle infotainment systems, mobile phones) may employ volume protection features. For example, taking a vehicle infotainment system as an example, when the system's volume reaches its protection level, the system can output a prompt message to ask the user whether they confirm playing at that volume. Alternatively, when the system's volume reaches its protection level and the user continues to increase the volume, the system can output a prompt message to ask the user whether they confirm continuing to increase the volume.

[0063] Reference Figure 2 For example, if the phone's volume is X%, and the car's volume is Y%, in a scenario where the phone sends audio to the car's system, the phone can send audio to the car's system. In response to the audio from the phone, the car's system can play the audio at a volume of Y%, where the decibel level of the audio can be determined by the audio gain and the car's system volume of Y%.

[0064] In some embodiments, the decibel level of the audio can be positively correlated with the audio gain and the vehicle's head volume (Y%). For example, a higher audio gain, i.e., a higher mobile phone volume (X%), results in a higher audio decibel level. Similarly, a higher head volume (Y%) results in a higher audio decibel level. This is because the audio gain is positively correlated with the mobile phone volume (X%), and therefore the audio decibel level can be positively correlated with both the mobile phone volume (X%) and the head volume (Y%).

[0065] In some embodiments, the decibel level of the audio played by the vehicle infotainment system can be, for example, X% × Y%.

[0066] exist Figure 2In the scenario shown, if the phone's volume is low, users often turn up the car's infotainment system volume, sometimes exceeding the system's safety level, to ensure they can hear the audio or keep the audio volume within a suitable range. In this situation, when switching from playing remote audio to playing local audio, the car's system will play the local audio at a very high volume because the user has turned the volume up, potentially damaging the user's hearing and resulting in a poor user experience.

[0067] In some embodiments, after the mobile phone is connected to the vehicle's infotainment system, the two devices can negotiate for the mobile phone to adjust its volume to 100%, meaning that the mobile phone's volume X% equals 100%. Because the mobile phone's volume is 100%, the user can adjust the vehicle's infotainment system's volume to control the decibel level of the audio played. For example, if the vehicle's infotainment system's volume is Y%, the decibel level of the audio played by the system can be Y%.

[0068] In this example, users can adjust the volume of the car's infotainment system to control the decibel level of the audio played. When the volume exceeds a protected level, the system can prompt the user to stop adjusting, thus preventing excessive volume when switching from remote audio playback to local audio playback. However, this method only applies to scenarios where the phone supports absolute volume control; not all phones support this, limiting its applicability.

[0069] In scenarios where the in-vehicle infotainment system switches from playing remote audio to playing local audio, to avoid excessive volume after the switch, some embodiments can detect the system's volume when switching. If the volume exceeds the system's protection volume, the system can automatically lower the volume to the protection level and play audio at that level. This prevents the system from playing local audio at a very high volume, avoiding potential hearing damage and improving the user experience.

[0070] In this example, the mobile phone can be considered the first audio source, and the vehicle's infotainment system can be considered the second audio source. In other words, when switching from the first audio source to the second audio source, the vehicle's infotainment system can activate a volume protection strategy. This volume protection strategy can include: the vehicle's infotainment system can detect its own volume; when the volume exceeds its protection volume, the system can automatically lower the volume to the protection level and play audio at that protection level.

[0071] In some embodiments, the volume protection strategy may further include: the vehicle infotainment system outputting a notification message to the user that the vehicle infotainment system volume is too high and has been reduced to the protection volume. In this example, the vehicle infotainment system can notify the user of the volume protection strategy, which can further improve the user experience.

[0072] The example above illustrates a scenario where the vehicle's infotainment system can automatically lower the volume to a protective level when switching from playing remote audio to playing local audio. This solution ensures basic user needs are met, such as preventing the volume from becoming too loud and damaging the user's hearing. However, in some implementations, users' preferred audio decibel levels differ. For example, the protective volume might be too loud for some users, but suitable for others.

[0073] Because users are accustomed to different decibel levels for audio, when the audio source is switched, such as when the car's infotainment system switches from playing remote audio to playing local audio, even if the remote and local audio played by the car's infotainment system are of the same type, the car's infotainment system currently plays audio at the same volume, which will cause the user to hear the audio sound (decibels) fluctuate, affecting the user experience.

[0074] For example, if the phone's volume is 30% and the car's infotainment system's volume is 60%, when the car's infotainment system plays audio from the phone (such as media audio), the audio decibel level can be 30% × 60% = 18%. When the car's infotainment system switches to playing local audio (such as media audio), it plays the audio at 60% volume, which can be considered as the audio decibel level being 60%. In this example, when the car's infotainment system switches audio sources, even if the type of audio played is the same, the audio decibel level is different, resulting in fluctuations in audio decibel level when switching audio sources.

[0075] To address this issue, this application provides a volume control method. In scenarios involving audio source switching, even if the audio sources have different volumes, for the same type of audio, the first electronic device can play the same type of audio at different volumes, ensuring that the decibel level is the same or similar when the first electronic device plays the same type of audio. This ensures that the decibel level of the same type of audio heard by the user is always within the user's preferred decibel range, avoiding the problem of fluctuating audio decibel levels when switching audio sources and improving the user experience.

[0076] Furthermore, users have different decibel requirements for different types of audio. For example, audio can be categorized into gentle and rock genres. Users might prefer to play gentle music at a lower decibel level to enjoy the emotions it conveys, while they might prefer to play rock music at a higher decibel level to experience more intense emotions.

[0077] For example, audio can be categorized by type, such as media audio, navigation audio, voice audio, call audio, and alarm audio. For instance, users might prefer to play media audio at a lower decibel level to fully appreciate the emotions conveyed. Conversely, users might prefer to play voice audio at a higher decibel level for clearer voice conversations.

[0078] In this application embodiment, other methods can also be used to classify audio types; the above are two examples of such classification methods. It should be understood that the following embodiments use audio types including media audio, navigation audio, voice audio, call audio, alarm audio, etc., as examples to introduce the volume control method provided by this application embodiment. For users, different decibel levels are required when playing different types of audio.

[0079] Accordingly, in the volume control method provided in the embodiments of this application, for different types of audio, in the scenario of audio source switching, the electronic device can also adjust the volume of the audio being played so that the decibel level of that type of audio can be adapted to the user.

[0080] To facilitate understanding of the volume control method provided in the embodiments of this application, the following will first combine... Figure 3 The structure of the first electronic device and the second electronic device is described.

[0081] The second electronic device can include different types of audio playback applications. Taking a mobile phone as an example, refer to... Figure 3 The second electronic device may include: media applications, telephone applications, instant messaging applications, navigation applications, etc. Media applications may include, but are not limited to: audio applications, video applications, audiobook applications, etc. The audio output by a media application can be called media audio, the audio output by an instant messaging application can be called voice audio, the audio output by a telephone application can be called call audio, and the audio output by a navigation application can be called navigation audio.

[0082] In some embodiments, the second electronic device can output alarm audio, such as earthquake early warning, system early warning, or third-party application early warning. Different alarm audios can originate from different applications; it should be understood that... Figure 3 The alarm application of the second electronic device was not shown in the document.

[0083] The first electronic device may include different types of first audio playback applications and different types of second audio playback applications. The first audio playback application can be considered a local audio playback application of the first electronic device, while the second audio playback application can be considered a remote audio playback application that operates on a second electronic device (or other electronic device).

[0084] Taking the vehicle's infotainment system as the first electronic device as an example, refer to Figure 3The first audio playback application may include: media applications, telephone applications, voice assistant applications, navigation applications, and vehicle alarm applications. The second audio playback application may include: media applications, telephone applications, and connected applications. Specifically, the media application in the vehicle's infotainment system connects to the media application on the mobile phone, the telephone application connects to the telephone application on the mobile phone, and the connected applications can connect to instant messaging applications, navigation applications, etc.

[0085] In some embodiments, the first electronic device may include a volume control strategy. In a scenario where the second electronic device delivers audio to the first electronic device, the first electronic device may play audio based on the volume control strategy. Specifically, refer to the steps performed by the first electronic device in the following embodiments.

[0086] In some embodiments, the first electronic device can determine the type of audio. For example, for local audio, the first electronic device can determine the type of audio based on the application from which the audio originates. For instance, if the audio played by the first electronic device comes from a media-type audio playback application, the first electronic device can determine that the audio type is media audio. Similarly, if the audio played by the first electronic device comes from a telephone-type audio playback application, the first electronic device can determine that the audio type is call audio.

[0087] For remote audio, refer to Figure 3 For a second audio playback application of media type and a second audio playback application of telephone application type, the first electronic device can determine the type of audio based on the application from which the audio originates.

[0088] In some embodiments, for remote audio, exemplarily in a scenario where a second electronic device delivers audio to a first electronic device, the second electronic device may send audio (such as media audio) to the first electronic device, and carry the type of audio. The first electronic device can determine the type of remote audio based on the type of audio carried in the audio.

[0089] In some embodiments, refer to Figure 3 After determining the type of remote audio, the first electronic device can transmit the audio to a corresponding second audio playback application (such as a media type second audio playback application in a car infotainment system), and then the second audio playback application can transmit the audio to the speaker for playback. Figure 3 The dashed line in the middle represents the transmission process of media audio.

[0090] In some embodiments, the first electronic device can further determine the audio source of the audio. When playing audio, the first electronic device can determine whether the audio source is local or remote based on the application corresponding to the audio. For example, if the audio comes from a first audio playback application, the first electronic device can determine that the audio is local audio and the audio source is the first electronic device. For example, if the audio comes from a second audio playback application, the first electronic device can determine that the audio is remote audio. After determining that the audio is remote audio, the first electronic device can further determine the audio source based on the device identifier carried in the audio.

[0091] Reference Figure 3 For example, when a second electronic device sends audio to a first electronic device, it can carry not only the type of audio but also the identifier of the second electronic device. In this embodiment, after the first electronic device determines that the audio is remote audio based on the application corresponding to the audio, it can further determine that the audio source originates from the second electronic device based on the identifier of the second electronic device carried in the audio.

[0092] It's conceivable that, in addition to establishing a connection with a second electronic device (such as an in-vehicle infotainment system) to transmit audio to it, the first electronic device can also establish a connection with a third electronic device to transmit audio to it. In the scenario where the third electronic device transmits audio to the first electronic device, the first electronic device can determine that the audio source is the third electronic device; for details, refer to the relevant descriptions regarding the first electronic device determining that the audio source is the second electronic device.

[0093] Similarly, Figure 3 The structure of the third electronic device is also shown, and the details can be found in the description of the second electronic device.

[0094] The volume control method provided in this application will be described below with reference to specific embodiments. These embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0095] Figure 4 This is a schematic flowchart of one embodiment of the volume control method provided in this application. (Refer to...) Figure 4 The volume control method provided in this application embodiment may include:

[0096] S401, the first electronic device plays first audio from the first audio source at a first volume.

[0097] S402, when the first audio source is detected to switch to the second audio source, the first electronic device plays the second audio from the second audio source at the second volume. The type of the first audio is the same as the type of the second audio. The decibel level at which the first audio is played at the first volume is the first decibel level, and the decibel level at which the second audio is played at the second volume is the second decibel level. The difference between the first decibel level and the second decibel level is less than or equal to a first threshold level.

[0098] The volume control method provided in this application embodiment is applicable to projection scenarios, and specifically applicable to audio source switching scenarios within the projection scenario. Specifically, S401 and S402 illustrate an example of a first electronic device playing audio and switching from a first audio source to a second audio source. It is understood that, referring to... Figure 3 As described, the first electronic device can determine the audio source, and when the audio source changes, the first electronic device can determine that the audio source has switched, that is, the first electronic device can determine the new audio source. Based on this, the first electronic device can detect that the first audio source has switched to the second audio source.

[0099] In this embodiment of the application, switching the audio source may include: switching from local to remote, switching from remote to local, or switching from remote 1 to remote 2.

[0100] For example, taking the vehicle's infotainment system as the first electronic device, the first audio source can be the vehicle's infotainment system (local), and the second audio source can be remote. For example, the second audio source can be a second electronic device or a third electronic device.

[0101] For example, taking the vehicle infotainment system as the first electronic device, the first audio source can be the second electronic device (remote 1), the second audio source can be the first electronic device (local to the vehicle infotainment system), or the second audio source can be another electronic device connected to the vehicle infotainment system, such as the third electronic device (remote 2).

[0102] In S401, the first electronic device can play a first audio signal from a first audio source at a first volume. In S402, when the first electronic device detects that the first audio source has switched to a second audio source, the first electronic device can adjust the volume and play a second audio signal from the second audio source at a second volume.

[0103] In this embodiment, the type of the first audio and the type of the second audio are the same. The first decibel is defined as the decibel level at which the first electronic device plays the first audio at a first volume, and the second decibel is defined as the decibel level at which the first electronic device plays the second audio at a second volume. The difference between the first and second decibels is less than or equal to a first threshold. This difference can be understood as the first decibel level being within a preset range when the first electronic device plays the first audio and when it plays the second audio.

[0104] In other words, when playing the same type of audio, the first electronic device can adjust the volume when the audio source is switched, so that the decibel of the audio being played is within a preset range. This can avoid the problem of the sound of the same type of audio fluctuating when the audio source is switched, and can improve the user experience.

[0105] In some embodiments, the first electronic device may store the volume of various types of audio from a first audio source and the volume of various types of audio from a second audio source. Taking the volume of various types of audio from the first audio source as an example, this volume can be understood as the volume of the first electronic device when playing various types of audio from the first audio source.

[0106] The volume of each type of audio from the first audio source and the volume of each type of audio from the second audio source can be pre-configured in the first electronic device based on empirical values ​​or big data calculations, or can be customized by the user on the first electronic device. Alternatively, to simplify user operation, in some embodiments, the volume of each type of audio from the first audio source and the volume of each type of audio from the second audio source can also be obtained based on the user's volume adjustment operations when the first electronic device has historically played different types of audio.

[0107] In this embodiment, when the first electronic device plays the first audio, it can query the stored "volume of each type of audio from the first audio source" to determine the first volume, and play the first audio at the first volume. Similarly, when switching from the first audio source to the second audio source, the first electronic device can query the stored "volume of each type of audio from the second audio source" to determine the second volume, and play the second audio at the second volume.

[0108] Regardless of how the volume of each type of audio from the first audio source and the volume of each type of audio from the second audio source are obtained, for the same type of audio, when the first electronic device plays audio from the first audio source or the second audio source, the volume of the first electronic device is adapted to the user, that is, the decibel of the audio played by the first electronic device is adapted to the user. Therefore, when switching audio sources, the user will not feel the problem of the sound fluctuating.

[0109] In this embodiment of the application, in the scenario of audio source switching, for the same type of audio, the first electronic device can play the same type of audio at different volumes, so that the decibel level when the first electronic device plays the same type of audio is the same or similar, so that the decibel level when the user hears the same type of audio is always within the decibel range that the user is used to, thereby avoiding the problem of audio decibel fluctuating when switching audio sources and improving the user experience.

[0110] The following details the method by which "when playing various types of audio from different audio sources in the past, the first electronic device obtains the volume of each type of audio source based on the user's volume adjustment operation":

[0111] Understandably, in a scenario where audio is played from a mobile phone to a car's infotainment system, if the audio volume is high, the user will typically turn down the system's volume to reduce the volume. Conversely, if the audio volume is low, the user will typically turn down the system's volume to increase the volume. This ensures the audio volume is appropriate for the user, keeping the perceived volume within a suitable range. It should be understood that for the same user, the desired audio volume for the same type of audio is usually within a preset range. Therefore, adjusting the car's volume will generally keep the volume of that type of audio within a preset range, preventing the user from experiencing sudden changes in sound volume.

[0112] Accordingly, in this embodiment of the application, when playing a certain type of audio from a certain audio source, the first electronic device can determine the volume corresponding to that type of audio from the audio source based on the user's volume adjustment operation. When the first electronic device plays that type of audio from the same audio source again, it can play the audio at that volume, enabling the audio decibel level to adapt to the user. The following is in conjunction with... Figure 5 Let's take the scenario of a mobile phone (the second electronic device) projecting audio to a vehicle's infotainment system (the first electronic device) as an example:

[0113] Reference Figure 5 The volume control method provided in this application embodiment may include:

[0114] S501, the first electronic device plays a fifth audio from a first audio source at a fourth volume, the type of the first audio being the same as the type of the fifth audio.

[0115] S502, in response to the user's operation to adjust the volume of the first electronic device, the first electronic device adjusts the fourth volume to the first volume.

[0116] S503, the first electronic device stores the first audio source, the type of the fifth audio, and the corresponding first volume.

[0117] 1) In scenarios where audio is projected from a mobile phone to a car's infotainment system, taking media audio as an example, the car's infotainment system can play the media audio from the mobile phone at a fourth volume level. For example, the decibel level at which the car's infotainment system plays media audio at the fourth volume level is the third decibel.

[0118] In the S501, when the car's infotainment system plays media audio from a mobile phone at the fourth volume level (such as the fifth audio level), the decibel level of the media audio may be too high or too low. For example, the difference between the first and third decibel levels may exceed the first threshold, making it uncomfortable for the user to hear. The user can adjust the volume of the car's infotainment system to lower or raise the decibel level of the media audio to suit their needs.

[0119] In S502 and S503, in response to a user adjusting the vehicle's infotainment system volume, such as changing the volume from the fourth volume to the first volume, the system can determine that playing media audio at the first volume is appropriate for the user. Accordingly, the system can store the audio source (e.g., a mobile phone), the type of media audio (the type of the fifth audio), and the corresponding first volume. In some embodiments, the mobile phone can serve as the first audio source. The first volume refers to the vehicle's infotainment system volume.

[0120] Similarly, in scenarios where a mobile phone streams audio to a vehicle's infotainment system, the phone can stream various types of audio. Following the same processing method as media audio, the infotainment system can store the volume corresponding to different types of audio from the phone (the primary audio source), as shown in Table 1.

[0121] Table 1

[0122]

[0123] 2) Similarly, since the vehicle infotainment system can connect to different electronic devices (remote audio sources), in scenarios where audio is projected from a remote audio source to the vehicle infotainment system, the system can store the volume of various types of audio from different sources according to the methods in S501-S503, as shown in Table 2:

[0124] Table 2

[0125]

[0126] 3) Similarly, when the vehicle's infotainment system plays local audio, the system itself can also be considered an audio source. In scenarios where the system plays local audio, it can store the volume corresponding to different types of audio, as described in S501-S503, as shown in Table 3.

[0127] Table 3

[0128]

[0129] Referring to Table 3, the vehicle's infotainment system stores the volume of various types of audio from different audio sources. This volume can be understood as the volume of the vehicle's infotainment system when playing various types of audio from different audio sources.

[0130] It is understood that in some embodiments, after the first electronic device executes S501-S503, the first electronic device may execute S401-S402. It should be understood that in... Figure 5 The S401-S402 were also shown.

[0131] For example, after executing S501-S503, the first electronic device can acquire and store the information shown in Table 3 above. Taking a mobile phone 1 as the first audio source, a vehicle infotainment system as the second audio source, and both the first and second audio sources as media audio as an example: When the vehicle infotainment system plays media audio from mobile phone 1, it can play the media audio at volume 1. When switching from the first audio source to the second audio source, such as when mobile phone 1 disconnects from the vehicle infotainment system, or when the vehicle infotainment system pauses playing media audio from mobile phone 1 and plays media audio from the vehicle infotainment system, it can play local media audio at volume 1B. It is understood that when the vehicle infotainment system switches to playing local media audio, mobile phone 1 can stop playing its own media audio.

[0132] For example, refer to Figure 6 In the example 'a', assuming the volume of mobile phone 1 is 30% and the volume of the car's infotainment system is 60%, when the car's infotainment system plays audio (such as media audio) from the mobile phone at 60% (the first volume, such as volume 1), the audio decibel level can be 30% × 60% = 18%. (Refer to...) Figure 6 In the example of 'b', when the vehicle's infotainment system switches to playing local audio (such as media audio), it can play the audio at 20% volume (such as the first volume, or volume 1B), which can be considered as the audio decibel level being 20%. In this example, when the vehicle's infotainment system switches audio sources, the type of audio played is the same, and the difference in decibel level is within the preset range, so there will be no problem of the sound volume fluctuating.

[0133] Because Volume 1 and Volume 1B are volumes adjusted based on the user's past media audio listening experiences, they are adapted to the user's listening volume. Since the vehicle's infotainment system volume is positively correlated with the decibel level of the audio played, when the system plays media audio at Volume 1 and Volume 1B, the decibel level of the media audio heard by the user is also adapted to the user's listening volume. For example, the decibel level of media audio played from phone 1 at Volume 1 is considered the first decibel, and the decibel level of media audio played from the system at Volume 1B is considered the second decibel. Both the first and second decibel levels are adapted to the user; that is, the first and second decibel levels are within a preset range, or the difference between the first and second decibel levels is less than or equal to a first threshold.

[0134] Similarly, taking mobile phone 2 as the third audio source, when switching from the second audio source to the third audio source, and the audio being played by the car's infotainment system is still the same type of media audio, the car's infotainment system can play the media audio from mobile phone 2 at volume 1B. It's understandable that by playing the media audio from mobile phone 2 at volume 1B, the decibel level of the media audio is adapted to the user's preferences.

[0135] In summary, when switching audio sources or playing the same type of audio on the car's infotainment system, the decibel level of the audio played by the system is well-suited to the user, so the user will not experience fluctuating volume, thus improving the user experience.

[0136] While the first electronic device is playing a fifth audio signal from a first audio source at a fourth volume, the user can adjust the volume of the first electronic device more than once to determine an appropriate volume. In some embodiments, each time the user adjusts the volume of the first electronic device, the first electronic device can update the volume of the fifth audio signal from the first audio source.

[0137] To reduce the number of times the first electronic device updates the volume of the fifth audio type of the first audio source, thus reducing the workload of the first electronic device, and to make the volume of the fifth audio type of the first audio source stored by the first electronic device more suitable for the user, in some embodiments, during the process of the user adjusting the volume of the first electronic device, the first electronic device may store the first audio source, the type of the fifth audio, and the corresponding first volume when at least one of the following conditions is met:

[0138] 1) The first electronic device plays audio of the same type as the fifth audio at a first volume for a duration greater than or equal to a preset duration.

[0139] After the user adjusts the volume of the first electronic device, taking the adjusted volume as the first volume as an example, if the first electronic device plays audio of the same type as the fifth audio at the first volume for a duration greater than or equal to a preset duration, it indicates that the user habitually listens to audio of the same type as the fifth audio at the first volume. For example, the preset duration could be 5 minutes.

[0140] In this case, in response to the user adjusting the fourth volume to the first volume, and the first electronic device playing audio of the same type as the fifth audio at the first volume for a duration greater than or equal to a preset duration, the first electronic device can store the first audio source, the type of the fifth audio, and the corresponding first volume for later use.

[0141] 2) The first electronic device plays the fifth audio at the first volume.

[0142] After the user adjusts the volume of the first electronic device, taking the adjusted volume of the first electronic device as the first volume as an example, if the first electronic device plays the fifth audio at the first volume, it can also indicate that the user is accustomed to listening to audio of the same type as the fifth audio at the first volume.

[0143] In this case, in response to the user adjusting the fourth volume to the first volume, and after the first electronic device finishes playing the fifth audio at the first volume, the first electronic device can store the first audio source, the type of the fifth audio, and the corresponding first volume for later use.

[0144] In this embodiment, in response to the user's operation of adjusting the fourth volume to the first volume, the first electronic device can determine that it will only store the first audio source, the type of the fifth audio, and the corresponding first volume when certain conditions are met. This not only reduces the number of times the first electronic device updates the volume of the fifth audio type of the first audio source, thus reducing the workload of the first electronic device, but also enables the volume of the fifth audio type of the first audio source stored by the first electronic device to be more suitable for the user.

[0145] In some embodiments, the user's decibel requirement for audio varies depending on the type of audio. In this example, in a scenario where the audio source remains the same but the audio type changes, the first electronic device can play audio at the volume corresponding to that type of audio to match the user's decibel requirement.

[0146] For example, in a scenario where a first electronic device plays a first audio from a first audio source at a first volume, when the first electronic device detects that the audio source remains unchanged but switches from the first audio to a third audio from the first audio source, the first electronic device can play the third audio at a third volume. Here, the third audio is of a different type than the first audio, and the third volume is the volume corresponding to the type to which the third audio belongs.

[0147] For example, refer to Figure 7 In the example 'a', taking mobile phone 1 as the first audio source, media audio as the first audio source, and call audio as the third audio source, the car's infotainment system can play media audio at volume 1 when playing media audio from mobile phone 1. During the playback of media audio from mobile phone 1, refer to... Figure 7 In example b, when mobile phone 1 receives a call from another device, it can project the call audio (i.e., the third audio) onto the vehicle's infotainment system. In this example, the system can play the call audio at volume 2. Furthermore, the system can play different types of audio from mobile phone 1 at different volumes, allowing the user to hear different decibel levels for each type of audio, thus catering to the user's varying preferences for different decibel levels.

[0148] In some embodiments, when the audio source is switched and the audio type changes, the first electronic device can also play the audio source and the type of audio at different volumes. For example, with mobile phone 1 as the first audio source and mobile phone 2 as the second audio source, when the vehicle system plays media audio from mobile phone 1, the vehicle system can play the media audio at volume 1. When the user connects mobile phone 2 to the vehicle system and plays navigation audio on the vehicle system, referring to Table 3, the vehicle system can play the navigation audio from mobile phone 2 at volume NA. In some embodiments, volume NA can be considered as the sixth volume, and the navigation audio can be considered as the sixth audio.

[0149] For example, different mobile phones can represent different users. Different users have different decibel requirements for the same type of audio and different types of audio. In this embodiment of the application, the vehicle system can play various types of audio from the mobile phone according to the user's volume (or decibel).

[0150] In some embodiments, it is understood that, in scenarios where the audio source remains unchanged, the audio is switched, and the audio type remains unchanged, the first electronic device can play the same type of audio at the same volume.

[0151] For example, in a scenario where the first electronic device plays a first audio from a first audio source at a first volume, when the first electronic device detects that the audio source remains unchanged but switches from the first audio to a fourth audio from the first audio source, the first electronic device can play the fourth audio at the first volume. The fourth audio is of the same type as the first audio.

[0152] For example, referring to Table 3, taking mobile phone 1 as the first audio source, media audio 1 as the first audio source, and media audio 2 as the fourth audio source, the car's infotainment system can play media audio 1 at volume 1 when it plays media audio 1 from mobile phone 1. During the playback of media audio from mobile phone 1, the user can switch media audio on either mobile phone 1 or the car's infotainment system, for example, switching from media audio 1 to media audio 2. Because media audio 1 and media audio 2 are of the same type, the car's infotainment system can continue to play media audio 2 at volume 1 to match the user's preferred decibel level.

[0153] In this embodiment, the first electronic device can continuously update Table 3, meaning it can continuously update the volume of various types of audio from different audio sources. This is because the user's decibel requirements for audio are constantly changing, and continuous updates can adapt to these needs. For example, taking the example of a mobile phone projecting media audio onto a car's infotainment system, a user can adjust the volume to a lower level when in a good mood and to a higher level when in a bad mood to alleviate their frustration. In this embodiment, in both the projection and playback scenarios, the first electronic device can continuously update the volume of various types of audio from different sources based on the user's real-time volume adjustments, thus better adapting to the user and improving the user experience.

[0154] In some embodiments, when a first electronic device plays a first audio from a first audio source at a first volume, in response to a user's operation to adjust the volume of the first electronic device, the first volume can be adjusted to a fifth volume. The electronic device can update a historically stored correspondence between the first audio source, the type of the fifth audio, and the first volume to the corresponding correspondence between the first audio source, the type of the fifth audio, and the fifth volume. For example, the first electronic device can adjust the first volume corresponding to the type of the first audio source and the fifth audio to the fifth volume in Table 3.

[0155] After the first electronic device updates the correspondence between the first audio source, the type of the fifth audio, and the fifth volume, the first electronic device can play the first audio at the fifth volume. The first electronic device plays the first audio at the fifth volume in decibels equal to the fourth decibel. Because the user's volume adjustment operation is adapted to the user, in some embodiments, the difference between the first decibel and the fourth decibel is less than or equal to a first threshold.

[0156] Similarly, when the audio played by the first electronic device switches from the first audio source to the fourth audio source, since the types of the first audio and the fourth audio are the same, the first electronic device can continue to play the fourth audio at the fifth volume.

[0157] For example, in a scenario where mobile phone 1 is playing media audio to the vehicle's infotainment system, if the user adjusts the volume from 1 (first volume) to 1C (fifth volume) on the infotainment system, the system can adjust the volume of the media audio from mobile phone 1 to 1C, as shown in Table 4 below:

[0158] Table 4

[0159]

[0160] Referring to Table 4, the vehicle's infotainment system can continue playing media audio from mobile phone 1 at volume 1C. When the audio played by the vehicle's infotainment system switches from media audio 1 on mobile phone 1 to media audio 2, the vehicle's infotainment system can continue playing media audio 2 from mobile phone 1 at volume 1C.

[0161] In this embodiment, the user's demand for audio decibels is constantly changing. In response to the user's operation of the vehicle's volume, the first electronic device can continuously update the volume of different types of audio from various audio sources, so as to better suit the user.

[0162] In some embodiments, when a user adjusts the volume on the first electronic device, in response to the user's volume adjustment operation, when it is determined that the volume of the first electronic device has reached a protection volume, the first electronic device can output a prompt message. This prompt message indicates whether to continue adjusting the volume of the first electronic device. The prompt message can be referred to the description in the above embodiments.

[0163] For example, the above describes the process of a user adjusting the fourth volume to the first volume on the first electronic device, and the process of a user adjusting the first volume to the fifth volume on the first electronic device; both can be considered as the process of a user adjusting the volume on the first electronic device. Specifically, in response to the user's operation of adjusting the volume of the first electronic device, when it is determined that the volume of the first electronic device has reached the protection volume (e.g., 60%), the first electronic device can output a prompt message. This prompt message indicates whether to continue adjusting the volume of the first electronic device.

[0164] In this embodiment, while the user is adjusting the volume of the first electronic device, the first electronic device can also output a prompt message to remind the user that the volume of the first electronic device has reached the protection volume and whether to continue adjusting the volume of the first electronic device. This can promptly notify the user and improve the user experience.

[0165] It should be noted that the data involved in this application (including but not limited to data used for analysis, data stored, data displayed, etc.) are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0166] In some embodiments, this application provides a first electronic device, such as an in-vehicle infotainment system. (See reference...) Figure 8The vehicle infotainment system 800 may include: a central processing unit (CPU) 801, a memory 802, a display screen 803, a speaker 804, and a communication module 805.

[0167] The vehicle-mounted unit CPU 901 can be used to execute the steps executed by the first electronic device in the above embodiments. The memory 802 may include high-speed random-access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage. The memory 802 can store various instructions for the vehicle-mounted unit to complete various processing functions and implement the method steps executed by the vehicle-mounted unit in this application.

[0168] Display screen 803 is used to display the vehicle's infotainment system interface. Speaker 804 is used to play audio.

[0169] The communication module 805 may include, but is not limited to, a Bluetooth chip, a Wi-Fi chip, etc. The communication module 805 is used to realize communication between the first electronic device and other electronic devices (such as the second electronic device and the third electronic device).

[0170] In some embodiments, the vehicle infotainment system 800 may also include a microphone 806, etc.

[0171] Understandable Figure 8 The structure shown does not constitute a specific limitation on the first electronic device (vehicle infotainment system). In other embodiments of this application, the vehicle infotainment system may include more or fewer components than shown, or combine some components, or split some components, or have different component arrangements. The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0172] In some embodiments, this application provides a second electronic device, such as a mobile phone. (See reference...) Figure 9 The mobile phone 900 may include: a central processing unit (CPU) 901, a memory 902, a display screen 903, a speaker 904, and a communication module 905.

[0173] The mobile phone CPU 901 can be used to execute the steps performed by the second electronic device in the above embodiments. For example, the mobile phone CPU 901 can enable the second electronic device to transmit audio to the first electronic device.

[0174] The memory 902 may include high-speed random-access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage. The memory 902 may store various instructions for the mobile phone to perform various processing functions and implement the method steps executed by the mobile phone in this application.

[0175] The display screen 903 is used to display the phone's interface. The speaker 904 is used to play audio.

[0176] The communication module 905 may include, but is not limited to, a Bluetooth chip, a Wi-Fi chip, etc. The communication module 905 is used to realize communication between the second electronic device and other electronic devices (such as the first electronic device).

[0177] Understandable Figure 9 The structure shown does not constitute a specific limitation on the second electronic device (mobile phone). In other embodiments of this application, the mobile phone may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0178] It should be noted that the modules or components described in the above embodiments can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when a module is implemented through processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors capable of calling program code, such as a controller. Additionally, these modules can be integrated together to implement a system-on-a-chip (SOC).

[0179] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0180] The term "multiple" in this document refers to two or more. The term "and / or" 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 alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0181] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.

[0182] It is understood that, in the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

Claims

1. A volume control method, characterized by, The method applied to a first electronic device comprises: playing first audio from a first audio source at a first volume; when detecting that the first audio source switches to a second audio source, playing second audio from the second audio source at a second volume, the first audio and the second audio being of the same type, wherein a decibel of the first audio played at the first volume is a first decibel, a decibel of the second audio played at the second volume is a second decibel, and a difference between the first decibel and the second decibel is less than or equal to a first threshold.

2. The method of claim 1, wherein, The first audio source is the first electronic device, and the second audio source is a second electronic device; or The first audio source is the second electronic device, and the second audio source is the first electronic device or a third electronic device.

3. The method according to claim 1 or 2, characterized in that, After the playing first audio from a first audio source at a first volume, the method further comprises: when detecting that the first audio switches to third audio from the first audio source, playing the third audio at a third volume, the first audio and the third audio being of different types.

4. The method according to claim 1 or 2, characterized in that, After the playing first audio from a first audio source at a first volume, the method further comprises: when detecting that the first audio switches to fourth audio from the first audio source, playing the fourth audio at the first volume, the first audio and the fourth audio being of the same type.

5. The method according to claim 1 or 2, characterized in that, The method further comprises: when detecting that the first audio source switches to the second audio source, playing sixth audio at a sixth volume, the sixth audio being of a different type from the first audio.

6. The method according to any one of claims 1-5, characterized in that, The method further comprises: playing fifth audio from the first audio source at a fourth volume, the first audio and the fifth audio being of the same type, a decibel of the fifth audio played at the fourth volume being a third decibel, and a difference between the first decibel and the third decibel being greater than the first threshold; in response to a user adjusting a volume of the first electronic device, adjusting the fourth volume to the first volume; storing the first audio source, the type of the fifth audio, and the first volume in correspondence.

7. The method of claim 6, wherein, The storing the first audio source, the type of the fifth audio, and the first volume in correspondence comprises: storing the first audio source, the type of the fifth audio, and the first volume in correspondence when at least one of the following conditions is met: a duration of playing audio of the same type as the fifth audio at the first volume is greater than or equal to a preset duration; or the fifth audio is played completely at the first volume.

8. The method according to claim 6 or 7, characterized in that, Before the playing first audio from a first audio source at a first volume, the method further comprises: determining the first volume corresponding to the first audio source and the type of the first audio according to a correspondence relationship among the first audio source, the type of the fifth audio, and the first volume.

9. The method according to any one of claims 6-8, characterized in that, After the playing first audio from a first audio source at a first volume, the method further comprises: in response to a user adjusting a volume of the first electronic device, adjusting the first volume to the fifth volume; update a correspondence relationship among the first audio source, the type of the fifth audio, and the first volume to a correspondence relationship among the first audio source, the type of the fifth audio, and the fifth volume; when it is detected that the fourth audio is switched from the first audio to the first audio source, playing the fourth audio at the fifth volume, the type of the first audio being the same as the type of the fourth audio.

10. The method of claim 9, wherein, a difference between the first decibel and a fourth decibel at which the first audio is played at the fifth volume is less than or equal to the first threshold value.

11. The method according to any one of claims 6-10, characterized in that, The method further includes: in response to an operation of adjusting the volume of the first electronic device by a user, when it is determined that the volume of the first electronic device reaches a protection volume of the first electronic device, outputting prompt information for prompting whether to continue adjusting the volume of the first electronic device.

12. An electronic device, comprising: The electronic device includes one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is configured to store computer program codes including computer instructions, and the one or more processors are configured to invoke the computer instructions to cause the electronic device to perform the method according to any one of claims 1-11.

13. A chip system, characterized by The chip system is applied to an electronic device, and the chip system includes one or more processors configured to invoke computer instructions to cause the electronic device to perform the method according to any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer readable storage medium includes computer instructions configured to cause the electronic device to perform the method according to any one of claims 1-11 when the computer instructions are run on the electronic device.

15. A computer program product, characterised in that, The computer program product includes computer program codes configured to cause the electronic device to perform the method according to any one of claims 1-11 when the computer program codes are run on the electronic device.