Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a system for transmitting and receiving an audio file, and aims to provide the audio file for Bluetooth equipment, enrich the playing mode of the audio file and improve the user experience.
In a first aspect, an embodiment of the present invention provides an audio file receiving method, where the method is applied to a bluetooth device, and the method includes:
receiving audio data of an audio file with a first Bluetooth audio transfer protocol, an
And receiving the audio information of the audio file by using a second Bluetooth transmission protocol. Optionally, the method further includes:
receiving a buffer start instruction in the second bluetooth transmission protocol, and/or,
and receiving a buffering end instruction by the second Bluetooth transmission protocol.
Optionally, the method further includes:
storing the audio data.
Optionally, the storing the audio data includes:
and establishing an audio folder according to the audio information, and storing the audio data into the audio folder.
Optionally, storing the audio data in the audio folder includes:
buffering the audio data in a random access memory of the Bluetooth device, and storing the audio data in the audio folder when the audio data buffered in the random access memory exceeds a preset storage capacity, or,
and directly storing the received audio data into the audio folder.
Optionally, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol.
In a second aspect, an embodiment of the present invention provides an audio file transmission method, where the method is applied to a user terminal device that transmits an audio file, and the method includes:
transmitting audio data of the audio file to a Bluetooth device in a first Bluetooth audio transmission protocol,
and transmitting the audio information of the audio file to the Bluetooth equipment by using a second Bluetooth transmission protocol.
Optionally, the method further includes:
transmitting a buffer start instruction to the bluetooth device in the second bluetooth transmission protocol, and/or,
and transmitting a buffering ending instruction to the Bluetooth equipment by using the second Bluetooth transmission protocol.
Optionally, the method further includes:
and receiving a communication event and determining whether to respond to the communication event according to a preset priority.
Optionally, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol.
Optionally, the audio information of the audio file is used to establish an audio folder, and the audio information includes: song title, artist name, and/or song category.
In a third aspect, an embodiment of the present invention provides an audio file receiving apparatus, where the apparatus is applied to a bluetooth device, and the apparatus includes:
an audio data receiving unit for receiving audio data of an audio file in a first Bluetooth audio transfer protocol, an
And the audio information receiving unit is used for receiving the audio information of the audio file by a second Bluetooth transmission protocol.
Optionally, the audio information receiving unit is further configured to:
receiving a buffer start instruction in the second bluetooth transmission protocol, and/or,
and receiving a buffering end instruction by the second Bluetooth transmission protocol.
Optionally, the apparatus further comprises:
and the storage unit is used for storing the audio data.
Optionally, the storage unit includes:
an audio folder establishing module for establishing an audio folder according to the audio information,
and the audio data storage module is used for storing the audio data to the audio folder.
Optionally, the audio data storage module is specifically configured to:
buffering the audio data in a random access memory of the Bluetooth device, and storing the audio data in the audio folder when the audio data buffered in the random access memory exceeds a preset storage capacity, or,
and directly storing the received audio data into the audio folder.
Optionally, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol.
In a fourth aspect, an embodiment of the present invention provides an audio file transmission apparatus, where the apparatus is applied to a user terminal device that transmits an audio file, and the apparatus includes:
an audio data transmitting unit for transmitting audio data of the audio file to a Bluetooth device in a first Bluetooth audio transmission protocol,
and the audio information sending unit is used for transmitting the audio information of the audio file to the Bluetooth equipment by using a second Bluetooth transmission protocol.
The audio information sending unit is further configured to:
transmitting a buffer start instruction to the bluetooth device in the second bluetooth transmission protocol, and/or,
and transmitting a buffering ending instruction to the Bluetooth equipment by using the second Bluetooth transmission protocol.
Optionally, the apparatus further comprises:
and the communication event response unit is used for receiving the communication event and determining whether to respond to the communication event according to the preset priority.
Optionally, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol.
Optionally, the audio information of the audio file is used to establish an audio folder, and the audio information includes:
song title, artist name, and/or song category.
In a fifth aspect, an embodiment of the present invention provides a user terminal device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods of audio file transfer described above.
In a sixth aspect, an embodiment of the present invention provides a bluetooth device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the audio file receiving methods described above.
In a seventh aspect, an embodiment of the present invention provides an audio file processing system, which includes the above user terminal device and a bluetooth device.
In an eighth aspect, an embodiment of the present invention provides a computer program product, where the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions, when the program instructions are executed by a user terminal device, the program instructions cause the user terminal device to execute the above-mentioned audio file transmission method.
In a ninth aspect, the embodiment of the present invention further provides a non-volatile computer-readable storage medium, where the computer-readable storage medium stores computer-executable instructions for causing a bluetooth device to execute the audio file receiving method described above.
The embodiment of the invention has the beneficial effects that: according to the embodiment of the invention, the audio data of the audio file is transmitted between the user terminal equipment and the Bluetooth equipment through the first Bluetooth audio transmission protocol, and the audio information corresponding to the audio data of the audio file is transmitted through the second Bluetooth transmission protocol so as to provide the audio file to the Bluetooth equipment, so that the playing mode of the audio file is enriched, and the user experience is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides an audio file transmission method, an audio file transmission device, an audio receiving method and an audio receiving device, wherein the method and the device can be used for providing audio files in user terminal equipment such as a Personal Computer (PC), a mobile phone and the like to Bluetooth equipment such as a Bluetooth headset and a Bluetooth sound box and storing the audio files at a Bluetooth equipment end, and the application environment of the method and the device is exemplified below.
FIG. 1(a), FIG. 1(b) and FIG. 1(c) are schematic diagrams of an application environment of an audio file processing system provided by an embodiment of the invention; fig. 1(a), 1(b) and 1(c) show three application scenarios for providing an audio file to the bluetooth device 10 through the user terminal device 20, wherein the application scenarios may further include a user (not shown in the figure), and the user may interact with the user terminal device 20 and the bluetooth device 10 through one or more user interaction devices of any suitable type, for example, a mouse, a button, a remote controller, a touch screen, a motion sensing camera, or a smart wearable device, and control the user terminal device 20 and the bluetooth device 10 to perform one or more operations, such as an audio playing operation, by inputting an instruction.
The user terminal device may be any suitable type of user terminal device providing one or more audio contents, such as a smart phone, a tablet computer, an MP3 player, a personal computer, a laptop computer, a personal stereo, a CD player, or other intelligent/non-intelligent terminal devices. The user terminal device is coupled to at least one storage medium for storing audio data, which may be a memory in the user terminal device or a storage medium on the internet, and retrieves audio files from the storage medium. The user terminal device may also be a combination of one or more electronic devices, such as a smartphone and an analog-to-digital converter (DAC) connected thereto.
The bluetooth device may be any suitable device having the capability of playing audio data and the capability of storing audio data, such as a bluetooth headset, a bluetooth speaker box, or other suitable type of speaker set. Fig. 1(a) shows a scenario in which audio data is provided to a bluetooth speaker via a personal PC. Fig. 1(b) shows a scenario in which audio data is supplied to a bluetooth speaker through a personal PC, and fig. 1(c) shows a scenario in which audio data is supplied to a bluetooth headset through a mobile phone.
The user terminal equipment can be connected with the Bluetooth equipment through an internal integrated or external Bluetooth module or a Bluetooth chip. When two bluetooth enabled devices establish a connection, they acquire the protocol provided by the corresponding device. Only devices using the same protocol can exchange data.
In bluetooth communications, a bluetooth enabled device need not implement the full bluetooth specification. In order to support compatibility between different bluetooth devices, some application layer protocols (profiles) are defined in the bluetooth specification, which define how a connection or application is implemented between bluetooth enabled devices.
Among them, A2DP (advanced Audio Distribution Profile advanced bluetooth Audio transmission model protocol) belongs to a subset of the bluetooth protocol Profile. Protocol stack and method of use for transmitting high quality music file data, A2DP was specifically formulated for transmitting stereo audio using bluetooth.
HFP (handles Free profile), HFP can only transmit mono encrypted audio, which is much worse than A2 DP. A2DP can transmit (16 bits, 44.1 kHz) audio, while HFP can only transmit (8 bits, 8 kHz) audio, HFP can be used to transmit speech signals.
Ble (bluetooth low energy), which belongs to bluetooth low energy protocol and is mainly used for short-time small data transmission.
The user terminal device may establish a bluetooth connection with the bluetooth device according to a user instruction, wherein the user terminal device may transfer audio data to the bluetooth device through a first bluetooth audio transmission protocol (e.g., A2DP protocol or HFP protocol) and transfer audio information (e.g., name of music, name of singer or performer, category of music, and voice speaker, etc.) related to the audio data to the bluetooth device through a second bluetooth transmission protocol (e.g., BLE protocol). And establishing an audio folder in a memory of the Bluetooth equipment according to the audio information, and storing the audio data in the audio folder to realize the storage of the audio file in the Bluetooth equipment.
The embodiment of the present invention is not limited to the above bluetooth protocol, and in practical applications, other suitable bluetooth protocols may be adopted for transmitting audio data and other suitable protocols may be adopted for transmitting audio information as needed.
When the user terminal equipment integrated with the Bluetooth chip plays an audio file, the Bluetooth chip can receive an audio signal (the audio signal can be in an MP3 format or other formats) through a Pulse Code Modulation (PCM) wired CODEC interface (such as a standard hardware stereo PCM interface), decode the audio signal and output PCM audio bare data. Because the PCM audio bare data needs a large bandwidth, is inefficient, consumes power and is not suitable for wireless transmission, the PCM audio bare data needs to be subjected to audio coding to be compressed, and then the compressed audio data is packetized and combined into audio data conforming to a Bluetooth transmission protocol. Where the A2DP protocol is employed, the A2DP audio data frames are grouped, e.g., frame1, frame2 … … frame N. After receiving the transmitted compressed and packetized audio data, the Bluetooth equipment can directly store the compressed and packetized audio data in an audio folder and decode the audio data when the audio data needs to be played; or the audio data can be stored in the audio folder after being decoded.
Among the A2DP protocols, Audio Coding formats satisfying the A2DP protocol include SBC (Sub Band Coding subband Coding), AAC (Advanced Audio Coding), Apt-X, and the like. The maximum encoding rate of 44.1kHz dual channels of the SBC encoding format is 328kbit/s, the encoding rate of the AAC encoding format can reach 320kbit/s, and the encoding rate of the Apt-X encoding format can reach 352 kbit/s.
The following examples are provided to further illustrate the present invention.
Fig. 2 is a flowchart illustrating an audio file transmission method according to an embodiment of the present invention. An audio file transmission method according to an embodiment of the present invention may be executed by various user terminal devices shown in fig. 1(a), fig. 1(b), or fig. 1(c), as shown in fig. 2, where the method includes:
201: transmitting the audio data of the audio file to Bluetooth equipment by using a first Bluetooth audio transmission protocol;
in practical applications, the sending of the audio data from the user terminal to the bluetooth device via the first bluetooth audio transmission protocol, such as A2DP, may be triggered in various ways, for example, when the user establishes a connection between the user terminal and the bluetooth device, and then turns on an audio player of the user terminal, the user terminal will send the audio data to the bluetooth device.
In the embodiment of the present invention, the audio data of the audio file may be obtained by converting the MP3 format of the audio file into the PCM format by a user terminal device, such as a smart phone, encoding the PCM format into the formats of SBC, AAC, Apt-X, etc., dividing the music in various formats into frames, such as frame1 and frame2 … … frame n, and transmitting the frames of audio data to a bluetooth device, such as a bluetooth headset, through A2 DP.
202: and transmitting the audio information of the audio file to the Bluetooth equipment by using a second Bluetooth transmission protocol.
In the embodiment of the invention, the user terminal equipment sends the audio information corresponding to the audio data to the Bluetooth equipment at the same time of sending the audio data or at a time interval before and after the audio data.
In the embodiment of the present invention, the user terminal device may play an audio file stored locally in the user terminal device, and transmit audio information of the audio file to the bluetooth device according to a second bluetooth transmission protocol in the process of transmitting audio data of the audio file through A2DP, or may play an online audio file, and transmit audio data and audio information in the audio file to the bluetooth device according to A2DP and BLE, respectively, where the second bluetooth transmission protocol is BLE, the audio information is used to establish an audio folder, the audio information may include a song name, a singer name, and/or a song category, and the audio information and the audio data belong to the same audio file.
In the embodiment of the present invention, the user terminal device may also play the network audio file online, and transmit the audio data and the audio information in the audio file to the bluetooth device by using A2DP and BLE, respectively.
According to the embodiment of the invention, the audio data of the audio file is transmitted through the first Bluetooth audio transmission protocol and the audio information of the audio file is transmitted to the Bluetooth equipment through the second Bluetooth transmission protocol so as to provide the audio file to the Bluetooth equipment, so that the playing mode of the audio file is enriched and the user experience is improved.
FIG. 3 is a flowchart illustrating another audio file transmission method according to an embodiment of the present invention; the method may also be performed by various user terminal devices shown in fig. 1(a), fig. 1(b) or fig. 1(c), as shown in fig. 3, and the method includes:
301: and transmitting the buffering starting instruction to the Bluetooth equipment by using a second Bluetooth transmission protocol.
In the embodiment of the present invention, in order to increase the storage speed of the audio data in the bluetooth device, the audio data may be stored in a buffer, for example, in a static random access memory SRAM, the operation of the bluetooth device for storing the audio data in the buffer may be controlled by a user terminal device, the user terminal device sends a buffer start instruction to the bluetooth device while sending the audio data, or at a time interval before and after sending the audio data, and the bluetooth device stores the audio data in the buffer after receiving the audio data and the buffer start instruction.
302, transmitting audio data of the audio file to a bluetooth device in a first bluetooth audio transmission protocol.
In the embodiment of the present invention, the audio data may be transmitted at A2DP after the buffering start instruction is transmitted at BLE, in which case the bluetooth device buffers the received audio data. Of course, it is also possible to transmit the audio data at A2DP first, and then transmit the buffer start command through BLE, at which time the received audio data is stored in the buffer.
303. And transmitting the buffering ending instruction to the Bluetooth equipment by using a second Bluetooth transmission protocol.
In the embodiment of the present invention, when the cached audio data reaches the storage capacity of the preset static random access memory, or the transmission of the audio data of the audio file is completed, the buffer end instruction may be transmitted to the bluetooth device through the BLE, and the bluetooth device terminates the storage of the audio data in the buffer when receiving the buffer end instruction.
304. And transmitting the audio information of the audio file to the Bluetooth equipment by using a second Bluetooth transmission protocol.
In the embodiment of the present invention, in order to store the audio data in the audio folder, the audio data may be sent while or after a certain time interval, or the buffering start instruction may be sent while or after a certain time interval, or the buffering end instruction may be sent while or after a certain time interval, and the audio information is sent to the bluetooth device through BLE.
It should be noted that, in the embodiment of the present invention, a certain sequence does not necessarily exist among the steps 301, 302, 303, and 304, and it can be understood by those skilled in the art according to the description of the embodiment of the present invention that, in different embodiments, the steps 301, 302, 303, and 304 may have different execution sequences. Meanwhile, in different embodiments, the cache start instruction and the cache end instruction may exist at the same time, or only one instruction may exist, for example, the cache start instruction and the cache end instruction may be sent, or only the cache end instruction or the cache start instruction may be sent.
In an embodiment of the present invention, the method further comprises:
and receiving a communication event and determining whether to respond to the communication event according to a preset priority.
In the embodiment of the present invention, the user terminal device may receive a communication event, such as an incoming call or an instant message, during playing an audio file, and for different communication events, may preset a priority for determining whether to respond to the corresponding communication event, such as the priority of the incoming call is higher than the playing priority of the audio file, and when an incoming call event is received during playing the audio file, the transmission of the audio file may be terminated, and the incoming call event may be responded. Of course, the priority of the communication event may also be set to be lower than the transmission of the audio file, for example, the priority of the instant message is lower than the playing priority of the audio file, and the transmission of the audio file may not be terminated if the instant message is received during the playing of the audio file.
According to the embodiment of the invention, the audio data of the audio file is transmitted through the first Bluetooth audio transmission protocol and the audio information of the audio file is transmitted to the Bluetooth equipment through the second Bluetooth transmission protocol so as to provide the audio file to the Bluetooth equipment, thereby enriching the playing mode of the audio file and improving the user experience.
Fig. 4 is a flowchart illustrating an audio file receiving method according to an embodiment of the present invention, which may be executed by various bluetooth devices shown in fig. 1(a), fig. 1(b), or fig. 1(c), and as shown in fig. 4, the method includes:
401: audio data of an audio file is received in a first bluetooth audio transfer protocol.
In the embodiment of the present invention, the bluetooth device may receive audio data of an audio file, which contains a plurality of data frames, sent by the user terminal device through A2 DP.
402: and receiving the audio information of the audio file by using a second Bluetooth transmission protocol.
In the embodiment of the invention, the bluetooth device may receive, through BLE, audio information of an audio file sent by the user terminal device, where the audio information is used to establish an audio folder, the audio information may include a song name, a singer name, and/or a song category, and the audio information and the audio data belong to the same audio file.
It should be noted that, in the embodiment of the present invention, a certain sequence does not necessarily exist between the steps 401 and 402, and those skilled in the art can understand, according to the description of the embodiment of the present invention, that in different embodiments, the steps 401 and 402 may have different execution sequences.
According to the embodiment of the invention, the audio data of the audio file is received through the first Bluetooth audio transmission protocol and the audio information of the audio file is received to the Bluetooth equipment through the second Bluetooth transmission protocol, so that the Bluetooth equipment can store the audio file conveniently, the playing mode of the audio file is enriched, and the user experience is improved.
FIG. 5 is a flow chart of another audio file receiving method according to an embodiment of the present invention; the method may also be performed by various user terminal devices shown in fig. 1(a), fig. 1(b) or fig. 1(c), as shown in fig. 5, and the method includes:
501: a cache start instruction is received in a second bluetooth transmission protocol.
In the embodiment of the present invention, in order to increase the storage speed of the audio data in the bluetooth device, the audio data may be stored in a buffer memory, for example, in a static random access memory SRAM, the operation of the bluetooth device for storing the audio data in the buffer memory may be controlled by a user terminal device, the user terminal device may send a buffer start instruction to the bluetooth device through BLE while sending the audio data, or at a time interval before and after sending the audio data, and the bluetooth device stores the audio data in the buffer memory after receiving the audio data and the buffer start instruction.
502, receiving audio data of the audio file in a first bluetooth audio transmission protocol.
In the embodiment of the present invention, the audio data may be received at A2DP after receiving the buffering start instruction at BLE, in which case the bluetooth device buffers the received audio data. Of course, the audio data may be received at A2DP, and then the buffering start instruction may be received through BLE, and at this time, the received audio data may be stored in the buffer.
503. And receiving the audio information of the audio file by using a second Bluetooth transmission protocol.
In the embodiment of the present invention, in order to store the audio data in the audio folder, the audio information may be received through BLE at the same time as, or after, the audio data is received, or at the same time as, or after, the buffering start instruction is received.
504. The audio data is stored.
In the embodiment of the invention, the received audio data can be cached or stored in the audio folder. When the audio data needs to be stored in the audio folder, the audio folder can be established according to the received audio information, and the audio data can be stored in the audio folder. Wherein storing the audio data to an audio folder may comprise: and caching the audio data in a random access memory of the Bluetooth equipment, and storing the audio data in the audio folder when the audio data cached in the random access memory exceeds a preset storage capacity, or directly storing the received audio data in the audio folder.
In embodiments of the present invention, the audio folder may be in a solid state memory built into a bluetooth device, such as eMMC or Tcard or UFS. The audio data is stored in the SRAM through the cache, the data storage of the audio data can be accelerated, the time and the power consumption can be saved, and when the audio data stored in the cache reaches the preset capacity, the received audio data can be written into the audio folder of the solid-state memory.
505. And receiving a buffering end instruction by the second Bluetooth transmission protocol.
In the embodiment of the present invention, when the cached audio data reaches the storage capacity of the preset sram, or the audio data transmission of the audio file is completed, the buffer end instruction may be transmitted to the bluetooth device through BLE, and the bluetooth device terminates the storage of the audio data in the buffer when receiving the buffer end instruction through BLE.
It should be noted that, in the embodiment of the present invention, a certain sequence does not necessarily exist among the above steps 501, 502, 503, 504, and 505, and it can be understood by those skilled in the art from the description of the embodiment of the present invention that, in different embodiments, the above steps 501, 502, 503, 504, and 505 may have different execution sequences, and meanwhile, a cache start instruction and a cache end instruction may exist simultaneously in different embodiments, or only one instruction may exist, for example, a cache start instruction and a cache end instruction may be received, or only a cache end instruction or a cache start instruction may be received.
According to the embodiment of the invention, the audio data of the audio file is received through the first Bluetooth audio transmission protocol and the audio information of the audio file is received to the Bluetooth equipment through the second Bluetooth transmission protocol, so that the Bluetooth equipment can store the audio file conveniently, the playing mode of the audio file is enriched, and the user experience is improved. Meanwhile, the audio data can be favorably controlled to be stored by receiving the caching start instruction and the caching end instruction, so that the transmission speed of the audio data is improved, and the audio file is stored in the audio folder, so that a user can conveniently and directly play the audio file through the Bluetooth equipment.
To further illustrate the embodiments of the audio file transmission method and the audio file receiving method of the present invention, the following describes an example of the audio file transmission method and the audio file receiving method in conjunction with a specific application scenario. The specific application scenario is to play music to the bluetooth headset through the mobile phone, as shown in fig. 6, which is a schematic diagram of an audio file processing workflow between the mobile phone and the bluetooth headset according to the embodiment of the present invention, and the application embodiment specifically includes:
1. the mobile phone plays music files through the music APP, such as playing a MP3 format song;
2. the mobile phone converts the MP3 format into a PCM format;
3. the Bluetooth IC of the mobile phone encodes the PCM format into SBC, AAC, Apt-X and other formats, and divides the music in the format into frames, such as frame1 and frame2 … … frame N;
4. the mobile phone sends a start buffering command to the bluetooth headset, music of frames 1 and 2 … … frame N is transmitted to the bluetooth headset through A2DP, and the bluetooth headset receives and buffers the frames 1 and 2 … … frame N in the Memory. The Memory is firstly stored in the Memory and is not directly and slowly written into the song folder because the Memory is an SRAM (static random access Memory), the storage is fast, the time is saved, and the power consumption is saved;
5. the mobile phone transmits music information (such as song name, singer name, song category and the like) of the song to the Bluetooth headset through BLE; and a song folder is established in a memory of the Bluetooth headset, for example, the name of a singer is named as a folder name; the memory is eMMC, TCard or UFS;
alternatively, this step may be performed simultaneously with step 4.
6. When a certain number of music frames are stored in the Memory, the bluetooth headset starts to write the music frames stored in the Memory into the song folder frame by frame.
7. When the music frame is sent to the last frame, the mobile phone sends a buffer termination instruction to the Bluetooth headset, and the Bluetooth headset writes the buffer termination into the song folder, so that the buffer termination is realized;
8. in another embodiment, the music frames of step 4 are written directly into the song folder, frame by frame, through A2DP, without buffering.
Fig. 7 is a schematic diagram of an audio file transmission apparatus according to an embodiment of the present invention, as shown in fig. 7, where the apparatus 700 is applied to a user terminal device shown in fig. 1(a), fig. 1(b), or fig. 1(c), and the apparatus 700 includes:
an audio data transmitting unit 701 for transmitting audio data of the audio file to a Bluetooth device in a first Bluetooth audio transmission protocol,
an audio information sending unit 702, configured to transmit the audio information of the audio file to the bluetooth device according to the second bluetooth transmission protocol.
In an embodiment of the present invention, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol. The audio information of the audio file is used for establishing an audio folder, and the audio information comprises: song title, artist name, and/or song category.
In this embodiment of the present invention, the audio information sending unit 702 is further configured to: and transmitting a cache start instruction to the Bluetooth equipment by using the second Bluetooth transmission protocol, and/or transmitting a cache end instruction to the Bluetooth equipment by using the second Bluetooth transmission protocol.
In an embodiment of the present invention, the apparatus 700 further includes:
and the communication event response unit is used for receiving the communication event and determining whether to respond to the communication event according to the preset priority.
In this embodiment of the present invention, after the user terminal device and the bluetooth device are connected, the audio data sending unit 701 sends the audio data of the user terminal device to the bluetooth device through A2DP, and the audio information sending unit 702 sends the audio information corresponding to the audio data to the bluetooth device through BLE. In order to control the transmission speed of the audio data, the audio information sending unit 702 may further send a buffering start instruction and a buffering end instruction, so as to control the audio data to be stored in the buffer of the bluetooth device.
It should be noted that the audio file transmission apparatus can execute the audio file transmission method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the audio file transmission apparatus, reference may be made to the audio file transmission method provided in the embodiment of the present invention.
According to the embodiment of the invention, the audio data of the audio file is transmitted through the first Bluetooth audio transmission protocol, and the audio information of the audio file is transmitted to the Bluetooth equipment through the second Bluetooth transmission protocol so as to provide the audio file to the Bluetooth equipment, so that the playing mode of the audio file is enriched, and the user experience is improved.
Fig. 8 is a schematic diagram of an audio file receiving apparatus according to an embodiment of the present invention, where the apparatus is applied to the bluetooth device shown in fig. 1(a), fig. 1(b), or fig. 1(c), and as shown in fig. 8, the apparatus 800 includes:
an audio data receiving unit 801 for receiving audio data of an audio file in a first Bluetooth audio transfer protocol, an
An audio information receiving unit 802, configured to receive audio information of the audio file according to a second bluetooth transmission protocol.
In an embodiment of the present invention, in the embodiment of the present invention, the first bluetooth audio transmission protocol is a bluetooth advanced audio transmission model protocol, and the second bluetooth transmission protocol is a bluetooth low energy transmission protocol. The audio information of the audio file is used for establishing an audio folder, and the audio information comprises: song title, artist name, and/or song category.
In this embodiment of the present invention, the audio information receiving unit 802 is further configured to:
receiving a buffer start instruction in the second bluetooth transmission protocol, and/or,
and receiving a buffering end instruction by the second Bluetooth transmission protocol.
In an embodiment of the present invention, the apparatus 800 further includes:
a storage unit 803 for storing the audio data.
The storage unit 803 includes:
an audio folder establishing module 8031, configured to establish an audio folder according to the audio information,
an audio data storage module 8032, configured to store the audio data in the audio folder.
In the embodiment of the present invention, the audio data storage module 8032 may be specifically configured to:
buffering the audio data in a random access memory of the Bluetooth device, and storing the audio data in the audio folder when the audio data buffered in the random access memory exceeds a preset storage capacity, or,
and directly storing the received audio data into the audio folder.
In the embodiment of the present invention, the audio data receiving unit 801 receives audio data of an audio file transmitted by the audio file transmission apparatus through A2DP, the audio information receiving unit 802 receives audio information of the audio file transmitted by BLE, and the storage unit 803 establishes an audio folder according to the audio information after receiving the audio data and the audio information, and stores the audio data in the audio folder. The storage unit 803 may include an audio folder establishing module 8031 and an audio data storage module 8032, and the audio data storage module 8032 may determine to store the audio data in the cache or the audio folder according to the cache start instruction and the cache end instruction.
It should be noted that the audio file receiving apparatus can execute the audio file receiving method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the audio file receiving apparatus, reference may be made to the audio file receiving method provided in the embodiment of the present invention.
According to the embodiment of the invention, the audio data of the audio file is received through the first Bluetooth audio transmission protocol, and the audio information of the audio file is received to the Bluetooth equipment through the second Bluetooth transmission protocol, so that the Bluetooth equipment can store the audio file conveniently, the playing mode of the audio file is enriched, and the user experience is improved. Meanwhile, the audio files are stored in the audio folder, so that a user can conveniently and directly play the audio files through the Bluetooth device.
Fig. 9 is a schematic diagram of a hardware structure of a user terminal device according to an embodiment of the present invention, and as shown in fig. 9, the user terminal device 900 includes:
one or more processors 901 and a memory 902, where one processor 901 is taken as an example in fig. 9.
The processor 901 and the memory 902 may be connected by a bus or other means, and fig. 9 illustrates the connection by a bus as an example.
The memory 902, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/units (e.g., the audio data transmitting unit 701 and the audio information transmitting unit 702 shown in fig. 7) corresponding to the audio file transmission method in the embodiment of the present invention. The processor 901 executes various functional applications and data processing of the user terminal device by running the nonvolatile software programs, instructions and units stored in the memory 902, that is, implements the audio file transmission method of the above-described method embodiment.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the user terminal device, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to the user terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory 902, and when executed by the one or more processors 901, perform the audio file transmission method in any of the above-described method embodiments, for example, perform the method steps 201 to 202 in fig. 2, and the method steps 301 to 304 in fig. 3, which are described above, to implement the functions of the unit 701 and 702 in fig. 7.
The user terminal equipment can execute the audio file transmission method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in the embodiment of the user terminal device, reference may be made to the audio file transmission method provided in the embodiment of the present invention.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, for example, to perform the above-described method steps 201 to 202 in fig. 2, and method steps 301 to 304 in fig. 3, to implement the functions of the modules 701 and 702 in fig. 7.
The user terminal device of the embodiment of the present application exists in various forms, including but not limited to:
(1) mobile communication devices, which are characterized by mobile communication capabilities and are primarily targeted at providing voice and data communications. Such terminals include smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) The ultra-mobile personal computer equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include PDA, MID, and UMPC devices, such as ipads.
(3) Portable entertainment devices such devices may display and play multimedia content. Such devices include audio and video players (e.g., ipods), handheld game consoles, electronic books, as well as smart toys and portable car navigation devices.
(4) The server is similar to a general computer architecture, but has higher requirements on processing capability, stability, reliability, safety, expandability, manageability and the like because of the need of providing highly reliable services.
(5) Other electronic devices with bluetooth functionality.
Fig. 10 is a schematic diagram of a hardware structure of a bluetooth device according to an embodiment of the present invention, and as shown in fig. 10, the user terminal device 1000 includes:
one or more processors 1001 and a memory 1002, with one processor 1001 being an example in fig. 10.
The processor 1001 and the memory 1002 may be connected by a bus or other means, and fig. 10 illustrates the connection by a bus as an example.
The memory 1002, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/units corresponding to the audio file transmission method in the embodiment of the present invention (for example, the audio data receiving unit 801 and the audio information receiving unit 802 shown in fig. 8). The processor 1001 executes various functional applications and data processing of the bluetooth device by executing the nonvolatile software program, instructions, and units stored in the memory 1002, that is, implements the audio file receiving method of the above-described method embodiment.
The memory 1002 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the bluetooth device, and the like. Further, the memory 1002 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, the memory 1002 may optionally include memory located remotely from the processor 1001, which may be connected to a bluetooth device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The one or more units are stored in the memory 1002 and when executed by the one or more processors 1001, perform the audio file receiving method in any of the above-described method embodiments, for example, perform the above-described method steps 401 to 402 in fig. 4, and the method steps 501 to 505 in fig. 5, to implement the functions of the unit 801 and 803 in fig. 8.
The Bluetooth device can execute the audio file receiving method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method. For technical details that are not described in detail in the embodiment of the bluetooth device, reference may be made to the audio file receiving method provided in the embodiment of the present invention.
Embodiments of the present invention provide a non-transitory computer-readable storage medium storing computer-executable instructions for execution by one or more processors, for example, to perform the above-described method steps 401 to 402 in fig. 4, method steps 501 to 505 in fig. 5, and to implement the functions of blocks 801 and 803 in fig. 8.
The bluetooth device of the embodiments of the present application may exist in various forms, including but not limited to:
(1) the Bluetooth headset has the characteristics of Bluetooth communication function and mainly aims at providing voice opening and music playing. .
(2) The Bluetooth sound box belongs to the category of music playing equipment and mainly aims at playing music.
(3) Portable entertainment devices such devices may play multimedia content. The devices comprise an audio player, a video player (such as an iPod), a handheld game machine, an electronic book, an intelligent toy and a portable vehicle-mounted navigation device, and the entertainment device has a Bluetooth communication function.
(5) Other music playing electronic devices with Bluetooth function.
Fig. 11 is a schematic diagram of an audio file processing system according to an embodiment of the present invention, and as shown in fig. 11, the system 1100 includes a user terminal device 1101 and a bluetooth device 1102, where the user terminal device 1101 has the functions described in the foregoing user terminal device embodiment and executes the method steps of the foregoing audio file transmission method embodiment, and the bluetooth device 1102 has the functions described in the foregoing bluetooth device embodiment and executes the method steps of the foregoing audio file reception method embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the embodiments may be implemented by software plus a general hardware platform, and may also be implemented by hardware. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; within the idea of the invention, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.