Audio playing method, electronic equipment and storage medium

By creating multiple audio partitions in electronic devices and managing their correspondence with devices, the problem of logical isolation between audio streams in existing audio splitting technology is solved, independent control and efficient resource management are achieved, and user experience and audio are improved. Playback quality.

CN118708147APending Publication Date: 2024-09-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310353979.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-27
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing audio splitting technology can only achieve physical isolation between audio streams, but cannot achieve logical isolation, resulting in interference when controlling different audio streams and affecting user experience.

Method used

By creating and managing multiple audio partitions in electronic devices, each partition corresponds to a different device, achieving logical isolation between audio streams, and optimizing the use of system resources by creating, reusing and deleting partitions on demand, supporting Media playback capabilities and mixing capabilities of different audio partitions.

Benefits of technology

It achieves independent control of different audio streams, avoids interference, improves user experience, and improves the efficiency and flexibility of audio playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708147A
    Figure CN118708147A
Patent Text Reader

Abstract

The invention provides an audio playing method, electronic equipment and a storage medium, and the method comprises the steps: responding to the operation that a user adjusts the media attribute of a first audio partition in first equipment, and enabling the media attribute of the first audio partition to be changed, media attributes of one or more second audio partitions in the first device are unchanged; wherein each audio partition in the first audio partition and the one or more second audio partitions corresponds to one piece of second equipment. According to the method provided by the invention, the problem of interference between the audio streams during audio shunting can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of multimedia technology, and in particular to an audio playback method, electronic equipment and storage medium. Background Art

[0002] Traditional computer operating systems connect upper-layer applications with lower-layer hardware, and provide interfaces and environments to the upper layer through reasonable scheduling and allocation of computer work and resources. Taking southbound hardware as an example, an operating system can be classified into multiple subsystems. For example, the display subsystem can be used to provide functions such as screen display. The display subsystem can connect to display-related hardware in the south, obtain its capabilities through relevant drivers, and encapsulate it into an application interface for use by the upper layer; the audio subsystem can be used to provide functions such as audio playback. The audio subsystem can connect to audio-related hardware and provide audio playback capabilities to the outside world.

[0003] With the continuous development of electronic technology, cross-device collaboration and interactive functions are becoming more and more common. For example, the sound output capability of devices with better sound quality (such as speakers, smart screens, etc.) can be shared with mobile terminals such as mobile phones or tablets, so that the songs played by the mobile phone or tablet can be played on the speakers and smart screens, thus providing a better audio-visual entertainment experience.

[0004] In the above audio delivery process, audio diversion can also be achieved. For example, the audio stream of application A can be delivered to the smart screen, and the audio stream of application B can be delivered to the Bluetooth headset. However, the current audio diversion can only achieve physical isolation between audio streams, but cannot achieve logical isolation between audio streams, which will cause problems when controlling different audio streams. For example, if application B is paused, application A will also be paused, or when using gestures and other operations to control the playback of one application, it will affect the playback of other applications, which will seriously affect the user experience. Summary of the invention

[0005] The present application provides an audio playback method, an electronic device and a storage medium, which are helpful to solve the interference problem between audio streams during audio splitting.

[0006] In a first aspect, the present application provides an audio playback method, applied to a first device, comprising:

[0007] In response to a user adjusting a media attribute of a first audio partition in the first device, the media attribute of the first audio partition changes, and the media attributes of one or more second audio partitions in the first device remain unchanged;

[0008] The first audio partition and each of the one or more second audio partitions correspond to a second device.

[0009] In the present application, different second devices are bound to different audio partitions, so that the audio partitions can be logically isolated, and interference between audio streams can be avoided when controlling different audio partitions.

[0010] In one possible implementation manner, before responding to the user adjusting the media attribute of the first audio zone in the first device, the method further includes:

[0011] In response to a user's operation of streaming any one or more applications to any target second device, the first device creates an audio partition corresponding to the target second device.

[0012] In the present application, by creating corresponding audio partitions on demand, the occupation of system resources by audio partitions can be reduced.

[0013] In one possible implementation manner, before the first device creates an audio partition corresponding to the target second device, the method further includes:

[0014] If the audio partition corresponding to the target second device has been created, the first device reuses the audio partition corresponding to the target second device.

[0015] In the present application, by reusing the created audio partitions, it is possible to avoid repeatedly creating existing audio partitions and improve the efficiency of audio playback.

[0016] In one possible implementation, the method further includes:

[0017] When the first device detects that no application plays any target audio partition in the first audio partition and the one or more second audio partitions, the target audio partition is deleted.

[0018] In this application, by deleting the audio partitions that are no longer used, the occupation of system resources by the audio partitions can be reduced.

[0019] In one possible implementation, the method further includes:

[0020] When the first device detects that it is disconnected from any second device, the audio partition corresponding to the disconnected second device is deleted.

[0021] In this application, by deleting the audio partitions that are no longer used, the occupation of system resources by the audio partitions can be reduced.

[0022] In one possible implementation, the method further includes:

[0023] In response to a migration operation of the user, the first device migrates one or more applications in the first audio partition to the second audio partition.

[0024] In the present application, the flexibility of audio diversion can be improved by migrating applications between different audio partitions.

[0025] In one possible implementation manner, the one or more second audio partitions support different audio playback capabilities and mixing capabilities.

[0026] In the present application, by distinguishing the media playback capabilities of different audio partitions, the application can better match the audio partitions, thereby improving the quality of audio playback.

[0027] In one possible implementation manner, the media attributes include at least volume, focus, and media session.

[0028] In a second aspect, the present application provides an audio playback device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the audio playback method as described in the first aspect.

[0029] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program; the processor is used to run the computer program to implement the audio playback method as described in the first aspect.

[0030] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is executed on a computer, the computer implements the audio playback method as described in the first aspect.

[0031] In a fifth aspect, the present application provides a computer program. When the above-mentioned computer program is run on a processor of an electronic device, the electronic device executes the audio playback method as described in the first aspect.

[0032] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 2 A system architecture diagram provided for an embodiment of the present application;

[0035] Figure 3 An application scenario architecture diagram provided for an embodiment of the present application;

[0036] Figure 4A A schematic diagram of the effect of audio streaming playback provided in an embodiment of the present application;

[0037] Figure 4B A flowchart of an embodiment of the audio playback method provided by the present application;

[0038] Figure 5 A schematic diagram of the effect of application migration provided in an embodiment of the present application;

[0039] Figure 6 A schematic diagram of the structure of an audio playback device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In the embodiments of the present application, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0041] It should be pointed out that the words "first", "second", etc. involved in the embodiments of the present application are only used to distinguish the description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.

[0042] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C may represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C may be an element itself, or a set containing one or more elements.

[0043] In the embodiments of the present application, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.

[0044] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.

[0045] The equal to involved in the embodiments of the present application can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. It should be noted that when equal to is used in conjunction with greater than, it cannot be used in conjunction with less than; when equal to is used in conjunction with less than, it cannot be used in conjunction with greater than.

[0046] Traditional computer operating systems connect upper-layer applications with lower-layer hardware, and provide interfaces and environments to the upper layer through reasonable scheduling and allocation of computer work and resources. Taking southbound hardware as an example, an operating system can be classified into multiple subsystems. For example, the display subsystem can be used to provide functions such as screen display. The display subsystem can connect to display-related hardware in the south, obtain its capabilities through relevant drivers, and encapsulate it into an application interface for use by the upper layer; the audio subsystem can be used to provide functions such as audio playback. The audio subsystem can connect to audio-related hardware and provide audio playback capabilities to the outside world.

[0047] With the continuous development of electronic technology, cross-device collaboration and interactive functions are becoming more and more common. For example, the sound output capability of devices with better sound quality (such as speakers, smart screens, etc.) can be shared with mobile terminals such as mobile phones or tablets, so that the songs played by the mobile phone or tablet can be played on the speakers and smart screens, thus providing a better audio-visual entertainment experience.

[0048] In the above audio delivery process, audio diversion can also be achieved. For example, the audio stream of application A can be delivered to the smart screen, and the audio stream of application B can be delivered to the Bluetooth headset. However, the current audio diversion can only achieve physical isolation between audio streams, but cannot achieve logical isolation between audio streams, which will cause problems when controlling different audio streams. For example, if application B is paused, application A will also be paused, or when using gestures and other operations to control the playback of one application, it will affect the playback of other applications, which will seriously affect the user experience.

[0049] Based on the above problems, the embodiment of the present application proposes an audio playback method, which is applied to an electronic device, and can realize logical isolation between audio streams when audio is shunted, so that when the user controls different applications, there will be no interference between applications, thereby improving the user's experience. Among them, the electronic device can be a terminal device, such as a mobile phone, a tablet, etc. The terminal device can also be called a mobile terminal, a user equipment (User Equipment, UE), an access terminal, a user unit, a user station, a mobile station, a mobile station, a remote station, a remote terminal, a mobile device, a user terminal, a terminal, a wireless communication device, a user agent or a user device. The terminal device can be a cellular phone, a cordless phone, a Session Initiation Protocol (Session Initiation Protocol, SIP) phone, a Wireless Local Loop (Wireless Local Loop, WLL) station, a Personal Digital Assistant (Personal Digital Assistant, PDA) device, a handheld device with wireless communication function, a computing device and a next-generation communication system, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved Public Land Mobile Network (Public Land Mobile Network, PLMN) network, etc.

[0050] Figure 1 First, a schematic structural diagram of the electronic device 100 is shown as an example.

[0051] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, a camera 193, a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a magnetic sensor 180D, and a touch sensor 180K.

[0052] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0053] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0054] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0055] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0056] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, etc.

[0057] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0058] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0059] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0060] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0061] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0062] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0063] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.

[0064] The wireless communication module 160 can provide a wireless communication solution applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0065] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0066] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0067] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0068] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0069] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0070] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0071] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0072] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0074] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.

[0075] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0076] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0077] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0078] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0079] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0080] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0081] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0082] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0083] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0084] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0085] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0086] Figure 2 For the system architecture diagram provided in the embodiment of this application, refer to Figure 2 , the electronic device 100 may include an application layer, an operating system layer and a hardware layer. The application layer may include one or more applications, for example, application 1, application 2, etc. The application may be a third-party application or a system application, which is not specifically limited in the present embodiment of the application.

[0087] The operating system layer may include multiple audio partitions, for example, audio partition 1, audio partition 2, etc. Each audio partition may include a mixing module, a device routing module, a media session module, an audio focus management module, a volume management module, and the like.

[0088] It is understandable that the traditional operating system layer only contains one audio subsystem. When audio is diverted, all applications share all functions in the audio subsystem, so interference problems between applications will arise. In the present application, the logical functions between applications are isolated through audio partitions, which can help solve the interference problem between applications during audio diversion. Among them, each audio partition can be considered as an audio subsystem, and each audio partition can correspond to an audio device, which can be a Bluetooth headset, a speaker, a smart screen and other devices. The embodiment of the present application does not specifically limit the type of audio device.

[0089] In addition, the above-mentioned audio partitions can be created when audio is diverted, and can also be deleted when diversion is not needed. For example, when the Blue Night headphones are put into the box or the smart screen is turned off, the corresponding audio partition can be deleted.

[0090] The hardware layer may include multiple hardware drivers, which may provide drivers for different audio devices, for example, Bluetooth drivers, speaker drivers, audio drivers, and smart screen drivers, etc.

[0091] Figure 3 For the application scenario architecture diagram provided in the embodiment of this application, refer to Figure 3 , the above application scenarios may include a first device and multiple second devices (for example, a second device A and a second device B, etc.). Among them, the communication connection between the first device and the second device may be a wireless connection or a wired connection. The wireless connection may be a wireless fidelity (Wireless Fidelity, Wi-Fi) connection or other types of wireless connection methods, which are not specifically limited in the embodiments of the present application. The first device may be the above-mentioned electronic device 100, for example, the first device may be a mobile phone or a tablet, etc., and the second device may be an audio device, for example, the second device may be a Bluetooth headset, a speaker or a smart screen, etc. It is understandable that, Figure 3 Only two second devices are shown for example, but this does not constitute a limitation on the embodiments of the present application. In some embodiments, more than two second devices may be included.

[0092] Next, through Figure 4A and Figure 4B The audio playback method of the embodiment of the present application is exemplarily described. Figure 4A This is a schematic diagram of the effect of audio streaming playback. Figure 4AIn the schematic diagram shown, the first device is a mobile phone, the second device A is a Bluetooth headset, and the second device B is a smart screen. The first device may include application 1, application 2, application 3, and application 4, wherein application 1 and application 2 are shunted to the second device A through audio partition X for playback, and application 3 and application 4 are shunted to the second device B through audio partition Y for playback.

[0093] Figure 4B The following is a flowchart of an embodiment of the audio playback method provided by the present application, which specifically includes the following steps:

[0094] Step 401: In response to a user's operation of streaming any one or more applications to any target second device, the first device creates an audio partition corresponding to the target second device.

[0095] Specifically, the user can perform an operation on the first device to divert the audio stream of any one or more applications to any target second device for playback. In response to the user's operation of diverting the audio stream of any one or more applications to the target second device for playback, the first device creates an audio partition corresponding to the target second device.

[0096] For example, a user may perform an operation on the first device to divert application 1 and application 2 to the second device A for playback. In response to the user's operation of diverting application 1 and application 2 to the second device A for playback, the first device creates an audio partition X, which corresponds to the second device A, so that the second device A plays application 1 and application 2 after receiving the audio streams of application 1 and application 2. And / or,

[0097] The user can perform an operation on the first device to divert application 3 and application 4 to the second device B for playback. In response to the user's operation of diverting application 3 and application 4 to the second device B for playback, the first device creates an audio partition Y, which corresponds to the second device B, so that the second device B plays application 3 and application 4 after receiving the audio streams of application 3 and application 4.

[0098] It can be understood that the above embodiment is illustrative of the example in which the first device diverts two applications to the second device, but it does not constitute a limitation on the embodiments of the present application. In some embodiments, the first device may also divert one application to the second device, or the first device may also divert three or more applications to the second device.

[0099] It is understandable that the audio streams between multiple applications received by the same target second device can be mixed, but the audio streams between multiple applications received by different target second devices cannot be mixed. Taking the above-mentioned application 1, application 2, application 3 and application 4 as an example, since the second device A receives application 1 and application 2, application 1 and application 2 can be mixed; similarly, the second device B receives application 3 and application 4, so application 3 and application 4 can be mixed. However, application 1 and application 2 correspond to different audio partitions and different second devices than application 3 and application 4, so application 1 and application 2 cannot be mixed with application 3 and application 4.

[0100] In some optional embodiments, since different audio partitions correspond to different second devices, and the audio playback capabilities and mixing capabilities between the second devices are different, the supported playback capabilities and mixing capabilities between the audio partitions may also be different. For example, the audio sampling rate and number of channels supported by the audio partitions may be different.

[0101] In some optional embodiments, when the first device diverts any one or more applications to the target second device, if the audio partition corresponding to the target second device has been created, there is no need to create a new audio partition, and the created audio partition can be reused. Exemplarily, if the user diverts application 1 and application 2 to the second device A, and the audio partition X corresponding to the second device A has been created, the first device can directly reuse the audio partition X without creating the audio partition X again.

[0102] In some optional embodiments, the first device may include a default audio partition, that is, when there is no need to open a new audio partition, the first device may use the default audio partition for playback.

[0103] Step 402: The first device distributes the audio streams of one or more applications to a target second device.

[0104] Specifically, after the first device has created an audio partition corresponding to the target second device, the audio streams of one or more applications can be diverted to the target second device. If the first device diverts only one application's audio stream to the target second device, the first device can directly divert the application's audio stream to the target second device; if the first device diverts multiple applications' audio streams to the target second device, the first device can mix the multiple applications' audio streams before diverting them to the target second device.

[0105] For example, Figure 4AFor example, the first device can mix the audio streams of application 1 and application 2 through audio partition X and then divert them to the second device A corresponding to audio partition X, or the first device can mix the audio streams of application 3 and application 4 through audio partition Y and then divert them to the second device B corresponding to audio partition Y.

[0106] Step 403: In response to the user adjusting the media attribute of the first audio partition, the media attribute of the second audio partition remains unchanged.

[0107] Specifically, the user can also perform operations on the first device or the second device to change the media attributes of the first audio zone. The media attributes may include volume, focus, and media session, etc. It is understandable that the above media attributes are only exemplary descriptions, but do not constitute a limitation of the embodiments of the present application. In some embodiments, more media attributes may be included.

[0108] When the user adjusts the media attributes of the first audio partition on the first device or the second device, the media attributes of the first audio partition will be changed, but the media attributes of the second audio partition will not be affected, wherein the second audio partition may include one or more audio partitions except the first audio partition.

[0109] For example, Figure 4A For example, if the user adjusts the media attributes of audio partition X, the media attributes of audio partition X can be changed, but the media attributes of audio partition Y will not be affected.

[0110] Next, an exemplary explanation is given by taking the media attribute volume as an example. Each audio partition can have independent volume management, all applications in any audio partition can share the same volume, and the volumes between different audio partitions are independent of each other. When the user adjusts the volume in audio partition X, it does not affect the volume of audio partition Y. Since audio partition X corresponds to the second device A, and audio partition Y corresponds to the second device B, when the volume of audio partition X is adjusted, it only affects the listening volume of users who listen through the second device A, and does not affect the listening volume of users who listen through the second device B, so that there will be no impact between audio partitions due to volume changes.

[0111] Next, an exemplary explanation is given by taking the media attribute as the focus as an example. Each audio partition can have independent focus management, and all applications in any audio partition are in the same focus stack, and the focus stacks between different audio partitions are independent of each other. The application playback status within the audio partition affects each other through the focus, while the application playback status between the audio partitions will not be affected by the focus change. Exemplarily, if the user chooses to open application 2 while listening to application 1, since application 1 and application 2 are in the same audio partition (for example, audio partition X), application 1 will be paused due to the loss of audio focus, but applications in other partitions (for example, audio partition Y) will not be paused, that is, applications in other partitions will not be affected by the focus change in audio partition X, and thus will not have an impact between audio partitions due to the focus change.

[0112] Next, an exemplary explanation is given by taking the media attribute as an example of a media session. Each audio partition can have independent media session management, and all applications in any audio partition are in the same media session stack, and the media session stacks between different audio partitions are independent of each other. Media events (for example, operation events such as play, pause, previous program, next program, etc.) can be sent to the top application of the media session stack of the corresponding audio partition, and will not be sent to applications of irrelevant audio partitions. Exemplarily, when the user presses the button of the second device A to try to play and pause, the media event of play pause will be sent to the audio partition X corresponding to the second device A, and the audio partition X can pause the currently playing application (for example, application 1) according to the media event of play pause, but the above-mentioned media event of play pause will not be sent to audio partition Y, that is, it will not affect the application being played in audio partition Y, so that there will be no impact between audio partitions caused by media session operations.

[0113] In some optional embodiments, the user may also perform an operation on the first device to migrate an application in one audio partition to another audio partition, so as to migrate the application from one device to another. In response to the user's migration operation, the first device may migrate the application in the first audio partition to the second audio partition, wherein the first audio partition and the second audio partition are two different audio partitions. Figure 4A For example, the user can migrate application 1 in audio partition X to audio partition Y, so that the original application 1 played by the second device A can be changed to the application 1 played by the second device B. It can be understood that before the application 1 is migrated, the application 1 and the application 2 are mixed in the audio partition X and then played by the second device A, and after the application 1 is migrated, the application 1, the application 3 and the application 4 are mixed in the audio partition Y and then played by the second device B. Figure 5 The schematic diagram of the effect of application migration is shown as an example.

[0114] It is understandable that after the application is migrated from the first audio partition to the second audio partition, the application may change the volume of the first audio partition to the volume of the second audio partition.

[0115] It can be understood that after the application is migrated from the first audio partition to the second audio partition, the application is exited from the focus stack of the first audio partition and added to the focus stack of the second audio partition.

[0116] It can be understood that after the application is migrated from the first audio partition to the second audio partition, the application exits from the media session stack of the first audio partition and is added to the media session stack of the second audio partition.

[0117] In some optional embodiments, when the first device detects that no application is playing in any audio partition, the audio partition may be deleted. Figure 4A For example, if both application 1 and application 2 in audio partition X are migrated to audio partition Y, audio partition X can be deleted.

[0118] In some optional embodiments, when the first device detects that it is disconnected from the second device, the audio partition corresponding to the disconnected second device may be deleted. Figure 4A For example, when the first device detects that the connection with the second device A is disconnected (for example, the second device A is turned off or offline, etc.), the audio partition X corresponding to the second device A can be deleted.

[0119] Figure 6 This is a schematic diagram of the structure of an embodiment of the audio playback device of the present application. Figure 6 As shown, the above-mentioned audio playback device 60 may include: an adjustment module 61; wherein,

[0120] The adjustment module 61 is used to respond to the user's operation of adjusting the media attributes of the first audio partition in the first device, so that the media attributes of the first audio partition are changed, and the media attributes of one or more second audio partitions in the first device remain unchanged; wherein, the first audio partition and each of the one or more second audio partitions corresponds to a second device.

[0121] In one possible implementation, the audio playback device 60 further includes:

[0122] The creation module is used for, in response to a user's operation of diverting any one or more applications to any target second device, causing the first device to create an audio partition corresponding to the target second device.

[0123] In one possible implementation, the audio playback device 60 further includes:

[0124] A multiplexing module is used for, if the audio partition corresponding to the target second device has been created, the first device multiplexing the audio partition corresponding to the target second device.

[0125] In one possible implementation, the audio playback device 60 further includes:

[0126] The deleting module is configured to delete the target audio partition when the first device detects that no application is playing any target audio partition in the first audio partition and the one or more second audio partitions.

[0127] In one possible implementation manner, the deleting module is further configured to delete the audio partition corresponding to the disconnected second device when the first device detects that the first device is disconnected from any second device.

[0128] In one possible implementation, the audio playback device 60 further includes:

[0129] The migration module is configured to enable the first device to migrate one or more applications in the first audio partition to the second audio partition in response to a migration operation of the user.

[0130] In one possible implementation manner, the one or more second audio partitions support different audio playback capabilities and mixing capabilities.

[0131] In one possible implementation manner, the media attributes include at least volume, focus, and media session.

[0132] Figure 6 The audio playback device 60 provided in the illustrated embodiment can be used to execute the technical solution of the method embodiment illustrated in the present application. Its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.

[0133] It should be understood that the above Figure 6 The division of the various modules of the audio playback device 60 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0134] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0135] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.

[0136] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method provided by the embodiment shown in the present application.

[0137] An embodiment of the present application also provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute the method provided by the embodiment shown in the present application.

[0138] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in 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 be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.

[0139] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0140] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0141] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.

[0142] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.

Claims

1. An audio playback method, characterized in that: Applied to a first device, the method includes: In response to a user adjusting a media attribute of a first audio partition in the first device, the media attribute of the first audio partition changes, and the media attributes of one or more second audio partitions in the first device remain unchanged; The first audio partition and each of the one or more second audio partitions correspond to a second device.

2. The method according to claim 1, characterized in that Before responding to the user's operation of adjusting the media attribute of the first audio zone in the first device, the method further includes: In response to a user's operation of streaming any one or more applications to any target second device, the first device creates an audio partition corresponding to the target second device.

3. The method according to claim 2, characterized in that Before the first device creates an audio partition corresponding to the target second device, the method further includes: If the audio partition corresponding to the target second device has been created, the first device reuses the audio partition corresponding to the target second device.

4. The method according to claim 1, characterized in that The method further comprises: When the first device detects that no application plays any target audio partition in the first audio partition and the one or more second audio partitions, the target audio partition is deleted.

5. The method according to claim 1, characterized in that The method further comprises: When the first device detects that it is disconnected from any second device, the audio partition corresponding to the disconnected second device is deleted.

6. The method according to claim 1, characterized in that The method further comprises: In response to a migration operation of the user, the first device migrates one or more applications in the first audio partition to the second audio partition.

7. The method according to claim 1, characterized in that The one or more second audio partitions support different audio playback capabilities and audio mixing capabilities.

8. The method according to any one of claims 1 to 7, characterized in that: The media attributes include at least volume, focus, and media session.

9. A first device, characterized in that: include: A processor and a memory, wherein the memory is used to store a computer program; and the processor is used to run the computer program to implement the audio playback method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the audio playing method according to any one of claims 1 to 8 is implemented.