CN109151783A - Data transmission method, device, electronic equipment and storage medium - Google Patents
Data transmission method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109151783A CN109151783A CN201810924554.9A CN201810924554A CN109151783A CN 109151783 A CN109151783 A CN 109151783A CN 201810924554 A CN201810924554 A CN 201810924554A CN 109151783 A CN109151783 A CN 109151783A
- Authority
- CN
- China
- Prior art keywords
- data
- audio
- electronic equipment
- audio data
- player device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/06—Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the present application discloses a kind of data transmission method, device, electronic equipment and storage medium, is applied to electronic equipment, which comprises when the electronic equipment exports audio data, detects the connection status between the electronic equipment and other equipment;When the electronic equipment and audio-frequence player device bluetooth connection, removal needs to be transmitted to the setting data in the audio data of the audio-frequence player device, and the setting data include the data of high frequency section and/or low frequency part;The audio-frequence player device will be transmitted to after audio data coding after the removal setting data.This method can promote the transmission speed of audio data, reduce the transmission delay of audio data, promote user experience.
Description
Technical field
This application involves technical field of electronic equipment, set more particularly, to a kind of data transmission method, device, electronics
Standby and storage medium.
Background technique
Electronic equipment, such as mobile phone, tablet computer etc. have become most common consumer electronics in people's daily life
One of product.When user uses electronic equipment, electronics can be received commonly using the audio-frequence player device connecting with electronic equipment
The audio-frequency information of equipment.But the received audio-frequency information of audio-frequence player device usually there will be delay, make the experience of user by
It influences.
Summary of the invention
In view of the above problems, present applicant proposes a kind of data transmission method, device, electronic equipment and storage medium, with
The transmission delay of audio data is reduced, user experience is promoted.
In a first aspect, the embodiment of the present application provides a kind of data transmission method, it is applied to electronic equipment, the method packet
It includes: when the electronic equipment exports audio data, detecting the connection status between the electronic equipment and other equipment;Work as institute
When stating electronic equipment and audio-frequence player device bluetooth connection, removal needs to be transmitted in the audio data of the audio-frequence player device
Setting data, it is described setting data include high frequency section and/or low frequency part data;After the removal is set data
Audio data coding after be transmitted to the audio-frequence player device.
Second aspect, the embodiment of the present application provide a kind of data transmission device, are applied to electronic equipment, described device packet
It includes: communication check module, audio processing modules and data transmission blocks, wherein the communication check module is used for described
When electronic equipment exports audio data, the connection status between the electronic equipment and other equipment is detected;The audio processing
Module is used for when the electronic equipment and audio-frequence player device bluetooth connection, and removal needs to be transmitted to the audio-frequence player device
Audio data in setting data, it is described setting data include high frequency section and/or low frequency part data;The data hair
Send module for the audio-frequence player device will to be transmitted to after the audio data coding after the removal setting data.
The third aspect, the embodiment of the present application provide a kind of electronic equipment, including memory, processor and bluetooth mould
Block, the memory and the bluetooth module are couple to the processor, the memory store instruction, when described instruction by
The processor executes the data transmission method that above-mentioned first aspect provides when processor execution.
Fourth aspect, the embodiment of the present application also provides a kind of computers of program code that can be performed with processor can
Read storage medium, which is characterized in that said program code makes the processor execute the data biography that above-mentioned first aspect provides
Transmission method.
Compared with the existing technology, data transmission method provided by the present application, device, electronic equipment and storage medium, pass through
When electronic equipment exports audio data, the connection status between electronic equipment and other equipment is detected, when electronic equipment and sound
When frequency playback equipment bluetooth connection, removal needs to be transmitted to the setting data in the audio data of audio-frequence player device, wherein sets
Fixed number passes after the audio data coding after removal finally to be set to data according to the data for including high frequency section and/or low frequency part
Audio-frequence player device is transported to, thus get higher electronic equipment by the efficiency of blue tooth transmission audio frequency data to audio-frequence player device,
The transmission delay of audio data is reduced, user experience is promoted.
These aspects or other aspects of the application can more straightforward in the following description.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for
For those skilled in the art, without creative efforts, it can also be obtained according to these attached drawings other attached
Figure.
Fig. 1 shows the flow chart of the data transmission method of one embodiment of the application offer;
Fig. 2 shows the flow charts for the data transmission method that another embodiment of the application provides;
Fig. 3 shows the flow chart of step S230 in data transmission method provided by the embodiments of the present application;
Fig. 4 shows the process for the data transmission method that the another embodiment of the application provided by the embodiments of the present application proposes
Figure;
Fig. 5 shows the structural block diagram of the display control unit of the embodiment of the present application proposition;
Fig. 6 shows setting for executing according to the electronics of the data transmission method of the embodiment of the present application for the embodiment of the present application
Standby block diagram.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
Currently, with the progress of science and technology, most electronic equipment can be played out audio data.Wherein, electronics
The audio framework of equipment and the audio framework of computer are similar, mainly by processor and built-in audio CODEC (codec)
To complete.Specifically, after processor receives the input of audio data, it is converted to I2S (Inter-IC Sound, in integrated circuit
Set audio-frequency bus) signal, and be transmitted to CODEC and be converted into analog signal, then play out.
As the further development of science and technology and the increase in demand of user, electronic equipment can be played with external audio frequency
Equipment connection, passes through the audio-frequence player device playing audio-fequency data.Audio-frequence player device may include earphone, speaker and vehicle
Carry equipment etc..The audio-frequence player device connecting with electronic equipment can receive the audio data that electronic equipment comes, and will
Audio data plays out.Wherein, electronic equipment can be connect by wired mode or wireless mode with audio-frequence player device.
And currently, user generallys use wireless mode and connect audio-frequence player device with electronic equipment, realization audio is broadcast
Put device plays audio data.When audio-frequence player device is wirelessly connect with electronic equipment, electronic equipment connects with it
The audio-frequence player device connect needs just carry out data transmission using network.For example, electronic equipment and audio-frequence player device need
Carried out data transmission using Wireless Fidelity (Wireless Fidelity, WiFi) connection or electronic equipment is set with audio broadcasting
It is standby to need to carry out data transmission using bluetooth (Bluetooth, BT) connection.In most cases, electronic equipment can lead to
It crosses bluetooth to connect with audio-frequence player device, and audio data is transmitted to by audio-frequence player device by bluetooth and is played out.
But since audio data is transmitted to audio-frequence player device by electronic equipment, audio number is received to audio-frequence player device
According to, can have certain transmission delay, so as to cause audio-frequence player device play sound it is not real-time, thereby increases and it is possible to electronic equipment
The picture of display is asynchronous etc., causes the experience of user bad.
In view of the above-mentioned problems, inventor is by studying for a long time and proposing data transmission provided by the embodiments of the present application
Method, apparatus, electronic equipment and storage medium, by being set in electronic equipment by blue tooth transmission audio frequency data to audio broadcasting
When standby broadcasting, it is transmitted to audio-frequence player device after re-encoding after the setting data in audio data that removal needs transmit, is promoted
The efficiency of transmission of audio data reduces the transmission delay of audio data, promotes user experience.Wherein, specific transmission side data
Method is described in detail in subsequent embodiment.
In one embodiment, referring to Fig. 1, Fig. 1 shows the stream of data transmission method provided by the embodiments of the present application
Journey schematic diagram.The data transmission method in electronic equipment by blue tooth transmission audio frequency data to audio-frequence player device by being played
When, removal needs to be transmitted to audio-frequence player device after re-encoding after the setting data in the audio data that transmits, promotes audio number
According to efficiency of transmission, reduce the transmission delay of audio data, promote user experience.In the particular embodiment, the data pass
Transmission method is applied to the data transmission device 400 as shown in Fig. 5 and the electronics configured with the data transmission device 400 is set
Standby (Fig. 6).It will illustrate the detailed process of the present embodiment by taking electronic equipment as an example below, it will of course be understood that, the present embodiment
Applied electronic equipment can be smart phone, tablet computer, wearable electronic equipment etc., not do specific restriction herein.
It will be explained in detail below for process shown in FIG. 1, above-mentioned data transmission method specifically may include following step
It is rapid:
Step S110: it when the electronic equipment exports audio data, detects between the electronic equipment and other equipment
Connection status.
Audio data is transmitted to audio-frequence player device and broadcast by electronic equipment frequently by connection audio-frequence player device
It puts.And user higher for demand can utilize the Bluetooth function of electronic equipment, and audio-frequence player device is made to pass through bluetooth and electricity
Sub- equipment connection, realizes the broadcasting of above-mentioned audio data.And audio data is transmitted to audio by Bluetooth communication in electronic equipment
When playback equipment plays out, there can be the transmission delay of audio data, keep the broadcasting of audio data not real-time.If electronics is set
When audio corresponding for dynamic menu for the audio data transmitted, electronic equipment is also resulted in when showing a picture, and audio
Playback equipment does not receive the audio data of the picture, keeps the broadcasting of picture asynchronous with the broadcasting of sound, therefore can be to electricity
Sub- equipment is handled by the case where blue tooth transmission audio frequency data.
In the embodiment of the present application, audio data whether can be exported to electronic equipment to detect.It is understood that
When electronic equipment has audio data output, then needs to consider the transmission delay of audio data and handled, and in no audio
When data export, then do not need to be handled.Specifically, whether can have processing audio data or audio by processor
Whether codec works, and judges whether electronic equipment has audio data output.
It, then can be further to the connection shape between electronic equipment and other equipment when electronic equipment exports audio data
State is detected, to confirm whether electronic equipment is just being played out using blue tooth transmission audio frequency data to electronic equipment, so as to
It handles using the case where audio-frequence player device playing audio-fequency data with electronic equipment bluetooth connection.
Step S120: when the electronic equipment and audio-frequence player device bluetooth connection, removal needs to be transmitted to the sound
Setting data in the audio data of frequency playback equipment, the setting data include the data of high frequency section and/or low frequency part.
In the embodiment of the present application, electronic equipment can be with other equipment bluetooth connection.Therefore, when other equipment and electronics
When equipment passes through bluetooth connection by bluetooth connection or electronic equipment and other equipment, step S110 can detecte presence
Electronic equipment and other equipment bluetooth connection.For example, detecting the bluetooth function of electronic equipment and other equipment in step S110
Can, and when the other equipment successful matching of the electronic equipment and unlatching Bluetooth function, then it can determine that other equipment electronics is set
Standby bluetooth connection.
Further, the device type for the other equipment that can also be connect with electronic equipment Bluetooth communication, with determine with
Whether the equipment that electronic equipment is communicatively coupled by bluetooth is audio-frequence player device.
Case-based Reasoning can be passed through in the electronic equipment based on android (Android) operating system as a kind of mode
Change the obtained return value of BluetoothClass.Device class to determine the currently device type by bluetooth connection.If returning
The value returned is AUDIO_VIDEO_CAMCORDER, then is characterized as image capture device;If the value returned is AUDIO_VIDEO_
CAR_AUDIO is then characterized as mobile unit;If the value returned is AUDIO_VIDEO_HIFI_AUDIO, it is characterized as audio and broadcasts
Equipment or video playback apparatus are put, for example, bluetooth headset;If the value returned is AUDIO_VIDEO_MICROPHONE, table
It is levied as microphone.
It is thus possible to detect the case where electronic equipment and audio-frequence player device are connected by Bluetooth communication.In the application
In embodiment, when detecting electronic equipment and audio-frequence player device bluetooth connection, then it can determine that electronic equipment passes through indigo plant
Tooth transmission audio data to audio-frequence player device plays out, therefore handles the transmission delay of audio data.
In the embodiment of the present application, detecting electronic equipment by blue tooth transmission audio frequency data to audio-frequence player device
When, the audio data for needing to be transmitted to audio-frequence player device can be handled, the setting data in audio data are carried out
Removal.
Wherein, electronic equipment can be by filter to the data of high frequency section and/or low frequency part in audio data
It is filtered, to remove the data of high frequency section and/or low frequency part.It is understood that above-mentioned filter high-frequency part and/or
The data of low frequency part are it is to be understood that letter to high-frequency band and low frequency band in the corresponding audio signal of audio data
It number is filtered.In the embodiment of the present application, above-mentioned high-frequency band and low frequency band are referred to the audio frequency criteria for classifying,
Such as International Power association IEC581 standard and GB/T14277-93 national standard, high-frequency band can be 5~20KHz, low
Frequent section can be 30~150Hz.In some cases, the range of above-mentioned high-frequency band and low frequency band can also be appropriate
Becoming larger or become smaller, such as high-frequency band becomes 8~20KHz, or is 4~20KHz, low frequency band also can be changed to 20~
150Hz, or for 20~80Hz etc., certainly, the above band limits is only for example, specific high-frequency band and low frequency band
Range in the embodiment of the present application can be not as restriction.
In the embodiment of the present application, the high frequency section and/or low frequency in bandpass filter removal audio data be can use
Partial data.When the data for needing to remove high frequency section, then bandpass filter allow by frequency range be except high-frequency band with
Outer frequency range, filter can be multi-pass band bandpass filter at this time;When the data for needing to remove low frequency part, then bandpass filtering
Device allow by frequency range be frequency range in addition to low frequency band, filter may be multi-pass band bandpass filter at this time;When
Need to remove the data of high frequency section and low frequency part, then bandpass filter allow by frequency range be intermediate-frequency band.
High frequency section and/or low frequency part in the audio data for needing to be transmitted to audio-frequence player device by removal
After data, then the size for the audio data that the size of above-mentioned audio data can be made to be less than before removal setting data.
Step S130: the audio-frequence player device will be transmitted to after the audio data coding after the removal setting data.
In the embodiment of the present application, to need to be transmitted to audio-frequence player device audio data remove setting data it
Afterwards, then audio data can be encoded, by audio data coding at coded data transmission to audio-frequence player device, makes sound
Frequency playback equipment plays out after decoding to coded data, to export sound.It specifically can be with to the coding mode of audio data
Coded format as needed and choose, for example, the corresponding volume such as PCM coded format, WAV coded format, MP3 coded format
Code mode.
It is understood that since the above-mentioned audio data encoded is removal high frequency section and/or low frequency part
Data after data, therefore when being encoded to audio data, encoder complexity will reduce, and coding rate will add
Fastly, and after encoding the size of the audio data after the coding obtained is encoded compared to the audio data for not removing setting data
Data afterwards will be smaller.And the time it takes can be compared with when the audio data after coding is sent to audio-frequence player device
It is small.Since encoder complexity reduces, and the time that follow audio playback equipment is spent when being decoded also can be smaller.
It is thus possible to make electronic equipment when audio data is transmitted to audio-frequence player device by bluetooth, to audio number
According to code efficiency will improve, the efficiency of transmission of audio data can also be improved, so as to reduce the transmission of audio data
Time reduces the transmission delay of audio data.
Data transmission method provided by the embodiments of the present application detects electronic equipment when electronic equipment exports audio data
Connection status between other equipment, then when electronic equipment is connect by bluetooth with audio-frequence player device, removal needs
The setting data being transmitted in the audio data of audio-frequence player device, finally will be after the audio data coding after removal setting data
It is transmitted to audio-frequence player device, so that the efficiency of transmission of the code efficiency and audio data to audio data improves, to subtract
The transmission time of few audio data, reduces the transmission delay of audio data, promotes user experience.
In one embodiment, referring to Fig. 2, Fig. 2 shows the streams of data transmission method provided by the embodiments of the present application
Journey schematic diagram.To be explained in detail below for process shown in Fig. 2, the data transmission method can specifically include with
Lower step:
Step S210: it when the electronic equipment exports audio data, detects between the electronic equipment and other equipment
Connection status.
Step S220: when the electronic equipment and audio-frequence player device bluetooth connection, acquisition needs to be transmitted to the sound
The type of application program corresponding to the audio data of frequency playback equipment.
When detecting electronic equipment by blue tooth transmission audio frequency data to audio-frequence player device, needs can be transmitted to
The audio data of audio-frequence player device is handled, and is removed to the setting data in audio data.
In the embodiment of the present application, it can according to need the type for the application program for being transmitted to audio-frequence player device to audio
Setting data in data are removed.It is to be appreciated that requirement of the different types of application program to the sound of output is different,
Therefore the data for needing to remove can be determined according to the type of application program.
Firstly, the then type of the available application program for needing to be transmitted to audio-frequence player device, that is, export above-mentioned audio
The type of the application program of data.All application programs that can export audio data can be divided in advance in electronic equipment
Class, and sorted each application program is corresponded to and is stored under different types.It, can after determining destination application
To be matched the corresponding application program of above-mentioned audio data one by one with each application program of storage, answered with obtaining with above-mentioned
With the type where the application program of procedure match and the application program, so as to obtain the type of above-mentioned application program.
It is of course also possible to which being determined according to the content of audio data should after identifying to the content of the audio data of electronic equipment output
The type of the corresponding application program of audio data, such as can be obtained in the data by the identification of the content to audio data
Hold corresponding text information, the specifying information based on the text acquisition of information data content.Certainly, it is defeated specifically to obtain electronic equipment
The mode of the type of application program corresponding to audio data out is not intended as limiting in the embodiment of the present application.
Step S230: type removal audio data medium-high frequency part and/or low frequency portion based on the application program
The data divided.
It, then can be according to above-mentioned application program after the application type for obtaining the application program for exporting above-mentioned audio data
Type, remove the data of audio data medium-high frequency part and/or low frequency part.For example, for without the need for output low frequency sound
The application program of the type of sound can then remove the data of low frequency part in audio data;For without the need for output high frequency sound
The application program of the type of sound can then remove the data of audio data medium-high frequency part;If for high-frequency sound and low
Frequency sound can then remove the data of the high frequency section and low frequency part in audio data all without output demand simultaneously.
Specifically, referring to Fig. 3, step S230 may include:
Step S231: whether the type for judging the application program is setting type.
It is possible, firstly, to judge to need to export to the type of the application program of audio-frequence player device whether to be setting type, it should
Setting type can be the type for having the application program of output demand to one of low-frequency sound and high-frequency sound, i.e., at this
Class application program does not interfere with its result of broadcast for after the low frequency part or high frequency section loss in its audio data.For example,
Class application program is prompted, conversational class application program, Video chat class application program etc., these application programs need output low frequency sound
Sound and high-frequency sound cannot be lost, or need to export high-frequency sound and low-frequency sound cannot be lost.Certainly, the above setting type
It is only for example, it's not limited to that for specific setting type.
Step S232: if it is setting type, the data of audio data medium-high frequency part or low frequency part are removed.
When judging the type of application program of above-mentioned output audio data to set type, then it can remove and need to pass
The data of the high frequency section or low frequency part in the audio data of audio-frequence player device are transported to, i.e. removal high frequency section and low frequency portion
One of point.
In the embodiment of the present application, setting type may include the first setting type and the second setting type.It is applying
When the type of program is the first setting type, the data of the low frequency part in audio data can be removed;In the class of application program
When type is the second setting type, the data of the high frequency section in audio data can be removed.
It is understood that first sets the application program of type to need to export the high frequency section in its audio data
The application program of data, the data without exporting the low frequency part in audio data, i.e., the first setting type cannot lose
High frequency section in its sound exported.Second sets the application program of type to need to export the low frequency portion in its audio data
The application program of the data divided, the data without exporting the high frequency section in audio data, i.e., the second setting type cannot
Lose the low frequency part in the sound of its output.
For example, the application program of the first setting type can need to issue for prompt class application program, such application program
High frequency prompting sound, i.e., sharp sound, therefore the data of low frequency part in the audio data that it is exported can be removed, and retain it
The data of high frequency section make the sound played out that can still reach prompt effect;Second setting type application program can be
Conversational class application program, Video chat class application program etc., such application program is without the need for output audio data medium-high frequency portion
The data divided, and still need to export the data of the low frequency part in its audio data, therefore the audio of its output can be removed
The data of data medium-high frequency part, and retain the data of its low frequency part.Certainly, the above first setting type and the second setting
Type is only for example, and does not represent the restriction to the first setting type in the embodiment of the present application and the second setting type.
Step S233: if being not setting type, the number of audio data medium-high frequency part and low frequency part is removed
According to.
In the embodiment of the present application, the type for needing to be transmitted to the application program of the audio data of audio-frequence player device is not
When setting type, then it represents that the application program does not both need to export the data of the high frequency section in its audio data, does not need yet
The data of the low frequency part in audio data are exported, therefore, in the audio data that application program output can be removed simultaneously
The data of high frequency section and low frequency part make the size of audio data reach minimum, pass convenient for promoting subsequent audio data
Defeated efficiency maximizes the transmission delay for reducing audio data.
For example, the type of above-mentioned application program is news report class application program, speech recognition class application program, voice are broadcast
When reporting class application program, then the data of the high frequency section and low frequency part in the audio data of its output can be removed simultaneously,
It enables users to obtain the text information in the sound played.
Step S240: the audio-frequence player device will be transmitted to after the audio data coding after the removal setting data.
Finally, being transmitted to audio-frequence player device after removal to be set to the audio data coding after data again, play audio
Equipment plays out after decoding to the data after coding.
In the embodiment of the present application, it can also be transmitted to as needed corresponding to the audio data of the audio-frequence player device
Application program operation information, adjust to the processing frequency of the audio data.Obtained and the fortune according to the operation information
The processor of the corresponding electronic equipment of row information to the processing frequency of audio data, and based on the processing frequency to audio data into
Row processing.It should be understood that processing frequency is higher, the code execution of electronic equipment is faster, and sound delay time is lower, and processing frequency is got over
Low, the code execution of electronic equipment is slower, and sound delay time is higher, therefore, more demanding for sound delay time, and place can be improved
Frequency is managed, and it is lower for sound delay time requirement, it can suitably reduce processing frequency.
Data transmission method provided by the embodiments of the present application detects electronic equipment when electronic equipment exports audio data
Connection status between other equipment obtains output then when electronic equipment is connect by bluetooth with audio-frequence player device
Then the type of the application program of audio data determines the data for needing to remove high frequency section in its audio data according to type,
Perhaps the data of low frequency part are removed or remove the data of high frequency section and low frequency part simultaneously, and finally by audio
Audio-frequence player device is transmitted to after data encoding.To realize the specific requirements according to different types of application program, to audio
The data selective removal of low frequency and high frequency section in data, in the broadcasting effect for not influencing the audio data of application program output
While fruit, the efficiency of transmission of the code efficiency and audio data that make audio data is improved, and reduces the transmission of audio data
Delay.
In one embodiment, referring to Fig. 4, Fig. 4 shows the stream of data transmission method provided by the embodiments of the present application
Journey schematic diagram.To be explained in detail below for process shown in Fig. 4, the data transmission method can specifically include with
Lower step:
Step S310: it when the electronic equipment exports audio data, detects between the electronic equipment and other equipment
Connection status.
Step S320: when the electronic equipment and audio-frequence player device bluetooth connection, presently described electronic equipment is obtained
Transmit the propagation delay time of the audio data to the audio-frequence player device.
When detecting electronic equipment by blue tooth transmission audio frequency data to audio-frequence player device, needs can be transmitted to
The audio data of audio-frequence player device is handled, and is removed to the setting data in audio data.
In the embodiment of the present application, the details in audio data played for guarantee majority of case audio-frequence player device is not
It loses, the property of can choose handles the propagation delay time of audio data.Specifically, can be according to current audio data
Propagation delay time and determine whether to handle the transmission delay of audio data.
Further, available current electronic device transmits the propagation delay time of audio data to audio-frequence player device
Between.Wherein it is possible to by obtaining bluetooth codec institute used in electronic equipment audio data to audio-frequence player device
Corresponding data propagation delay time, the propagation delay time as audio data;Also available electronic equipment is broadcast with audio
The transmission time for putting the answer signal between equipment is set transmission time as electronic equipment audio data to audio broadcasting
The standby propagation delay time.Certainly, the propagation delay time of electronic equipment audio data to audio-frequence player device is specifically obtained
Between mode be not intended as limiting in the embodiment of the present application.
Step S330: when the propagation delay time is more than to be sized, removal needs to be transmitted to the audio and plays
The audio data medium-high frequency part of equipment and/or the data of low frequency part.
In the embodiment of the present application, after the transmission delay for obtaining above-mentioned audio data, it can be determined that propagation delay time
Between size whether be more than to be sized, to be determined whether at the propagation delay time to audio data according to judging result
Reason.
It is understood that the propagation delay time be less than be sized when, then can indicate current audio data
Transmission delay is lower, will not have an impact to the result of broadcast of audio data, i.e., user will not experience the delay and broadcast to audio
Put the influence for the sound that equipment is played.When the propagation delay time is more than to be sized, then current audio data can be indicated
Transmission delay it is higher, the result of broadcast of audio data can be had an impact.
For example, then removal needs to be transmitted to the audio of the audio-frequence player device when being more than 5 milliseconds in the propagation delay time
The data of data medium-high frequency part and/or low frequency part.Certainly, the above propagation delay time is only for example, and does not represent to this
Apply for the restriction of transmission delay in embodiment.
In addition, in the embodiment of the present application, in audio data source when music application, needing to be transmitted in removal
Setting data in the audio data of the audio-frequence player device may include:
Based on the play mode of the music application, removal needs to be transmitted to the audio number of the audio-frequence player device
According to medium-high frequency part or the data of low frequency part.
Be understood that when, music application at runtime, is likely to be at different play mode, such as can be the rank of nobility
Scholar's music playing mode, pop music play mode etc., in jazz play mode, usual musical sound is with high frequency
It is main, in pop music play mode usually based on low frequency.It therefore, can be according to different play mode, selective removal frequency
The data of data medium-high frequency part or low frequency part.
Therefore, can be when transmission delay be more than to be sized, removal needs to be transmitted to the audio number of audio-frequence player device
According to medium-high frequency part and/or the data of low frequency part, and guarantee the result of broadcast of music.
Step S340: the audio-frequence player device will be transmitted to after the audio data coding after the removal setting data.
In the embodiment of the present application, to need to be transmitted to audio-frequence player device audio data remove setting data it
Afterwards, then audio data can be encoded, by audio data coding at coded data transmission to audio-frequence player device, makes sound
Frequency playback equipment plays out after decoding to coded data.
Data transmission method provided by the embodiments of the present application detects electronic equipment when electronic equipment exports audio data
Connection status between other equipment obtains current then when electronic equipment is connect by bluetooth with audio-frequence player device
Then the transmission delay of audio data judges whether the transmission delay is more than to be sized, just remove when being more than to be sized
Setting data in audio data will finally be transmitted to audio-frequence player device and play out after audio data coding.To realize
Selectivity is removed the setting data in audio data, guarantees the integrality of some cases subaudio frequency data, makes audio
Information is not lost, while also improves the code efficiency of audio data and the efficiency of transmission of audio data, and reduces audio number
According to transmission delay.
In one embodiment, referring to Fig. 5, Fig. 5 shows data transmission device 400 provided by the embodiments of the present application
Module frame chart.The data transmission device 400 is applied to electronic equipment.It will be illustrated below for block diagram shown in fig. 5, it is described
Data transmission device 400 includes: communication check module 410, audio processing modules 420 and data transmission blocks 430.Wherein,
The communication check module 410 is used to detect the electronic equipment when the electronic equipment exports audio data and set with other
Connection status between standby;The audio processing modules 420 are used for when the electronic equipment and audio-frequence player device bluetooth connection
When, removal needs to be transmitted to the setting data in the audio data of the audio-frequence player device, and the setting data include high frequency
The data of part and/or low frequency part;The data transmission blocks 430 are used for the audio data after the removal setting data
Coded transmission is to the audio-frequence player device.
In the embodiment of the present application, which may include: that type acquiring unit and data removal are single
Member.Wherein, type acquiring unit is used to obtain application corresponding to the audio data for needing to be transmitted to the audio-frequence player device
The type of program;Data removal unit removes audio data medium-high frequency part for the type based on the application program
And/or the data of low frequency part.
Further, data removal unit can be specifically used for: whether the type for judging the application program is setting class
Type;If it is setting type, the data of audio data medium-high frequency part or low frequency part are removed;If being not setting class
Type then removes the data of audio data medium-high frequency part and low frequency part.
Further, the setting type includes the first setting type and the second setting type.The data removal is single
Member execute if it is setting type, remove the data of audio data medium-high frequency part or low frequency part, may include:
When the type of the application program is the first setting type, the data of the low frequency part in the audio data are removed;Described
When the type of application program is the second setting type, the data of the high frequency section in the audio data are removed.
In the embodiment of the present application, which also may include: that delay acquiring unit and removal execute
Unit.Wherein, the delay acquiring unit is used to obtain when the electronic equipment is connect by bluetooth with audio-frequence player device
Audio data described in presently described electronic equipment to the audio-frequence player device propagation delay time;The removal executes
Unit is used for when the propagation delay time is more than to be sized, and removal needs to be transmitted to the audio of the audio-frequence player device
The data of data medium-high frequency part and/or low frequency part.
In the embodiment of the present application, which can also include: frequency regulation block.Frequency adjusts mould
Block is used for the operation information based on application program corresponding to the audio data for needing to be transmitted to the audio-frequence player device, adjustment
To the processing frequency of the audio data.
In one embodiment, referring to Fig. 6, based on above-mentioned data transmission method, device, the embodiment of the present application is also mentioned
One kind of confession can execute the electronic equipment 100 of aforementioned data transmission method.Electronic equipment 100 include intercouple one or
Multiple (one is only shown in figure) processors 102, memory 104 and bluetooth module 110.Being stored in the memory 104 can
To execute the corresponding program of data transmission method provided by the above embodiment, and processor 102 can execute the memory 104
The program of middle storage.
It will appreciated by the skilled person that every other component belongs to for the processor 102
It is coupled between peripheral hardware, the processor 102 and these peripheral hardwares by multiple Peripheral Interfaces.The Peripheral Interface can based on
Lower standard implementation: Universal Asynchronous Receive/sending device (Universal Asynchronous Receiver/Transmitter,
UART), universal input/output (General Purpose Input Output, GPIO), Serial Peripheral Interface (SPI) (Serial
Peripheral Interface, SPI), internal integrated circuit (Inter-Integrated Circuit, I2C), but not and limit
In above-mentioned standard.In some instances, the Peripheral Interface can only include bus;In other examples, the Peripheral Interface
May also include other elements, display controller such as one or more controller, such as connecting the display panel or
Person is used to connect the storage control of memory.In addition, these controllers can also be detached from the Peripheral Interface, and
It is integrated in the processor 102 or in corresponding peripheral hardware.
The memory 104 can be used for storing software program and module, and the processor 102 is stored in institute by operation
The software program and module in memory 104 are stated, thereby executing various function application and data processing.The memory
104 may include high speed random access memory, may also include nonvolatile memory, and such as one or more magnetic storage device dodges
It deposits or other non-volatile solid state memories.In some instances, the memory 104 can further comprise relative to institute
The remotely located memory of processor 102 is stated, these remote memories can pass through network connection to the electronic body portion 10
Or the main display 120.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile communication
Net and combinations thereof.
Bluetooth module 110 can be a kind of PCBA board of integrated Bluetooth function, short-distance wireless communication is used for, by function
It is divided into blue-teeth data module and blue tooth voice module, the former completes wireless data transmission, and the latter completes voice and stereo audio
Wireless data transmission.
Electronic equipment 100 (for example, being based on iPhone TM, can be based on Android TM for mobile phone or smart phone
Phone), portable gaming device (such as Nintendo DS TM, PlayStation Portable TM, Gameboy
Advance TM, iPhone TM), laptop computer, PDA, portable Internet appliance, music player and data storage
Equipment, other handheld devices and wrist-watch, earphone, pendant, earphone etc., electronic equipment 100 can also can be worn for others
Equipment is worn (for example, such as electronic glasses, electronics clothes, electronics bracelet, electronics necklace, electronics are tatooed, mobile terminal or intelligent hand
The headset equipment (HMD) of table).
In one embodiment, the embodiment of the present application provides a kind of calculating of program code that can be performed with processor
Machine read/write memory medium, said program code make the processor execute the data transmission method that above-mentioned first aspect provides.
In the embodiment of the present application, " computer-readable medium " can be it is any may include, store, communicating, propagating or
Transfer program uses for instruction execution system, device or equipment or in conjunction with these instruction execution systems, device or equipment
Device.The more specific example (non-exhaustive list) of computer-readable medium include the following: there are one or more wirings
Electrical connection section (electronic equipment), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk are read-only
Memory (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium because can then be edited for example by carrying out optical scanner to paper or other media, interpret or when necessary with
Other suitable methods are handled electronically to obtain described program, are then stored in computer storage.
In conclusion data transmission method provided by the present application, device, electronic equipment and storage medium, by electronics
When equipment exports audio data, detect the connection status between electronic equipment and other equipment, when electronic equipment by bluetooth with
When audio-frequence player device connects, removal needs to be transmitted to the setting data in the audio data of audio-frequence player device, wherein setting
Data include the data of high frequency section and/or low frequency part, are transmitted after the audio data coding after removal finally to be set to data
Subtract to audio-frequence player device so that electronic equipment be made to get higher by the efficiency of blue tooth transmission audio frequency data to audio-frequence player device
The transmission delay of few audio data, promotes user experience.
In the description of this specification, any process described otherwise above in flow chart or herein or method description can
To be understood to, indicate to include the steps that one or more for realizing the executable instruction of specific logical function or process
Module, segment or the part of code, and the range of the preferred embodiment of the application includes other realization, wherein can not
By sequence shown or discussed, including according to related function by it is basic simultaneously in the way of or in the opposite order, to hold
Row function, this should be understood by embodiments herein person of ordinary skill in the field.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries
It suddenly is that relevant hardware can be instructed to complete by program, the program can store in a kind of computer-readable storage medium
In matter, which when being executed, includes the steps that one or a combination set of embodiment of the method.In addition, in each embodiment of the application
In each functional unit can integrate in a processing module, be also possible to each unit and physically exist alone, can also two
A or more than two units are integrated in a module.Above-mentioned integrated module both can take the form of hardware realization, can also
It is realized in the form of using software function module.If the integrated module realized in the form of software function module and as
Independent product when selling or using, also can store in a computer readable storage medium.
Claims (10)
1. a kind of data transmission method, which is characterized in that be applied to electronic equipment, which comprises
When the electronic equipment exports audio data, the connection status between the electronic equipment and other equipment is detected;
When the electronic equipment and audio-frequence player device bluetooth connection, removal needs to be transmitted to the sound of the audio-frequence player device
Setting data of the frequency in, the setting data include the data of high frequency section and/or low frequency part;
The audio-frequence player device will be transmitted to after audio data coding after the removal setting data.
2. the method according to claim 1, wherein the removal needs to be transmitted to the audio-frequence player device
Setting data in audio data, comprising:
Obtain the type for needing to be transmitted to application program corresponding to the audio data of the audio-frequence player device;
Type based on the application program removes the data of audio data medium-high frequency part and/or low frequency part.
3. according to the method described in claim 2, it is characterized in that, the type based on the application program removes the audio number
According to medium-high frequency part and/or the data of low frequency part, comprising:
Whether the type for judging the application program is setting type;
If it is setting type, the data of audio data medium-high frequency part or low frequency part are removed;
If being not setting type, the data of audio data medium-high frequency part and low frequency part are removed.
4. according to the method described in claim 3, it is characterized in that, the setting type includes the first setting type and second
Type is set, if it is setting type, removes the data of audio data medium-high frequency part or low frequency part, comprising:
When the type of the application program is the first setting type, the data of the low frequency part in the audio data are removed;
When the type of the application program is the second setting type, the data of the high frequency section in the audio data are removed.
5. described the method according to claim 1, wherein the audio data source is in music application
Removal needs to be transmitted to the setting data in the audio data of the audio-frequence player device, comprising:
Based on the play mode of the music application, removal needs to be transmitted in the audio data of the audio-frequence player device
The data of high frequency section or low frequency part.
6. the method according to claim 1, wherein described when the electronic equipment is played by bluetooth and audio
When equipment connects, removal needs to be transmitted to the setting data in the audio data of the audio-frequence player device, comprising:
When the electronic equipment is connect by bluetooth with audio-frequence player device, sound described in presently described electronic equipment is obtained
Frequency is according to the propagation delay time to the audio-frequence player device;
When the propagation delay time is more than to be sized, removal needs to be transmitted to the audio data of the audio-frequence player device
The data of medium-high frequency part and/or low frequency part.
7. method according to claim 1-5, which is characterized in that the method also includes:
Based on the operation information of application program corresponding to the audio data for needing to be transmitted to the audio-frequence player device, institute is adjusted
State the processing frequency of audio data.
8. a kind of data transmission device, which is characterized in that be applied to electronic equipment, described device includes: communication check module, sound
Frequency processing module and data transmission blocks, wherein
The communication check module is used to detect the electronic equipment when the electronic equipment exports audio data and set with other
Connection status between standby;
The audio processing modules are used for when the electronic equipment is connect by bluetooth with audio-frequence player device, and removal needs to pass
The setting data in the audio data of the audio-frequence player device are transported to, the setting data include high frequency section and/or low frequency
Partial data;
The data transmission blocks are used to that the audio will to be transmitted to after the audio data coding after the removal setting data and broadcast
Put equipment.
9. a kind of electronic equipment, which is characterized in that including memory, processor and bluetooth module, the memory and institute
It states bluetooth module and is couple to the processor, the memory store instruction, institute when executed by the processor
It states processor and executes the method according to claim 1 to 7.
10. a kind of computer-readable storage medium for the program code that can be performed with processor, which is characterized in that the journey
Sequence code makes the processor execute the method according to claim 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810924554.9A CN109151783B (en) | 2018-08-14 | 2018-08-14 | Data transmission method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810924554.9A CN109151783B (en) | 2018-08-14 | 2018-08-14 | Data transmission method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109151783A true CN109151783A (en) | 2019-01-04 |
CN109151783B CN109151783B (en) | 2021-08-17 |
Family
ID=64793007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810924554.9A Active CN109151783B (en) | 2018-08-14 | 2018-08-14 | Data transmission method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109151783B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110677521A (en) * | 2019-10-24 | 2020-01-10 | 北京九狐时代智能科技有限公司 | Fixed-line equipment and audio signal processing method |
CN113141602A (en) * | 2020-01-16 | 2021-07-20 | 同响科技股份有限公司 | Low-delay Bluetooth voice and message transmission system and method |
CN114006890A (en) * | 2021-10-26 | 2022-02-01 | 深圳Tcl新技术有限公司 | Data transmission method, data transmission equipment, storage medium and terminal equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103200263A (en) * | 2013-04-02 | 2013-07-10 | 上海山景集成电路股份有限公司 | Intelligent terminal, Bluetooth audio playing device and interactive method and interactive system for intelligent terminal and Bluetooth audio playing device |
US20150131825A1 (en) * | 2013-11-14 | 2015-05-14 | Samsung Electronics Co., Ltd. | Audio output control method and apparatus |
CN206272831U (en) * | 2016-11-16 | 2017-06-20 | 深圳市冠旭电子股份有限公司 | A kind of audio playing circuit and Bluetooth audio frequency playback equipment |
CN107864432A (en) * | 2017-10-25 | 2018-03-30 | 努比亚技术有限公司 | Baffle Box of Bluetooth connection management method, terminal and computer-readable recording medium |
-
2018
- 2018-08-14 CN CN201810924554.9A patent/CN109151783B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103200263A (en) * | 2013-04-02 | 2013-07-10 | 上海山景集成电路股份有限公司 | Intelligent terminal, Bluetooth audio playing device and interactive method and interactive system for intelligent terminal and Bluetooth audio playing device |
US20150131825A1 (en) * | 2013-11-14 | 2015-05-14 | Samsung Electronics Co., Ltd. | Audio output control method and apparatus |
CN206272831U (en) * | 2016-11-16 | 2017-06-20 | 深圳市冠旭电子股份有限公司 | A kind of audio playing circuit and Bluetooth audio frequency playback equipment |
CN107864432A (en) * | 2017-10-25 | 2018-03-30 | 努比亚技术有限公司 | Baffle Box of Bluetooth connection management method, terminal and computer-readable recording medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110677521A (en) * | 2019-10-24 | 2020-01-10 | 北京九狐时代智能科技有限公司 | Fixed-line equipment and audio signal processing method |
CN113141602A (en) * | 2020-01-16 | 2021-07-20 | 同响科技股份有限公司 | Low-delay Bluetooth voice and message transmission system and method |
CN113141602B (en) * | 2020-01-16 | 2023-10-03 | 同响科技股份有限公司 | Low-delay Bluetooth voice message transmission system and method |
CN114006890A (en) * | 2021-10-26 | 2022-02-01 | 深圳Tcl新技术有限公司 | Data transmission method, data transmission equipment, storage medium and terminal equipment |
CN114006890B (en) * | 2021-10-26 | 2024-02-06 | 深圳Tcl新技术有限公司 | Data transmission method, device, storage medium and terminal device |
Also Published As
Publication number | Publication date |
---|---|
CN109151783B (en) | 2021-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109275129B (en) | Communication processing method, communication processing device, electronic equipment and storage medium | |
CN109151783A (en) | Data transmission method, device, electronic equipment and storage medium | |
CN109005582A (en) | Transmission power adjustment method, device, electronic equipment and storage medium | |
CN109445740A (en) | Audio frequency playing method, device, electronic equipment and storage medium | |
CN103366744B (en) | Based on the method and apparatus of Voice command portable terminal | |
CN106569774B (en) | Method and terminal for removing noise | |
CN109151861A (en) | Encoding rate method of adjustment, device and electronic equipment | |
CN109144642A (en) | Display control method, device, electronic equipment and storage medium | |
WO2020082705A1 (en) | Bluetooth speaker playing control method and system, and smart device | |
CN111816190A (en) | Voice interaction method and device for upper computer and lower computer | |
CN113080565A (en) | Intelligent helmet | |
CN109065050A (en) | A kind of sound control method, device, equipment and storage medium | |
CN105425951A (en) | Application interaction control method and device | |
EP4289129A1 (en) | Systems and methods of handling speech audio stream interruptions | |
CN109697987A (en) | A kind of the far field voice interaction device and implementation method of circumscribed | |
CN113096677B (en) | Intelligent noise reduction method and related equipment | |
CN113992965A (en) | Low-delay transmission method and system | |
CN116437256A (en) | Audio processing method, computer-readable storage medium, and electronic device | |
CN109524024B (en) | Audio playing method, medium, device and computing equipment | |
CN115038021B (en) | Real wireless stereo earphone, audio processing, lighting and vibration method | |
CN110168511B (en) | Electronic equipment and method and device for reducing power consumption | |
CN108962259A (en) | Processing method and the first electronic equipment | |
CN111556406B (en) | Audio processing method, audio processing device and earphone | |
CN110971744B (en) | Method and device for controlling voice playing of Bluetooth sound box | |
CN109243452A (en) | A kind of method and system for sound control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |