Wireless Headphone Audio Data Transmission Method, Device, Wireless Headphone and Storage Medium
By using Bluetooth and wifi modules in wireless headphones, establishing a connection and receiving audio data in burst transmission mode, the problem that wireless headphones cannot play high-resolution lossless audio files is solved, and a Hi-Res authentication and energy-saving transmission mode is realized.
Patent Information
- Application Number
- CN202010219053.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-25
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2040-03-25
AI Technical Summary
Existing wireless headphones cannot play high-resolution lossless audio files and cannot achieve Hi-Res certification.
By starting the Bluetooth module and the wifi module, receive Bluetooth and wifi connection requests from the mobile terminal, establish a connection, and receive preset audio data in burst transmission mode through wifi, decode and play.
It realizes the ability to play high-resolution lossless audio files in wireless headphones, enhances the user experience, and extends the usage time of wireless headphones through an energy-saving burst transmission mode.
Smart Images

Figure CN113453202B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wireless earphones, and in particular, to a method and device for transmitting audio data of wireless earphones, a wireless earphone, and a storage medium. Background Art
[0002] Compared with wired earphones, wired earphones have relatively single functions, are inconvenient to store, and are easily tangled. Wireless earphones generally have functional features such as voice assistants, active noise reduction, hands-free calls, and gesture control inside, and are portable and convenient to wear. The trend of converting wired earphones to wireless earphones in the market is obvious. However, currently, wireless earphones on the market basically adopt the Bluetooth transmission form, and for all wireless frequency bands applied to Bluetooth transmission, the transmitted audio data cannot achieve Hi-Res certification (Hi-Res, full name High Resolution Audio, that is, high-resolution audio, a high-quality audio product design standard proposed and defined by Sony and formulated by JAS (Japan Audio Society) and CEA (Consumer Electronics Association)), and it is impossible to play high-resolution (24 / 32bit to 192 / 384khz) lossless audio files in wireless earphones. Therefore, there is an urgent need for a new technology that can play high-resolution lossless audio files in wireless earphones. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a method and device for transmitting audio data of wireless earphones, a wireless earphone, and a storage medium, aiming to solve the problem that high-resolution lossless audio files cannot be played in wireless earphones.
[0004] To solve the above technical problems, the embodiments of the present application provide a method for transmitting audio data of wireless earphones, and adopt the following technical solutions:
[0005] Start the Bluetooth module and the wifi module;
[0006] Receive the Bluetooth connection request and the wifi connection request of the mobile terminal, and establish a Bluetooth connection and a wifi connection with the mobile terminal;
[0007] Receive the preset audio data sent by the mobile terminal in a burst transmission mode through wifi, decode and play it.
[0008] Further, the step of receiving the connection request of the mobile terminal and establishing a Bluetooth connection and a wifi connection with the mobile terminal specifically includes:
[0009] Receive the Bluetooth connection request of the mobile terminal and establish a Bluetooth connection with the mobile terminal;
[0010] Receive the wifi connection request of the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of wifi, and establish a wifi connection with the mobile terminal through the set wifi protocol.
[0011] Further, the step of receiving the preset audio data sent by the mobile terminal in burst transmission mode through wifi, decoding and playing specifically includes:
[0012] When receiving the audio data of the preset capacity through wifi, switch wifi to the off state;
[0013] Store the audio data of the preset capacity in the RAM of the wireless earphone and decode and play it;
[0014] Monitor the capacity of the preset capacity of audio data that has been decoded and played. When the proportion of the capacity of the preset capacity of data that has been decoded and played reaches the preset ratio, switch wifi to the on state, and receive another preset capacity of audio data through wifi until the playback ends.
[0015] Further, switching wifi to the off state is to control the wifi module to disconnect the wifi connection with the mobile terminal through the Bluetooth module; switching wifi to the on state is to control the wifi module to establish a wifi connection with the mobile terminal through the Bluetooth module.
[0016] Further, before the step of receiving another preset capacity of audio data through wifi, it further includes:
[0017] Obtain the sampling rate, bit depth, and number of channels of the audio data from the received preset audio data;
[0018] Adjust the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio data.
[0019] Further, the step of adjusting the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio file specifically includes:
[0020] Define the preset capacity = X, sampling rate = a, bit depth = b, then:
[0021] X = a * b * α, α = number of channels / preset duration, and α represents the proportionality coefficient related to the number of channels and preset duration of the audio data.
[0022] To solve the above technical problems, the embodiment of the present application also provides an audio data transmission device for a wireless earphone, which adopts the following technical solutions:
[0023] A startup module, used to turn on the wireless earphone and start the Bluetooth module and the Wi-Fi module;
[0024] A connection module, used to receive Bluetooth connection requests and Wi-Fi connection requests from a mobile terminal, and establish a Bluetooth connection and a Wi-Fi connection with the mobile terminal;
[0025] An audio playback module, used to receive preset audio data sent by the mobile terminal in a burst transmission mode via Wi-Fi, decode and play it.
[0026] Further, the connection module includes:
[0027] A Bluetooth connection unit, used to receive the Bluetooth connection request of the mobile terminal and establish a Bluetooth connection with the mobile terminal;
[0028] A Wi-Fi connection unit, used to receive the Wi-Fi connection request of the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of Wi-Fi, and establish a Wi-Fi connection with the mobile terminal through the set Wi-Fi protocol.
[0029] Further, the audio playback module further includes:
[0030] A switching unit, used to switch Wi-Fi to the off state when receiving preset-capacity audio data via Wi-Fi;
[0031] A playback unit, used to store the preset-capacity audio data in the RAM of the wireless earphone and decode and play it;
[0032] A monitoring unit, used to monitor the capacity of the preset-capacity audio data that has been decoded and played. When the proportion of the capacity of the preset-capacity data that has been decoded and played reaches a preset ratio, switch Wi-Fi to the on state, and receive another preset-capacity audio data via Wi-Fi until the playback ends.
[0033] Further, switching Wi-Fi to the off state is to control the Wi-Fi module by the Bluetooth module to disconnect the Wi-Fi connection with the mobile terminal; switching Wi-Fi to the on state is to control the Wi-Fi module by the Bluetooth module to establish a Wi-Fi connection with the mobile terminal.
[0034] Further, the monitoring unit is further used for:
[0035] Obtain the sampling rate, bit depth, and number of channels of the audio data from the received preset audio data;
[0036] Adjust the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio data.
[0037] Further, the monitoring unit is further configured to:
[0038] Define the preset capacity = X, the sampling rate = a, and the bit depth = b. Then:
[0039] X = a * b * α, where α = number of channels / preset duration, and α represents a proportionality coefficient related to the number of channels and the preset duration of the audio data.
[0040] To solve the above technical problems, an embodiment of the present application further provides a wireless earphone, which adopts the following technical solutions:
[0041] It includes a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps of the wireless earphone audio data transmission method described in any one of the above methods.
[0042] To solve the above technical problems, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
[0043] A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the steps of the wireless earphone audio data transmission method described in any one of the above methods.
[0044] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects:
[0045] The solution of the present application transmits audio data through wifi, enabling high-resolution lossless audio files to be played on the wireless earphone, enhancing the user experience; at the same time, through the burst transmission mode, the wireless earphone does not need to transmit audio data in real time, achieving energy saving and increasing the effective usage duration of the wireless earphone. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] To more clearly illustrate the solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments of the present application. Obviously, the following drawings are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 is a flowchart of an embodiment of the wireless earphone audio data transmission method of the present application;
[0048] Figure 2 is a schematic structural diagram of an embodiment of the wireless earphone audio data transmission device according to the present application;
[0049] Figure 3 is a flowchart of another embodiment of the wireless earphone audio data transmission method of the present application;
[0050] Figure 4 is a flowchart of another embodiment of the audio data transmission method for the wireless earphones of the present application;
[0051] Figure 5 is a schematic structural diagram of an embodiment of a computer device according to the present application.
[0052] Reference numerals: startup module 100, connection module 200, audio playback module 300. Detailed implementation manners
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs; the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above drawings are intended to cover non-exclusive inclusion. The terms "first", "second", etc. in the specification and claims of this application or the above drawings are used to distinguish different objects and not to describe a specific order.
[0054] Reference to "embodiment" herein means that a specific feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of this application. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0055] To enable those skilled in the technical field to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the drawings.
[0056] Refer to Figure 1 , an embodiment of this application provides a method for transmitting audio data of wireless earphones, and the method includes the steps of:
[0057] S10. Start the Bluetooth module and the Wi-Fi module;
[0058] S20. Receive the Bluetooth connection request and the Wi-Fi connection request of the mobile terminal, and establish a Bluetooth connection and a Wi-Fi connection with the mobile terminal;
[0059] S30. Receive the preset audio data sent by the mobile terminal in a burst transmission mode through Wi-Fi, decode and play it.
[0060] As described in the above step S10, the above-mentioned wireless earphones refer to wireless earphones that simultaneously have a Bluetooth module and a Wi-Fi module. The form of the wireless earphones can be earbuds, ear-hook earphones, neckband earphones, and over-ear earphones. Optionally, the present application preferably uses wireless neckband earphones. After the wireless neckband earphones are properly worn, the weight of the earphones falls on the back of the neck, reducing the burden on the ears when wearing the earphones, being comfortable to wear and not easily falling off. Additionally, by setting magnets at the front section of the neckband, the earphones can be adsorbed to the front section of the neckband, making it more convenient to pick up and more suitable for sports. At the same time, the left earphone and the right earphone of the wireless neckband earphones can be wired to the same audio processing device, and there is no time and sound effect difference in listening between the left earphone and the right earphone.
[0061] As described in the above step S20, the above-mentioned mobile terminal can be various electronic devices with a sound playback function and capable of Wi-Fi and Bluetooth connections, including but not limited to smartphones, tablets, MP3 players, laptops, in-vehicle players, etc. Optionally, when the mobile terminal is a smartphone, the above-mentioned mobile phone can find the wireless earphones for connection through the Bluetooth and Wi-Fi settings pages, or can establish Bluetooth and Wi-Fi connections with the wireless earphones through the UI interface of a specific App. For example, establish Bluetooth and Wi-Fi connections with the wireless earphones through "TitanSound".
[0062] As described in the above step S30, the above-mentioned burst transmission mode means receiving one segment of data and then receiving another segment of data after a certain time interval. The above-mentioned receiving the preset audio data sent by the mobile terminal through Wi-Fi means that the mobile terminal sends the audio data to the wireless earphones in the form of Wi-Fi transmission, and the wireless earphones receive the audio data and decode and restore it through their own decoder. Optionally, the built-in decoder of the present application is preferably a dual DAC, and the dual DAC has a higher decoding efficiency and can provide lossless audio to wireless users without delay.
[0063] In one embodiment, the step of receiving the Bluetooth connection request and Wi-Fi connection request of the mobile terminal and establishing a Bluetooth connection and a Wi-Fi connection with the mobile terminal includes:
[0064] S201. Receive the Bluetooth connection request of the mobile terminal and establish a Bluetooth connection with the mobile terminal;
[0065] S202. Receive the Wi-Fi connection request of the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of Wi-Fi, and establish a Wi-Fi connection with the mobile terminal through the set Wi-Fi protocol.
[0066] In this embodiment, the wireless earphone includes a Bluetooth module and a Wi-Fi module. The Wi-Fi connection relationship between the wireless earphone and the mobile terminal is usually controlled by the Wi-Fi module. In this embodiment, by using the protocol content of Bluetooth, the protocol data of Wi-Fi is set to achieve the purpose of controlling the Wi-Fi connection relationship by the Bluetooth module. Specifically, the content of the Bluetooth protocol LMP is added to the Wi-Fi protocol. The content of the LMP protocol is mainly used to control the master-slave role switching, link monitoring, device name request, link key, connection, disconnection, sleep, encryption and other relationships between devices. The LMP protocol in the Wi-Fi protocol enables the Bluetooth module to monitor the Wi-Fi link by calling LMP and control the connection, disconnection, sleep, encryption, etc. of Wi-Fi. The transmission protocol of Wi-Fi is still its original protocol, that is, the transmission mechanism of Wi-Fi remains unchanged. The advantage of such a setting is to ensure that when the wireless earphone and the mobile terminal are connected via Bluetooth, the Wi-Fi connection between the wireless earphone and the mobile terminal can be turned on or off with almost zero latency. More specifically, the wireless earphone first establishes a Bluetooth connection with the mobile terminal, modifies the Wi-Fi protocol, and then establishes a Wi-Fi connection. Such an ordered connection relationship of first establishing a Bluetooth connection and then establishing a Wi-Fi connection enables the wireless earphone to control the Wi-Fi connection (the second connection relationship) through the Bluetooth connection (the first connection relationship) after establishing the Bluetooth connection (the first connection relationship).
[0067] In one embodiment, the step of receiving the preset audio data sent by the mobile terminal in a burst transmission mode through Wi-Fi, decoding and playing it includes:
[0068] S301. When receiving audio data of a preset capacity through Wi-Fi, switch Wi-Fi to the off state;
[0069] S302. Store the audio data of the preset capacity in the RAM of the wireless earphone and decode and play it;
[0070] S303. Monitor the capacity of the preset capacity of audio data that has been decoded and played. When the proportion of the capacity of the preset capacity of data that has been decoded and played reaches a preset ratio, switch Wi-Fi to the on state, and receive another preset capacity of audio data through Wi-Fi until the playback ends.
[0071] In this embodiment, a readable temporary storage medium is provided in the wireless earphone. The above-mentioned readable temporary storage medium is used to store the preset audio data sent by the mobile terminal. The wireless earphone decodes the preset audio data in the readable temporary storage medium through a built-in decoder and plays it. Since the readable temporary storage medium has the characteristics of large storage capacity, fast reading speed, and fast transmission speed in cooperation with wifi, a mobile terminal can transmit a segment of audio data to be played to the wireless earphone through wifi and store it in the readable temporary storage medium. At this time, the wireless earphone has a segment of audio data to be played, and the wifi can be turned off to achieve an energy-saving effect. When the audio data in the readable temporary storage medium has been decoded and played or the decoded and played reaches a preset ratio (for example, 85%, 90% or 95% is decoded and played), the wifi is switched to the on state at this time, and another segment of audio data to be played is received through wifi and transmitted to the wireless earphone and stored in the readable temporary storage medium, and the cycle is repeated in turn to provide lossless audio to the wireless user without delay until the playback ends. In this embodiment, the size of the preset capacity of the audio data received last time and the size of the data of the preset capacity received next time can be the same or different. Optionally, in this embodiment, the same size of the preset capacity of data is received each time.
[0072] In one embodiment, switching the wifi to the off state is to control the wifi module by the bluetooth module to disconnect the wifi connection with the mobile terminal; switching the wifi to the on state is to control the wifi module by the bluetooth module to establish a wifi connection with the mobile terminal.
[0073] In one embodiment, before the step of receiving another preset capacity of audio data through wifi, it further includes:
[0074] Obtain the sampling rate, bit depth and number of channels of the audio data from the received preset audio data;
[0075] Adjust the size of the preset capacity according to the sampling rate, bit depth and number of channels of the audio data.
[0076] In this embodiment, for sounds of the same duration, if the values of the sampling rate (the number of samples extracted from the continuous signal per second and composed into a discrete signal) and bit depth (i.e., the sampling depth, representing the fineness of the recording of the sound intensity in the sampling) of the audio data are large, it means that the audio data capacity is large. If the audio data capacity is large, more storage space is required. Therefore, the size of the preset capacity can be adjusted according to the sampling rate, bit depth and number of channels of the audio data.
[0077] In one embodiment, the step of adjusting the size of the preset capacity according to the sampling rate, bit depth and number of channels of the audio data specifically includes:
[0078] Define the preset capacity = X, the sampling rate = a, and the bit depth = b. Then:
[0079] X = a * b * α, where α = number of channels / preset duration, and α represents the proportionality coefficient related to the number of channels and the preset duration of the audio data.
[0080] In this embodiment, if the number of channels of the audio data to be acquired is 6 and 3 minutes of audio data is desired, then α can be set to 6 / (3 * 60). For another example, if the number of channels of the audio data to be acquired is 3 and 5 minutes of audio data is desired, then α can be set to 3 / (5 * 60); in practical applications, lossless audio is basically 5.1 channels, and the actual number of channels is 6. The value of α can be defined as α = 6 / duration according to the desired acquisition duration.
[0081] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), etc., or a Random Access Memory (RAM), etc.
[0082] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. Their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
[0083] Further reference Figure 2 , as an implementation of the method shown above Figure 1 , the present application provides an embodiment of a wireless headphone audio data transmission device. This device embodiment corresponds to Figure 2 the method embodiment shown, and this device can be specifically applied to various electronic devices.
[0084] Such as Figure 2As shown in the figure, the wireless headphone audio data transmission device described in this embodiment includes: a startup module 100, a connection module 200, and an audio playback module 300. Among them:
[0085] The startup module 100 is used to turn on and start the Bluetooth module and the Wi-Fi module of the wireless headphones;
[0086] The connection module 200 is used to receive Bluetooth connection requests and Wi-Fi connection requests from the mobile terminal, and establish Bluetooth connections and Wi-Fi connections with the mobile terminal;
[0087] The audio playback module 300 is used to receive the preset audio data sent by the mobile terminal in a burst transmission mode via Wi-Fi, decode and play it.
[0088] In the startup module 100, the above-mentioned wireless headphones refer to wireless headphones that have both a Bluetooth module and a Wi-Fi module at the same time. The form of the wireless headphones can be earbuds, ear-hook headphones, neckband headphones, and over-ear headphones. Optionally, the present application preferably uses wireless neckband headphones. After the wireless neckband headphones are worn properly, the weight of the headphones falls on the back of the neck, reducing the burden on the ears when wearing the headphones, being comfortable to wear and not easy to fall off. And by setting magnets at the front section of the neckband, the headphones can be adsorbed on the front section of the neckband, making it more convenient to take and use, and more suitable for sports. At the same time, the left and right headphones of the wireless neckband headphones can be wired to the same audio processing device, and there is no time and sound effect difference in listening between the left and right headphones.
[0089] In the connection module 200, the above-mentioned mobile terminal can be various electronic devices with voice playback functions and capable of Wi-Fi and Bluetooth connections, including but not limited to smartphones, tablets, MP3 players, laptops, in-vehicle players, etc. Optionally, when the mobile terminal is a smartphone, the above-mentioned mobile phone can find the wireless headphones through the Bluetooth and Wi-Fi settings pages for connection, or can also establish Bluetooth connections and Wi-Fi connections with the wireless headphones through the UI interface of a specific App. For example, establish Bluetooth connections and Wi-Fi connections with the wireless headphones through "TitanSound".
[0090] In the audio playback module 300, the above-mentioned burst transmission mode means receiving a segment of data, and then receiving another segment of data after a certain time interval. The above-mentioned receiving the preset audio data sent by the mobile terminal via Wi-Fi means that the mobile terminal sends the audio data to the wireless headphones in the form of Wi-Fi transmission, and the wireless headphones receive the audio data and decode and restore it through their own decoders. Optionally, the built-in decoder of the present application is preferably a dual DAC, and the dual DAC has higher decoding efficiency and can provide lossless audio to wireless users without delay.
[0091] In one embodiment, the connection module includes:
[0092] A Bluetooth connection unit, configured to receive a Bluetooth connection request from the mobile terminal and establish a Bluetooth connection with the mobile terminal;
[0093] A Wifi connection unit, configured to receive a wifi connection request from the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of wifi, and establish a wifi connection with the mobile terminal through the set wifi protocol.
[0094] In this embodiment, in the wireless earphone, there are a Bluetooth module and a wifi module. The wifi connection relationship between the wireless earphone and the mobile terminal is usually controlled by the wifi module. In this embodiment, by using the protocol content of Bluetooth, the protocol data of wifi is set to achieve the purpose of controlling the wifi connection relationship by the Bluetooth module. Specifically, the content of the Bluetooth protocol LMP is added to the wifi protocol. The content of the LMP protocol is mainly used to control the master-slave role switching, link monitoring, device name request, link secret key, connection, disconnection, sleep, encryption, etc. between devices. The LMP protocol in the wifi protocol enables the Bluetooth module to monitor the wifi link by calling LMP and control the connection, disconnection, sleep, encryption, etc. of wifi. The transmission protocol of WIFI is still its original protocol, that is, the transmission mechanism of wifi has not changed. The advantage of such a setting is to ensure that when the wireless earphone and the mobile terminal are in a Bluetooth connection, the wifi connection between the wireless earphone and the mobile terminal can be turned on or off with almost zero latency. More specifically, the wireless earphone first establishes a Bluetooth connection with the mobile terminal, modifies the wifi protocol, and then establishes a wifi connection. Such an ordered connection relationship of first establishing a Bluetooth connection and then establishing a wifi connection enables the wireless earphone to control the wifi connection (the second connection relationship) through the Bluetooth connection (the first connection relationship) after establishing the Bluetooth connection (the first connection relationship).
[0095] In one embodiment, the audio playback module 300 includes:
[0096] A switching unit, configured to switch wifi to the off state when receiving audio data of a preset capacity through wifi;
[0097] A playback unit, configured to store the audio data of the preset capacity in the RAM of the wireless earphone and decode and play it;
[0098] A monitoring unit, configured to monitor the capacity of the audio data of the preset capacity that has been decoded and played. When the ratio of the capacity of the preset capacity of data that has been decoded and played reaches a preset ratio, switch wifi to the on state and receive another preset capacity of audio data through wifi until the playback ends.
[0099] In this embodiment, a readable temporary storage medium is provided in the wireless earphone. The readable temporary storage medium is used to store preset audio data sent by the mobile terminal. The wireless earphone decodes the preset audio data in the readable temporary storage medium through a built-in decoder and plays it. Since the readable temporary storage medium has the characteristics of large storage capacity, fast reading speed, and fast transmission speed in cooperation with wifi, a mobile terminal can transmit a segment of audio data to be played to the wireless earphone through wifi and store it in the readable temporary storage medium. At this time, the wireless earphone has a segment of audio data to be played, and the wifi can be turned off to achieve an energy-saving effect. When the audio data in the readable temporary storage medium has been decoded and played or the decoded and played reaches a preset ratio (for example, 85%, 90%, or 95% has been decoded and played), the wifi is switched to the on state at this time, and another segment of audio data to be played is transmitted to the wireless earphone through wifi and stored in the readable temporary storage medium again, and so on in a cycle, so as to provide lossless audio to the wireless user without delay until the playback ends. In this embodiment, the capacity of the preset capacity of the audio data received last time and the data of the preset capacity received next time can be the same or different. Optionally, in this embodiment, the same size of preset capacity data is received each time.
[0100] In one embodiment, switching the wifi to the off state is to control the wifi module to disconnect the wifi connection with the mobile terminal through the bluetooth module; switching the wifi to the on state is to control the wifi module to establish a wifi connection with the mobile terminal through the bluetooth module.
[0101] In one embodiment, the monitoring unit is further configured to:
[0102] Obtain the sampling rate, bit depth, and number of channels of the audio data from the received preset audio data;
[0103] Adjust the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio data.
[0104] In this embodiment, for sounds of the same duration, if the values of the sampling rate (the number of samples extracted from a continuous signal per second and composed into a discrete signal) and bit depth (i.e., the sampling depth, representing the fineness of recording the sound intensity in the sampling) of the audio data are large, it means that the audio data has a large capacity. If the audio data has a large capacity, more storage space is required. Therefore, the size of the preset capacity can be adjusted according to the sampling rate, bit depth, and number of channels of the audio data.
[0105] In one embodiment, the monitoring unit is further configured to:
[0106] Define the preset capacity = X, the sampling rate = a, and the bit depth = b, then:
[0107] X = a * b * α, where α = number of channels / preset duration, and α represents a proportionality coefficient related to the number of channels and preset duration of the audio data.
[0108] In this embodiment, if the number of channels of the audio data to be obtained is 6 and 3 minutes of audio data is to be obtained, then α can be set to 6 / (3 * 60). For another example, if the number of channels of the audio data to be obtained is 3 and 5 minutes of audio data is to be obtained, then α can be set to 3 / (5 * 60). In practical applications, lossless audio is basically 5.1 channels, and the actual number of channels is 6. The value of α can be defined as α = 6 / duration according to the duration to be obtained.
[0109] To solve the above technical problems, the embodiments of the present application also provide a computer device. Specifically, please refer to Figure 5 , Figure 5 which is the basic structural block diagram of the computer device in this embodiment.
[0110] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are communicatively connected to each other through a system bus. It should be noted that only the computer device 6 with components 61 - 63 is shown in the figure. However, it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented. Among them, those skilled in the art of the present technology can understand that a computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0111] The computer device can be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The computer device can interact with the user through a keyboard, a mouse, a remote control, a touchpad, a voice control device, or other means.
[0112] The memory 61 includes at least one type of readable storage medium, which includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disc, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, FlashCard, etc. equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit and the external storage device of the computer device 6. In this embodiment, the memory 61 is generally used to store the operating system and various application software installed in the computer device 6, such as the program code of the wireless headphone audio data transmission method. In addition, the memory 61 may also be used to temporarily store various data that have been output or will be output.
[0113] In some embodiments, the processor 62 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 62 is generally used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run the program code stored in the memory 61 or process data, such as running the program code of the wireless headphone audio data transmission method.
[0114] The network interface 63 may include a wireless network interface or a wired network interface, and the network interface 63 is generally used to establish a communication connection between the computer device 6 and other electronic devices.
[0115] The present application also provides another implementation manner, that is, to provide a computer-readable storage medium storing a program of a wireless headphone audio data transmission method, and the program of the wireless headphone audio data transmission method can be executed by at least one processor, so that the at least one processor executes the steps of the wireless headphone audio data transmission method as described above.
[0116] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0117] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The accompanying drawings show the preferred embodiments of the present application, but do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosed content of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing specific embodiments, or perform equivalent replacements on some of the technical features. Any equivalent structure directly or indirectly using the content of the specification and drawings of the present application in other related technical fields is equally within the scope of the patent protection of the present application.
Claims
1. A method for transmitting audio data of wireless earphones, characterized in that, including the following steps: Start the Bluetooth module and the Wi-Fi module; Receive the Bluetooth connection request and the Wi-Fi connection request of the mobile terminal, and establish a Bluetooth connection and a Wi-Fi connection with the mobile terminal; Receive the preset audio data sent by the mobile terminal in burst transmission mode via Wi-Fi, decode and play it; The burst transmission mode is that when the preset audio data has been decoded and played or the decoded and played reaches a preset ratio, receive another segment of preset audio data to be played via Wi-Fi and store it in the readable temporary storage medium, and cycle in turn; The step of receiving the Bluetooth connection request and the Wi-Fi connection request of the mobile terminal and establishing a Bluetooth connection and a Wi-Fi connection with the mobile terminal specifically includes: Receive the Bluetooth connection request of the mobile terminal and establish a Bluetooth connection with the mobile terminal; Receive the Wi-Fi connection request of the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of Wi-Fi, and establish a Wi-Fi connection with the mobile terminal through the set Wi-Fi protocol, where LMP is used to control the master-slave role switching, link monitoring, device name request, link secret key, connection, disconnection, sleep, and encryption relationship between devices, so that the Bluetooth module can monitor the Wi-Fi link by calling LMP and control the connection, disconnection, sleep, and encryption of Wi-Fi.
2. The method for transmitting audio data of a wireless headset according to claim 1, characterized in that, The step of receiving the preset audio data sent by the mobile terminal in burst transmission mode via Wi-Fi, decoding and playing it specifically includes: When receiving the audio data of a preset capacity via Wi-Fi, switch Wi-Fi to the off state; Store the audio data of the preset capacity in the RAM of the wireless headset and decode and play it; Monitor the capacity of the preset capacity of audio data that has been decoded and played. When the ratio of the capacity of the preset capacity of data that has been decoded and played reaches a preset ratio, switch Wi-Fi to the on state and receive another preset capacity of audio data via Wi-Fi until the playback ends.
3. The method for transmitting audio data of wireless earphones according to claim 2, wherein Switching Wi-Fi to the off state is to control the Wi-Fi module by the Bluetooth module to disconnect the Wi-Fi connection with the mobile terminal; switching Wi-Fi to the on state is to control the Wi-Fi module by the Bluetooth module to establish a Wi-Fi connection with the mobile terminal.
4. The method for wireless headphone audio data transmission according to claim 2, wherein Before the step of receiving another preset capacity of audio data via Wi-Fi, it further includes: Obtain the sampling rate, bit depth, and number of channels of the audio data from the received preset audio data; Adjust the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio data.
5. The method for wireless headphone audio data transmission according to claim 4, wherein The step of adjusting the size of the preset capacity according to the sampling rate, bit depth, and number of channels of the audio data specifically includes: Define the preset capacity = X, the sampling rate = a, the bit depth = b, then: X = a * b * α, α = number of channels / preset duration, and α represents the proportionality coefficient related to the number of channels and the preset duration of the audio data.
6. An audio data transmission device for a wireless earphone, characterized in that, including: A start module for the wireless headset to turn on and start the Bluetooth module and the Wi-Fi module; A connection module, configured to receive Bluetooth connection requests and Wi-Fi connection requests from a mobile terminal, and establish Bluetooth connections and Wi-Fi connections with the mobile terminal; An audio playback module, configured to receive preset audio data sent by the mobile terminal in a burst transmission mode via Wi-Fi, decode and play the data; Wherein, the burst transmission mode is that when the preset audio data has been decoded and played or the decoded and played data reaches a preset ratio, another segment of preset audio data to be played is received via Wi-Fi and transmitted to the wireless earphone and stored in a readable temporary storage medium, and this process is repeated in sequence; The connection module includes: A Bluetooth connection unit, configured to receive the Bluetooth connection request from the mobile terminal and establish a Bluetooth connection with the mobile terminal; A Wi-Fi connection unit, configured to receive the Wi-Fi connection request from the mobile terminal, add the content of LMP in the Bluetooth protocol to the protocol data of Wi-Fi, and establish a Wi-Fi connection with the mobile terminal through the set Wi-Fi protocol; Wherein, the LMP is used to control master-slave role switching, link monitoring, device name request, link secret key, connection, disconnection, sleep, and encryption relationship between devices, so that the Bluetooth module can monitor the Wi-Fi link by invoking the LMP and control the connection, disconnection, sleep, and encryption of Wi-Fi.
7. A wireless earphone, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the wireless earphone audio data transmission method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the wireless earphone audio data transmission method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method and system for realizing voice interaction by using wireless earphone and wireless earphone
CN106878850A
Wireless audio streaming system for swimmers and under water applications
US20180234190A1