Method, Apparatus, Program Product and Storage Medium for Processing Bluetooth Audio Data

By transmitting audio encoded data to the second electronic device based on source file attributes, the problem of sound quality damage and power consumption increase caused by inflexible Bluetooth audio data processing is solved, and flexible and efficient audio data processing is achieved.

CN116760924BActive Publication Date: 2025-07-04GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310765800.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2025-07-04
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

Existing Bluetooth audio data processing methods are inflexible, resulting in damage to audio quality or additional power consumption.

Method used

Audio encoded data is obtained based on the source file attributes by the first electronic device and transmitted to the second electronic device through Bluetooth for decoding and playing, ensuring that high-quality audio is not damaged and avoiding additional power consumption caused by low-quality audio.

Benefits of technology

Improves flexibility in Bluetooth audio data processing, ensuring that audio quality is not damaged while reducing additional power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116760924B_ABST
    Figure CN116760924B_ABST
Patent Text Reader

Abstract

The present application provides a method, a processing device, a program product, and a storage medium for processing Bluetooth audio data, which improves the flexibility of processing Bluetooth audio data. The method includes: a first electronic device obtaining audio coding data of the first currently played audio based on source file attributes of the first currently played audio, where the source file attributes include a sampling rate and a bit depth; transmitting the audio coding data of the first currently played audio to a second electronic device, so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio; wherein, a Bluetooth connection is established between the first electronic device and the second electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Bluetooth technology, and in particular, to a method for processing Bluetooth audio data, a processing device, a program product, and a storage medium. Background Art

[0002] Bluetooth technology is an open global specification for wireless data and voice communication. It is a special short-range wireless technology connection based on low-cost short-range wireless connections to establish a communication environment for fixed and mobile devices. Currently, it has been widely used in people's daily lives and work. For example, in the scenario of transmitting audio via Bluetooth, a Bluetooth terminal device will negotiate a fixed sampling rate and bit depth with the connected Bluetooth audio device to process and transmit audio data based on the fixed sampling rate and bit depth.

[0003] However, the above method for processing audio data has the problem of inflexibility, which may lead to damage to audio quality or increased additional power consumption. Summary of the Invention

[0004] This application provides a method for processing Bluetooth audio data, a processing device, a program product, and a storage medium, which improves the flexibility of processing Bluetooth audio data.

[0005] In a first aspect, a method for processing Bluetooth audio data is provided, which is applied to a first electronic device. The method includes: obtaining audio coding data of the first currently played audio based on the source file attributes of the first currently played audio, where the source file attributes include a sampling rate and a bit depth; transmitting the audio coding data of the first currently played audio to a second electronic device so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio; where a Bluetooth connection is established between the first electronic device and the second electronic device.

[0006] In a second aspect, another method for processing Bluetooth audio data is provided, which is applied to a second electronic device. The method includes: receiving audio coding data from a first electronic device, where the audio coding data is obtained by the first electronic device based on the source file attributes of the first currently played audio, and the source file attributes include a sampling rate and a bit depth; decoding the audio coding data to obtain and play the first currently played audio; where a Bluetooth connection is established between the first electronic device and the second electronic device.

[0007] In this application, a first electronic device may transmit audio coding data of a first currently playing audio to a second electronic device that has established a Bluetooth connection with it, so that the second electronic device decodes the audio coding data to obtain and play the first currently playing audio. Among them, the audio coding data of the first currently playing audio may be obtained by the first electronic device based on the source file attributes of the first currently playing audio, which can avoid the additional power consumption caused by processing low-quality audio while ensuring that high-quality audio is not damaged. In other words, this application improves the flexibility of processing Bluetooth audio data.

[0008] In a third aspect, a first electronic device is provided. The first electronic device includes: a processing module and a transmitting module. Among them, the processing module is used to obtain the audio coding data of the first currently playing audio based on the source file attributes of the first currently playing audio, and the source file attributes include sampling rate and bit depth; the transmitting module is used to transmit the audio coding data of the first currently playing audio to a second electronic device, so that the second electronic device decodes the audio coding data to obtain and play the first currently playing audio; among them, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0009] In a fourth aspect, a second electronic device is provided. The second electronic device includes: a receiving module and a processing module. Among them, the receiving module is used to receive audio coding data from a first electronic device, and the audio coding data is obtained by the first electronic device based on the source file attributes of the first currently playing audio, and the source file attributes include sampling rate and bit depth; the processing module is used to decode the audio coding data to obtain and play the first currently playing audio; among them, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0010] In a fifth aspect, a processing device for Bluetooth audio data is provided, including a processor. The processor is coupled to a memory and can be used to execute instructions in the memory to implement the method in any one of the possible implementation manners in the first aspect or the second aspect. Optionally, the processing device for Bluetooth audio data further includes a memory. Optionally, the processing device for Bluetooth audio data further includes a communication interface, and the processor is coupled to the communication interface.

[0011] In a sixth aspect, a processor is provided, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any one of the possible implementation manners in the first aspect or the second aspect.

[0012] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be transistors, gate circuits, flip-flops, and various logic circuits, etc. The input signal received by the input circuit can be received and input by, for example but not limited to, a receiver. The signal output by the output circuit can be output to, for example but not limited to, a transmitter and transmitted by the transmitter. Moreover, the input circuit and the output circuit can be the same circuit, which serves as the input circuit and the output circuit at different times respectively. The embodiments of the present application do not limit the specific implementation manners of the processor and various circuits.

[0013] In a seventh aspect, a processing device is provided, including a processor and a memory. The processor is configured to read instructions stored in the memory, and can receive signals through a receiver and transmit signals through a transmitter to execute the method in any one of the possible implementation manners in the above first aspect or second aspect.

[0014] Optionally, there is one or more processors, and there is one or more memories.

[0015] Optionally, the memory can be integrated with the processor, or the memory and the processor are separately arranged.

[0016] In the specific implementation process, the memory can be a non-transitory memory, such as a read only memory (ROM). It can be integrated with the processor on the same chip, or can be separately arranged on different chips. The embodiments of the present application do not limit the type of the memory and the setting manner of the memory and the processor.

[0017] It should be understood that the relevant data interaction process, such as sending an indication message, can be a process of outputting an indication message from the processor, and receiving capability information can be a process of the processor receiving input capability information. Specifically, the data processed and output can be output to the transmitter, and the input data received by the processor can come from the receiver. Among them, the transmitter and the receiver can be collectively referred to as a transceiver.

[0018] The processing device in the above seventh aspect can be a chip. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor can be a general-purpose processor, which is implemented by reading software code stored in the memory. The memory can be integrated in the processor or can be located outside the processor and exist independently.

[0019] In an eighth aspect, a computer program product is provided. The computer program product includes a computer program (which may also be referred to as code or instructions). When the computer program is run, it causes a computer to execute the method in any one of the possible implementation manners of the first aspect or the second aspect.

[0020] In a ninth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (which may also be referred to as code or instructions). When it runs on a computer, it causes the computer to execute the method in any one of the possible implementation manners of the first aspect or the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of the system architecture of an electronic device provided by an embodiment of the present application;

[0023] Figure 3 is a flowchart of a method for processing Bluetooth audio data provided by an embodiment of the present application;

[0024] Figure 4 is a flowchart of a first specific example of the method for processing Bluetooth audio data provided by an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a mobile phone interface for processing Bluetooth audio data provided by an embodiment of the present application;

[0026] Figure 6 is a flowchart of a second specific example of the method for processing Bluetooth audio data provided by an embodiment of the present application;

[0027] Figure 7 is a block diagram of an example structure of a device for processing Bluetooth audio data provided by an embodiment of the present application;

[0028] Figure 8 is a block diagram of another example structure of a device for processing Bluetooth audio data provided by an embodiment of the present application;

[0029] Figure 9 is a schematic diagram of yet another example structure of a device for processing Bluetooth audio data provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0031] Figure 1 is a schematic diagram of an application scenario 100 provided by an embodiment of the present application. As Figure 1As shown, the application scenario 100 includes a first electronic device 101 and a second electronic device 102. The first electronic device 101 can transmit audio-encoded data to the second electronic device 101. Correspondingly, the second electronic device 102 can receive the above audio-encoded data, decode the audio-encoded data, obtain and play the decoded audio, so as to realize playing the audio on the first electronic device 101 on the second electronic device 102. Among them, a Bluetooth connection can be established between the first electronic device 101 and the second electronic device 102, so that the first electronic device 101 can send the above audio-encoded data to the second electronic device 102 that has established a Bluetooth connection with it through Bluetooth.

[0032] It should be understood that in addition to the first electronic device 101 transmitting audio-encoded data to the second electronic device 102 so that the second electronic device 102 plays the audio on the first electronic device 101 as shown above, the first electronic device 101 can also send audio-encoded data to other electronic devices that have established a Bluetooth connection with it, so as to realize playing its audio on other electronic devices. This application does not limit this.

[0033] It should also be understood that the above electronic devices can also be called Bluetooth devices. For example, the above first electronic device 101 can also be called the first Bluetooth device 101, and the above second electronic device 102 can also be called the first Bluetooth device. This application does not limit this.

[0034] It should also be understood that in the case where the first electronic device 101 sends audio-encoded data to the second electronic device 102, the first electronic device 101 can also be called a Bluetooth terminal device 101, and the second electronic device 102 can also be called a Bluetooth audio device 102. This application does not limit this.

[0035] However, in the above application scenario, there is a problem that the processing of audio data (which can also be called Bluetooth audio data) is not flexible.

[0036] It should be understood that in the case where a Bluetooth connection is established between the first electronic device 101 and the second electronic device 102, the first electronic device 101 and the second electronic device 102 can negotiate to determine a fixed sampling rate and bit depth (which can also be called a preset attribute). When the source file attributes of the subsequent transmitted audio are inconsistent with the negotiated preset attributes, the following problems will occur:

[0037] Exemplarily, if the sampling rate indicated by the preset attribute is 44.1 kHz, and the sampling rate indicated by the source file attributes of the transmitted audio is 192 kHz, the first electronic device 101 will force the transmission at the sampling rate of 44.1 kHz indicated by the preset attribute, resulting in a problem of damaging the audio quality.

[0038] Exemplarily, if the sampling rate indicated by the preset attribute is 192 kHz, while the sampling rate indicated by the source file attribute of the transmitted audio is 44.1 kHz, the first electronic device 101 will transmit the above audio at the sampling rate of 192 kHz indicated by the preset attribute. However, this 192 kHz sampling rate will not improve the audio quality and will also occupy a higher bandwidth, resulting in additional power consumption.

[0039] In view of this, the embodiments of the present application provide a method for processing Bluetooth audio data, a processing device, a program product, and a storage medium. The first electronic device can transmit the audio coding data of the first currently played audio to the second electronic device that has established a Bluetooth connection with it, so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio. Among them, the audio coding data of the first currently played audio can be obtained by the first electronic device based on the source file attribute of the first currently played audio, which can avoid the additional power consumption caused by processing low-quality audio while ensuring that high-quality audio is not damaged. In other words, the present application improves the flexibility of processing Bluetooth audio data.

[0040] It should be understood that the electronic device in the embodiments of the present application may also be referred to as: user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile platform, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc. The electronic device involved in the embodiments of the present application may be a device that provides voice / data connectivity to users. For example, it may be a handheld device with wireless connection function, a vehicle-mounted device, etc. Currently, some examples of terminals are: mobile phone, tablet computer, laptop computer, palmtop computer, mobile internet device (MID), wearable device, virtual reality (VR) device, augmented reality (AR) device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, cellular phone, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing devices connected to a wireless modem, vehicle-mounted device, wearable device, electronic device in a 5G network or an electronic device in a future evolved public land mobile network (PLMN), etc. The embodiments of the present application are not limited thereto.

[0041] By way of example and not limitation, in the embodiments of the present application, the electronic device may also be a wearable device. A wearable device, also known as a wearable intelligent device, is a general term for devices developed by applying wearable technologies to the intelligent design of daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that can be directly worn on the body or integrated into the user's clothes or accessories. A wearable device is not just a hardware device, but also realizes powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable intelligent devices include those with complete functions and large sizes that can realize complete or partial functions without relying on a smart phone, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to cooperate with other devices such as smart phones, such as various smart bracelets and smart jewelry for physical sign monitoring.

[0042] In addition, in the embodiments of the present application, the electronic device may also be an electronic device in an Internet of Things (IoT) system. The IoT is an important part of the future development of information technology. Its main technical feature is to connect objects to the network through communication technologies, thereby realizing an intelligent network of human-machine interconnection and object-object interconnection. The electronic device of the present application may also be an in-vehicle unit, in-vehicle module, in-vehicle component, in-vehicle chip, or in-vehicle unit built into a vehicle as one or more components or units. The vehicle can implement the method of the present application through the built-in in-vehicle unit, in-vehicle module, in-vehicle component, in-vehicle chip, or in-vehicle unit. Therefore, the embodiments of the present application can be applied to vehicle networking, such as vehicle-to-everything (V2X), long term evolution-vehicle (LTE-V), vehicle-to-vehicle (V2V), etc.

[0043] Exemplarily, Figure 2 FIG. is a schematic diagram of the system architecture of an electronic device provided by an embodiment of the present application.

[0044] As Figure 2 shown, the electronic device includes a processor 210, a transceiver 220, and a display unit 270. Among them, the display unit 270 may include a display screen.

[0045] Optionally, the electronic device may further include a memory 230. The processor 210, the transceiver 220, and the memory 230 may communicate with each other through an internal connection path to transfer search data. The memory 230 is used to store a computer program, and the processor 210 is used to call and run the computer program from the memory 230.

[0046] The above-mentioned processor 210 and the memory 230 may be integrated into a processing device. More commonly, they are independent components of each other. The processor 210 is used to execute the program code stored in the memory 230 to implement the above functions. Specifically, in implementation, the memory 230 may also be integrated in the processor 210, or be independent of the processor 210.

[0047] In addition, in order to make the functions of the electronic device more complete, the electronic device may further include one or more of an input unit 260, an audio circuit 280, a sensor 201, etc.

[0048] Optionally, the above-mentioned electronic device may further include a power supply 250 for supplying power to various devices or circuits in the electronic device.

[0049] It can be understood that Figure 2 The operations and / or functions of the respective modules in the shown electronic device are respectively for implementing the corresponding processes in the following method embodiments. For details, reference may be made to the descriptions in the following method embodiments. To avoid repetition, the detailed descriptions are appropriately omitted here.

[0050] It can be understood that Figure 2 The processor 210 in the shown electronic device may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (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. Among them, different processing units may be independent devices or may be integrated in one or more processors.

[0051] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory may save the instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0052] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0053] It can be understood that the interface connection relationships among the modules illustrated in the embodiments of the present application are only illustrative descriptions and do not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection manners in the above embodiments, or a combination of multiple interface connection manners.

[0054] It can be understood that Figure 2 The power supply 250 shown is used to supply power to the processor 210, the memory 230, the display unit 270, the input unit 260, the transceiver 220, etc.

[0055] The transceiver 230 may provide solutions for wireless communications applied to the electronic device, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The transceiver 220 may be one or more devices integrating at least one communication processing module.

[0056] The electronic device implements the display function through a GPU, a display unit 270, an application processor, etc. The GPU is a microprocessor for image processing, connected to the display unit 270 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.

[0057] The display unit 270 is used to display images, videos, etc. (such as the search interface of this application, etc.). The display unit 270 includes a display panel. The display panel can adopt 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), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0058] The memory 230 can be used to store computer-executable program code, and the executable program code includes instructions. The memory 230 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device (such as search data, etc.). In addition, the memory 230 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 210 executes various functional applications and data processing of the electronic device by running the instructions stored in the memory 230 and / or the instructions stored in the memory provided in the processor.

[0059] The electronic device can implement the audio function through an audio circuit 280, an application processor, etc. Such as music playback, recording, etc.

[0060] It can be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0061] Next, the technical solutions in the present application will be described with reference to the accompanying drawings.

[0062] For the convenience of clearly describing the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily mean different.

[0063] It should be noted that in the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.

[0064] In addition, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, and c may represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b, and c, where a, b, and c may be single or multiple.

[0065] In order to make the purpose and technical solutions of the present application clearer and more intuitive, a method for processing Bluetooth audio data, a processing device, a program product, and a storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0066] Figure 3 is a schematic flowchart of a method 300 for processing Bluetooth audio data provided by an embodiment of the present application. The method 300 can be applied to the aboveFigure 1 The application scenario 100 shown, in addition, it can also be applied to other scenarios, and the embodiments of the present application do not limit this. For example Figure 3 As shown, the method 300 may include the following steps:

[0067] S301, the first electronic device obtains the audio encoding data of the first currently played audio based on the source file attributes of the first currently played audio, and the source file attributes include the sampling rate and the bit depth.

[0068] It should be understood that the sampling rate refers to the number of samples extracted from a continuous signal and composed into a discrete signal per unit time, which is expressed in Hertz (Hz). Generally speaking, the sampling rate refers to the number of signal samples that a computer can collect per unit time. The bit depth is also called the sampling precision, with the unit of bit (Bit), and common bit selections are 16 Bit and 24 Bit. As described above, the total number of samples sampled per second is the sampling rate, and the number of bits of information in each sample is the bit depth.

[0069] S302, the first electronic device transmits the audio encoding data to the second electronic device. Correspondingly, the second electronic device receives the audio encoding data.

[0070] It should be understood that a Bluetooth connection is established between the first electronic device and the second electronic device. In other words, the first electronic device can transmit the audio encoding data to the second electronic device via Bluetooth.

[0071] It should also be understood that the audio encoding data transmitted from the first electronic device to the second electronic device may also carry the source file attributes of the first currently played audio.

[0072] S303, the second electronic device decodes the audio encoding data and obtains and plays the first currently played audio.

[0073] In a possible implementation manner, corresponding to S302, if the first electronic device sends the source file attributes of the first currently played audio to the second electronic device, the second electronic device may perform the operations corresponding to S303 based on the source file attributes of the first currently played audio carried in the encoded data, that is, perform a decoding operation on the audio encoding data based on the sampling rate and bit depth indicated by the source file attributes of the first currently played audio, and then obtain and play the first currently played audio.

[0074] In this application, a first electronic device may transmit audio coding data of a first currently played audio to a second electronic device that has established a Bluetooth connection with it, so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio. Among them, the audio coding data of the first currently played audio may be obtained by the first electronic device based on the source file attributes of the first currently played audio, which can avoid the extra power consumption caused by processing low-quality audio while ensuring that high-quality audio is not damaged. In other words, this application improves the flexibility of processing Bluetooth audio data.

[0075] It should be understood that before the above S301, the first electronic device and the second electronic device may also jointly negotiate to determine a preset attribute, so that the first electronic device can also obtain the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio.

[0076] Next, taking the first electronic device as a mobile phone and the second electronic device as a Bluetooth headset as an example, the method for processing Bluetooth audio data provided by this application will be described in detail.

[0077] Figure 4 It is a schematic flowchart of a method 400 for processing Bluetooth audio data provided by an embodiment of this application. As Figure 4 shown, the method 400 may include the following steps:

[0078] S401, the mobile phone and the Bluetooth headset negotiate to determine a preset attribute.

[0079] It should be understood that the mobile phone has established a Bluetooth connection with the above Bluetooth headset.

[0080] It should also be understood that the above preset attribute may be determined based on the decoding method supported by the Bluetooth headset and the encoding method supported by the mobile phone.

[0081] Exemplarily, the above coding and decoding methods may include advanced audio coding (AAC), subband coding (SBC), etc., and this application does not limit this.

[0082] S402, when detecting the first currently played audio, the mobile phone determines whether the value of the source file attribute of the first currently played audio is greater than the value of the preset attribute.

[0083] S403, when determining that the value of the source file attribute of the first currently played audio is greater than the value of the preset attribute, the mobile phone determines whether the current power consumption of the Bluetooth headset is less than or equal to the power consumption threshold.

[0084] Exemplarily, the value of the source file attribute being greater than the value of the preset attribute may indicate that both the sampling rate and the bit depth indicated by the source file attribute are greater than the sampling rate and the bit depth indicated by the above preset attribute. This application does not make any limitations in this regard.

[0085] S404. When it is determined that the current power consumption of the Bluetooth headset is less than or equal to the power consumption threshold, the mobile phone obtains the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio.

[0086] S405. The mobile phone transmits the above audio coding data to the Bluetooth headset, so that the Bluetooth headset receives the audio coding data, decodes the audio coding data based on the source file attribute of the first currently played audio, and obtains and plays the first currently played audio.

[0087] Exemplarily, the mobile phone can transmit the above audio coding data to the Bluetooth headset via Bluetooth.

[0088] It should be understood that when the mobile phone determines to obtain the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio, the audio coding data transmitted by the mobile phone to the Bluetooth headset may also carry the source file attribute of the first currently played audio.

[0089] Optionally, following the above S402, the mobile phone can also obtain the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio when it is determined that the value of the source file attribute of the first currently played audio is less than the value of the preset attribute and the current power consumption of the Bluetooth headset is greater than the above power consumption threshold, that is, execute the above S404.

[0090] Optionally, the mobile phone can also obtain the audio coding data of the first currently played audio based on the preset attribute when it is determined that the current power consumption of the Bluetooth headset is greater than the above power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attribute of the first currently played audio, or when it is determined that the current power consumption of the Bluetooth headset is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attribute of the first currently played audio.

[0091] Optionally, corresponding to the above S404, before the mobile phone obtains the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio, the mobile phone can also determine whether a selection operation on the preset attribute is detected, and if it is determined that the selection operation is not detected, execute the above S403. Or, it can also obtain the audio coding data of the first currently played audio based on the preset attribute selected by the user when the selection operation is detected to meet the user's needs. In other words, the priority of the user's selection is the highest.

[0092] It should be understood that there can be multiple preset attributes negotiated and determined by the above-mentioned mobile phone and Bluetooth headset, and the preset attribute in S401 can be any one of the multiple preset attributes, and the present application does not make any limitation thereto.

[0093] Figure 5 Fig. 500 of the mobile phone interface for processing Bluetooth audio data provided by the embodiment of the present application is shown. As Figure 5 shown, this mobile phone interface a is the usage interface of a music application. Through the content displayed on this interface a, the user can learn that the current operation interface is for the song named "AAA" (i.e., the first currently played audio), and can also determine that the Bluetooth function of the mobile phone is currently in the on state through the Bluetooth icon displayed in the upper right corner of this interface. The user can click the "Play" button displayed on this interface. When the mobile phone detects the operation of the user clicking on this "Play" button, it can generate an instruction to display a preset attribute and execute the operation corresponding to this instruction.

[0094] As shown in interface b, a preset attribute and a selection button for this preset attribute are displayed. Among them, this preset attribute includes a first preset attribute, a second preset attribute, and a third preset attribute, and the user can click the selection button for the first preset attribute. When the mobile phone detects the click operation on the selection button for the above-mentioned first preset attribute, it generates an instruction to generate audio coding data of the first currently played audio based on this first preset attribute, and executes the operation corresponding to this instruction, and transmits this audio coding data to the Bluetooth headset. Correspondingly, the Bluetooth headset can receive this audio coding data and decode this audio coding data based on the first preset attribute, so that the user can currently hear the first currently played audio through the Bluetooth headset.

[0095] It should be understood that the above-mentioned preset attributes shown are merely exemplary, and the sorting of the above-mentioned multiple preset attributes can be determined according to the level of the corresponding audio playback effect, that is, the user can select the corresponding preset attribute according to the requirements for the audio playback effect, and the present application does not make any limitation thereto.

[0096] Optionally, in the actual operation process, the above-mentioned preset attribute can also be displayed as specific sampling rate and bit depth. For example, on the display area where the first preset attribute is located on the interface, "44.1Khz, 16bit" can be displayed, and on the display area where the second preset attribute is located, "192Khz, 24bit" can be displayed, and the present application does not make any limitation thereto.

[0097] It should also be understood that the above-mentioned user operations are merely exemplary. Besides "click", this user operation can also be operations such as "swipe", and the present application does not make any limitation thereto.

[0098] As shown in interface c, the interface displays a "pause" button to indicate that the above song is currently playing. That is, the user can learn about the playing status of the above song through this interface.

[0099] It should be understood that the above Figure 5 The first currently playing audio shown in is merely exemplary. In addition to being a song, the first currently playing audio can also be a recording, video audio, etc., and the present application does not limit this.

[0100] Optionally, following the above S303 or S405, the first electronic device can also transmit the audio coding data of the second currently playing audio to the second electronic device to realize playing the second currently playing audio on the second electronic device.

[0101] Next, taking the first electronic device as a tablet computer and the second electronic device as a Bluetooth speaker as an example, the method for processing Bluetooth audio data provided by the present application will be described in detail.

[0102] Figure 6 is a schematic flowchart of a method 600 for processing Bluetooth audio data provided by an embodiment of the present application. As Figure 6 shown, the method 600 may include the following steps:

[0103] S601, the tablet computer transmits the audio coding data of the above first currently playing audio to the Bluetooth speaker, so that the Bluetooth speaker receives the audio coding data, decodes the audio coding data, and obtains and plays the above first currently playing audio.

[0104] It should be understood that the above tablet computer and the above Bluetooth speaker are established with a Bluetooth connection. In other words, the tablet computer can transmit the above audio coding data to the Bluetooth speaker through Bluetooth.

[0105] In the first possible implementation manner, the tablet computer can obtain the audio coding data of the above first currently playing audio based on a preset attribute.

[0106] It should be understood that the preset attribute is jointly agreed upon by the tablet computer and the Bluetooth speaker before the above S601. In other words, the preset attribute is known to the Bluetooth speaker. Corresponding to the above S601, the tablet computer can send audio coding data without any audio source file attributes to the Bluetooth speaker.

[0107] In the second possible implementation manner, the tablet computer can also obtain the audio coding data of the above first currently playing audio based on the source file attributes of the historical playing audio.

[0108] It should be understood that the historical playing audio can be the audio played before the first currently playing audio.

[0109] It should also be understood that the source file attributes of the historical played audio are carried when the audio coding data is historically transmitted. In other words, the preset attributes are known to the Bluetooth speaker. Corresponding to S601 above, the tablet computer can send audio coding data without any source file attributes of the audio to the Bluetooth speaker.

[0110] In a third possible implementation, the tablet computer can also obtain the audio coding data of the first currently played audio based on the source file attributes of the currently played audio (i.e., the first currently played audio).

[0111] It should be understood that the source file attributes of the first currently played audio are unknown to the Bluetooth speaker. Corresponding to S601 above, the tablet computer can send audio coding data carrying the source file attributes of the first currently played audio to the Bluetooth speaker.

[0112] Exemplarily, the Bluetooth speaker can decode the audio coding data based on the source file attributes when it determines that the audio coding data carries source file attributes. Or, when it determines that the audio coding data does not carry any source file attributes, it decodes the audio coding data based on the preset attributes.

[0113] S602. When the tablet computer detects the second currently played audio, it determines whether the audio types of the second currently played audio and the first currently played audio are the same.

[0114] It should be understood that in the embodiments of the present application, the audio type can be determined by the tablet computer based on the application corresponding to the audio. In addition, it can also be determined based on other information of the above audio. The present application does not make any limitations in this regard.

[0115] S603. When it is determined that the audio types of the second currently played audio and the first currently played audio are the same, the tablet computer obtains the audio coding data of the second currently played audio based on the historical attributes.

[0116] Exemplarily, if the applications corresponding to the first currently played music and the second currently played audio are both music applications, the tablet computer obtains the audio coding data of the second currently played audio based on the historical attributes.

[0117] It should be understood that the above-mentioned music application shown is only exemplary, and the present application does not make any limitations in this regard.

[0118] In a first possible case, corresponding to the first implementation shown in S601 above, the historical attribute here can be the preset attribute.

[0119] In the second possible case, corresponding to the second or third implementation shown in S601 above, the historical attribute here can also be the source file attribute of the historical played audio.

[0120] It should be understood that the historical played audio here is the first current played audio above or the audio played before the first current played audio, and this application does not make any limitations in this regard.

[0121] S604. The tablet computer transmits the audio coding data of the second current played audio to the Bluetooth speaker, so that the Bluetooth speaker receives the audio coding data, decodes the audio coding data, and obtains and plays the second current played audio.

[0122] Exemplarily, for the first case in S603 above, the Bluetooth speaker can decode the audio coding data based on a preset attribute to obtain and play the second current played audio.

[0123] Exemplarily, for the second case in S603 above, the Bluetooth speaker can decode the audio coding data based on the source file attribute of the historical played audio to obtain and play the second current played audio.

[0124] Optionally, following S602 above, the tablet computer can also execute S605 when determining that the audio types of the second current played audio and the first current played audio are different, obtain the source file attribute of the second current played audio, and obtain the audio coding data of the second current played audio based on the source file attribute of the second current played audio. Wherein, the audio coding data of the second current played audio can carry the source file attribute of the second current played audio, so that the subsequent Bluetooth speaker can decode the audio coding data based on the source file attribute and play the decoded audio.

[0125] It should be understood that the above embodiments can also be coupled to each other, and this application does not make any limitations in this regard. And the magnitudes of the sequence numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0126] In the above text, in combination with Figures 1 to 6 , the method for processing Bluetooth audio data in the embodiments of this application is described in detail. Next, in combination with Figures 7 to 8 , the device for processing Bluetooth audio data in the embodiments of this application will be described in detail.

[0127] Figure 7 FIG. shows a device 700 for processing Bluetooth audio data provided by an embodiment of this application. The device 700 for processing Bluetooth audio data includes: a processing module 701 and a sending module 702.

[0128] Among them, the processing module 701 is used to: obtain the audio encoding data of the first currently played audio based on the source file attributes of the first currently played audio, where the source file attributes include the sampling rate and bit depth; the sending module 702 is used to: transmit the audio encoding data of the first currently played audio to a second electronic device, so that the second electronic device decodes the audio encoding data to obtain and play the first currently played audio; among them, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0129] Optionally, the processing module 701 is used to: determine and display preset attributes, where the preset attributes include a preset sampling rate and a preset bit depth; in the case where no selection operation of the user on the preset attributes is detected, obtain the audio encoding data of the first currently played audio based on the source file attributes of the first currently played audio; where the preset attributes are determined based on the decoding method supported by the second electronic device and the encoding method supported by the first electronic device.

[0130] Optionally, the processing module 701 is used to: in the case where a selection operation of the user on the preset attributes is detected, obtain the audio encoding data of the first currently played audio based on the preset attributes.

[0131] Optionally, the processing module 701 is used to: obtain the audio encoding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attributes, and the source file attributes of the first currently played audio.

[0132] Optionally, the processing module 701 is used to: in the case where it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attributes is greater than the value of the source file attributes of the first currently played audio, obtain the audio encoding data of the first currently played audio based on the source file attributes of the first currently played audio; or, in the case where it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attributes is less than the value of the source file attributes of the first currently played audio, obtain the audio encoding data of the first currently played audio based on the source file attributes of the first currently played audio.

[0133] Optionally, the processing module 701 is configured to: when it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the preset attribute; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the preset attribute.

[0134] Optionally, the processing module 701 is configured to: obtain the audio coding data of the second currently played audio based on the source file attribute of the first currently played audio; the sending module 702 is configured to: send the audio coding data of the second currently played audio to the second electronic device, so that the second electronic device decodes the audio coding data of the second currently played audio and obtains and plays the second currently played audio.

[0135] Optionally, the processing module 701 is configured to: determine whether the audio types of the first currently played audio and the second currently played audio are the same; when it is determined that the audio types of the first currently played audio and the second currently played audio are the same, obtain the audio coding data of the second currently played audio based on the historically obtained source file attribute of the first currently played audio; wherein, the audio type is determined based on the application corresponding to the audio.

[0136] The processing module 701 is configured to: when it is determined that the audio types of the first currently played audio and the second currently played audio are different, obtain the source file attribute of the second currently played audio; and obtain the audio coding data of the second currently played audio based on the source file attribute of the second currently played audio.

[0137] It should be understood that the Bluetooth audio data processing device 700 here is embodied in the form of a functional module. The term "module" here can refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a proprietary processor or a group of processors, etc.) for executing one or more software or firmware programs, and a memory, a combined logic circuit and / or other suitable components that support the described functions. In an alternative example, those skilled in the art can understand that the Bluetooth audio data processing device 700 can specifically be the first electronic device in the above embodiments, or the functions of the first electronic device in the above embodiments can be integrated in the Bluetooth audio data processing device 700. The Bluetooth audio data processing device 700 can be used to execute each process and / or step corresponding to the first electronic device in the above method embodiments. To avoid repetition, it will not be elaborated here.

[0138] The above-mentioned Bluetooth audio data processing device 700 has the function of implementing the corresponding steps executed by the first electronic device in the above method; the above function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In the embodiments of the present application, Figure 7 the Bluetooth audio data processing device 700 in can also be a chip or a chip system, for example: a system on chip (SoC).

[0139] Figure 8 Another Bluetooth audio data processing device 800 provided by the embodiments of the present application is shown. The Bluetooth audio data processing device 800 includes: a receiving module 801 and a processing module 802.

[0140] Among them, the receiving module 801 is used to: receive audio coding data from the first electronic device, the audio coding data is obtained by the first electronic device based on the source file attributes of the first currently played audio, and the source file attributes include the sampling rate and the bit depth; the processing module 802 is used to: decode the audio coding data, obtain and play the first currently played audio; wherein, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0141] Optionally, the processing module 802 is configured to: determine preset attributes, where the preset attributes include a preset sampling rate and a preset bit depth; determine whether the audio coding data carries the source file attributes of the first currently played audio; in the case that it is determined that the audio coding data carries the source file attributes of the first currently played audio, decode the audio coding data based on the source file attributes of the first currently played audio, and obtain and play the first currently played audio; where the preset attributes are determined based on the decoding method supported by the second electronic device and the encoding method supported by the first electronic device.

[0142] Optionally, the processing module 802 is configured to: in the case that it is determined that the audio coding data does not carry the source file attributes of the first currently played audio, decode the audio coding data based on the preset attributes, and obtain and play the first currently played audio.

[0143] Optionally, the receiving module 801 is configured to: receive the audio coding data of the second currently played audio from the first electronic device; the processing module 802 is configured to: decode the audio coding data of the second currently played audio based on the source file attributes of the first currently played audio, and obtain and play the second currently played audio. Where the audio coding data of the second currently played audio is obtained by the first electronic device based on the source file attributes of the first currently played audio obtained historically in the case that the audio types of the first currently played audio and the second currently played audio are determined to be the same.

[0144] It should be understood that the Bluetooth audio data processing device 800 is embodied in the form of a functional module here. The term "module" here may refer to an application specific integrated circuit (ASIC), an electronic circuit, a processor (such as a shared processor, a dedicated processor, or a group of processors, etc.) for executing one or more software or firmware programs, a memory, a combined logic circuit, and / or other suitable components that support the described functions. In an alternative example, those skilled in the art can understand that the Bluetooth audio data processing device 800 may specifically be the second electronic device in the above embodiments, or the functions of the second electronic device in the above embodiments may be integrated in the Bluetooth audio data processing device 800. The Bluetooth audio data processing device 800 may be used to execute each process and / or step corresponding to the second electronic device in the above method embodiments. To avoid repetition, it will not be elaborated here.

[0145] The above-mentioned processing device 800 for Bluetooth audio data has the function of implementing the corresponding steps executed by the second electronic device in the above method; this function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In the embodiments of the present application, Figure 8 the processing device 800 for Bluetooth audio data in it can also be a chip or a chip system, for example: a system on chip (SoC).

[0146] Figure 9 Another processing device 900 for Bluetooth audio data provided by the embodiments of the present application is shown. The processing device 900 for Bluetooth audio data includes: a processor 901, a memory 902, a communication interface 903, and a bus 904. Among them, the memory 902 is used to store instructions, and the processor 901 is used to execute the instructions stored in the memory 902. The processor 901, the memory 902, and the communication interface 903 are communicatively connected to each other through the bus 904.

[0147] In the first implementation manner, the processing device 900 for Bluetooth audio data can specifically be the first electronic device in the above embodiment. Among them, the processor 901 is used to: obtain the audio coding data of the first currently playing audio based on the source file attributes of the first currently playing audio, where the source file attributes include the sampling rate and the bit depth; and, transmit the audio coding data of the first currently playing audio to the second electronic device, so that the second electronic device decodes the audio coding data and obtains and plays the first currently playing audio; where, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0148] In the second implementation manner, the processing device 900 for Bluetooth audio data can specifically be the second electronic device in the above embodiment. Among them, the processor 901 is used to: receive the audio coding data from the first electronic device, where the audio coding data is obtained by the first electronic device based on the source file attributes of the first currently playing audio, and the source file attributes include the sampling rate and the bit depth; and, decode the audio coding data and obtain and play the first currently playing audio; where, a Bluetooth connection is established between the first electronic device and the second electronic device.

[0149] It should be understood that the processing device 900 for Bluetooth audio data can specifically be the first electronic device or the second electronic device in the above embodiment. The functions of the first electronic device or the second electronic device in the above embodiment can be integrated in the processing device 900 for Bluetooth audio data, and the processing device 900 for Bluetooth audio data can be used to execute the respective steps and / or processes corresponding to the first electronic device or the second electronic device in the above method embodiments.

[0150] Optionally, the memory 902 may include a read-only memory and a random access memory, and provide instructions and data to the processor 901. A part of the memory 902 may further include a non-volatile random access memory. For example, the memory 902 may also store information about the device type. The processor 901 may be used to execute the instructions stored in the memory, and when the processor executes the instructions, the processor 901 may execute each step and / or process corresponding to the first electronic device or the second electronic device in the foregoing method embodiments.

[0151] It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0152] In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of the hardware in the processor or an instruction in software form. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by the hardware processor, or executed and completed by a combination of the hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor executes the instructions in the memory and combines its hardware to complete the steps of the foregoing method. To avoid repetition, it will not be described in detail here.

[0153] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0154] 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 foregoing method embodiments, and will not be described in detail here.

[0155] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.

[0156] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.

[0158] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a terminal device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0159] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the above-mentioned claims.

Claims

1. A method for processing Bluetooth audio data, characterized in that, Applied to a first electronic device, the method includes: When a selection operation of a user on a preset attribute is detected, based on the preset attribute, obtain audio coding data of a first currently played audio, where the preset attribute includes a preset sampling rate and a preset bit depth; When a selection operation of the user on the preset attribute is not detected, based on the current power consumption state of a second electronic device, the preset attribute, and the source file attributes of the first currently played audio, obtain the audio coding data of the first currently played audio, where the source file attributes include a sampling rate and a bit depth; The obtaining the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio includes: When it is determined that the current power consumption of the second electronic device is greater than a power consumption threshold and the value of the preset attribute is greater than the value of the source file attributes of the first currently played audio, based on the source file attributes of the first currently played audio, obtain the audio coding data of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is less than the value of the source file attributes of the first currently played audio, based on the source file attributes of the first currently played audio, obtain the audio coding data of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attributes of the first currently played audio, based on the preset attribute, obtain the audio coding data of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attributes of the first currently played audio, based on the preset attribute, obtain the audio coding data of the first currently played audio; Transmit the audio coding data of the first currently played audio to the second electronic device, so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio; Wherein, a Bluetooth connection is established between the first electronic device and the second electronic device.

2. The method according to claim 1, wherein Before detecting the selection operation of the user on the preset attribute, the method further includes: Determine and display the preset attribute; Wherein, the preset attribute is determined based on the decoding method supported by the second electronic device and the encoding method supported by the first electronic device.

3. The method according to claim 1, wherein The method further includes: Based on the source file attributes of the first currently played audio, obtain audio coding data of a second currently played audio; Send the audio coding data of the second currently played audio to the second electronic device, so that the second electronic device decodes the audio coding data of the second currently played audio to obtain and play the second currently played audio.

4. The method according to claim 3, characterized in that, Before obtaining the audio coding data of the second currently played audio based on the source file attributes of the first currently played audio, the method further includes: Determine whether the audio types of the first currently played audio and the second currently played audio are the same; The obtaining the audio coding data of the second currently played audio based on the source file attributes of the first currently played audio includes: When it is determined that the audio types of the first currently played audio and the second currently played audio are the same, obtaining the audio coding data of the second currently played audio based on the source file attributes of the first currently played audio obtained historically; Wherein, the audio type is determined based on the application corresponding to the audio.

5. The method according to claim 4, characterized in that The method further includes: When it is determined that the audio types of the first currently played audio and the second currently played audio are different, obtain the source file attributes of the second currently played audio; Obtain the audio coding data of the second currently played audio based on the source file attributes of the second currently played audio.

6. A method for processing Bluetooth audio data, characterized in that, Applied to a second electronic device, the method includes: Receiving the audio coding data of the first currently played audio from a first electronic device, where the audio coding data of the first currently played audio is obtained by the first electronic device based on a preset attribute when detecting a user's selection operation on the preset attribute, the preset attribute including a preset sampling rate and a preset bit depth; or, when the first electronic device does not detect the user's selection operation on the preset attribute, the audio coding data of the first currently played audio is obtained based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio, the source file attributes including a sampling rate and a bit depth; The obtaining the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio includes: When it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is greater than the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is less than the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the preset attribute; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attribute of the first currently played audio, obtain the audio coding data of the first currently played audio based on the preset attribute; Decode the audio coding data of the first currently played audio, and obtain and play the first currently played audio; Wherein, a Bluetooth connection is established between the first electronic device and the second electronic device.

7. The method according to claim 6, wherein Before decoding the audio coding data of the first currently played audio to obtain and play the first currently played audio, the method further includes: Determine the preset attribute; Judge whether the audio coding data of the first currently played audio carries the source file attribute of the first currently played audio; The decoding the audio coding data of the first currently played audio to obtain and play the first currently played audio includes: When it is determined that the audio coding data of the first currently played audio carries the source file attribute of the first currently played audio, decode the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio, and obtain and play the first currently played audio; Wherein, the preset attribute is determined based on the decoding method supported by the second electronic device and the encoding method supported by the first electronic device.

8. The method according to claim 7, characterized in that The method further includes: When it is determined that the audio coding data of the first currently played audio does not carry the source file attribute of the first currently played audio, decode the audio coding data of the first currently played audio based on the preset attribute, and obtain and play the first currently played audio.

9. The method according to claim 6, wherein The method further includes: Receive the audio coding data of the second currently played audio from the first electronic device; Decode the audio coding data of the second currently played audio based on the source file attribute of the first currently played audio, and obtain and play the second currently played audio; Among them, the audio coding data of the second currently played audio is obtained by the first electronic device based on the source file attributes of the first currently played audio obtained historically when it is determined that the audio types of the first currently played audio and the second currently played audio are the same.

10. A first electronic device, characterized in that, It includes: A processing module, configured to, when detecting a user's selection operation on a preset attribute, obtain the audio coding data of the first currently played audio based on the preset attribute, where the preset attribute includes a preset sampling rate and a preset bit depth; when not detecting the user's selection operation on the preset attribute, obtain the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio, where the source file attributes include a sampling rate and a bit depth; the obtaining the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attributes of the first currently played audio includes: when it is determined that the current power consumption of the second electronic device is greater than a power consumption threshold and the value of the preset attribute is greater than the value of the source file attributes of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the source file attributes of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is less than the value of the source file attributes of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the source file attributes of the first currently played audio; or, when it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attributes of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the preset attribute; or, when it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attributes of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the preset attribute; A sending module, configured to transmit the audio coding data of the first currently played audio to the second electronic device, so that the second electronic device decodes the audio coding data to obtain and play the first currently played audio; among them, a Bluetooth connection is established between the first electronic device and the second electronic device.

11. A second electronic device, characterized in that, It includes: A receiving module, configured to receive the audio coding data of the first currently played audio from the first electronic device, where the audio coding data of the first currently played audio is obtained by the first electronic device based on a preset attribute when detecting a user's selection operation on the preset attribute, and the preset attribute includes a preset sampling rate and a preset bit depth; Alternatively, it is obtained by the first electronic device based on the current power consumption state of the second electronic device, the preset attribute, and the source file attribute of the first currently played audio in the case where the first electronic device does not detect a user's selection operation on the preset attribute. The source file attribute includes a sampling rate and a bit depth. Obtaining the audio coding data of the first currently played audio based on the current power consumption state of the second electronic device, the preset attribute, and the source file attribute of the first currently played audio includes: in the case where it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is greater than the value of the source file attribute of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio; or, in the case where it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is less than the value of the source file attribute of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the source file attribute of the first currently played audio; or, in the case where it is determined that the current power consumption of the second electronic device is greater than the power consumption threshold and the value of the preset attribute is less than or equal to the value of the source file attribute of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the preset attribute; or, in the case where it is determined that the current power consumption of the second electronic device is less than or equal to the power consumption threshold and the value of the preset attribute is greater than or equal to the value of the source file attribute of the first currently played audio, obtaining the audio coding data of the first currently played audio based on the preset attribute. A processing module, configured to decode the audio coding data of the first currently played audio, obtain and play the first currently played audio; wherein, a Bluetooth connection is established between the first electronic device and the second electronic device.

12. A processing device for Bluetooth audio data, characterized in that, It includes a processor and a memory. The memory is used to store code instructions, and the processor is used to run the code instructions to execute the method according to any one of claims 1 to 9.

13. A computer-readable storage medium, characterized in that, It is used to store a computer program, and the computer program includes instructions for implementing the method according to any one of claims 1 to 9.

14. A computer program product, comprising computer program code therein, characterized in that, When the computer program code runs on a computer, the computer is caused to implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Bluetooth headset control method, system and device and medium

    CN112671967A

  • Audio playing method and device and storage medium

    CN114783452A

  • Audio processing method and device, chip, electronic equipment and storage medium

    CN115206352A

  • Audio processing method, chip, device, equipment and computer readable storage medium

    CN115223577A

  • Audio data processing method and device, storage medium and electronic equipment

    CN115811720A