CN109150399A - Data transmission method, device, electronic equipment and computer-readable medium - Google Patents

Data transmission method, device, electronic equipment and computer-readable medium Download PDF

Info

Publication number
CN109150399A
CN109150399A CN201810923390.8A CN201810923390A CN109150399A CN 109150399 A CN109150399 A CN 109150399A CN 201810923390 A CN201810923390 A CN 201810923390A CN 109150399 A CN109150399 A CN 109150399A
Authority
CN
China
Prior art keywords
bandwidth
electronic equipment
audio
equipment
data
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
Application number
CN201810923390.8A
Other languages
Chinese (zh)
Other versions
CN109150399B (en
Inventor
龚金华
严锋贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810923390.8A priority Critical patent/CN109150399B/en
Publication of CN109150399A publication Critical patent/CN109150399A/en
Application granted granted Critical
Publication of CN109150399B publication Critical patent/CN109150399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0015Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0002Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

This application discloses a kind of data transmission method, device, electronic equipment and computer-readable mediums, are related to field of communication technology.This method comprises: whether the audio playing module for detecting electronic equipment receives the playing request of audio data when electronic equipment connects wireless audio playback equipment;If receiving playing request, the encoding rate for audio data to be sent to wireless audio playback equipment is determined;According to the corresponding relationship of preset bandwidth and encoding rate, the bandwidth of destination data link between electronic equipment and wireless audio playback equipment is improved;By the destination data link after raising bandwidth, audio data is sent to wireless audio playback equipment.When enabling to encoding rate higher, the bandwidth of destination data link is larger between electronic equipment and wireless audio playback equipment, can be improved the transmission speed of the data of high code-rate, reduces the generation of the Caton phenomenon in audio playing process.

Description

Data transmission method, device, electronic equipment and computer-readable medium
Technical field
This application involves field of communication technology, more particularly, to a kind of data transmission method, device, electronic equipment and Computer-readable medium.
Background technique
With the development of science and technology, electronic equipment have become in people's daily life most common electronic product it One.Also, user often receives the audio-frequency information of electronic equipment by the audio-frequence player device connecting with electronic equipment, but It is that the audio data that audio-frequence player device receives may have Caton, the bad problem of user experience.
Summary of the invention
Present applicant proposes a kind of data transmission method, device, electronic equipment and computer-readable mediums, above-mentioned to improve Defect.
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 electronic equipment connects wireless audio playback equipment, detecting the broadcasting whether electronic equipment receives audio data Request;If receiving playing request, the coding for the audio data to be sent to the wireless audio playback equipment is determined Rate;According to the corresponding relationship of preset bandwidth and encoding rate, improve the electronic equipment and the wireless audio playback equipment it Between destination data link bandwidth;By the destination data link after raising bandwidth, the audio data is sent to the nothing Line audio-frequence player device.
Second aspect, the embodiment of the present application also provides a kind of data transmission devices, are applied to electronic equipment.Described device Include: detection unit, determination unit, improve unit and transmission unit.Detection unit, for connecting wireless audio when electronic equipment When playback equipment, the playing request whether electronic equipment receives audio data is detected.Determination unit, if for receiving Playing request determines the corresponding encoding rate of the audio data.Unit is improved, for pair according to preset bandwidth and encoding rate It should be related to, improve the bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment.Transmission unit, For by the destination data link after raising bandwidth, the audio data to be sent to the wireless audio playback equipment.
The third aspect, the embodiment of the present application also provides a kind of electronic equipment, including one or more processors;Storage Device;One or more application program, wherein one or more of application programs are stored in the memory and are configured To be executed by one or more of processors, one or more of programs are configured to carry out the above method.
Fourth aspect, the embodiment of the present application also provides a kind of computer-readable medium, the computer-readable storage Program code is stored in medium, said program code can be called by processor and execute the above method.
Data transmission method, device, electronic equipment and computer-readable medium provided by the embodiments of the present application are playing sound Frequency according to when, determine the corresponding encoding rate of the audio data, which is used to for the audio data being sent to described Wireless audio playback equipment improves number of targets between the electronic equipment and the wireless audio playback equipment according to the encoding rate According to the bandwidth of link, so that when encoding rate is higher, the electronic equipment and the wireless audio playback equipment Between destination data link bandwidth it is larger, can be improved the transmission speed of the data of high code-rate, reduce audio playing process In Caton phenomenon generation.
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 schematic diagram of voice system provided by the embodiments of the present application;
Fig. 2 shows a kind of method flow diagrams for data transmission method that one embodiment of the application provides;
Fig. 3 shows a kind of method flow diagram for data transmission method that another embodiment of the application provides;
Fig. 4 shows the schematic diagram of WiFi list provided by the embodiments of the present application;
Fig. 5 shows a kind of embodiment of step S304 in the method flow diagram of data transmission method shown in Fig. 3 The schematic diagram of method flow;
Fig. 6 shows number of targets between the electronic equipment and the wireless audio playback equipment of one embodiment of the application offer According to the schematic diagram of the bandwidth of link;
Fig. 7 shows target between the electronic equipment and the wireless audio playback equipment that another embodiment of the application provides The schematic diagram of the bandwidth of data link;
Fig. 8 shows a kind of method flow diagram for data transmission method that the another embodiment of the application provides;
Fig. 9 shows a kind of module frame chart of data transmission device provided by the embodiments of the present application;
Figure 10 shows the module frame chart of electronic equipment provided by the embodiments of the present application;
Figure 11 shows provided by the embodiments of the present application for saving or carrying the number realized according to the embodiment of the present application According to the storage unit of the program code of transmission method.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described.
Referring to Fig. 1, showing the module map of voice system 1 provided by the embodiments of the present application.Specifically, the voice system 1 includes electronic equipment 100 and wireless audio playback equipment 200.
In embodiments of the present invention, the application program that can play audio is installed in electronic equipment 100, it specifically, should Application program can be audio playing software, video jukebox software or call software etc..Electronic equipment 100 plays needs Audio is sent to wireless audio playback equipment 200, plays voice by wireless audio playback equipment 200.
Wherein, wireless audio playback equipment 200 refers to the equipment for playing audio independently of electronic equipment 100, The audio data of the transmission of electronic equipment 100 and broadcasting can be received.Such as: when user plays song using the electronic equipment, User can start music application program, or the behaviour using electronic equipment 100 on the display interface of electronic equipment 100 Make the song that the included player plays of system have locally saved, electronic equipment 100 is during playing song, to the song It is handled, obtains digitized audio data, and the audio data that processing obtains is sent to wireless audio playback equipment 200, wireless audio playback equipment 200 carries out digital-to-analogue conversion after receiving the audio data, to the audio data, obtains mould Quasi- signal, and the analog signal is played using the playing function of external voice equipment, to realize song by external voice equipment It plays.
In the embodiment of the present invention, carried out between electronic equipment 100 and wireless audio playback equipment 200 by wireless network Interaction is to transmit signal, wherein the wireless network can be bluetooth, wifi, LTE network or NFC etc..
Then in the embodiment of the present invention, wireless audio playback equipment 200 is Bluetooth audio device or bluetooth headset, and wireless audio is broadcast Put equipment 200 can by open Bluetooth function realize with the connection of electronic equipment 100, and after a connection is established, electronics is set Standby 100 voices for being needed to play are sent to Bluetooth audio device, realize that voice plays by Bluetooth audio device.
Specifically, after the starting of the Bluetooth function of electronic equipment 100 and wireless audio playback equipment 200, electronic equipment 100 By bluetooth equipment of the search in its preset distance, and the title of the bluetooth equipment searched is shown on its display interface, use After family is clicked in the display interface or selects wireless audio playback equipment 200, electronic equipment 100 is set to wireless audio broadcasting Standby 200 send connection request, and wireless audio playback equipment 200 will be established and electronic equipment 100 after receiving connection request Between connection, and feedback link success message.
Electronic equipment 100 is broadcast after establishing connection with wireless audio playback equipment 200 if electronic equipment 100 is in need When the audios such as the song put or video, which is processed into digital signal by electronic equipment, and is played to wireless audio Equipment 200 sends the audio data, and wireless audio playback equipment 200 is after receiving the audio data, to the audio number According to being handled and being played, the broadcasting of audio is realized.Specifically, electronic equipment 100 needs to send after audio data coding Specifically connected between electronic equipment 100 and wireless audio playback equipment 200 by bluetooth to wireless audio playback equipment 200 Connect, and between data and instruction transmission, in accordance with certain Bluetooth protocol, then audio data is sent to by electronic equipment 100 When wireless audio playback equipment 200, needing will according to the coded format under the Bluetooth protocol supported by the audio data Audio data coding, for example, audio is directed to, frequently with Apt-X, SBC, AAC, LDAC encryption algorithm.
Electronic equipment 100 will generate packets of audio data after audio data coding, then pass through electronic equipment 100 and wireless sound Packets of audio data is sent to wireless audio playback equipment 200, wireless audio by the Bluetooth transmission channel between frequency playback equipment 200 Playback equipment 200 will can get audio data, example after getting the packets of audio data after the decoded packet data Such as, SBC, SBC are that A2DP (Advanced Audio Distribution Profile, Bluetooth audio frequency transport protocol) agreement is strong Coded format as defined in making.All bluetooths can all support this agreement, so all Bluetooth audio frequency chips can also support this A agreement, by taking the audio of MP3 format as an example, cataloged procedure be electronic equipment by mp3 file the sample variance after pcm encoder Change, reconvert to SBC coded format is then forwarded to wireless audio playback equipment, and wireless audio playback equipment is by SBC format The audio data that PCM format is obtained after audio decoder, further according to portions such as the voice coils of pcm encoder driving wireless audio playback equipment Part vibration sounding.
Again illustratively, if user A is made a phone call using electronic equipment 100 to user B, and after closing of the circuit, user A makes Electronic equipment 100 receives the voice that the electronic equipment of user B is sent, and the electronic equipment 100 that user A is used will receive Voice be sent to wireless audio playback equipment 200, which is played by wireless audio playback equipment 200, enables user A Uppick user's B voice.As an implementation, it is provided with microphone on wireless audio playback equipment 200, then used For family A in speech, wireless audio playback equipment 200 will acquire the sound of user A, and generate voice, and the voice of generation is sent out The voice is sent to the electronic equipment that user B is used by the electronic equipment 100 by the electronic equipment 100 for giving user A, so that It can be realized the call between user A and user B.
Again illustratively, video is carried out using the mounted instant message applications of electronic equipment 100 and user B in user A When session, the video data that the electronic equipment 100 of user A sends the electronic equipment for receiving user B, electronic equipment 100 will The video data is handled, video picture data and video voice data are obtained, wherein electronic equipment 100 will shown Video picture data is shown on interface, and video audio data transmitting is given into the wireless audio that the electronic equipment 100 connects and is broadcast Equipment 200 is put, the video voice data, and the camera shooting on electronic equipment 100 are played simultaneously by the wireless audio playback equipment 200 The video image that head takes acquisition, sound when wireless audio playback equipment 200 talks acquisition user A, obtains voice Data, and collected voice data is sent to electronic equipment 100 by wireless audio playback equipment 200, electronic equipment 100 will be taken the photograph As collected video image and the collected voice data of wireless audio playback equipment 200 are handled, video counts are obtained According to, and the electronic equipment that user B is used is fed back to, the electronic equipment that user B is used completes the broadcasting of video, with reality Video session between current family A and user B.
Currently, playing the audio data in electronic equipment using wireless audio playback equipment, wired earphone institute can be reduced Bring is inconvenient, and still, inventor has found under study for action, when playing audio using wireless audio playback equipment, due to Audio phenomena such as will cause audio there are time delay or Catons, greatly reduces user experience by the wireless network transmissions such as bluetooth Degree.
Inventor find under study for action one that leads to above-mentioned delay the reason is that, current electronic equipment generally has bluetooth Module and WiFi module, electronic equipment can be connected to the audio-frequence player devices such as bluetooth headset by bluetooth module, set in electronics Then audio data is passed through Bluetooth transmission to audio-frequence player device by standby upper carry out music, audio-frequence player device receives Audio data exports again.But the WiFi of electronic equipment supports 2.4G frequency range and 5G frequency range, wherein WiFi2.4G frequency range and indigo plant Tooth 2.4G frequency range has overlapping, and WiFi and bluetooth share a radio-frequency antenna, therefore, if bluetooth and WiFi are being used When 2.4G frequency range, can there are problems that the problem of seizing antenna resources, i.e., BT/WiFi coexists, to cause audio data Caton The problem of.
Therefore, in order to solve drawbacks described above, the embodiment of the present application provides a kind of data transmission method, and this method is applied to Above-mentioned electronic equipment, for reducing the Caton phenomenon in audio data playing process, specifically, this method comprises: S201 is extremely S204。
S201: when electronic equipment connects wireless audio playback equipment, the audio playing module of the electronic equipment is detected Whether the playing request of audio data is received.
When the Bluetooth function of electronic equipment is opened, electronic equipment can set the bluetooth within the scope of certain distance around Standby scanning, specifically, after receiving scan command by the Bluetooth chip of electronic equipment or other bottom-layer network modules, according to pre- If scan channel sequence be scanned, such as first scan 1,7,13 channel of common channels, then scan other non-common channels, by This obtains the mark of all bluetooth equipments in present scope, and is shown in the bluetooth list interface of electronic equipment.
It had been connected and the preferable bluetooth of signal strength is set if existed in the mark of the bluetooth equipment scanned Standby, electronic equipment can be connect with the bluetooth equipment automatically, then user can also select a bluetooth to set in bluetooth list interface It is standby to be attached.
When electronic equipment is connect with external bluetooth equipment, then the system of electronic equipment, which can be crossed, goes to a state value, The state value indicates that electronic equipment has currently connected bluetooth equipment.To, electronic equipment is able to detect that bluetooth equipment, To get the device identification of bluetooth equipment.
After the device identification for getting connected bluetooth equipment, connected bluetooth is determined according to the device identification Whether equipment is wireless audio playback equipment, and specifically, which may include title or brand of equipment etc., example Such as, it can determine whether the equipment is the wireless audio playback equipment such as earphone or sound equipment according to the device identification, so as to true It is fixed whether to be connected with wireless audio playback equipment.Alternatively, it is also possible to be the device identification for determining connected bluetooth equipment, so Afterwards, the corresponding equipment kind of current connected device identification is obtained in the corresponding relationship of preset device identification and device category Whether class is wireless audio playback equipment so as to the type of the current connected equipment of determination.
Whether the equipment that can also pass through bluetooth connection to electronic equipment is that audio-frequence player device detects, wherein It, can be as obtained by Case-based Reasoning BluetoothClass.Device class in electronic equipment based on android operating system To return value determine the currently device type by bluetooth connection.If the value returned is AUDIO_VIDEO_CAMCORDER, Then it is characterized as image capture device;If the value returned is AUDIO_VIDEO_CAR_AUDIO, it is characterized as mobile unit;If returning The value returned is AUDIO_VIDEO_HIFI_AUDIO, then audio-frequence player device or video playback apparatus is characterized as, for example, bluetooth Earphone;If the value returned is AUDIO_VIDEO_MICROPHONE, it is characterized as microphone.
When determining that electronic equipment connects wireless audio playback equipment, that is to say, that wireless in electronic equipment connection After audio-frequence player device, whether the audio playing module for detecting electronic equipment receives playing request, which is to use In the request of request playing audio-fequency data.
Wherein, audio playing module can be the audio playing program of electronic equipment.Specifically, in electronic equipment and wirelessly Audio-frequence player device connect when, and need for audio data to be played to be sent to wireless audio play play when, which broadcasts Audio data coding can be got audio data in electronic equipment, and need the loudspeaking by electronic equipment by amplification module When device plays, which can decode audio data and be sent to loudspeaker and play out.
Specifically, which can be pure audio files, can also broadcasting corresponding with image data audio data, For example, being the audio data in video, specifically, video data includes the sound of image data and broadcasting corresponding with image data Frequency evidence includes specifically multiple image data and audio data in video, when video data plays, spininess figure As data are as shown by the display device of electronic equipment or the peripheral hardware display device connecting with electronic equipment, and audio data by Audio player, for example, wireless audio playback equipment plays, specifically, in the play time pair of a certain frame of image data Answer the play time of an audio data.And the audio data in game is also similar, audio data needs and game Interior game picture is corresponding to be played.
Then when electronic equipment plays the video in pure audio files or video file and scene of game, audio is played Module gets the playing request of audio data to be played, can get audio data by parsing the playing request.
Specifically, playing request can be prompting message, be also possible to voice playing request.Wherein, prompting message includes The letter that call-prompting information, short message prompting message and clock alarming information etc. are used to remind the certain events of user triggered Breath.For example, call-prompting information is for reminding user currently to have incoming call.
As another embodiment, sounding request can be during electronic equipment sounding, play voice every time Request.Then sounding request can be the request of audio sounding, be also possible to the request of video sounding or call sounding request.
Specifically, multiple audio playing softwares are installed, then the software can be music APP, view in electronic equipment Frequency plays APP or recording APP etc..For example, video playing interface is provided with video playing key, by pressing to the video playing The detection of the touch-control of key, can determine whether the audio playing module of electronic equipment currently receives the broadcasting of audio data and ask It asks, for example, user chooses video, into the broadcast interface of video, clicks the broadcast button of the broadcast interface, application program passes through Monitoring to user's touch control operation, be able to detect that user currently clicked is what kind of video, and specifically, broadcasting is pressed Button is provided with preset attribute, detects the attribute of the acquired corresponding broadcast button of touch control operation, it will be able to determine user institute The video to be played chosen, and then get playing request and the corresponding audio of the playing request.
S202: the encoding rate for the audio data to be sent to the wireless audio playback equipment is determined.
When audio data is sent to wireless audio playback equipment by electronic equipment, for the speed of improve data transfer, need By Audio data compression, to reduce the size of audio data, then the process is to encode to audio data.Specifically, There are a variety of for the audio data to be sent to the encryption algorithm of the wireless audio playback equipment, each encryption algorithm institute Corresponding encoding rate is different, i.e., sound when different encryption algorithms is to the same audio data coding, after obtained coding The size of frequency evidence is also different.
Wherein, electronic equipment is sent to what wireless audio playback equipment played to by sound from the sound that user inputs is received Process, including analog signal sampling, quantization and the coding to sound.Sound is the signal of Time Continuous, by the sound The digitlization of the signal, i.e. discretization are realized in sampling and quantization, to form audio data.For example, when if sound is one Between continuous sine curve, after electronic equipment gets the sound, for example, pass through microphone acquire.Electronic equipment is to this Sampled voice is at several points, this process is sampling.Obviously, sampling density is bigger, i.e., sample rate is bigger, obtained discrete Signal is just closer to former continuous signal.Since each sampled point will occupy memory space, therefore sample rate is higher, gained The audio data arrived is bigger.
Sampling is the first step of audio processing.After sampling, also the data of acquisition are stored.Storage is desirable Space, one second sampled data is stored with how many space, and here it is audio coding rates.As it can be seen that identical in sample rate Under the premise of, encoding rate is lower, and data are smaller.But two steps of sampling and coding can all reduce sound quality.Coding is actually Compression, encoding as mp3 is all lossy compression, thrown away most of human ear discover without sonic data, thus volume Very little.
Wherein, the raising of audio coding rate can be raising sample rate, be also possible to during coding, reduce nothing Discarding and the more useful informations of reservation with information, i.e. reduction compression ratio, for example, a kind of encryption algorithm, it will be in sound stream The 16bit data sampled every time are stored with 4bit, then compression ratio is 4:1, then have 25% useful information to be retained, and if will Compression ratio becomes 8bit, then compression ratio becomes 2:1, and compression ratio is reduced, and has 50% useful information to be retained, and more has It is retained with information, but the data quantitative change of audio data is bigger.
The above are in the cataloged procedure of sound to audio data, then after getting audio data, need audio number According to by Bluetooth transmission to wireless audio playback equipment, and in order to guarantee the speed of data transmission, need in accordance with electronic equipment with Bluetooth transmission protocol between wireless audio playback equipment is by audio data coding, to form the format of user's transmission, for example, on State by pcm encoder at SBC format, and in order to improve transmission speed and improve transmission serious forgiveness, need to adopt audio data Sample and coding, so that the size of audio data is reduced, convenient for transmission.Coding when similarly, for for transmitting audio data Rate increases, and can increase the compression ratio in the transmission to the sample rate of audio data or when reducing coding.
And which kind of specifically used encoding rate of electronic equipment is used to audio data being sent to the wireless audio playback equipment, It can be what user was actively arranged, be also possible to using access times in encoding rate used in the last time or preset time period Higher encoding rate, for example, it may be connecting electronic equipment with wireless audio playback equipment in user is to have set to be used for Audio data is then sent to the nothing in electronic equipment using the encoding rate as default code rate by the encoding rate of audio transmission When line audio-frequence player device, just by audio data coding and transmitted using the default code rate.
S203: according to the corresponding relationship of preset bandwidth and encoding rate, the electronic equipment and the wireless audio are improved The bandwidth of destination data link between playback equipment.
Assuming that electronic equipment is when being sent to the wireless audio playback equipment for audio data, using the encoding rate Audio data coding is generated into packets of audio data, and different encoding rates, packets of audio data size generated are also different.And needle The data packet big to some data volumes needs to increase bandwidth and sends by the data packet, and otherwise, bandwidth is too low, each institute's energy The maximum amount of data of transmission is too small, will lead to that the speed of transmitted data is excessively slow and Caton occurs in cause audio to play when The phenomenon that.
As an implementation, it can be the corresponding relationship according to preset bandwidth and encoding rate, improve the electronics The bandwidth of destination data link between equipment and the wireless audio playback equipment, wherein in the corresponding relationship, the bandwidth Size and the encoding rate height be positively correlated, that is to say, that bandwidth is bigger, then encoding rate is higher.
Specifically, the corresponding relationship is as shown in table 1 below:
Table 1
Bandwidth Encryption algorithm
1MHz SBC
2MHz ACC
3MHz APTX
4MHz LDAC
In table 1 as above, SBC, ACC, APTX and LDAC are several different encryption algorithms, i.e. audio data is passed by bluetooth Format when defeated, and in upper table 1, from top to bottom, encoding rate is gradually increased, i.e. encoding rate: SBC < ACC < APTX < LDAC, and Corresponding bandwidth is also to be gradually increased.
Specifically, when audio data is sent to wireless audio playback equipment using bluetooth, bluetooth mould can be configured Bluetooth transmission parameter in block, the Bluetooth transmission parameter include transmission power, transmission rate and bandwidth etc., pass through reading as a result, The Bluetooth transmission parameter is taken just to can determine target data between presently described electronic equipment and the wireless audio playback equipment The bandwidth of link.
Then, after determining the corresponding bandwidth of encoding rate by above-mentioned corresponding relationship, by the bandwidth found with work as Preceding bandwidth is found the current Bandwidth adjustment for example, if the band found, which is wider than, is deserved preceding bandwidth Bandwidth, for example, the corresponding encryption algorithm of encoding rate for the audio data to be sent to the wireless audio playback equipment For LDAC, then corresponding bandwidth is 4MHz, and current bandwidth is 2MHz, then 4MHz is greater than 2MHz, then by current Bandwidth adjustment For 4MHz.
As another embodiment, it is set for the audio data to be sent to wireless audio broadcasting having determined Standby encoding rate, judges whether the encoding rate belongs to pre-arranged code rate, if so, by the electronic equipment and the wireless audio The bandwidth of destination data link improves between playback equipment, and specifically, the amplitude of raising can be a preset fixation Value is also possible to the corresponding relationship according to shown in above-mentioned table 1 and is adjusted for example, fixed improve 4MHz.
Wherein, pre-arranged code rate is the corresponding encoding rate of preset several different types of encryption algorithms, for example, in advance If encoding rate is that APTX and LDAC is not belonging to the pre-arranged code rate, does not then need to improve then if present encoding rate is SBC The bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment, if present encoding rate is LDAC then belongs to the pre-arranged code rate, then improves target data between the electronic equipment and the wireless audio playback equipment The bandwidth of link.
S204: by the destination data link after raising bandwidth, the audio data is sent to the wireless audio and is broadcast Put equipment.
After audio data is encoded according to encryption algorithm, packets of audio data is generated, by the destination data link by sound Frequency data packet is sent to the wireless audio playback equipment, so as to realize that audio data, which is sent to wireless audio broadcasting, to be set It is standby.
Due to improving the bandwidth of destination data link between electronic equipment and the wireless audio playback equipment, so that often The data volume of the secondary data that can be transmitted is bigger, so as to which audio data is sent to wireless audio playback equipment faster, Enable wireless audio playback equipment continue and high speed acquisition audio data, avoid because wait audio data reception and Lead to the Caton in audio data playing process, further, it is possible to higher encoding rate be supported, so that the sound quality of audio data is more It is high.
Furthermore, it is contemplated that destination data link is used between the electronic equipment and the wireless audio playback equipment Communications band and other data link when share, the resource due to the communications band is seized, and is easier to cause The bandwidth of destination data link is insufficient, therefore, for the shared situation of communications band, the band of destination data link can be improved Width, specifically, as shown in figure 3, this method comprises: S301 to S305.
S301: when electronic equipment connects wireless audio playback equipment, the audio playing module of the electronic equipment is detected Whether the playing request of audio data is received.
S302: the encoding rate for the audio data to be sent to the wireless audio playback equipment is determined.
S303: communications band used in the destination data link is determined.
When electronic equipment is connect with external wireless device, electronic equipment selects bluetooth, WiFi or other connection types Connection request is sent to external wireless device, then can be searched in the frequency range for the communication mode that external wireless device is supported The external wireless device, for example, electronic equipment opens bluetooth, then in the corresponding communications band of bluetooth, e.g. 2.4GHz, energy Enough search the external equipment for also opening bluetooth.
Specifically, after connection, electronic equipment can determine electronic equipment for electronic equipment and wireless audio playback equipment Set used communication mode, e.g. bluetooth with wireless audio broadcasting, then electronic equipment and wireless audio playback equipment it Between data communication need the antenna of electronic equipment to send data to wireless audio playback equipment, or receive wireless audio and broadcast Data transmitted by equipment are put, and frequency range used in different communication modes is different, such as bluetooth uses 2.4GHz, 2.4GHz or 5GHz can be used in WiFi.After then selecting a kind of communication mode, it will be able to determine that the communication mode is corresponding logical Believe frequency range, for example, bluetooth corresponds to 2.4GHz, and electronic equipment is passing through corresponding to the router or hot spot that WiFi is connected Frequency range is different, then corresponding communications band is also different, for example, scanning the WiFi heat of surrounding after electronic equipment opens WiFi Point obtains WiFi list, as shown in figure 4, showing the mark of multiple hot spots in the list, wherein some hot spots are corresponding Communications band is 2.4GHz, and the corresponding communications band of some hot spots is 5GHz, and in Fig. 4, the corresponding communications band of WiFi-1 is The corresponding communications band of 2.4GHz, WiFi-1-5GHz is 5GHz, then user selects WiFi-1, then electronic equipment and WiFi-1 it Between connected by the communications band of 2.4GHz, and if user selects WiFi-1-5GHz, lead between electronic equipment and WiFi-1 Cross the communications band connection of 5GHz.Electronic equipment just can determine between electronic equipment and the Wi-Fi hotspot connected as a result, Communications band.
S304: if there is other data link and the destination data link share the communications band, then according to default Bandwidth and encoding rate corresponding relationship, improve target data chain between the electronic equipment and the wireless audio playback equipment The bandwidth on road.
When electronic equipment and wireless audio playback equipment has been determined, it can determine that the electronic equipment and wireless audio play Connection type and destination data link between the two between equipment, thus just can determine electronic equipment and wireless audio The corresponding communications band of destination data link between playback equipment.Then, then determine whether that other data link make With the communications band.
As an implementation, electronic equipment includes bluetooth module and WiFi module.
The WiFi module is for realizing the connection between WiFi access point, and the data friendship between WiFi access point Mutually.Specifically, can with peripheral apparatus by adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (such as U.S. electric and Electronic Engineering Association standard IEEE 802.10A, IEEE802.11b, IEEE802.11g and/or IEEE 802.11n) agreement Communication connection is established, then WiFi module may include power amplifier, wireless transceiver, transmit/receive switch, low-noise amplifier And antenna etc..When sending signal, transceiver itself can directly export low power faint radiofrequency signal, send to power amplification Device (Power Amplifier, PA) carries out power amplification, then passes through transmit/receive switch (Transmit/Receive Switch) space is radiated to via antenna (Antenna).When receiving signal, antenna can sense the electromagnetic signal in space, lead to It crosses after switch to send to low-noise amplifier (Low Noise Amplifier, LNA) and amplify, in this way, amplified letter Number can be directly fed to transceiver is handled, and is demodulated.The first communications band and second can be used in the WiFi module Communications band, wherein the first communications band can be 2.4GHz, and the second communications band can be 5Ghz.
Similarly, bluetooth module is for realizing the bluetooth connection between electronic equipment and bluetooth equipment, and and bluetooth equipment Between data interaction.Specifically, can also lead to bluetooth equipment by Bluetooth protocol 5.0/4.2/4.1/2.1/2.0 Cross bluetooth low energy consumption technologies (Bluetooh Low Energy, BLE), bluetooth enhancing rate technology (Enhanced Data Rate, EDR) or bluetooth basic rate (Base Rate, BR) etc..Its basic circuit constitute it is similar with WiFi module, can also be with It is made of power amplifier, wireless transceiver, transmit/receive switch, low-noise amplifier and antenna etc..The bluetooth module can be with Use the first communications band.
When the bluetooth module and WiFi module of electronic equipment work at the same time, and WiFi module using the first communications band when It waits, will lead to bluetooth module and WiFi module simultaneously in the communications band using 2.4GHz, therefore, as shown in figure 5, the tool of S304 Body embodiment may include step S3041 to S3042.
When electronic equipment passes through bluetooth connection wireless audio playback equipment, then electronic equipment and wireless audio can be determined Destination data link between playback equipment, and determine that the corresponding communications band of change destination data link is the first communication frequency Section, the i.e. communications band of 2.4GHz.
Then, it then executes S3401: judging whether the WiFi module is used first communications band.
Judge whether electronic equipment passes through WiFi module and connect with external equipment (for example, wireless router etc.), and institute State whether the communications band used is the first communications band, i.e. the communications band of 2.4GHz is sentenced if it is the first communications band Determine WiFi module and first communications band is used, if non-first communications band, for example, being the second communications band, then Return re-executes S3401.
Since WiFi module and bluetooth module use the first communications band, then it will lead to bluetooth module and WiFi module be same When using a radio-frequency antenna, and the bandwidth of the first communications band is limited, for example, the bandwidth of the first communications band is 2.4GHz to 2.48GHz, WiFi are to select one in 12 overlapped channels in 22MHz bandwidth, and bluetooth is then in frequency range Frequency hopping between 79 1MHz channels of equispaced.Therefore, no matter which channel WiFi is using, and all exists between the two mutually relevant It disturbs.Then WiFi will affect the transmission of bluetooth, so that bandwidth corresponding to bluetooth can not obtain highest transmission value, therefore, it is necessary to will The bandwidth of bluetooth improves, thus improve electronic equipment pass through exported between bluetooth and wireless audio playback equipment the rate of transmission with And the data volume upper limit that can be transmitted every time.
That is, judging that the WiFi module when using first communications band, executes S3402: according to pre- If bandwidth and encoding rate corresponding relationship, improve target data between the electronic equipment and the wireless audio playback equipment The bandwidth of link.
Specifically, the mode of 2.4GHz frequency range can be shared according to WiFi module and bluetooth module and improve electronic equipment with The bandwidth of destination data link between the wireless audio playback equipment.For example, the mode for sharing 2.4GHz frequency range includes WiFi Module and bluetooth module time division multiplexing, can also be that WiFi module and bluetooth module respectively use certain frequency range.
As an implementation, WiFi module and bluetooth module time division multiplexing.Assuming that the corresponding data-link of WiFi module Road is WiFi link, and between electronic equipment and wireless audio playback equipment is destination data link, then in electronic equipment When WiFi module and bluetooth module use 2.4GHz frequency range simultaneously, electronic equipment is that destination data link and WiFi link distribute not The same time point using 2.4GHz frequency range, so that 2.4GHz frequency range is used alternatingly in destination data link and WiFi link, That is, the antenna of 2.4GHz is used alternatingly in WiFi module and bluetooth module.And the time that bluetooth module is able to use determines The speed between electronic equipment and wireless audio playback equipment by bluetooth data transmission is determined, and and second can not transmit Data volume, i.e. bandwidth.
Then at this point, improving the bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment Embodiment can be, and improves destination data link between electronic equipment and the wireless audio playback equipment and is able to use The time span of the antenna of 2.4GHz, correspondingly, the time span of the antenna of the be able to use 2.4GHz of WiFi link can reduce. For example, before adjustment, in each second, 1/3 time, destination data link uses the antenna of 2.4GHz, and residue 2/3 when Between, WiFi link uses the antenna of 2.4GHz.And after the adjustment, in each second, 2/3 time, destination data link is used The antenna of 2.4GHz, and the time of residue 1/3, WiFi link use the antenna of 2.4GHz, then destination data link energy each second Enough transmission times increase, and the data volume that can be transmitted just will increase, i.e., bandwidth improves.
As another embodiment, WiFi module and bluetooth module respectively use a part frequency of the first communications band Section, specifically, frequency range used in WiFi module is different from frequency range used in the bluetooth module, in some embodiments, Frequency range non-overlapping used in frequency range used in WiFi module and the bluetooth module.As shown in fig. 6, it is logical to show first Believe in frequency range, the schematic diagram of frequency range used in frequency range used in WiFi module and the bluetooth module, wherein assuming that WiFi Frequency range used in module is named as WiFi frequency range, and frequency range, that is, destination data link is described first used in bluetooth module Frequency range in communications band is named as Bluetooth band.As shown in Figure 6, wherein region represented by p1 is the bandwidth of Bluetooth band, And region represented by p2 is the bandwidth of WiFi frequency range.Then p1 and p2 is independent two regions, and there is no interference from each other. Then shown in Fig. 6, Bluetooth band and WiFi frequency range are continuous regions, and as another embodiment, it can also not It is that continuous region is constituted, as shown in Figure 7, wherein it is the bandwidth of WiFi frequency range represented by hatched example areas, and other regions are The bandwidth of Bluetooth band.
Specifically, the bandwidth of Bluetooth band not necessarily have to be than WiFi frequency range with roomy, as long as needing in electronic equipment When by the encryption algorithm of high code-rate by wireless audio playback equipment is sent to after audio data coding, Bluetooth band Bandwidth can be sufficiently large, and the transmission speed for meeting the audio data after the audio coding algorithms coding by the encoding rate meets It needing, i.e. Fig. 6 and 7 is only one embodiment, rather than between the bandwidth to this Bluetooth band and the bandwidth of WiFi frequency range Size relation restriction.
In some embodiments, electronic equipment is when using WiFi module, in order to guarantee the number transmitted using WiFi According to speed it is only slow, need to guarantee WiFi bandwidth meet a minimum.Therefore, according to preset bandwidth and encoding rate Corresponding relationship improves the specific reality of the bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment Apply mode are as follows: the lowest-bandwidth demand that the WiFi module uses first communications band is obtained, according to the WiFi module Lowest-bandwidth demand and the encoding rate, improve target data between the electronic equipment and the wireless audio playback equipment Bandwidth of the link in first communications band.
Wherein, the lowest-bandwidth demand of WiFi module can be user according to demand and set, for example, it is certain downloading it is soft Part can set the upper limit value and lower limit value of a downloading when downloading, and the lower limit value can serve as WiFi module Lowest-bandwidth demand.Furthermore it is also possible to be set according to the data content of the required downloading of user, for example, being listened in user When audio, the sound quality for the audio that user is chosen is different, and corresponding data volume is also different, then obtains the data volume of audio And the play time of the audio, so as to obtain downloading data amount each second, thus when avoiding user from listening to music, The case where audio data after currently playing node buffers downloading not in time and pause is caused to play.Therefore, can according to It the data volume of the data of downloading and plays time span required for the data and sets, for example, the data of 10M, when broadcasting Between be 10 seconds, in order to avoid Caton bandwidth need be greater than or equal to 1M/S, i.e., the lowest-bandwidth demand of WiFi module be 1M/S.
Then, further according to the lowest-bandwidth demand of the WiFi module and the encoding rate, improve the electronic equipment with Bandwidth of the destination data link in first communications band between the wireless audio playback equipment, that is to say, that mentioning Band of the destination data link in first communications band between the high electronic equipment and the wireless audio playback equipment When wide, need to guarantee that bandwidth of the WiFi module in first communications band is needed not less than the lowest-bandwidth of WiFi module It asks.
Specifically, the first frequency sub-band region in first communications band is allocated to the WiFi module, wherein institute The bandwidth for stating the first frequency sub-band region is matched with the lowest-bandwidth demand of the WiFi module.As shown in fig. 6, wherein corresponding to p2 The bandwidth in region matched with the lowest-bandwidth demand of WiFi module, then the p2 it is corresponding be exactly in the first communications band first Frequency sub-band region.For example, the lowest-bandwidth of WiFi module is aMbps, then the first frequency sub-band region in the first communications band Bandwidth is also aMbps, to ensure that the lowest-bandwidth demand of WiFi module.
Illustratively, it is assumed that the total bandwidth of the first communications band is 100Mbps, the current band of WiFi module and bluetooth module Width is 50Mbps, and the lowest-bandwidth demand of WiFi module is 20Mbps, then modifies the bandwidth of WiFi module from 50Mbps For 20Mbps, then the current bandwidth of bluetooth module can be revised as 80Mbps, so that the bandwidth of bluetooth module be improved.When So, the bandwidth of bluetooth module can also be increased to XMbps, wherein the numerical value of X is greater than 50 and less than 80, for example, by bluetooth mould The bandwidth of block is increased to 70Mbps, can not only improve the bandwidth of bluetooth module as a result, can also avoid the band of bluetooth module It is wider than high and causes the power consumption of electronic equipment excessive, furthermore it is also possible to a part of protection bandwidth is reserved to WiFi module, in WiFi When demand of the module to bandwidth improves, it can suitably increase the bandwidth of WiFi module, while not influencing the bandwidth of bluetooth module again.
Then, it is the second son frequency that the ghz area except first frequency sub-band region is removed in first communications band Then bandwidth of the destination data link in the second frequency sub-band region is improved further according to the encoding rate in section region.Also It is to say, in the first communications band, the region of bandwidth identical with the lowest-bandwidth of WiFi module is allocated to WiFi module, so It afterwards, is that bluetooth module distributes frequency band according to encoding rate, so as to protect then out of remaining region, i.e. the second frequency sub-band region Card centainly ensure that WiFi module normal use bandwidth when improving bandwidth for bluetooth module, and avoid no limitation Raising bluetooth module bandwidth and cause WiFi module can not normal use.
It, by this way can be by the bandwidth of WiFi module then if the bandwidth of WiFi module before adjustment is bigger Minimum requirements are reduced to, and increase the bandwidth of bluetooth simultaneously.
S305: by the destination data link after raising bandwidth, the audio data is sent to the wireless audio and is broadcast Put equipment.
Therefore, when WiFi module and bluetooth module are used in conjunction with the antenna of 2.4GHz, since WiF module is also using The communications band of 2.4GHz then will limit the bandwidth that bluetooth module is able to use, and can reduce bluetooth module and is able to use Bandwidth then reduces the bandwidth of WiFi module, so that the upper limit value for the bandwidth that bluetooth can be improved increases, that is, can be more The big bandwidth for improving bluetooth module.
It should be noted that the part being not described in detail in above-mentioned steps, can refer to previous embodiment, it is no longer superfluous herein It states.
Specifically, on the basis of the above embodiments, it plays, can also be implemented using the application for the audio in video The method of example, it is asynchronous to avoid sound and picture, specifically, referring to Fig. 8, showing a kind of data transmission method, apply In electronic equipment, specifically, this method comprises: S801 to S806.
S801: when electronic equipment connects wireless audio playback equipment, the audio playing module of the electronic equipment is detected Whether the playing request of audio data is received.
S802: the corresponding real-time rank of the audio data is determined.
There are real-time ranks for audio data, and the requirement of real-time of some data is high, for example, voice-enabled chat or video are chatted The audio that the voice of audio data in it perhaps in communication process also or with audio video synchronization plays.And the reality of some data When property require it is low, for example, the song etc. played, i.e., pure song and non-video.
As an implementation, the mark for determining the corresponding application program of audio data, further according to the application program Identify the real-time rank for determining audio data.Specifically, it is determined that sending the target application journey of the playing request of the audio data The mark of sequence, then determine the type of application program corresponding to the mark of the destination application.
After getting the mark of destination application, the type of destination application is determined according to the mark, wherein The mark of destination application can be the packet name of application program, title etc..For example, being previously stored in electronic equipment using journey The mark of sequence and corresponding relationship with the classification of application program, as shown in table 2 below:
Table 2
The mark of application program The classification of application program
Apk1 Game
Apk2 Video
Apk3 Audio
The mark of the application program according to shown in above-mentioned table 2 and the corresponding relationship with the classification of application program as a result, energy Enough determine the classification of application program corresponding to destination application.For example, being broadcast in the embodiment of the present application by wireless audio The game picture of the Games Software of device plays electronic equipment is put, which includes image and music, which can be with It is game music, sound effect of game etc., for example, the sound effect of game can be shot or footsteps.Then as one embodiment, sound Frequency is according to can be sound effect of game, then the corresponding application program of the sound effect of game is so-and-so game APP, and affiliated classification is game Then type determines the type of the audio data according to the type of application program, specifically, can be by the type of application program As the type of audio data, for example, the type of application program is game, then the type of audio data is also game.
Then, the corresponding real-time rank of audio data is determined further according to the type of the application program.Specifically, electronics is set It is stored with real-time rank corresponding to the type of application program in standby, as shown in table 3 below:
Table 3
The mark of application program The classification of application program Real-time rank
Apk1 Game J1
Apk2 Video J2
Apk3 Audio J3
Apk4 It is social J1
To just can determine the corresponding real-time rank of audio data.In addition, if it is determined that audio data is corresponding to answer It is audio with the classification of program, then the application program that can play audio may can also play video, then need to the audio Whether data are that audio in video is determined.
Specifically, in some embodiments, whether judgement is currently playing video, and specifically, electronic equipment is playing When video, the audio data in video can be extracted the audio processing modules in the system of being sent to, to call electronics to set Audio data is sent to audio frequency processing circuit to carry out coding of audio etc. and operate by standby interior audio frequency processing circuit, therefore After the playing request for receiving audio data, whether judgement is currently playing video, if it is, indicating currently to play Audio be the audio data belonged in the video being currently played, i.e. audio data belongs to the audio in video.
In further embodiments, electronic equipment is after data solution agreement, decapsulation, to divide in the process for playing video It is decoded for audio decoder and video, decoded audio data is sent into audio-frequence player device and is played, video data is sent into and is regarded Frequency playback equipment plays.So for convenience playing video and audio sync, the audio and video frame in video can be arranged Similar mark, for example, audio and video frame all uses the mark format of A+B, wherein A is preamble, is belonged to for indicating Some video just can determine this according to the format of the mark of the audio data then when getting the audio data to be played Whether audio is corresponding with video frame, i.e., whether belongs to the audio in video.
And if determining that the classification of the corresponding application program of audio data is audio class and then the determining audio data It whether is audio in video, if it is, determining that the real-time rank of change audio data is video class application program correspondence Real-time rank, rather than the corresponding real-time rank of audio class application program.
S803: judge whether the real-time rank is higher than pre-set level.
Judge whether the real-time rank of the audio data belongs to greater than pre-set level.Wherein, pre-set level is preparatory Setting the corresponding real-time rank of the type for needing to reduce audio broadcast time-delay, can be user according to demand and set. For example, pre-set level is J2 or more.Then if the corresponding real-time rank of audio data is J1, the real-time of audio data Rank is greater than pre-set level, otherwise, then determines to be less than or equal to pre-set level.
S804: the encoding rate for the audio data to be sent to the wireless audio playback equipment is determined.
S805: according to the corresponding relationship of preset bandwidth and encoding rate, the electronic equipment and the wireless audio are improved The bandwidth of destination data link between playback equipment.
S806: by the destination data link after raising bandwidth, the audio data is sent to the wireless audio and is broadcast Put equipment.
The electronic equipment and the wireless audio can be improved for the high audio data of those real-time ranks as a result, The bandwidth of destination data link between playback equipment, so that audio data is sent to wireless audio playback equipment faster.
It should be noted that the part being not described in detail in above-mentioned steps, can refer to previous embodiment, it is no longer superfluous herein It states.
Referring to Fig. 9, showing a kind of data transmission device 900 provided by the embodiments of the present application, which is applied to upper The electronic equipment stated, specifically, the device include: detection unit 901, determination unit 902, improve unit 903 and transmission unit 904。
Detection unit 901, for whether detecting the electronic equipment when electronic equipment connects wireless audio playback equipment Receive the playing request of audio data.
Determination unit 902, if determining the corresponding encoding rate of the audio data for receiving playing request.
It improves unit 903 and improves the electronic equipment and institute for the corresponding relationship according to preset bandwidth and encoding rate State the bandwidth of destination data link between wireless audio playback equipment.
Transmission unit 904, for the audio data being sent to described by the destination data link after raising bandwidth Wireless audio playback equipment.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Referring to FIG. 10, it illustrates the structural block diagrams of a kind of electronic equipment provided by the embodiments of the present application.The electronics is set Standby 100, which can be smart phone, tablet computer, e-book etc., can run the electronic equipment of application program.Electricity in the application Sub- equipment 100 may include one or more such as lower component: processor 110, memory 120, bluetooth module 140, WiFi module 160 and one or more application program, wherein one or more application programs can be stored in memory 120 and be matched It is set to and is executed by one or more processors 110, one or more programs are configured to carry out preceding method embodiment such as and are retouched The method stated.
Processor 110 may include one or more processing core.Processor 110 is whole using various interfaces and connection Various pieces in a electronic equipment 100, by run or execute the instruction being stored in memory 120, program, code set or Instruction set, and the data being stored in memory 120 are called, execute the various functions and processing data of electronic equipment 100.It can Selection of land, processor 110 can use Digital Signal Processing (Digital Signal Processing, DSP), field-programmable Gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA) at least one of example, in hardware realize.Processor 110 can integrating central processor (Central Processing Unit, CPU), in image processor (Graphics Processing Unit, GPU) and modem etc. One or more of combinations.Wherein, the main processing operation system of CPU, user interface and application program etc.;GPU is for being responsible for Show the rendering and drafting of content;Modem is for handling wireless communication.It is understood that above-mentioned modem It can not be integrated into processor 110, be realized separately through one piece of communication chip.Processor 110 can control WiFi mould The equipment that block 160 and bluetooth module 140 are connected.So as to can be realized between electronic equipment and external equipment through WiFi or Person's bluetooth connection.
Memory 120 may include random access memory (Random Access Memory, RAM), also may include read-only Memory (Read-Only Memory).Memory 120 can be used for store instruction, program, code, code set or instruction set.It deposits Reservoir 120 may include storing program area and storage data area, wherein the finger that storing program area can store for realizing operating system Enable, for realizing at least one function instruction (such as touch function, sound-playing function, image player function etc.), be used for Realize the instruction etc. of following each embodiments of the method.Storage data area can also store the number that terminal 100 is created in use According to (such as phone directory, audio, video data, chat record data) etc..Memory 120 also with WiFi module 160 and bluetooth module 140, for storing 140 received data of WiFi module 160 and bluetooth module, data to be sent and messaging parameter etc..
WiFi module 160 is for realizing the connection between WiFi access point, and the data between WiFi access point Interaction.Specifically, adopting wireless fidelity technology (Wireless, Fidelity, WiFi) (such as U.S. electric can be passed through with peripheral apparatus It is assisted with Electronic Engineering Association standard IEEE 802.10A, IEEE802.11b, IEEE802.11g and/or IEEE 802.11n) View establishes communication connection, then WiFi module may include power amplifier, wireless transceiver, transmit/receive switch, low noise amplification Device and antenna etc..When sending signal, transceiver itself can directly export low power faint radiofrequency signal, send to power and put Big device (Power Amplifier, PA) carries out power amplification, then passes through transmit/receive switch (Transmit/Receive Switch) space is radiated to via antenna (Antenna).When receiving signal, antenna can sense the electromagnetic signal in space, lead to It crosses after switch to send to low-noise amplifier (Low Noise Amplifier, LNA) and amplify, in this way, amplified letter Number can be directly fed to transceiver is handled, and is demodulated.Above-mentioned first communications band can be used in the WiFi module 160 With the second communications band, wherein the first communications band can be 2.4GHz, and the second communications band can be 5Ghz.
Similarly, bluetooth module 140 sets for realizing the bluetooth connection between electronic equipment and bluetooth equipment, and with bluetooth Data interaction between standby.Specifically, can be with bluetooth equipment by Bluetooth protocol 5.0/4.2/4.1/2.1/2.0, it can also be with Enhance rate technology (Enhanced Data by bluetooth low energy consumption technologies (Bluetooh Low Energy, BLE), bluetooth Rate, EDR) or bluetooth basic rate (Base Rate, BR) etc..Its basic circuit constitute it is similar with WiFi module, can also be with It is made of power amplifier, wireless transceiver, transmit/receive switch, low-noise amplifier and antenna etc..The bluetooth module 140 can To use above-mentioned first communications band.
Figure 11 is please referred to, it illustrates a kind of structural frames of computer readable storage medium provided by the embodiments of the present application Figure.Program code is stored in the computer-readable medium 1100, said program code can be called by processor and execute above-mentioned side Method described in method embodiment.
Computer readable storage medium 1100 can be (the read-only storage of electrically erasable of such as flash memory, EEPROM Device), the electronic memory of EPROM, hard disk or ROM etc.Optionally, computer readable storage medium 1100 includes non-volatile Property computer-readable medium (non-transitory computer-readable storage medium).It is computer-readable Storage medium 1100 has the memory space for the program code 1110 for executing any method and step in the above method.These programs Code can read or be written to this one or more computer program from one or more computer program product In product.Program code 1110 can for example be compressed in a suitable form.
Finally, it should be noted that above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although The application is described in detail with reference to the foregoing embodiments, those skilled in the art are when understanding: it still can be with It modifies the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;And These are modified or replaceed, do not drive corresponding technical solution essence be detached from each embodiment technical solution of the application spirit and Range.

Claims (10)

1. a kind of data transmission method, which is characterized in that be applied to electronic equipment, which comprises
When electronic equipment connects wireless audio playback equipment, whether the audio playing module for detecting the electronic equipment is received The playing request of audio data;
If receiving playing request, the coding for the audio data to be sent to the wireless audio playback equipment is determined Rate;
According to the corresponding relationship of preset bandwidth and encoding rate, improve the electronic equipment and the wireless audio playback equipment it Between destination data link bandwidth;
By the destination data link after raising bandwidth, the audio data is sent to the wireless audio playback equipment.
2. the method according to claim 1, wherein described close according to preset bandwidth is corresponding with encoding rate System, improves the bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment, comprising:
Determine communications band used in the destination data link;
If there is other data link and the destination data link share the communications band, then according to preset bandwidth and volume The corresponding relationship of code rate improves the bandwidth of destination data link between the electronic equipment and the wireless audio playback equipment.
3. according to the method described in claim 2, the electronic equipment includes bluetooth module and Wi F i module, the bluetooth mould The first communications band can be used in block, and the first communications band or the second communications band can be used in the Wi F i module, described Electronic equipment is connect by the bluetooth module with the wireless audio playback equipment;
It is described to share the communications band with the destination data link if there is other data link, then according to preset bandwidth With the corresponding relationship of encoding rate, the band of destination data link between the electronic equipment and the wireless audio playback equipment is improved It is wide, comprising:
Judge whether the Wi F i module is used first communications band;
If first communications band is used, according to the corresponding relationship of preset bandwidth and encoding rate, the electricity is improved The bandwidth of destination data link between sub- equipment and the wireless audio playback equipment.
4. according to the method described in claim 3, the corresponding relationship according to preset bandwidth and encoding rate, improves the electricity The bandwidth of destination data link between sub- equipment and the wireless audio playback equipment, comprising:
Obtain the lowest-bandwidth demand that the WiFi module uses first communications band;
According to the lowest-bandwidth demand of the WiFi module and the encoding rate, the electronic equipment and the wireless audio are improved Bandwidth of the destination data link in first communications band between playback equipment.
5. according to the method described in claim 4, it is characterized in that, the lowest-bandwidth demand according to the WiFi module and The encoding rate improves bandwidth of the destination data link in first communications band, comprising:
The first frequency sub-band region in first communications band is allocated to the WiF i module, wherein the first son frequency The bandwidth in section region is matched with the lowest-bandwidth demand of the WiFi module;
Bandwidth of the destination data link in the second frequency sub-band region is improved according to the encoding rate, wherein described second Frequency sub-band region is the ghz area removed except first frequency sub-band region in first communications band.
6. -5 any method according to claim 1, which is characterized in that
In the corresponding relationship of the preset bandwidth and encoding rate, the height positive of the size of the bandwidth and the encoding rate It closes.
7. -5 any method according to claim 1, which is characterized in that if described receive playing request, determination is used for The audio data is sent to the encoding rate of the wireless audio playback equipment, comprising:
If receiving playing request, the corresponding real-time rank of the audio data is determined;
Judge whether the real-time rank is higher than pre-set level;
If being higher than, it is determined that for the audio data to be sent to the encoding rate of the wireless audio playback equipment.
8. a kind of data transmission device, which is characterized in that be applied to electronic equipment, described device includes:
Detection unit, for detecting whether the electronic equipment receives when electronic equipment connects wireless audio playback equipment The playing request of audio data;
Determination unit, if determining the corresponding encoding rate of the audio data for receiving playing request;
Unit is improved, for the corresponding relationship according to preset bandwidth and encoding rate, improves the electronic equipment and described wireless The bandwidth of destination data link between audio-frequence player device;
Transmission unit, for by the destination data link after raising bandwidth, the audio data to be sent to the wireless sound Frequency playback equipment.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Memory;
One or more application program, wherein one or more of application programs are stored in the memory and are configured To be executed by one or more of processors, one or more of programs are configured to carry out as claim 1-7 is any Method described in.
10. a kind of computer-readable medium, which is characterized in that be stored with program generation in the computer-readable storage medium Code, said program code can be called by processor and execute any one of claim 1-7 the method.
CN201810923390.8A 2018-08-14 2018-08-14 Data transmission method and device, electronic equipment and computer readable medium Active CN109150399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810923390.8A CN109150399B (en) 2018-08-14 2018-08-14 Data transmission method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810923390.8A CN109150399B (en) 2018-08-14 2018-08-14 Data transmission method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN109150399A true CN109150399A (en) 2019-01-04
CN109150399B CN109150399B (en) 2021-04-13

Family

ID=64792974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810923390.8A Active CN109150399B (en) 2018-08-14 2018-08-14 Data transmission method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN109150399B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191461A (en) * 2019-06-14 2019-08-30 Oppo广东移动通信有限公司 Data transfer control method, device and electronic equipment
CN111432384A (en) * 2020-03-18 2020-07-17 合肥讯飞读写科技有限公司 Large data volume audio Bluetooth real-time transmission method for equipment with recording function
CN111465873A (en) * 2019-01-16 2020-07-28 深圳市大疆创新科技有限公司 Data sending method and electronic equipment
CN111466910A (en) * 2020-04-30 2020-07-31 电子科技大学 Sleep monitoring method, system, storage medium, computer program and device
CN111552454A (en) * 2020-04-29 2020-08-18 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and storage medium
WO2021120570A1 (en) * 2019-12-17 2021-06-24 中兴通讯股份有限公司 Bluetooth audio transmission method and apparatus, terminal, and readable storage medium
CN113157238A (en) * 2021-04-19 2021-07-23 深圳市艾酷通信软件有限公司 Audio playing method and device, earphone, electronic equipment and storage medium
CN113691745A (en) * 2021-08-13 2021-11-23 中国科学院上海技术物理研究所 Method and system for acquiring high-speed data at front end of infrared camera and satellite-borne infrared camera
CN113766306A (en) * 2021-04-21 2021-12-07 腾讯科技(北京)有限公司 Method and device for detecting video jamming, computer equipment and storage medium
CN113838470A (en) * 2021-09-15 2021-12-24 Oppo广东移动通信有限公司 Audio processing method, device, electronic equipment, computer readable medium and product
CN114980041A (en) * 2021-02-19 2022-08-30 Oppo广东移动通信有限公司 WiFi signal scanning method, device, terminal and storage medium
CN115174538A (en) * 2022-06-30 2022-10-11 Oppo广东移动通信有限公司 Data transmission method and device, electronic equipment and computer readable medium
WO2023240561A1 (en) * 2022-06-16 2023-12-21 北京小米移动软件有限公司 Audio processing system and method, and electronic device and storage medium
WO2024055583A1 (en) * 2022-09-15 2024-03-21 哲库科技(上海)有限公司 Audio data transmission method and apparatus, and chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354618A (en) * 2013-06-24 2013-10-16 西安交通大学 HLS-based multi-scenario streaming media adaptive live broadcast method
WO2015043161A1 (en) * 2013-09-26 2015-04-02 华为技术有限公司 Method and device for bandwidth extension
US20170105216A1 (en) * 2015-10-07 2017-04-13 Samsung Electronics Co .. Ltd. Adaptive communication method and apparatus
CN107170460A (en) * 2017-06-30 2017-09-15 深圳Tcl新技术有限公司 Sound quality adjusting method, system, host side and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354618A (en) * 2013-06-24 2013-10-16 西安交通大学 HLS-based multi-scenario streaming media adaptive live broadcast method
WO2015043161A1 (en) * 2013-09-26 2015-04-02 华为技术有限公司 Method and device for bandwidth extension
US20170105216A1 (en) * 2015-10-07 2017-04-13 Samsung Electronics Co .. Ltd. Adaptive communication method and apparatus
CN107170460A (en) * 2017-06-30 2017-09-15 深圳Tcl新技术有限公司 Sound quality adjusting method, system, host side and storage medium

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111465873A (en) * 2019-01-16 2020-07-28 深圳市大疆创新科技有限公司 Data sending method and electronic equipment
CN110191461A (en) * 2019-06-14 2019-08-30 Oppo广东移动通信有限公司 Data transfer control method, device and electronic equipment
CN110191461B (en) * 2019-06-14 2022-05-17 Oppo广东移动通信有限公司 Data transmission control method and device and electronic equipment
WO2021120570A1 (en) * 2019-12-17 2021-06-24 中兴通讯股份有限公司 Bluetooth audio transmission method and apparatus, terminal, and readable storage medium
CN111432384B (en) * 2020-03-18 2023-05-09 合肥讯飞读写科技有限公司 Large-data-volume audio Bluetooth real-time transmission method for equipment with recording function
CN111432384A (en) * 2020-03-18 2020-07-17 合肥讯飞读写科技有限公司 Large data volume audio Bluetooth real-time transmission method for equipment with recording function
CN111552454A (en) * 2020-04-29 2020-08-18 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and storage medium
CN111552454B (en) * 2020-04-29 2023-10-27 广州酷狗计算机科技有限公司 Audio playing method, device, terminal and storage medium
CN111466910A (en) * 2020-04-30 2020-07-31 电子科技大学 Sleep monitoring method, system, storage medium, computer program and device
CN111466910B (en) * 2020-04-30 2023-11-21 电子科技大学 Sleep monitoring method, system, storage medium, computer program and device
CN114980041A (en) * 2021-02-19 2022-08-30 Oppo广东移动通信有限公司 WiFi signal scanning method, device, terminal and storage medium
CN113157238A (en) * 2021-04-19 2021-07-23 深圳市艾酷通信软件有限公司 Audio playing method and device, earphone, electronic equipment and storage medium
CN113766306B (en) * 2021-04-21 2023-11-14 腾讯科技(北京)有限公司 Method, device, computer equipment and storage medium for detecting video clamping
CN113766306A (en) * 2021-04-21 2021-12-07 腾讯科技(北京)有限公司 Method and device for detecting video jamming, computer equipment and storage medium
CN113691745A (en) * 2021-08-13 2021-11-23 中国科学院上海技术物理研究所 Method and system for acquiring high-speed data at front end of infrared camera and satellite-borne infrared camera
CN113691745B (en) * 2021-08-13 2024-09-24 中国科学院上海技术物理研究所 Method and system for collecting high-speed data at front end of infrared camera and satellite-borne infrared camera
CN113838470B (en) * 2021-09-15 2023-10-03 Oppo广东移动通信有限公司 Audio processing method, device, electronic equipment, computer readable medium and product
CN113838470A (en) * 2021-09-15 2021-12-24 Oppo广东移动通信有限公司 Audio processing method, device, electronic equipment, computer readable medium and product
WO2023240561A1 (en) * 2022-06-16 2023-12-21 北京小米移动软件有限公司 Audio processing system and method, and electronic device and storage medium
CN115174538A (en) * 2022-06-30 2022-10-11 Oppo广东移动通信有限公司 Data transmission method and device, electronic equipment and computer readable medium
WO2024055583A1 (en) * 2022-09-15 2024-03-21 哲库科技(上海)有限公司 Audio data transmission method and apparatus, and chip

Also Published As

Publication number Publication date
CN109150399B (en) 2021-04-13

Similar Documents

Publication Publication Date Title
CN109150399A (en) Data transmission method, device, electronic equipment and computer-readable medium
EP3629561B1 (en) Data transmission method and system, and bluetooth headphone
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
WO2020063047A1 (en) Audio playback method and apparatus, electronic device and storage medium
EP3629562B1 (en) Data transmitting method and system
CN109445741B (en) Data transmission method and device, electronic equipment and storage medium
US20200402513A1 (en) Bluetooth speaker base, method and system for controlling thereof
CN109379491A (en) Audio frequency playing method, device, electronic equipment and computer-readable medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
KR102569374B1 (en) How to operate a Bluetooth device
CN109151212B (en) Equipment control method and device and electronic equipment
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN109003618A (en) Coding control method, device, electronic equipment and storage medium
CN113794797B (en) Terminal equipment and method for picking up sound through Bluetooth peripheral
CN109274407B (en) Data transmission method, device, electronic equipment and storage medium
CN109151194A (en) Data transmission method, device, electronic equipment and storage medium
CN113039822B (en) Method and equipment for establishing data channel
CN111199743A (en) Audio coding format determining method and device, storage medium and electronic equipment
CN109257732B (en) Equipment control method and device and electronic equipment
CN110351419B (en) Intelligent voice system and voice processing method thereof
CN113784001A (en) Audio data playing method and device, electronic equipment and storage medium
CN109102816B (en) Encoding control method and device and electronic equipment
CN109298846B (en) Audio transmission method and device, electronic equipment and storage medium
US8660488B2 (en) Communication device
CN110212942A (en) Based on voice and the wireless interspeaker supporting lteral data communication and quickly recording

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